From: Greg Clayton Date: Wed, 16 Jul 2014 00:42:06 +0000 (+0000) Subject: Fixed the an objective C test case so it passes correctly. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c156f852c6e52772b06c6342c1b03a64e7f06e7;p=platform%2Fupstream%2Fllvm.git Fixed the an objective C test case so it passes correctly. Fixed the test case to use a runtime function prototype that will be correct ([NSString stringWithCString: "new"]) instead of one that won't (expression str = [NSString stringWithFormat: @"%cew", 'N']). The runtime doesn't track vararg functions correctly so we can't reconstitute the function correctly. Also fixed some expressions that used "str_id" whose type was "id" and do the necessary casting since "id" doesn't have any methods. llvm-svn: 213113 --- diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods2.py b/lldb/test/lang/objc/foundation/TestObjCMethods2.py index d113fff..fb74e60 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods2.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods2.py @@ -158,7 +158,6 @@ class FoundationTestCase2(TestBase): patterns = ["\(int\) \$.* = 3"]) self.runCmd("process continue") - @unittest2.expectedFailure(8741897) def NSString_expr(self): """Test expression commands for NSString.""" exe = os.path.join(os.getcwd(), "a.out") @@ -178,12 +177,13 @@ class FoundationTestCase2(TestBase): patterns = ["\(int\) \$.* ="]) self.expect("expression [str description]", patterns = ["\(id\) \$.* = 0x"]) - self.expect("expression [str_id description]", + self.expect("expression (id)[str_id description]", patterns = ["\(id\) \$.* = 0x"]) + self.expect("expression str.length") self.expect("expression str.description") - self.expect("expression str_id.description") self.expect('expression str = @"new"') - self.expect('expression str = [NSString stringWithFormat: @"%cew", \'N\']') + self.runCmd("image lookup -t NSString") + self.expect('expression str = [NSString stringWithCString: "new"]') self.runCmd("process continue") def MyString_dump(self):