diff options
Diffstat (limited to 'lldb/test/lang/objc/foundation/TestObjCMethods2.py')
-rw-r--r-- | lldb/test/lang/objc/foundation/TestObjCMethods2.py | 99 |
1 files changed, 16 insertions, 83 deletions
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods2.py b/lldb/test/lang/objc/foundation/TestObjCMethods2.py index 88fcfc137f5..59eb9955c3c 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods2.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods2.py @@ -12,81 +12,7 @@ import lldbutil class FoundationTestCase2(TestBase): mydir = TestBase.compute_mydir(__file__) - - @dsym_test - def test_more_expr_commands_with_dsym(self): - """More expression commands for objective-c.""" - self.buildDsym() - self.more_expr_objc() - - @dwarf_test - def test_more_expr_commands_with_dwarf(self): - """More expression commands for objective-c.""" - self.buildDwarf() - self.more_expr_objc() - - @dsym_test - def test_NSArray_expr_commands_with_dsym(self): - """Test expression commands for NSArray.""" - self.buildDsym() - self.NSArray_expr() - - @dwarf_test - def test_NSArray_expr_commands_with_dwarf(self): - """Test expression commands for NSArray.""" - self.buildDwarf() - self.NSArray_expr() - - @dsym_test - def test_NSString_expr_commands_with_dsym(self): - """Test expression commands for NSString.""" - self.buildDsym() - self.NSString_expr() - - @dwarf_test - def test_NSString_expr_commands_with_dwarf(self): - """Test expression commands for NSString.""" - self.buildDwarf() - self.NSString_expr() - - @dsym_test - def test_MyString_dump_with_dsym(self): - """Test dump of a known Objective-C object by dereferencing it.""" - self.buildDsym() - self.MyString_dump() - - @dwarf_test - def test_MyString_dump_with_dwarf(self): - """Test dump of a known Objective-C object by dereferencing it.""" - self.buildDwarf() - self.MyString_dump() - - @expectedFailurei386 - @dsym_test - def test_NSError_po_with_dsym(self): - """Test that po of the result of an unknown method doesn't require a cast.""" - self.buildDsym() - self.NSError_po() - - @expectedFailurei386 - @dwarf_test - def test_NSError_po_with_dwarf(self): - """Test that po of the result of an unknown method doesn't require a cast.""" - self.buildDsym() - self.NSError_po() - - @dsym_test - def test_NSError_p_with_dsym(self): - """Test that p of the result of an unknown method does require a cast.""" - self.buildDsym() - self.NSError_p() - - @dwarf_test - def test_NSError_p_with_dwarf(self): - """Test that p of the result of an unknown method does require a cast.""" - self.buildDsym() - self.NSError_p() - + def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -97,9 +23,10 @@ class FoundationTestCase2(TestBase): self.lines.append(line_number('main.m', '// Break here for NSString tests')) self.lines.append(line_number('main.m', '// Break here for description test')) self.lines.append(line_number('main.m', '// Set break point at this line')) - - def more_expr_objc(self): + + def test_more_expr_commands(self): """More expression commands for objective-c.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -133,8 +60,9 @@ class FoundationTestCase2(TestBase): self.runCmd("process continue") - def NSArray_expr(self): + def test_NSArray_expr_commands(self): """Test expression commands for NSArray.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -158,8 +86,9 @@ class FoundationTestCase2(TestBase): patterns = ["\(int\) \$.* = 3"]) self.runCmd("process continue") - def NSString_expr(self): + def test_NSString_expr_commands(self): """Test expression commands for NSString.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -186,8 +115,9 @@ class FoundationTestCase2(TestBase): self.expect('expression str = [NSString stringWithCString: "new"]') self.runCmd("process continue") - def MyString_dump(self): + def test_MyString_dump(self): """Test dump of a known Objective-C object by dereferencing it.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -201,8 +131,10 @@ class FoundationTestCase2(TestBase): patterns = ["\(MyString\) \$.* = ", "\(MyBase\)", "\(NSObject\)", "\(Class\)"]) self.runCmd("process continue") - def NSError_po(self): + @expectedFailurei386 + def test_NSError_po(self): """Test that po of the result of an unknown method doesn't require a cast.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -215,9 +147,10 @@ class FoundationTestCase2(TestBase): self.expect('po [NSError errorWithDomain:@"Hello" code:35 userInfo:@{@"NSDescription" : @"be completed."}]', substrs = ["Error Domain=Hello", "Code=35", "be completed."]) self.runCmd("process continue") - - def NSError_p(self): + + def test_NSError_p(self): """Test that p of the result of an unknown method does require a cast.""" + self.build() exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) |