diff options
| author | Robert Norton | 2018-01-29 15:48:40 +0000 |
|---|---|---|
| committer | Robert Norton | 2018-01-29 15:48:40 +0000 |
| commit | 8406a2ec3aeab4ad573a126adb3393e7033d749b (patch) | |
| tree | fcc43f55251e5b3359671f6111db227aed7f9082 /test | |
| parent | a827c35deba4f3e06034c26ec09aed4b6b5fcd70 (diff) | |
| parent | b8a0efd0043a00447ca4f3aeea75a4e6e024d98b (diff) | |
Merge branch 'sail2' of https://bitbucket.org/Peter_Sewell/sail into sail2
Diffstat (limited to 'test')
| -rw-r--r-- | test/ocaml/string_of_struct/expect | 0 | ||||
| -rw-r--r-- | test/ocaml/string_of_struct/sos.sail | 17 | ||||
| -rw-r--r-- | test/ocaml/string_of_struct/test.isail | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/test/ocaml/string_of_struct/expect b/test/ocaml/string_of_struct/expect new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/ocaml/string_of_struct/expect diff --git a/test/ocaml/string_of_struct/sos.sail b/test/ocaml/string_of_struct/sos.sail new file mode 100644 index 00000000..6d14dfd7 --- /dev/null +++ b/test/ocaml/string_of_struct/sos.sail @@ -0,0 +1,17 @@ +/* This is a regression test for a bug where an option type in a +struct would cause the ocaml backend to generate a bad string_of +function for the struct */ + +union option ('a : Type) = { + None, + Some : 'a +} + +struct test = { + test1 : int, + test2 : option(int) +} + +val main : unit -> unit + +function main () = ()
\ No newline at end of file diff --git a/test/ocaml/string_of_struct/test.isail b/test/ocaml/string_of_struct/test.isail new file mode 100644 index 00000000..6a9595e3 --- /dev/null +++ b/test/ocaml/string_of_struct/test.isail @@ -0,0 +1,4 @@ +:output result +main() +:run +:quit
\ No newline at end of file |
