summaryrefslogtreecommitdiff
path: root/test/ocaml/pattern1
diff options
context:
space:
mode:
authorBrian Campbell2017-09-18 16:31:56 +0100
committerBrian Campbell2017-09-18 16:31:56 +0100
commit4d83d5cf11751b990055963797b5919bf7c22b0b (patch)
tree329c2cd838c467430146ceafd662f6a8a7091d40 /test/ocaml/pattern1
parentd7d7b781e91abbefca7e7a037c4109b3db89f958 (diff)
parent4e7a568bb57337d41dda893044ed84b66e62752f (diff)
Merge branch 'experiments' into mono-experiments
Diffstat (limited to 'test/ocaml/pattern1')
-rw-r--r--test/ocaml/pattern1/expect1
-rw-r--r--test/ocaml/pattern1/pattern.sail11
2 files changed, 12 insertions, 0 deletions
diff --git a/test/ocaml/pattern1/expect b/test/ocaml/pattern1/expect
new file mode 100644
index 00000000..2ae28399
--- /dev/null
+++ b/test/ocaml/pattern1/expect
@@ -0,0 +1 @@
+pass
diff --git a/test/ocaml/pattern1/pattern.sail b/test/ocaml/pattern1/pattern.sail
new file mode 100644
index 00000000..a2314adc
--- /dev/null
+++ b/test/ocaml/pattern1/pattern.sail
@@ -0,0 +1,11 @@
+
+val unit -> unit effect pure main
+
+function main () = {
+ vec := 0x4F;
+ switch vec {
+ case (0b01 : (bit[2]) x : 0xF) ->
+ if (x == 0b00) then print("pass") else print("x is incorrect")
+ case _ -> print("pattern fail")
+ }
+}