Results are quite disappointing. Resolution on long doubles is nothing like as good as I hoped; they're out by one part in 10^20. All unit tests except one pass, and the one that doesn't is a very minor rounding issue, so I'm calling it good.
26 lines
464 B
Bash
26 lines
464 B
Bash
#!/bin/bash
|
|
|
|
expected='5'
|
|
actual=`echo "(add 2 3)" | target/psse 2> /dev/null | head -2 | tail -1`
|
|
|
|
if [ "${expected}" = "${actual}" ]
|
|
then
|
|
echo "OK"
|
|
else
|
|
echo "Fail: expected '${expected}', got '${actual}'"
|
|
exit 1
|
|
fi
|
|
|
|
expected='5.5'
|
|
actual=`echo "(add 2.5 3)" | target/psse 2> /dev/null | head -2 | tail -1`
|
|
|
|
if [ "${expected}" = "${actual}" ]
|
|
then
|
|
echo "OK"
|
|
exit 0
|
|
else
|
|
echo "Fail: expected '${expected}', got '${actual}'"
|
|
exit 1
|
|
fi
|
|
|