From 7af935ed9a09b1963666c3daf20b4a621ab091eb Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Fri, 5 Aug 2011 21:55:15 +0000 Subject: [PATCH] Fixed test suite failure of test_SBTypeList(). SBTypeList does not have IsValid() method defined. It's always valid in a sense. So the Python's truth value testing in turn delegates to __len__() method, which is defined for SBTypeList, and returns 0. llvm-svn: 136985 --- .../TestDefaultConstructorForAPIObjects.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py index f567ce7fded0..69a455061103 100644 --- a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py +++ b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py @@ -316,7 +316,10 @@ class APIDefaultConstructorTestCase(TestBase): obj = lldb.SBTypeList() if self.TraceOn(): print obj - self.assertTrue(obj) + # SBTypeList does not have IsValid() method defined. It's always valid + # in a sense. So the Python's truth value testing in turn delegates to + # __len__() method, which is defined for SBTypeList, and returns 0. + self.assertFalse(obj) @python_api_test def test_SBValue(self):