# HG changeset patch # User David A. Holland # Date 1370920981 14400 # Node ID de18d1ac7d34f2e31bb2c3bca029aa74e084e306 # Parent da557b87be613d5a900bf5a92348e0d6e622da9a add some testing of arithmetic diff -r da557b87be61 -r de18d1ac7d34 tests/Makefile --- a/tests/Makefile Mon Jun 10 23:22:52 2013 -0400 +++ b/tests/Makefile Mon Jun 10 23:23:01 2013 -0400 @@ -3,7 +3,7 @@ TESTS=\ t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15 t16 \ - t17 t18 t19 t20 t21 t22 t23 + t17 t18 t19 t20 t21 t22 t23 t24 all: run-tests .WAIT show-diffs diff -r da557b87be61 -r de18d1ac7d34 tests/t24.c --- /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 diff -r da557b87be61 -r de18d1ac7d34 tests/t24.good --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/t24.good Mon Jun 10 23:23:01 2013 -0400 @@ -0,0 +1,5 @@ +right +right +right +right +right