diff tests/t24.c @ 94:de18d1ac7d34

add some testing of arithmetic
author David A. Holland
date Mon, 10 Jun 2013 23:23:01 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/t24.c	Mon Jun 10 23:23:01 2013 -0400
@@ -0,0 +1,67 @@
+#if 0
+wrong
+#endif
+
+#if 1
+right
+#endif
+
+#if -1
+right
+#endif
+
+#if 0 + 0
+wrong
+#endif
+
+#if 1 + 1
+right
+#endif
+
+#if 1 - 1
+wrong
+#endif
+
+#if -1 + 1
+wrong
+#endif
+
+#if 3 - 2 - 1
+wrong
+#endif
+
+#if 3 * 2 - 6
+wrong
+#endif
+
+#if 6 - 2 * 3
+wrong
+#endif
+
+#if 3 - 3 && 1
+wrong
+#endif
+
+#if 3 - 3 || 0
+wrong
+#endif
+
+#if 1 && 0
+wrong
+#endif
+
+#if 0 && 1
+wrong
+#endif
+
+#if 1 || 0
+right
+#endif
+
+#if 0 || 1
+right
+#endif
+
+#if (0 || 1) && (0 || 0)
+wrong
+#endif