[Lldb-commits] [lldb] r213113 - Fixed the an objective C test case so it passes correctly.

Greg Clayton gclayton at apple.com
Tue Jul 15 17:42:09 PDT 2014


Author: gclayton
Date: Tue Jul 15 19:42:06 2014
New Revision: 213113

URL: http://llvm.org/viewvc/llvm-project?rev=213113&view=rev
Log:
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.


Modified:
    lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py

Modified: lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py?rev=213113&r1=213112&r2=213113&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py Tue Jul 15 19:42:06 2014
@@ -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):





More information about the lldb-commits mailing list