core_testing1/collatz_test.sh
changeset 472 6a77c260c8a5
parent 399 b17a98b0c52f
child 474 b528d1d3d3c3
--- a/core_testing1/collatz_test.sh	Wed Nov 01 15:01:32 2023 +0000
+++ b/core_testing1/collatz_test.sh	Thu Nov 02 11:32:10 2023 +0000
@@ -15,20 +15,21 @@
 # compilation tests
 
 function scala_compile {
-  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -Xprint:parser "$1" 2> c$out 1> c$out)
+  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli compile "$1" ) #2> c$out 1> c$out)
 }
 
 # functional tests
 
 function scala_assert {
-  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" -- "$2" -e "" 2> /dev/null 1> /dev/null)
+  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala-cli -i "$1" "$2" -e "urbanmain()" ) #2> /dev/null 1> /dev/null)
 }
 
 # purity test
+function scala_vars {
+   (sed 's/immutable/ok/g' c$out > cb$out;
+    egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' cb$out 2> /dev/null 1> /dev/null)
+}
 
-function scala_vars {
-   (egrep '\bvar\b|\breturn\b|\.par\.|\.par |ListBuffer|AtomicInteger|mutable|util.control|new Array' c$out 2> /dev/null 1> /dev/null)
-}
 
 
 ### compilation test