]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
paste2.c: Update test.
authorNeil Booth <neilb@earthling.net>
Tue, 21 Nov 2000 00:00:50 +0000 (00:00 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Tue, 21 Nov 2000 00:00:50 +0000 (00:00 +0000)
        * gcc.dg/cpp/paste2.c: Update test.
        * objc/execute/paste.m: New test.

From-SVN: r37597

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/paste2.c
gcc/testsuite/objc/execute/paste.m [new file with mode: 0644]

index 6fb01f86b96b925304a4b2901993b37becd1319e..bfb9405e08868c3edf8efbf73a65f867c124c264 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-20  Neil Booth  <neilb@earthling.net>
+
+        * gcc.dg/cpp/paste2.c: Update test.
+        * objc/execute/paste.m: New test.
+
 2000-11-20  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * gcc.dg/c99-condexpr-1.c: New test.
index 97218565f5b01ff8862b0ea7ab0e44f9023e24a5..1958918d1811e7b684638e2fb3a8ec705422c563 100644 (file)
@@ -106,10 +106,12 @@ int main ()
       err ("Various operator pasting");
     if (strcmp (hh, "%:%:"))
       err ("Pasted digraph spelling");
+    if ((glue (., 1) glue (!, =) .1))
+      err ("Pasted numbers 1");
     /* glue3 here will only work if we paste left-to-right.  If a
        future implementation does not do this, change the test.  */
-    if ((glue (., 0) glue (=, =) .0) + (glue3 (1.0e, +, 1) == 10.0) != 2)
-      err ("Pasted numbers");
+    if (glue3 (1.0e, +, 1) != 10.0)
+      err ("Pasted numbers 2");
   }
 
   return 0;
diff --git a/gcc/testsuite/objc/execute/paste.m b/gcc/testsuite/objc/execute/paste.m
new file mode 100644 (file)
index 0000000..ad69f38
--- /dev/null
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.  */
+
+/* { dg-do run } */
+/* { dg-options "" } */
+
+#define str(x) #x
+#define xstr(x) str(x)
+#define glue(x, y) x ## y
+extern int strcmp (const char *, const char *);
+extern int puts (const char *);
+extern void abort (void);
+#define err(str) do { puts(str); abort(); } while (0)
+
+int
+main ()
+{
+  /* Test Objective C names.  */
+  if (strcmp (xstr (glue (@, ident)), "@ident"))
+    err ("Objective C names");
+  return 0;
+}