diff options
Diffstat (limited to 'gcc/testsuite/objc/execute/string1.m')
-rw-r--r-- | gcc/testsuite/objc/execute/string1.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/testsuite/objc/execute/string1.m b/gcc/testsuite/objc/execute/string1.m index f0d14731836..fff03c7cfa6 100644 --- a/gcc/testsuite/objc/execute/string1.m +++ b/gcc/testsuite/objc/execute/string1.m @@ -1,8 +1,12 @@ -#include <stdio.h> +/* Based on a test case contributed by Nicola Pero. */ + +#include <string.h> +#include <stdlib.h> #include <objc/NXConstStr.h> int main(int argc, void **args) { - printf ([@"this is a string\n" cString]); + if (strcmp ([@"this is a string" cString], "this is a string")) + abort (); return 0; } |