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
This commit is contained in:
Greg Clayton 2014-07-16 00:42:06 +00:00
parent e470771b3a
commit 2c156f852c
1 changed files with 4 additions and 4 deletions

View File

@ -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):