From d2c1325af0ee17d224af50909f0dbcc70526b98d Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Tue, 4 Jul 2000 11:51:43 +0000 Subject: macro1.c: Add more macro expansion tests. * gcc.dg/cpp/macro1.c: Add more macro expansion tests. * gcc.dg/cpp/strify2.c: Same. From-SVN: r34867 --- gcc/testsuite/gcc.dg/cpp/strify2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/testsuite/gcc.dg/cpp/strify2.c') diff --git a/gcc/testsuite/gcc.dg/cpp/strify2.c b/gcc/testsuite/gcc.dg/cpp/strify2.c index ddde976..18777bd 100644 --- a/gcc/testsuite/gcc.dg/cpp/strify2.c +++ b/gcc/testsuite/gcc.dg/cpp/strify2.c @@ -16,8 +16,9 @@ extern void abort (void); int main (int argc, char *argv[]) { - str (\); /* { dg-warning "valid string" "str(\)" } */ - str (\\\); /* { dg-warning "valid string" "str(\\\)" } */ + str (\); /* { dg-warning "valid string" "str(\\)" } */ + str (\\); /* OK. */ + str (\\\); /* { dg-warning "valid string" "str(\\\\\\)" } */ /* This also serves as a useful test of the value of __INCLUDE_LEVEL. */ if (strcmp (xstr (__INCLUDE_LEVEL__), "0")) @@ -26,6 +27,9 @@ int main (int argc, char *argv[]) if (strcmp(str (__INCLUDE_LEVEL__), "__INCLUDE_LEVEL__")) err ("macro name"); + if (strcmp(str(), "") || strcmp(str( ), "")) + err ("empty string"); + if (strcmp(str ("s\n"), "\"s\\n\"")) err ("quoted string"); -- cgit v1.1