diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-02 22:34:51 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-02 22:34:51 +0000 |
commit | 50bc1ed290824218a1bb46f70ec731712da610b0 (patch) | |
tree | 1d3e18cd42de622121b266b93322ec7d6e6c4507 /lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | |
parent | d1932dcdd3e3212ad6ad21f586cfa8a44940b8f9 (diff) | |
download | bcm5719-llvm-50bc1ed290824218a1bb46f70ec731712da610b0.tar.gz bcm5719-llvm-50bc1ed290824218a1bb46f70ec731712da610b0.zip |
[FileSystem] Open File instances through the FileSystem.
This patch modifies how we open File instances in LLDB. Rather than
passing a path or FileSpec to the constructor, we now go through the
virtual file system. This is needed in order to make things work with
the VFS in the future.
Differential revision: https://reviews.llvm.org/D54020
llvm-svn: 346049
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp')
-rw-r--r-- | lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp index 1376f268aa7..5726670b15f 100644 --- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp +++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp @@ -167,7 +167,7 @@ TEST_F(PythonDataObjectsTest, TestDictionaryResolutionWithDot) { } TEST_F(PythonDataObjectsTest, TestPythonInteger) { -// Test that integers behave correctly when wrapped by a PythonInteger. + // Test that integers behave correctly when wrapped by a PythonInteger. #if PY_MAJOR_VERSION < 3 // Verify that `PythonInt` works correctly when given a PyInt object. @@ -557,7 +557,9 @@ TEST_F(PythonDataObjectsTest, TestPythonCallableInvoke) { } TEST_F(PythonDataObjectsTest, TestPythonFile) { - File file(FileSystem::DEV_NULL, File::eOpenOptionRead); + File file; + FileSystem::Instance().Open(file, FileSpec(FileSystem::DEV_NULL), + File::eOpenOptionRead); PythonFile py_file(file, "r"); EXPECT_TRUE(PythonFile::Check(py_file.get())); } |