diff mbox

[ObjC*/testsuite] amend tests for new features not supported by Darwin < 9.

Message ID 901B1352-5C4D-4231-929C-7A0416B8AFEC@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Feb. 8, 2011, 2:08 p.m. UTC
Hi,

There are still a bunch of  new ObjC tests that for Darwin 8 (because  
it doesn't support API#2 or objc_copyStruct)
this deals with them and restores Darwin-8 to a clean ObjC test-suite  
output.

tested on x86-darwin{8,9,10} , i686-linux, x86_64-linux and cris-elf.

I will apply tomorrow (under Mike's pre-approval for such changes)  
unless there's an earlier OK (or objection, of course).

cheers
Iain


testsuite:

	* objc.dg/special/load-category-1.m: Remove unused header.
	* objc.dg/special/load-category-1a.m: Likewise.
	* objc.dg/special/load-category-2.m: Likewise.
	* objc.dg/special/load-category-2a.m: Likewise.
	* objc.dg/special/load-category-3.m: Likewise.
	* objc.dg/special/load-category-3a.m: Likewise.
	* objc.dg/attributes/proto-attribute-2.m: Likewise.
	* objc.dg/attributes/proto-attribute-3.m: Likewise.
	* objc.dg/attributes/class-attribute-1.m: Likewise.
	* objc.dg/property/property.exp: Don't run for Darwin < 9.
	* obj-c++.dg/property/property.exp: Likewise.
	* objc.dg/attributes/method-sentinel-1.m: Update type header.
	* obj-c++.dg/attributes/method-sentinel-1.mm: Likewise.
	* obj-c++.dg/attributes/proto-attribute-2.mm: Skip for Darwin < 9.
	* obj-c++.dg/attributes/class-attribute-1.mm: Likewise.
	* obj-c++.dg/attributes/proto-attribute-3.mm: Likewise.
	* obj-c++.dg/template-8.mm: Likewise.
diff mbox

Patch

Index: gcc/testsuite/objc.dg/special/load-category-1.m
===================================================================
--- gcc/testsuite/objc.dg/special/load-category-1.m	(revision 169914)
+++ gcc/testsuite/objc.dg/special/load-category-1.m	(working copy)
@@ -4,7 +4,6 @@ 
 
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 #include "load-category-1.h"
 
Index: gcc/testsuite/objc.dg/special/load-category-1a.m
===================================================================
--- gcc/testsuite/objc.dg/special/load-category-1a.m	(revision 169914)
+++ gcc/testsuite/objc.dg/special/load-category-1a.m	(working copy)
@@ -2,7 +2,6 @@ 
 
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 #include "load-category-1.h"
 
Index: gcc/testsuite/objc.dg/special/load-category-2.m
===================================================================
--- gcc/testsuite/objc.dg/special/load-category-2.m	(revision 169914)
+++ gcc/testsuite/objc.dg/special/load-category-2.m	(working copy)
@@ -5,7 +5,6 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 #include "load-category-2.h"
 
Index: gcc/testsuite/objc.dg/special/load-category-2a.m
===================================================================
--- gcc/testsuite/objc.dg/special/load-category-2a.m	(revision 169914)
+++ gcc/testsuite/objc.dg/special/load-category-2a.m	(working copy)
@@ -3,7 +3,6 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 #include "load-category-2.h"
 
Index: gcc/testsuite/objc.dg/special/load-category-3.m
===================================================================
--- gcc/testsuite/objc.dg/special/load-category-3.m	(revision 169914)
+++ gcc/testsuite/objc.dg/special/load-category-3.m	(working copy)
@@ -10,7 +10,6 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 #include "load-category-3.h"
 
Index: gcc/testsuite/objc.dg/special/load-category-3a.m
===================================================================
--- gcc/testsuite/objc.dg/special/load-category-3a.m	(revision 169914)
+++ gcc/testsuite/objc.dg/special/load-category-3a.m	(working copy)
@@ -8,7 +8,6 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 #include "load-category-3.h"
 
Index: gcc/testsuite/objc.dg/property/property.exp
===================================================================
--- gcc/testsuite/objc.dg/property/property.exp	(revision 169914)
+++ gcc/testsuite/objc.dg/property/property.exp	(working copy)
@@ -33,8 +33,9 @@  set tests [lsort [glob -nocomplain $srcdir/$subdir
 # Main loop.
 dg-runtest $tests "-fgnu-runtime" $DEFAULT_CFLAGS
 
-# darwin targets can also run code with the NeXT runtime.
-if [istarget "*-*-darwin*" ] {
+# Darwin targets can also run code with the NeXT runtime.
+# but Properties are not supported by the runtime lib before Darwin 9.
+if [istarget "*-*-darwin\[9123\]*" ] {
   dg-runtest $tests "-fnext-runtime" $DEFAULT_CFLAGS
 }
 
Index: gcc/testsuite/objc.dg/attributes/method-sentinel-1.m
===================================================================
--- gcc/testsuite/objc.dg/attributes/method-sentinel-1.m	(revision 169914)
+++ gcc/testsuite/objc.dg/attributes/method-sentinel-1.m	(working copy)
@@ -4,6 +4,7 @@ 
 
 #include <objc/objc.h>
 #include <stdlib.h>
+#include "../../objc-obj-c++-shared/objc-test-suite-types.h"
 
 @interface NSArray
 {
Index: gcc/testsuite/objc.dg/attributes/proto-attribute-2.m
===================================================================
--- gcc/testsuite/objc.dg/attributes/proto-attribute-2.m	(revision 169914)
+++ gcc/testsuite/objc.dg/attributes/proto-attribute-2.m	(working copy)
@@ -6,7 +6,6 @@ 
 
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 __attribute__ ((deprecated))
 @protocol DeprecatedProtocol1;
Index: gcc/testsuite/objc.dg/attributes/proto-attribute-3.m
===================================================================
--- gcc/testsuite/objc.dg/attributes/proto-attribute-3.m	(revision 169914)
+++ gcc/testsuite/objc.dg/attributes/proto-attribute-3.m	(working copy)
@@ -6,7 +6,6 @@ 
 
 #include <stdlib.h>
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 __attribute__ ((deprecated))
 @protocol DeprecatedProtocol1
Index: gcc/testsuite/objc.dg/attributes/class-attribute-1.m
===================================================================
--- gcc/testsuite/objc.dg/attributes/class-attribute-1.m	(revision 169914)
+++ gcc/testsuite/objc.dg/attributes/class-attribute-1.m	(working copy)
@@ -3,7 +3,6 @@ 
 /* Test deprecate attribute with an @interface declaration.  */
 
 #include <objc/objc.h>
-#include <objc/runtime.h>
 
 __attribute__ ((deprecated)) 
 @interface DeprecatedClass
Index: gcc/testsuite/obj-c++.dg/property/property.exp
===================================================================
--- gcc/testsuite/obj-c++.dg/property/property.exp	(revision 169914)
+++ gcc/testsuite/obj-c++.dg/property/property.exp	(working copy)
@@ -33,9 +33,10 @@  set tests [lsort [glob -nocomplain $srcdir/$subdir
 # Main loop.
 dg-runtest $tests "-fgnu-runtime" $DEFAULT_OBJCXXFLAGS
 
-# darwin targets can also run code with the NeXT runtime.
-if [istarget "*-*-darwin*" ] {
-dg-runtest $tests "-fnext-runtime" $DEFAULT_OBJCXXFLAGS
+# Darwin targets can also run code with the NeXT runtime.
+# but Properties are not supported by the runtime lib before Darwin 9.
+if [istarget "*-*-darwin\[9123\]*" ] {
+  dg-runtest $tests "-fnext-runtime" $DEFAULT_OBJCXXFLAGS
 }
 
 # All done.
Index: gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm	(revision 169914)
+++ gcc/testsuite/obj-c++.dg/attributes/method-sentinel-1.mm	(working copy)
@@ -4,6 +4,8 @@ 
 
 #include <objc/objc.h>
 #include <stdlib.h>
+/* Ensure a compatible definition of nil.  */
+#include "../../objc-obj-c++-shared/objc-test-suite-types.h"
 
 @interface NSArray
 {
Index: gcc/testsuite/obj-c++.dg/attributes/proto-attribute-2.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/attributes/proto-attribute-2.mm	(revision 169914)
+++ gcc/testsuite/obj-c++.dg/attributes/proto-attribute-2.mm	(working copy)
@@ -1,5 +1,6 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 
 /* Test deprecate attribute with a forward declarations of
    @protocol.  */
Index: gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm	(revision 169914)
+++ gcc/testsuite/obj-c++.dg/attributes/class-attribute-1.mm	(working copy)
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 
 /* Test deprecate attribute with an @interface declaration.  */
 
Index: gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm	(revision 169914)
+++ gcc/testsuite/obj-c++.dg/attributes/proto-attribute-3.mm	(working copy)
@@ -1,6 +1,8 @@ 
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
+/* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 
+
 /* Test deprecate attribute with normal @protocol declarations.  */
 
 
Index: gcc/testsuite/obj-c++.dg/template-8.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/template-8.mm	(revision 169914)
+++ gcc/testsuite/obj-c++.dg/template-8.mm	(working copy)
@@ -3,6 +3,7 @@ 
 /* Author: Fariborz Jahanian <fjahanian@apple.com> */
 /* Adapted by Nicola Pero <nicola.pero@meta-innovation.com> */
 /* { dg-do run } */
+/* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 
 #include <objc/objc.h>