summaryrefslogtreecommitdiff
path: root/impl/test/run
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@carlo-laptop>2012-08-06 22:58:29 +1000
committerCarlo Zancanaro <carlo@carlo-laptop>2012-08-06 22:58:29 +1000
commit42e729d20000eb141b2907ad83630af34f4afea3 (patch)
treee231556126d538d6b61fe099c6245176aeb3df15 /impl/test/run
parent77d26a8f2832791587b19351ee1fde207fdda608 (diff)
New variation on the equation system solver.
Much simpler to understand. Basically have a variable assignment which is dynamic and updates with the strategy changes. Similarly have strategy changes easily invalidate the variable assignment. This makes them strongly inter-dependent, but simplifies the implementation considerably. Proving it should be easier like this, too.
Diffstat (limited to 'impl/test/run')
-rw-r--r--impl/test/run19
1 files changed, 15 insertions, 4 deletions
diff --git a/impl/test/run b/impl/test/run
index d238962..b030827 100644
--- a/impl/test/run
+++ b/impl/test/run
@@ -1,16 +1,27 @@
#!/bin/bash
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NUM=1
+FAILED=0
-while [ -f "$NUM.eqns" ]
+echo "Testing binary: $1 in directory $DIR"
+while [ -f "$DIR/$NUM.eqns" ]
do
- OUTPUT=$($1 "$NUM.eqns" smart smart)
- DIFF=$(echo "$OUTPUT" | diff - "$NUM.soln")
+ OUTPUT=$($1 "$DIR/$NUM.eqns" smart smart)
+ DIFF=$(echo "$OUTPUT" | diff - "$DIR/$NUM.soln")
if [ ! -z "$DIFF" ]; then
echo "=================="
echo "Test #$NUM failed:"
- echo "$OUTPUT" | sdiff - "$NUM.soln"
+ echo "$OUTPUT" | sdiff - "$DIR/$NUM.soln"
echo
+ FAILED=$(($FAILED + 1))
fi
NUM=$(($NUM + 1))
done
+
+if [ "$FAILED" -eq "0" ]; then
+ echo "All tests passed."
+fi
+if [ ! "$FAILED" -eq "0" ]; then
+ echo "$FAILED tests failed."
+fi