summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/strings
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/strings')
-rw-r--r--gcc/testsuite/objc.dg/strings/const-cfstring-5.m6
-rw-r--r--gcc/testsuite/objc.dg/strings/const-str-12b.m10
-rw-r--r--gcc/testsuite/objc.dg/strings/strings.exp2
3 files changed, 12 insertions, 6 deletions
diff --git a/gcc/testsuite/objc.dg/strings/const-cfstring-5.m b/gcc/testsuite/objc.dg/strings/const-cfstring-5.m
index 13cb789577..98bb7c5bdd 100644
--- a/gcc/testsuite/objc.dg/strings/const-cfstring-5.m
+++ b/gcc/testsuite/objc.dg/strings/const-cfstring-5.m
@@ -6,16 +6,16 @@
/* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mconstant-cfstrings" } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
-@interface Foo: Object {
+@interface Foo: NSObject {
char *cString;
unsigned int len;
}
+ (Foo *)description;
@end
-@interface Bar: Object
+@interface Bar: NSObject
+ (Foo *) getString: (int) which;
@end
diff --git a/gcc/testsuite/objc.dg/strings/const-str-12b.m b/gcc/testsuite/objc.dg/strings/const-str-12b.m
index 430ab5db2d..d0dfb668ea 100644
--- a/gcc/testsuite/objc.dg/strings/const-str-12b.m
+++ b/gcc/testsuite/objc.dg/strings/const-str-12b.m
@@ -5,17 +5,23 @@
/* { dg-options "-fconstant-string-class=Foo" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#define OBJECT Object
+#endif
#include "../../objc-obj-c++-shared/objc-test-suite-types.h"
-@interface Foo: Object {
+@interface Foo: OBJECT {
char *cString;
unsigned int len;
}
+ (id)description;
@end
-@interface Bar: Object
+@interface Bar: OBJECT
+ (Foo *) getString: (int) which;
@end
diff --git a/gcc/testsuite/objc.dg/strings/strings.exp b/gcc/testsuite/objc.dg/strings/strings.exp
index 823c2871a5..f38e6a35b8 100644
--- a/gcc/testsuite/objc.dg/strings/strings.exp
+++ b/gcc/testsuite/objc.dg/strings/strings.exp
@@ -1,6 +1,6 @@
# String tests that only need to run at default optimization.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#