]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
strings-1.m: Move to...
authorIain Sandoe <iains@gcc.gnu.org>
Mon, 29 Nov 2010 16:52:41 +0000 (16:52 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 29 Nov 2010 16:52:41 +0000 (16:52 +0000)
gcc/testsuite:

* gcc/testsuite/objc.dg/strings-1.m: Move to...
* gcc/testsuite/objc.dg/strings/strings-1.m: ... here. Update paths.
* gcc/testsuite/objc.dg/strings-2.m: Move to ...
* gcc/testsuite/objc.dg/strings/strings-2.m ... here, provide a
constructor and class reference for NeXT runtime.  Update paths.
* gcc/testsuite/obj-c++.dg/strings-1.m: Move to...
* gcc/testsuite/obj-c++.dg/strings/strings-1.m: ... here. Update paths.
* gcc/testsuite/obj-c++.dg/strings-2.m: Move to ...
* gcc/testsuite/obj-c__.dg/strings/strings-2.m ... here, provide a
constructor and class reference for NeXT runtime.  Update paths.

From-SVN: r167253

gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/strings/strings-1.mm [moved from gcc/testsuite/obj-c++.dg/strings-1.mm with 94% similarity]
gcc/testsuite/obj-c++.dg/strings/strings-2.mm [moved from gcc/testsuite/obj-c++.dg/strings-2.mm with 63% similarity]
gcc/testsuite/objc.dg/strings/strings-1.m [moved from gcc/testsuite/objc.dg/strings-1.m with 94% similarity]
gcc/testsuite/objc.dg/strings/strings-2.m [moved from gcc/testsuite/objc.dg/strings-2.m with 63% similarity]

index 1cfb5b2dfe6b3ee57d6189126d8468c42997b7b0..19080bcb038ba4b63fa6887fbbd9089c23b4015d 100644 (file)
@@ -1,3 +1,16 @@
+2010-11-29  Iain Sandoe  <iains@gcc.gnu.org>
+
+       * gcc/testsuite/objc.dg/strings-1.m: Move to...
+       * gcc/testsuite/objc.dg/strings/strings-1.m: ... here. Update paths.
+       * gcc/testsuite/objc.dg/strings-2.m: Move to ...
+       * gcc/testsuite/objc.dg/strings/strings-2.m ... here, provide a 
+       constructor and class reference for NeXT runtime.  Update paths.
+       * gcc/testsuite/obj-c++.dg/strings-1.m: Move to...
+       * gcc/testsuite/obj-c++.dg/strings/strings-1.m: ... here. Update paths.
+       * gcc/testsuite/obj-c++.dg/strings-2.m: Move to ...
+       * gcc/testsuite/obj-c__.dg/strings/strings-2.m ... here, provide a 
+       constructor and class reference for NeXT runtime.  Update paths.
+       
 2010-11-29  Dodji Seketeli  <dodji@redhat.com>
 
        PR c++/42260
similarity index 94%
rename from gcc/testsuite/obj-c++.dg/strings-1.mm
rename to gcc/testsuite/obj-c++.dg/strings/strings-1.mm
index 2630220618c282607fb4a39eb9be4e44350709d6..fc3f211857aa223ea2cc3043e676ed7dae66ef57 100644 (file)
@@ -1,8 +1,8 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
 
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/next-mapping.h"
 #ifndef __NEXT_RUNTIME__
 #include <objc/NXConstStr.h>
 #endif
similarity index 63%
rename from gcc/testsuite/obj-c++.dg/strings-2.mm
rename to gcc/testsuite/obj-c++.dg/strings/strings-2.mm
index 9b7023a974596113dfc3f2b5a828cca99ea42a2a..09d7a7f1f3205d6cba490652a15d972b7aca6c2d 100644 (file)
@@ -5,10 +5,10 @@
 /* { dg-options "-fconstant-string-class=MyTestString" } */
 /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=MyTestString" { target *-*-darwin* } } */
 
-/* { dg-additional-sources "../objc-obj-c++-shared/Object1.mm" } */
+/* { dg-additional-sources "../../objc-obj-c++-shared/Object1.mm" } */
 
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/next-mapping.h"
 
 #include <stdlib.h> /* For abort() */
 
 }
 @end
 
+#ifdef __NEXT_RUNTIME__
+#  ifdef NEXT_OBJC_USE_NEW_INTERFACE
+struct fudge_objc_class _MyTestStringClassReference;
+#  else
+struct objc_class _MyTestStringClassReference;
+#  endif
+#endif
+
 int main (void)
 {
   MyTestString *test_valid1 = @"test";
@@ -49,3 +57,15 @@ int main (void)
 
   return 0;
 }
+
+#ifdef __NEXT_RUNTIME__
+/* The MyTestString metaclass will need to be initialized before we can
+   send messages to strings.  */
+
+void testsuite_mytest_string_init (void) __attribute__((constructor));
+void testsuite_mytest_string_init (void) {
+  memcpy (&_MyTestStringClassReference,
+         objc_getClass ("MyTestString"),
+         sizeof (_MyTestStringClassReference));
+}
+#endif
\ No newline at end of file
similarity index 94%
rename from gcc/testsuite/objc.dg/strings-1.m
rename to gcc/testsuite/objc.dg/strings/strings-1.m
index 2630220618c282607fb4a39eb9be4e44350709d6..fc3f211857aa223ea2cc3043e676ed7dae66ef57 100644 (file)
@@ -1,8 +1,8 @@
 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
 /* { dg-do compile } */
 
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/next-mapping.h"
 #ifndef __NEXT_RUNTIME__
 #include <objc/NXConstStr.h>
 #endif
similarity index 63%
rename from gcc/testsuite/objc.dg/strings-2.m
rename to gcc/testsuite/objc.dg/strings/strings-2.m
index d69967a6871d726bcefa4cc56c80aaf918016765..29d9375bf7b1f9d98bd33bb1d8e46c854784aebc 100644 (file)
@@ -5,10 +5,10 @@
 /* { dg-options "-fconstant-string-class=MyTestString" } */
 /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=MyTestString" { target *-*-darwin* } } */
 
-/* { dg-additional-sources "../objc-obj-c++-shared/Object1.m" } */
+/* { dg-additional-sources "../../objc-obj-c++-shared/Object1.m" } */
 
-#include "../objc-obj-c++-shared/Object1.h"
-#include "../objc-obj-c++-shared/next-mapping.h"
+#include "../../objc-obj-c++-shared/Object1.h"
+#include "../../objc-obj-c++-shared/next-mapping.h"
 
 #include <stdlib.h> /* For abort() */
 
 }
 @end
 
+#ifdef __NEXT_RUNTIME__
+#  ifdef NEXT_OBJC_USE_NEW_INTERFACE
+struct fudge_objc_class _MyTestStringClassReference;
+#  else
+struct objc_class _MyTestStringClassReference;
+#  endif
+#endif
+
 int main (void)
 {
   MyTestString *test_valid1 = @"test";
@@ -49,3 +57,15 @@ int main (void)
 
   return 0;
 }
+
+#ifdef __NEXT_RUNTIME__
+/* The MyTestString metaclass will need to be initialized before we can
+   send messages to strings.  */
+
+void testsuite_mytest_string_init (void) __attribute__((constructor));
+void testsuite_mytest_string_init (void) {
+  memcpy (&_MyTestStringClassReference,
+         objc_getClass ("MyTestString"),
+         sizeof (_MyTestStringClassReference));
+}
+#endif
\ No newline at end of file