summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/single_guard.expect2
-rw-r--r--test/c/single_guard.sail16
2 files changed, 18 insertions, 0 deletions
diff --git a/test/c/single_guard.expect b/test/c/single_guard.expect
new file mode 100644
index 00000000..070cdc2c
--- /dev/null
+++ b/test/c/single_guard.expect
@@ -0,0 +1,2 @@
+In main
+In test
diff --git a/test/c/single_guard.sail b/test/c/single_guard.sail
new file mode 100644
index 00000000..017ed8a5
--- /dev/null
+++ b/test/c/single_guard.sail
@@ -0,0 +1,16 @@
+default Order dec
+
+$include <prelude.sail>
+
+val "print_endline" : string -> unit
+
+val test : unit -> unit
+
+function test(_ if true) = {
+ print_endline("In test")
+}
+
+function main() -> unit = {
+ print_endline("In main");
+ test()
+} \ No newline at end of file