equal
deleted
inserted
replaced
13 |
13 |
14 |
14 |
15 # compilation tests |
15 # compilation tests |
16 |
16 |
17 function scala_compile { |
17 function scala_compile { |
18 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -Xprint:parser "$1" 2> c$out 1> c$out) |
18 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli compile "$1" ) #2> c$out 1> c$out) |
19 } |
19 } |
20 |
20 |
21 # functional tests |
21 # functional tests |
22 |
22 |
23 function scala_assert { |
23 function scala_assert { |
24 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" -- "$2" -e "" 2> /dev/null 1> /dev/null) |
24 (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli -i "$1" "$2" -e "urbanmain()" ) #2> /dev/null 1> /dev/null) |
25 } |
25 } |
26 |
26 |
27 # purity test |
27 # purity test |
|
28 function scala_vars { |
|
29 (sed 's/immutable/ok/g' c$out > cb$out; |
|
30 egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' cb$out 2> /dev/null 1> /dev/null) |
|
31 } |
28 |
32 |
29 function scala_vars { |
|
30 (egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' c$out 2> /dev/null 1> /dev/null) |
|
31 } |
|
32 |
33 |
33 |
34 |
34 ### compilation test |
35 ### compilation test |
35 |
36 |
36 echo -e "collatz.scala runs?" >> $out |
37 echo -e "collatz.scala runs?" >> $out |