diff options
| author | Alasdair Armstrong | 2018-03-02 14:24:00 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-03-02 14:49:40 +0000 |
| commit | aad9ce3bda23efbab03595868bda7fc6dc3e03bf (patch) | |
| tree | 5d0dcb30baf48aaaa934b5bed5d04c2a0d6bb55d /test | |
| parent | 7cfbb697db209b96449a5c311b395d64d99e20a8 (diff) | |
Fix off-by-one error in OCaml for loop compilation
Fix for loop in interactive interpreter
Fixes #8
Diffstat (limited to 'test')
| -rw-r--r-- | test/ocaml/for_bounds/expect | 4 | ||||
| -rw-r--r-- | test/ocaml/for_bounds/for_bounds.sail | 7 | ||||
| -rw-r--r-- | test/ocaml/for_bounds/test.isail | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/test/ocaml/for_bounds/expect b/test/ocaml/for_bounds/expect new file mode 100644 index 00000000..6c06f0e0 --- /dev/null +++ b/test/ocaml/for_bounds/expect @@ -0,0 +1,4 @@ +i=0 +i=1 +i=2 +i=3 diff --git a/test/ocaml/for_bounds/for_bounds.sail b/test/ocaml/for_bounds/for_bounds.sail new file mode 100644 index 00000000..a7388a85 --- /dev/null +++ b/test/ocaml/for_bounds/for_bounds.sail @@ -0,0 +1,7 @@ + +val main : unit -> unit +function main () = { + foreach(i from 0 to 3) { + print_int("i=", i); + } +} diff --git a/test/ocaml/for_bounds/test.isail b/test/ocaml/for_bounds/test.isail new file mode 100644 index 00000000..6a9595e3 --- /dev/null +++ b/test/ocaml/for_bounds/test.isail @@ -0,0 +1,4 @@ +:output result +main() +:run +:quit
\ No newline at end of file |
