From 678d260f5b236404d39906696caf34c8ad74c4e0 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Fri, 1 Sep 2017 15:11:56 +0100 Subject: More test cases for ocaml backend --- test/ocaml/pattern1/expect | 1 + test/ocaml/pattern1/pattern.sail | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/ocaml/pattern1/expect create mode 100644 test/ocaml/pattern1/pattern.sail (limited to 'test/ocaml/pattern1') 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") + } +} -- cgit v1.2.3