summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/default-constructor
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/default-constructor')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
index e48b90e2ee9..75bd4a6760d 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -194,6 +194,20 @@ class APIDefaultConstructorTestCase(TestBase):
@add_test_categories(['pyapi'])
@no_debug_info_test
+ def test_SBFile(self):
+ sbf = lldb.SBFile()
+ self.assertFalse(sbf.IsValid())
+ self.assertFalse(bool(sbf))
+ e, n = sbf.Write(b'foo')
+ self.assertTrue(e.Fail())
+ self.assertEqual(n, 0)
+ buffer = bytearray(100)
+ e, n = sbf.Read(buffer)
+ self.assertEqual(n, 0)
+ self.assertTrue(e.Fail())
+
+ @add_test_categories(['pyapi'])
+ @no_debug_info_test
def test_SBInstruction(self):
obj = lldb.SBInstruction()
if self.TraceOn():
OpenPOWER on IntegriCloud