shithub: scc

Download patch

ref: fbc4a2c2bfb90654aafbdaf3c3e2a76b807ea19b
parent: 4ef8edb2ea08f08fcaf8056909d014ccae1e6455
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Oct 6 11:21:30 EDT 2015

Add basic test for enumerations

--- /dev/null
+++ b/cc1/tests/test035.c
@@ -1,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;
+}