diff options
author | Jim Ingham <jingham@apple.com> | 2012-09-22 00:05:11 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-09-22 00:05:11 +0000 |
commit | 63dfc725a7709feee23d9bf8969ccbdd04ce9c87 (patch) | |
tree | 5279ac20e11544907ef22e041f28dc2e123c7be0 /lldb/test/functionalities/data-formatter/data-formatter-objc | |
parent | 1391cc7d516687b293ba713140a60efd9ae2acd2 (diff) | |
download | bcm5719-llvm-63dfc725a7709feee23d9bf8969ccbdd04ce9c87.tar.gz bcm5719-llvm-63dfc725a7709feee23d9bf8969ccbdd04ce9c87.zip |
Fix all the test case breakages caused by folks writing tests all over the place that depended explicitly
on the output of "break set". Please don't do this sort of thing!!!!!
llvm-svn: 164433
Diffstat (limited to 'lldb/test/functionalities/data-formatter/data-formatter-objc')
-rw-r--r-- | lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py | 34 | ||||
-rw-r--r-- | lldb/test/functionalities/data-formatter/data-formatter-objc/main.m | 4 |
2 files changed, 10 insertions, 28 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py index 95022b497f1..ab629105062 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py @@ -8,6 +8,7 @@ import unittest2 import lldb from lldbtest import * import datetime +import lldbutil class ObjCDataFormatterTestCase(TestBase): @@ -111,10 +112,7 @@ class ObjCDataFormatterTestCase(TestBase): """Check that Unicode characters come out of CFString summary correctly.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.expect("breakpoint set -f main.m -l %d" % self.line, - BREAKPOINT_CREATED, - startstr = "Breakpoint created: 1: file ='main.m', line = %d, locations = 1" % - self.line) + lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) @@ -145,10 +143,7 @@ class ObjCDataFormatterTestCase(TestBase): """Test basic ObjC formatting behavior.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.expect("breakpoint set -f main.m -l %d" % self.line, - BREAKPOINT_CREATED, - startstr = "Breakpoint created: 1: file ='main.m', line = %d, locations = 1" % - self.line) + lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) @@ -202,10 +197,7 @@ class ObjCDataFormatterTestCase(TestBase): """Test formatters for AppKit classes.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.expect("breakpoint set -f main.m -l %d" % self.line, - BREAKPOINT_CREATED, - startstr = "Breakpoint created: 1: file ='main.m', line = %d, locations = 1" % - self.line) + lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) @@ -374,10 +366,7 @@ class ObjCDataFormatterTestCase(TestBase): """Test common cases of expression parser <--> formatters interaction.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.expect("breakpoint set -f main.m -l %d" % self.line, - BREAKPOINT_CREATED, - startstr = "Breakpoint created: 1: file ='main.m', line = %d, locations = 1" % - self.line) + lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) @@ -420,10 +409,7 @@ class ObjCDataFormatterTestCase(TestBase): """Test formatters for Core OSX frameworks.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.expect("breakpoint set -f main.m -l %d" % self.line, - BREAKPOINT_CREATED, - startstr = "Breakpoint created: 1: file ='main.m', line = %d, locations = 1" % - self.line) + lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) @@ -477,10 +463,7 @@ class ObjCDataFormatterTestCase(TestBase): """Test the behavior of formatters when KVO is in use.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - self.expect("breakpoint set -f main.m -l %d" % self.line, - BREAKPOINT_CREATED, - startstr = "Breakpoint created: 1: file ='main.m', line = %d, locations = 1" % - self.line) + lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True) self.runCmd("run", RUN_SUCCEEDED) @@ -514,7 +497,8 @@ class ObjCDataFormatterTestCase(TestBase): # check that NSMutableDictionary's formatter is not confused when dealing with a KVO'd dictionary self.expect('frame variable newMutableDictionary', substrs = ['(NSDictionary *) newMutableDictionary = ',' 21 key/value pairs']) - self.runCmd("breakpoint set -r setAtoms") + lldbutil.run_break_set_by_regexp (self, 'setAtoms') + self.runCmd("continue") self.expect("frame variable _cmd",substrs = ['setAtoms:']) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/main.m b/lldb/test/functionalities/data-formatter/data-formatter-objc/main.m index eaf372b6103..aae6479da5f 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/main.m +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/main.m @@ -653,9 +653,7 @@ int main (int argc, const char * argv[]) NSArray *components = @[@"usr", @"blah", @"stuff"]; NSString *path = [NSString pathWithComponents: components]; - // Set break point at this line. - - [molecule addObserver:[My_KVO_Observer new] forKeyPath:@"atoms" options:0 context:NULL]; + [molecule addObserver:[My_KVO_Observer new] forKeyPath:@"atoms" options:0 context:NULL]; // Set break point at this line. [newMutableDictionary addObserver:[My_KVO_Observer new] forKeyPath:@"weirdKeyToKVO" options:NSKeyValueObservingOptionNew context:NULL]; [molecule setAtoms:nil]; |