summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/ScriptInterpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/ScriptInterpreter')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt1
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp9
2 files changed, 6 insertions, 4 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
index fdb86db7cf3..618767de91e 100644
--- a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
@@ -6,6 +6,7 @@ add_lldb_unittest(ScriptInterpreterPythonTests
LINK_LIBS
lldbHost
lldbPluginScriptInterpreterPython
+ LLVMTestingSupport
LINK_COMPONENTS
Support
) \ No newline at end of file
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index d43da010b1d..e6d1c4d14b0 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -15,6 +15,7 @@
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/lldb-enumerations.h"
+#include "llvm/Testing/Support/Error.h"
#include "PythonTestSuite.h"
@@ -581,10 +582,10 @@ TEST_F(PythonDataObjectsTest, TestPythonCallableInvoke) {
}
TEST_F(PythonDataObjectsTest, TestPythonFile) {
- File file;
- FileSystem::Instance().Open(file, FileSpec(FileSystem::DEV_NULL),
- File::eOpenOptionRead);
- PythonFile py_file(file, "r");
+ auto file = FileSystem::Instance().Open(FileSpec(FileSystem::DEV_NULL),
+ File::eOpenOptionRead);
+ ASSERT_THAT_EXPECTED(file, llvm::Succeeded());
+ PythonFile py_file(*file.get(), "r");
EXPECT_TRUE(PythonFile::Check(py_file.get()));
}
OpenPOWER on IntegriCloud