From 2dfcbdeedb0ac40d4865aaf5c2202dfba95f4a38 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Fri, 14 Dec 2018 15:17:42 +0000 Subject: Add a few more tests for Jenkins Some of the output from the tests scripts is odd on Jenkins, try to fix this by flushing stdout more regularly in the test scripts --- test/c/config.expect | 6 ++++++ test/c/config.sail | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/c/config.expect create mode 100644 test/c/config.sail (limited to 'test/c') diff --git a/test/c/config.expect b/test/c/config.expect new file mode 100644 index 00000000..059a413f --- /dev/null +++ b/test/c/config.expect @@ -0,0 +1,6 @@ +x = 3 +Hello +z = 0xFF +x = 4 +World +z = 0xAA diff --git a/test/c/config.sail b/test/c/config.sail new file mode 100644 index 00000000..2902d259 --- /dev/null +++ b/test/c/config.sail @@ -0,0 +1,34 @@ +default Order dec + +$include +$include + +val "print" : string -> unit + +register q : int + +register configuration x : int = 3 + +register configuration y : string = "Hello\n" + +register configuration z : bits(8) = 0xFF + +val init : unit -> unit effect {configuration} + +function init() = { + x = 4; + y = "World\n"; + z = 0xAA; +} + +val main : unit -> unit effect {configuration} + +function main() = { + print_int("x = ", x); + print(y); + print_bits("z = ", z); + init(); + print_int("x = ", x); + print(y); + print_bits("z = ", z); +} \ No newline at end of file -- cgit v1.2.3