diff options
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/unittests/Expression/ClangParserTest.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/unittests/Expression/ClangParserTest.cpp b/lldb/unittests/Expression/ClangParserTest.cpp index 1727be9f01f..c776e48c952 100644 --- a/lldb/unittests/Expression/ClangParserTest.cpp +++ b/lldb/unittests/Expression/ClangParserTest.cpp @@ -9,12 +9,20 @@ #include "Plugins/ExpressionParser/Clang/ClangHost.h" #include "TestingSupport/TestUtilities.h" +#include "lldb/Host/HostInfo.h" #include "lldb/Utility/FileSpec.h" #include "lldb/lldb-defines.h" #include "gtest/gtest.h" using namespace lldb_private; +namespace { +struct ClangHostTest : public testing::Test { + static void SetUpTestCase() { HostInfo::Initialize(); } + static void TearDownTestCase() { HostInfo::Terminate(); } +}; +} // namespace + #ifdef __APPLE__ static std::string ComputeClangDir(std::string lldb_shlib_path, bool verify = false) { @@ -24,7 +32,7 @@ static std::string ComputeClangDir(std::string lldb_shlib_path, return clang_dir.GetPath(); } -TEST(ClangHostTest, MacOSX) { +TEST_F(ClangHostTest, MacOSX) { // This returns whatever the POSIX fallback returns. std::string posix = "/usr/lib/liblldb.dylib"; EXPECT_FALSE(ComputeClangDir(posix).empty()); |