summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/default-constructor
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-08-05 00:07:41 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-08-05 00:07:41 +0000
commit190f2b1c21a1852e8303ea0d7f0103879c3247b9 (patch)
tree980dcb6960cd7773dc1ef764192cff1652eb3d1c /lldb/test/python_api/default-constructor
parent9e7dbd1cc6582ba72bb5a042996eee8dfcf8bff5 (diff)
downloadbcm5719-llvm-190f2b1c21a1852e8303ea0d7f0103879c3247b9.tar.gz
bcm5719-llvm-190f2b1c21a1852e8303ea0d7f0103879c3247b9.zip
Remove expectedFailure decorator for test_SBType, which does not take an empty constructor after the recent changes.
And remove expectedFailure decorator for test_SBTypeMember, which no longer exists after the recent changes, replace it with test_SBTypeList. llvm-svn: 136947
Diffstat (limited to 'lldb/test/python_api/default-constructor')
-rw-r--r--lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py27
-rw-r--r--lldb/test/python_api/default-constructor/sb_typemember.py18
2 files changed, 15 insertions, 30 deletions
diff --git a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
index 23c96c3f187..f567ce7fded 100644
--- a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -294,26 +294,29 @@ class APIDefaultConstructorTestCase(TestBase):
sb_thread.fuzz_obj(obj)
@python_api_test
- @unittest2.expectedFailure
def test_SBType(self):
- obj = lldb.SBType()
- if self.TraceOn():
- print obj
- self.assertFalse(obj)
+ try:
+ obj = lldb.SBType()
+ if self.TraceOn():
+ print obj
+ self.assertFalse(obj)
+ # If we reach here, the test fails.
+ self.fail("lldb.SBType() should fail, not succeed!")
+ except:
+ # Exception is expected.
+ return
+
+ # Unreachable code because lldb.SBType() should fail.
# Do fuzz testing on the invalid obj, it should not crash lldb.
import sb_type
sb_type.fuzz_obj(obj)
@python_api_test
- @unittest2.expectedFailure
- def test_SBTypeMember(self):
- obj = lldb.SBTypeMember()
+ def test_SBTypeList(self):
+ obj = lldb.SBTypeList()
if self.TraceOn():
print obj
- self.assertFalse(obj)
- # Do fuzz testing on the invalid obj, it should not crash lldb.
- import sb_typemember
- sb_typemember.fuzz_obj(obj)
+ self.assertTrue(obj)
@python_api_test
def test_SBValue(self):
diff --git a/lldb/test/python_api/default-constructor/sb_typemember.py b/lldb/test/python_api/default-constructor/sb_typemember.py
deleted file mode 100644
index 25e3b82005f..00000000000
--- a/lldb/test/python_api/default-constructor/sb_typemember.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import sys
-import lldb
-
-def fuzz_obj(obj):
- obj.IsBaseClass()
- obj.IsBitfield()
- obj.GetBitfieldWidth()
- obj.GetBitfieldOffset()
- obj.GetOffset()
- obj.GetName()
- obj.GetType()
- obj.GetParentType()
- obj.SetName("my_type_member_name")
- obj.Clear()
OpenPOWER on IntegriCloud