diff options
Diffstat (limited to 'test')
| -rwxr-xr-x | test/builtins/run_tests.py | 3 | ||||
| -rw-r--r-- | test/c/and_block.expect | 1 | ||||
| -rw-r--r-- | test/c/and_block.sail | 14 | ||||
| -rw-r--r-- | test/c/option.sail | 2 | ||||
| -rw-r--r-- | test/c/poly_union.sail | 2 | ||||
| -rw-r--r-- | test/c/poly_union_rev.sail | 2 | ||||
| -rw-r--r-- | test/c/tl_poly_match.expect | 2 | ||||
| -rw-r--r-- | test/c/tl_poly_match.sail | 17 |
8 files changed, 42 insertions, 1 deletions
diff --git a/test/builtins/run_tests.py b/test/builtins/run_tests.py index 0d87e1ec..e1f2927e 100755 --- a/test/builtins/run_tests.py +++ b/test/builtins/run_tests.py @@ -86,7 +86,8 @@ xml += test_c_builtins('C, Constant folding', '-Oconstant_fold') xml += test_ocaml_builtins('OCaml', '') -xml += test_lem_builtins('Lem to OCaml') +# Comment this out for most runs because it's really slow +# xml += test_lem_builtins('Lem to OCaml') xml += '</testsuites>\n' diff --git a/test/c/and_block.expect b/test/c/and_block.expect new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/test/c/and_block.expect @@ -0,0 +1 @@ +2 diff --git a/test/c/and_block.sail b/test/c/and_block.sail new file mode 100644 index 00000000..84baf492 --- /dev/null +++ b/test/c/and_block.sail @@ -0,0 +1,14 @@ +default Order dec + +$include <prelude.sail> + +val "print" : string -> unit + +val main : unit -> unit + +function main() = { + match 432 { + 432 if { (); false } => print("1\n"), + _ => print("2\n") + } +}
\ No newline at end of file diff --git a/test/c/option.sail b/test/c/option.sail index 1ca59372..aedde8ef 100644 --- a/test/c/option.sail +++ b/test/c/option.sail @@ -1,5 +1,7 @@ default Order dec +$include <flow.sail> + val print = "print_endline" : string -> unit val "print_int" : (string, int) -> unit diff --git a/test/c/poly_union.sail b/test/c/poly_union.sail index 02a80e17..ffd51a4c 100644 --- a/test/c/poly_union.sail +++ b/test/c/poly_union.sail @@ -1,5 +1,7 @@ default Order dec +$include <flow.sail> + val print = "print_endline" : string -> unit union ast = { diff --git a/test/c/poly_union_rev.sail b/test/c/poly_union_rev.sail index bc654808..73470456 100644 --- a/test/c/poly_union_rev.sail +++ b/test/c/poly_union_rev.sail @@ -1,5 +1,7 @@ default Order dec +$include <flow.sail> + val print = "print_endline" : string -> unit union option ('a : Type) = { diff --git a/test/c/tl_poly_match.expect b/test/c/tl_poly_match.expect new file mode 100644 index 00000000..1191247b --- /dev/null +++ b/test/c/tl_poly_match.expect @@ -0,0 +1,2 @@ +1 +2 diff --git a/test/c/tl_poly_match.sail b/test/c/tl_poly_match.sail new file mode 100644 index 00000000..14aa1140 --- /dev/null +++ b/test/c/tl_poly_match.sail @@ -0,0 +1,17 @@ +default Order dec + +$include <prelude.sail> + +val "print" : string -> unit + +val f : option(int) -> string + +function f(Some(_)) = "1\n" +and f(None()) = "2\n" + +val main : unit -> unit + +function main() = { + print(f(Some(3))); + print(f(None())); +}
\ No newline at end of file |
