diff -r c40f364d87eb -r b4def82f3f9f testing/collatz_test --- a/testing/collatz_test Sun Nov 05 12:56:55 2017 +0000 +++ b/testing/collatz_test Tue Nov 07 13:08:18 2017 +0000 @@ -15,7 +15,7 @@ # compilation tests function scala_compile { - (ulimit -t 30 -m 1024000 ; scala "$1" 2> $out 1> $out) + (ulimit -t 30 -m 1024000 ; scala "$1" 2>> $out 1>> $out) } # functional tests @@ -40,7 +40,7 @@ echo " --> fail" >> $out tsts0=$(( 1 )) else - echo " --> yes" >> $out + echo " --> success" >> $out tsts0=$(( 0 )) fi @@ -67,6 +67,7 @@ if [ $tsts -eq 0 ] then + echo "collatz.scala tests:" >> $out echo " collatz(1) == 0,1 or 4" >> $out echo " collatz(6) == 9" >> $out echo " collatz(9) == 20" >> $out @@ -83,12 +84,12 @@ if [ $tsts -eq 0 ] then - echo " collatz_max(10) == (9, 20)" >> $out - echo " collatz_max(100) == (97, 119)" >> $out - echo " collatz_max(1000) == (871, 179)" >> $out - echo " collatz_max(10000) == (6171, 262)" >> $out - echo " collatz_max(100000) == (77031, 351)" >> $out - echo " collatz_max(1000000) == (837799, 525)" >> $out + echo " collatz_max(10) == (20, 9)" >> $out + echo " collatz_max(100) == (119, 97)" >> $out + echo " collatz_max(1000) == (179, 871)" >> $out + echo " collatz_max(10000) == (262, 6171)" >> $out + echo " collatz_max(100000) == (351, 77031)" >> $out + echo " collatz_max(1000000) == (525, 837799)" >> $out if (scala_assert "collatz.scala" "collatz_test2.scala") then