main_marking5/bf_test.sh
changeset 394 839ad118e467
parent 393 7a9cc14d0912
child 424 daf561a83ba6
equal deleted inserted replaced
393:7a9cc14d0912 394:839ad118e467
   260 ### bfc6 test
   260 ### bfc6 test
   261 
   261 
   262 if [ $tsts -eq 0 ]
   262 if [ $tsts -eq 0 ]
   263 then
   263 then
   264   echo -e " optimise(load_bff(\"benchmark.bf\")).length == 181" | tee -a $out
   264   echo -e " optimise(load_bff(\"benchmark.bf\")).length == 181" | tee -a $out
   265   echo -e " optimise(load_bff(\"mandelbrot.bf\")).length == 11203" | tee -a $out  
   265   echo -e " optimise(load_bff(\"mandelbrot.bf\")).length == 11205" | tee -a $out  
   266   echo -e " run3(\"[-]\", Map(0 -> 100)) == Map(0 -> 0)" | tee -a $out
   266   echo -e " run3(\"[-]\", Map(0 -> 100)) == Map(0 -> 0)" | tee -a $out
   267   echo -e " run3(\"[->+<]\", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)" | tee -a $out
   267   echo -e " run3(\"[->+<]\", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)" | tee -a $out
   268   echo -e " run3(\"[>>+>>+<<<<-]\", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)" | tee -a $out
   268   echo -e " run3(\"[>>+>>+<<<<-]\", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)" | tee -a $out
   269   echo -e " run3(\"\"\"+++++[->++++++++++<]>--<+++[->>++++++++++" | tee -a $out
   269   echo -e " run3(\"\"\"+++++[->++++++++++<]>--<+++[->>++++++++++" | tee -a $out
   270   echo -e "        <<]>>++<<----------[+>.>.<+<]\"\"\") == Map(0 -> 0, 1 -> 58, 2 -> 32)" | tee -a $out
   270   echo -e "        <<]>>++<<----------[+>.>.<+<]\"\"\") == Map(0 -> 0, 1 -> 58, 2 -> 32)" | tee -a $out
   285 ### bfc7 test
   285 ### bfc7 test
   286 
   286 
   287 if [ $tsts -eq 0 ]
   287 if [ $tsts -eq 0 ]
   288 then
   288 then
   289   echo -e " combine(optimise(load_bff(\"benchmark.bf\"))).length == 134" | tee -a $out
   289   echo -e " combine(optimise(load_bff(\"benchmark.bf\"))).length == 134" | tee -a $out
   290   echo -e " combine(optimise(load_bff(\"mandelbrot.bf\"))).length == 6509" | tee -a $out
   290   echo -e " combine(optimise(load_bff(\"mandelbrot.bf\"))).length == 6511" | tee -a $out
   291   echo -e " run4(\"[-]\", Map(0 -> 100)) == Map(0 -> 0)" | tee -a $out
   291   echo -e " run4(\"[-]\", Map(0 -> 100)) == Map(0 -> 0)" | tee -a $out
   292   echo -e " run4(\"[->+<]\", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)" | tee -a $out
   292   echo -e " run4(\"[->+<]\", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)" | tee -a $out
   293   echo -e " run4(\"[>>+>>+<<<<-]\", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)" | tee -a $out
   293   echo -e " run4(\"[>>+>>+<<<<-]\", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)" | tee -a $out
   294   echo -e " run4(\"\"\"+++++[->++++++++++<]>--<+++[->>++++++++++" | tee -a $out
   294   echo -e " run4(\"\"\"+++++[->++++++++++<]>--<+++[->>++++++++++" | tee -a $out
   295   echo -e "        <<]>>++<<----------[+>.>.<+<]\"\"\") == Map(0 -> 0, 1 -> 58, 2 -> 32)" | tee -a $out
   295   echo -e "        <<]>>++<<----------[+>.>.<+<]\"\"\") == Map(0 -> 0, 1 -> 58, 2 -> 32)" | tee -a $out