diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-11-20 10:00:40 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-11-20 10:00:40 +0000 |
commit | 2b4bc24677474e24ddf7668ec0fe39ad1c6f6622 (patch) | |
tree | 7fbc1c2fb655e016296a554be5635e846af82dc6 | |
parent | 55fdb7a37fbe8d7b3bee96fb41bfef1975993b9a (diff) |
tests: Add a non-GLib test
As a follow up to commit 915a744037d93abfcaab8b35e98e281cf88bb132, add a
non-GLib test, which checks that scanning a file which doesn’t include
glib.h succeeds.
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/generic-non-glib.head.c | 5 | ||||
-rw-r--r-- | tests/generic-non-glib.tail.c | 1 | ||||
-rw-r--r-- | tests/non-glib.c | 10 |
4 files changed, 19 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index e14fb6e..00c0b4f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,6 +15,7 @@ c_tests = \ gvariant-iter.c \ gvariant-lookup.c \ gvariant-new.c \ + non-glib.c \ nonnull.c \ gerror-api.c \ $(NULL) @@ -26,6 +27,8 @@ templates = \ assertion-return.tail.c \ generic.head.c \ generic.tail.c \ + generic-non-glib.head.c \ + generic-non-glib.tail.c \ gerror.head.c \ gerror.tail.c \ gsignal.head.c \ diff --git a/tests/generic-non-glib.head.c b/tests/generic-non-glib.head.c new file mode 100644 index 0000000..328b19b --- /dev/null +++ b/tests/generic-non-glib.head.c @@ -0,0 +1,5 @@ +#include <stdio.h> + +int +main (void) +{ diff --git a/tests/generic-non-glib.tail.c b/tests/generic-non-glib.tail.c new file mode 100644 index 0000000..5c34318 --- /dev/null +++ b/tests/generic-non-glib.tail.c @@ -0,0 +1 @@ +} diff --git a/tests/non-glib.c b/tests/non-glib.c new file mode 100644 index 0000000..c82dbc9 --- /dev/null +++ b/tests/non-glib.c @@ -0,0 +1,10 @@ +/* Template: generic-non-glib */ + +/* + * No error + */ +{ + // This should compile OK without the checker falling over because + // glib.h has not been included. + printf ("Hello world!\n"); +} |