From a0524bd159fece73a18da2f5bca8b369d1a4d6ab Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 16 Oct 2014 23:02:03 +0000 Subject: [PATCH] Fix this test case to actually work - it was relying on a certain 'po' output which wasn't occurring llvm-svn: 219978 --- .../lang/objc/objc-new-syntax/TestObjCNewSyntax.py | 24 +++++++++------------- lldb/test/lang/objc/objc-new-syntax/main.m | 2 ++ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py index 21717b0..cd4f875 100644 --- a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py +++ b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py @@ -15,14 +15,12 @@ class ObjCNewSyntaxTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @dsym_test - @unittest2.expectedFailure def test_expr_with_dsym(self): self.buildDsym() self.expr() @dwarf_test @skipIfLinux - @unittest2.expectedFailure def test_expr_with_dwarf(self): self.buildDwarf() self.expr() @@ -93,34 +91,32 @@ class ObjCNewSyntaxTestCase(TestBase): substrs = ["NSArray", "foo", "bar"]) self.expect("expr --object-description -- @{ @\"key\" : @\"object\" }", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSDictionary", "key", "object"]) + substrs = ["key", "object"]) self.expect("expr --object-description -- @'a'", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", str(ord('a'))]) + substrs = [str(ord('a'))]) self.expect("expr --object-description -- @1", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "1"]) + substrs = ["1"]) self.expect("expr --object-description -- @1l", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "1"]) + substrs = ["1"]) self.expect("expr --object-description -- @1ul", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "1"]) + substrs = ["1"]) self.expect("expr --object-description -- @1ll", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "1"]) + substrs = ["1"]) self.expect("expr --object-description -- @1ull", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "1"]) + substrs = ["1"]) - self.expect("expr --object-description -- @123.45", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "123.45"]) - self.expect("expr --object-description -- @123.45f", VARIABLES_DISPLAYED_CORRECTLY, + self.expect("expr -- @123.45", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["NSNumber", "123.45"]) self.expect("expr --object-description -- @( 1 + 3 )", VARIABLES_DISPLAYED_CORRECTLY, - substrs = ["NSNumber", "4"]) - self.expect("expr --object-description -- @(\"Hello world\" + 6)", VARIABLES_DISPLAYED_CORRECTLY, + substrs = ["4"]) + self.expect("expr -- @((char*)\"Hello world\" + 6)", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["NSString", "world"]) diff --git a/lldb/test/lang/objc/objc-new-syntax/main.m b/lldb/test/lang/objc/objc-new-syntax/main.m index 8b4073e..d77ba5b 100644 --- a/lldb/test/lang/objc/objc-new-syntax/main.m +++ b/lldb/test/lang/objc/objc-new-syntax/main.m @@ -14,6 +14,8 @@ int main() NSMutableDictionary *mutable_dictionary = [NSMutableDictionary dictionaryWithCapacity:1]; [mutable_dictionary addEntriesFromDictionary:immutable_dictionary]; + NSNumber *one = @1; + NSLog(@"Stop here"); // Set breakpoint 0 here. } } -- 2.7.4