summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/mapping.expect1
-rw-r--r--test/c/mapping.sail17
-rw-r--r--test/c/prelude.expect0
-rw-r--r--test/c/prelude.sail7
4 files changed, 25 insertions, 0 deletions
diff --git a/test/c/mapping.expect b/test/c/mapping.expect
new file mode 100644
index 00000000..49f4aaa8
--- /dev/null
+++ b/test/c/mapping.expect
@@ -0,0 +1 @@
+m() = 1
diff --git a/test/c/mapping.sail b/test/c/mapping.sail
new file mode 100644
index 00000000..3d232a42
--- /dev/null
+++ b/test/c/mapping.sail
@@ -0,0 +1,17 @@
+default Order dec
+
+$include <flow.sail>
+$include <arith.sail>
+
+val m : unit <-> int(1)
+
+mapping m = {
+ () <-> 1
+}
+
+val main : unit -> unit
+
+function main() = {
+ print_int("m() = ", m());
+ m(1)
+} \ No newline at end of file
diff --git a/test/c/prelude.expect b/test/c/prelude.expect
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/c/prelude.expect
diff --git a/test/c/prelude.sail b/test/c/prelude.sail
new file mode 100644
index 00000000..7e217f5d
--- /dev/null
+++ b/test/c/prelude.sail
@@ -0,0 +1,7 @@
+default Order dec
+
+$include <prelude.sail>
+
+val main : unit -> unit
+
+function main() = ()