core_testing3/postfix_test.sh
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 13:53:37 +0000
changeset 474 b528d1d3d3c3
parent 401 9471c3b7ea02
child 477 a4e1f63157d8
permissions -rwxr-xr-x
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
#!/bin/bash
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
set -euo pipefail
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
out=${1:-output}
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
echo -e "" > $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
     9
echo -e "Below is the feedback for your submission postfix.scala and postfix2.scala" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
echo -e "" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    12
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
# compilation tests
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
function scala_compile {
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    16
  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli compile "$1" 2> c$out 1> c$out)
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
}
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
# functional tests
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
function scala_assert {
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    22
  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli -i "$1" "$2" -e "urbanmain()" 2> /dev/null 1> /dev/null)
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
}
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
# purity test
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
function scala_vars {
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    27
   (sed 's/immutable/ok/g' c$out > cb$out;
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    28
    egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' cb$out 2> /dev/null 1> /dev/null)
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
}
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    32
# compilation test
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    33
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    34
echo -e "postfix.scala runs?" >> $out
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    35
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    36
if (scala_compile postfix.scala)
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    37
then
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 346
diff changeset
    38
    echo -e "  --> passed" >> $out
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    39
    tsts=$(( 0 ))
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    40
  else
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    41
      echo -e "  --> SCALA DID NOT RUN postfix.scala\n" >> $out
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    42
      echo -e "  --> try running scala-cli compile postfix.scala on your own computer\n" >> $out
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    43
    tsts=$(( 1 )) 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    44
fi
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    45
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    46
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
# var, return, ListBuffer test
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
#
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
echo -e "postfix.scala does not contain vars, returns etc?" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    51
if  [ $tsts -eq 0 ]
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    52
then 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    53
    if (scala_vars postfix.scala)
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    54
    then
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    55
	echo -e "   --> FAIL (make triple-sure your program conforms to the required format)" >> $out 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    56
	tsts=$(( 1 ))
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    57
    else
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 346
diff changeset
    58
	echo -e "  --> passed" >> $out
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    59
	tsts=$(( 0 )) 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    60
    fi
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
### postfix tests
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    66
if [ $tsts -eq 0 ]
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
then
250
1b08b8ac13fd updated
Christian Urban <urbanc@in.tum.de>
parents: 249
diff changeset
    68
  echo -e " syard(split(\"3 + 4 * ( 2 - 1 )\")) == List(\"3\", \"4\", \"2\", \"1\", \"-\", \"\*\", \"+\")" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
  echo -e " syard(split(\"( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )\")) == List(\"3\", \"4\", \"5\", \"+\", \"+\")" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
  echo -e " syard(split(\"5 + 7 / 2\")) == List(\"5\", \"7\", \"2\", \"/\", \"+\")" >> $out
250
1b08b8ac13fd updated
Christian Urban <urbanc@in.tum.de>
parents: 249
diff changeset
    71
  echo -e " syard(split(\"5 * 7 / 2\")) == List(\"5\", \"7\", \"\*\", \"2\", \"/\")" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
  
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    73
  if (scala_assert "postfix.scala" "postfix_test1.scala")
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
  then
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
    echo -e "  --> success" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
  else
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
    echo -e "  --> \n ONE TEST FAILED\n" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
  fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
    83
if [ $tsts -eq 0 ]
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
then
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  echo -e " compute(syard(split(\"3 + 4 * ( 2 - 1 )\"))) == 7" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
  echo -e " compute(syard(split(\"10 + 12 * 33\"))) == 406" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  echo -e " compute(syard(split(\"( 5 + 7 ) * 2\"))) == 24" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
  echo -e " compute(syard(split(\"5 + 7 / 2\"))) == 8" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  echo -e " compute(syard(split(\"5 * 7 / 2\"))) == 17" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  echo -e " compute(syard(split(\"9 + 24 / ( 7 - 3 )\"))) == 15" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
    92
  if (scala_assert "postfix.scala" "postfix_test2.scala")
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  then
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
    echo -e "  --> success" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  else
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
    echo -e "  --> \n ONE TEST FAILED\n" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
300
72688efdf17c updated testing files
Christian Urban <urbanc@in.tum.de>
parents: 266
diff changeset
   100
echo -e "" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
### postfix2 tests
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   104
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   105
# compilation test
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   106
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   107
echo -e "postfix2.scala runs?" >> $out
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   108
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   109
if (scala_compile postfix2.scala)
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   110
then
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 346
diff changeset
   111
    echo -e "  --> passed" >> $out
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   112
    tsts1=$(( 0 ))
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   113
else
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   114
    echo -e "  --> SCALA DID NOT RUN postfix2.scala\n" >> $out
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
   115
    echo -e "  --> try running scala-cli compile postfix2.scala on your own computer\n" >> $out
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   116
    tsts1=$(( 1 )) 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   117
fi
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   118
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   119
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
# var, return, ListBuffer test
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
#
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
echo -e "\n\npostfix2.scala does not contain vars, returns etc?" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   124
if [ $tsts1 -eq 0 ]
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
then
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   126
    if (scala_vars postfix2.scala)
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   127
    then
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   128
	echo -e "   --> FAIL (make triple-sure your program conforms to the required format)" >> $out 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   129
	tsts1=$(( 1 ))
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   130
    else
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 346
diff changeset
   131
	echo -e "  --> passed" >> $out
346
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   132
	tsts1=$(( 0 )) 
663c2a9108d1 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 300
diff changeset
   133
    fi
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
if [ $tsts1 -eq 0 ]
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
then
250
1b08b8ac13fd updated
Christian Urban <urbanc@in.tum.de>
parents: 249
diff changeset
   139
  echo -e " syard(split(\"3 + 4 * ( 2 - 1 )\")) == List(\"3\", \"4\", \"2\", \"1\", \"-\", \"\*\", \"+\")" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
  echo -e " syard(split(\"( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )\")) == List(\"3\", \"4\", \"5\", \"+\", \"+\")" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
  echo -e " syard(split(\"5 + 7 / 2\")) == List(\"5\", \"7\", \"2\", \"/\", \"+\")" >> $out
250
1b08b8ac13fd updated
Christian Urban <urbanc@in.tum.de>
parents: 249
diff changeset
   142
  echo -e " syard(split(\"5 * 7 / 2\")) == List(\"5\", \"7\", \"\*\", \"2\", \"/\")" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  echo -e " syard(split(\"3 + 4 * 8 / ( 5 - 1 ) ^ 2 ^ 3\")) == " >> $out
250
1b08b8ac13fd updated
Christian Urban <urbanc@in.tum.de>
parents: 249
diff changeset
   144
  echo -e "         List(\"3\", \"4\", \"8\", \"\*\", \"5\", \"1\", \"-\", \"2\", \"3\", \"^\", \"^\", \"/\", \"+\")" >> $out
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
  echo -e " " >> $out 
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
  echo -e " compute(syard(split(\"3 + 4 * ( 2 - 1 )\"))) == 7" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
  echo -e " compute(syard(split(\"10 + 12 * 33\"))) == 406" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
  echo -e " compute(syard(split(\"( 5 + 7 ) * 2\"))) == 24" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  echo -e " compute(syard(split(\"5 + 7 / 2\"))) == 8" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
  echo -e " compute(syard(split(\"5 * 7 / 2\"))) == 17" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
  echo -e " compute(syard(split(\"9 + 24 / ( 7 - 3 )\"))) == 15" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
  echo -e " compute(syard(split(\"4 ^ 3 ^ 2\"))) == 262144" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
  echo -e " compute(syard(split(\"4 ^ ( 3 ^ 2 )\"))) == 262144" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
  echo -e " compute(syard(split(\"( 4 ^ 3 ) ^ 2\"))) == 4096" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
  echo -e " compute(syard(split(\"( 3 + 1 ) ^ 2 ^ 3\"))) == 65536" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
  
474
b528d1d3d3c3 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 401
diff changeset
   157
  if (scala_assert "postfix2.scala" "postfix_test3.scala")
249
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
  then
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
    echo -e "  --> success" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
  else
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
    echo -e "  --> \n ONE TEST FAILED\n" >> $out
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
  fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
fi
1997cfcd6334 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164