Mercurial > hg > dmlib
comparison tests/testeval.sh @ 712:048df6a4b26d
Add tests.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 17 Apr 2013 07:47:30 +0300 |
parents | d51dbf263a59 |
children | 80c3e69aa301 |
comparison
equal
deleted
inserted
replaced
711:4eb5a0d72397 | 712:048df6a4b26d |
---|---|
22 1+3*5&7 | 22 1+3*5&7 |
23 35&3 + 2 | 23 35&3 + 2 |
24 9+5&(3 + 7) | 24 9+5&(3 + 7) |
25 (5*(7&3) + 1) | 25 (5*(7&3) + 1) |
26 123045 >> 1 & 60 | 26 123045 >> 1 & 60 |
27 ~60 | |
28 3 + ~5 | |
29 -~128 | |
30 5-~127 | |
27 " | while read f; do | 31 " | while read f; do |
28 if test "x$f" != "x"; then | 32 if test "x$f" != "x"; then |
29 printf "#include <stdio.h>\nint main(int argc, char *argv[])\n{\n (void) argc; (void) argv;\n printf(\"%%1.5f\\\\n\", (double) (%s));\n return 0;\n}\n" "$f" > "$CTEST.c" | 33 printf "#include <stdio.h>\nint main(int argc, char *argv[])\n{\n (void) argc; (void) argv;\n printf(\"%%1.5f\\\\n\", (double) (%s));\n return 0;\n}\n" "$f" > "$CTEST.c" |
30 gcc -g -o "$CTEST" "$CTEST.c" | 34 gcc -g -o "$CTEST" "$CTEST.c" |
31 if test $? -eq 0; then | 35 if test $? -eq 0; then |