diff mbox

ObjC/ObjC++: Additional test for class extensions

Message ID 1292004474.350622050@192.168.2.228
State New
Headers show

Commit Message

Nicola Pero Dec. 10, 2010, 6:07 p.m. UTC
This patch adds a test that class extensions produce an error if compiled
with -fobjc-std=objc1.  It all works fine, I'd just like to have the test
in the testsuite to make sure it keeps working fine in the future. ;-)

Ok to commit ?

Thanks

PS: the ObjC++ check doesn't work due to testsuite issues - a number of other
checks in the same file don't work either.  I'll have to look at that separately.

+/* @end */

Comments

Mike Stump Dec. 10, 2010, 8 p.m. UTC | #1
On Dec 10, 2010, at 10:07 AM, Nicola Pero wrote:
> This patch adds a test that class extensions produce an error if compiled
> with -fobjc-std=objc1.  It all works fine, I'd just like to have the test
> in the testsuite to make sure it keeps working fine in the future. ;-)
> 
> Ok to commit ?

Ok.
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 167680)
+++ ChangeLog   (working copy)
@@ -1,5 +1,11 @@ 
 2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>
 
+       * objc.dg/fobjc-std-1.m: Updated to test that class extensions
+       produce an error with -fobjc-std=objc1.
+       * obj-c++.dg/fobjc-std-1.mm: Same change.
+
+2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>
+
        * objc.dg/class-extension-1.m: New.
        * objc.dg/class-extension-2.m: New.
        * objc.dg/class-extension-3.m: New.
Index: objc.dg/fobjc-std-1.m
===================================================================
--- objc.dg/fobjc-std-1.m       (revision 167679)
+++ objc.dg/fobjc-std-1.m       (working copy)
@@ -65,3 +65,12 @@ 
 {
   return MyRootClass.name; /* { dg-error "not available in Objective.C 1.0" } */
 }
+
+@interface MyRootClass3
+{
+  Class isa;
+}
+@end
+
+@interface MyRootClass3 ()
+@end /* { dg-error "not available in Objective.C 1.0" } */
Index: obj-c++.dg/fobjc-std-1.mm
===================================================================
--- obj-c++.dg/fobjc-std-1.mm   (revision 167679)
+++ obj-c++.dg/fobjc-std-1.mm   (working copy)
@@ -71,3 +71,11 @@ 
   return MyRootClass.name; /* { dg-error "not available in Objective.C 1.0" } */
 }
 
+@interface MyRootClass3
+{
+  Class isa;
+}
+@end
+
+/* There is a problem with the testsuite on the following line; the compiler seems Ok, but the testsuite still barfs.  */
+/* @interface MyRootClass3 () */ /* dg-error "not available in Objective.C 1.0" */