diff options
| author | Alasdair Armstrong | 2017-11-03 18:15:40 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-11-03 18:15:40 +0000 |
| commit | e43324b207b13d7e4094e2561b4e4a84c76e1299 (patch) | |
| tree | ec3ecf746ac66b13c74cba328536759a4dd0a82a /test/ocaml/pattern1 | |
| parent | 31d548faa0388fc517f2d2ccaee894a71d29698a (diff) | |
Fix ocaml test suite
Diffstat (limited to 'test/ocaml/pattern1')
| -rw-r--r-- | test/ocaml/pattern1/pattern.sail | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/ocaml/pattern1/pattern.sail b/test/ocaml/pattern1/pattern.sail index a2314adc..3c28d46e 100644 --- a/test/ocaml/pattern1/pattern.sail +++ b/test/ocaml/pattern1/pattern.sail @@ -1,11 +1,9 @@ - -val unit -> unit effect pure main +val main : unit -> unit 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") + vec = 0x4F; + match vec { + 0b01 @ x : bits(2) @ 0xF => if x == 0b00 then print("pass") else print("x is incorrect"), + _ => print("pattern fail") } } |
