[hackers] [scc] Add basic test for enumerations || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 7 Oct 2015 17:44:47 +0200 (CEST)

commit fbc4a2c2bfb90654aafbdaf3c3e2a76b807ea19b
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Oct 6 15:21:30 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Oct 7 15:26:01 2015 +0200

    Add basic test for enumerations

diff --git a/cc1/tests/test035.c b/cc1/tests/test035.c
new file mode 100644
index 0000000..9f283c3
--- /dev/null
+++ b/cc1/tests/test035.c
_AT_@ -0,0 +1,30 @@
+
+/*
+name: TEST035
+description: Basic test for enumerations
+output:
+
+*/
+
+enum E {
+ x,
+ y = 2,
+ z,
+};
+
+
+int
+main()
+{
+ enum E e;
+
+ if(x != 0)
+ return 1;
+ if(y != 2)
+ return 2;
+ if(z != 3)
+ return 3;
+
+ e = x;
+ return x;
+}
Received on Wed Oct 07 2015 - 17:44:47 CEST

This archive was generated by hypermail 2.3.0 : Wed Oct 07 2015 - 17:48:13 CEST