summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/cheri_capreg.sail2
-rw-r--r--test/mono/mapping.sail16
-rw-r--r--test/mono/pass/mapping1
3 files changed, 18 insertions, 1 deletions
diff --git a/test/c/cheri_capreg.sail b/test/c/cheri_capreg.sail
index d9933a5d..e8890a4a 100644
--- a/test/c/cheri_capreg.sail
+++ b/test/c/cheri_capreg.sail
@@ -244,7 +244,7 @@ function main() = {
print_bits("C01 = ", C01);
print_bits("DDC = ", DDC);
foreach(i from 1 to 3) {
- let idx = to_bits(2, i) in
+ let idx = to_bits(2, i);
writeCapReg(idx, null_cap)
};
print_bits("C03 = ", C03);
diff --git a/test/mono/mapping.sail b/test/mono/mapping.sail
new file mode 100644
index 00000000..ecc06b0b
--- /dev/null
+++ b/test/mono/mapping.sail
@@ -0,0 +1,16 @@
+$include <flow.sail>
+
+/* Trivial example with mapping that doesn't really need monomorphised */
+
+enum foo = {A,B}
+
+mapping map_foo : foo <-> bool = {
+ A <-> true,
+ B <-> false
+}
+
+val run : unit -> unit effect {escape}
+
+function run() = {
+ assert(map_foo(A))
+} \ No newline at end of file
diff --git a/test/mono/pass/mapping b/test/mono/pass/mapping
new file mode 100644
index 00000000..3a95be81
--- /dev/null
+++ b/test/mono/pass/mapping
@@ -0,0 +1 @@
+mapping.sail -auto_mono \ No newline at end of file