1 //===- unittests/Driver/ModuleCacheTest.cpp -------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // Unit tests for the LLDB module cache API. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #include "clang/Driver/Driver.h" 15 #include "gtest/gtest.h" 16 using namespace clang; 17 using namespace clang::driver; 18 19 namespace { 20 21 TEST(ModuleCacheTest, GetTargetAndMode) { 22 SmallString<128> Buf; 23 Driver::getDefaultModuleCachePath(Buf); 24 StringRef Path = Buf; 25 EXPECT_TRUE(Path.find("org.llvm.clang") != Path.npos); 26 EXPECT_TRUE(Path.endswith("ModuleCache")); 27 } 28 } // end anonymous namespace. 29