Not really a unit test, just trying to find where the problem is
This commit is contained in:
parent
46a4132823
commit
000ae3c392
29
unit-tests/where-does-it-break.sh
Executable file
29
unit-tests/where-does-it-break.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Not really a unit test, but a check to see where bignum addition breaks
|
||||||
|
|
||||||
|
broken=0
|
||||||
|
i=1152921506900200000
|
||||||
|
# we've already proven we can successfullu get up to here
|
||||||
|
increment=10000
|
||||||
|
|
||||||
|
while [ $broken -eq "0" ]
|
||||||
|
do
|
||||||
|
expr="(+ $i $increment)"
|
||||||
|
# Use sbcl as our reference implementation...
|
||||||
|
expected=`echo "$expr" | sbcl --noinform | grep -v '*'`
|
||||||
|
actual=`echo "$expr" | target/psse | tail -1 | sed 's/\,//g'`
|
||||||
|
|
||||||
|
echo -n "adding $increment to $i: "
|
||||||
|
|
||||||
|
if [ "${expected}" = "${actual}" ]
|
||||||
|
then
|
||||||
|
echo "OK"
|
||||||
|
else
|
||||||
|
echo "Fail: expected '${expected}', got '${actual}'"
|
||||||
|
broken=1
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
i=$expected
|
||||||
|
done
|
Loading…
Reference in a new issue