summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Bauereiss2017-12-06 17:18:36 +0000
committerThomas Bauereiss2017-12-06 17:18:36 +0000
commit2bc281428a3a1d608d56f69e71b50056a25e3da0 (patch)
treedfd8e8a13702696fd9daef64315952b9652f95e8 /test
parentc3c3c40a1d4f81448d8356317e88be2b04363df7 (diff)
parent44e9396fa90ab68ee4c8d9674c6bbad6fc851c6d (diff)
Merge remote branch 'experiments' into experiments
Diffstat (limited to 'test')
-rw-r--r--test/ocaml/short_circuit/expect1
-rw-r--r--test/ocaml/short_circuit/sc.sail15
-rwxr-xr-xtest/typecheck/run_tests.sh4
3 files changed, 18 insertions, 2 deletions
diff --git a/test/ocaml/short_circuit/expect b/test/ocaml/short_circuit/expect
new file mode 100644
index 00000000..9766475a
--- /dev/null
+++ b/test/ocaml/short_circuit/expect
@@ -0,0 +1 @@
+ok
diff --git a/test/ocaml/short_circuit/sc.sail b/test/ocaml/short_circuit/sc.sail
new file mode 100644
index 00000000..a0f4941d
--- /dev/null
+++ b/test/ocaml/short_circuit/sc.sail
@@ -0,0 +1,15 @@
+
+val fail : unit -> bool effect {escape}
+
+function fail () = {
+ assert(false);
+ true
+}
+
+val main : unit -> unit effect {escape}
+
+function main () = {
+ assert(~(false & fail()));
+ assert(true | fail());
+ print("ok")
+} \ No newline at end of file
diff --git a/test/typecheck/run_tests.sh b/test/typecheck/run_tests.sh
index 48cf070b..a2567d21 100755
--- a/test/typecheck/run_tests.sh
+++ b/test/typecheck/run_tests.sh
@@ -62,7 +62,7 @@ for i in `ls $DIR/pass/`;
do
if $SAILDIR/sail -ddump_tc_ast -dsanity $DIR/pass/$i 2> /dev/null 1> $DIR/rtpass/$i;
then
- if $SAILDIR/sail -ddump_tc_ast -dno_cast -dsanity $DIR/rtpass/$i 2> /dev/null 1> $DIR/rtpass2/$i;
+ if $SAILDIR/sail -ddump_tc_ast -dmagic_hash -dno_cast -dsanity $DIR/rtpass/$i 2> /dev/null 1> $DIR/rtpass2/$i;
then
if diff $DIR/rtpass/$i $DIR/rtpass2/$i;
then
@@ -86,7 +86,7 @@ do
then
red "tested $i expecting fail" "pass"
else
- if $SAILDIR/sail -dno_cast -just_check $DIR/rtfail/$i 2> /dev/null;
+ if $SAILDIR/sail -dno_cast -dmagic_hash -just_check $DIR/rtfail/$i 2> /dev/null;
then
yellow "tested $i expecting fail" "passed re-check"
else