Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Alasdair committed Dec 2, 2023
1 parent 94eef8e commit c86472b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/c/set_struct.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ok
13 changes: 13 additions & 0 deletions test/c/set_struct.sail
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
default Order dec

$option -undefined_gen

$include <prelude.sail>

struct S = {
f1 : {0, 1}
}

function main() -> unit = {
print_endline("ok");
}
1 change: 1 addition & 0 deletions test/c/set_struct2.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ok
19 changes: 19 additions & 0 deletions test/c/set_struct2.sail
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
default Order dec

$option -undefined_gen

$include <prelude.sail>

$[undefined_gen skip]
struct S = {
f1 : {0, 1}
}

val undefined_S : unit -> S

function undefined_S() = struct { f1 = 0 }

function main() -> unit = {
let _ : S = undefined;
print_endline("ok");
}

0 comments on commit c86472b

Please sign in to comment.