diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-03 17:05:28 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-03 17:05:28 -0500 |
commit | 2bf840925ba7781d16406ac28438f8bdc5f7d08c (patch) | |
tree | e70ca149eafd8eb4366a6ecf1edb1d4bed9e5aee /tests/foreign | |
parent | 0a3bb0c9ce4a2e96c7be3d0519aa0f5fa458c1af (diff) |
new, better test system
Diffstat (limited to 'tests/foreign')
-rw-r--r-- | tests/foreign/expected | 1 | ||||
-rw-r--r-- | tests/foreign/foreign.toc | 25 | ||||
-rwxr-xr-x | tests/foreign/test.sh | 3 |
3 files changed, 0 insertions, 29 deletions
diff --git a/tests/foreign/expected b/tests/foreign/expected deleted file mode 100644 index af5626b..0000000 --- a/tests/foreign/expected +++ /dev/null @@ -1 +0,0 @@ -Hello, world! diff --git a/tests/foreign/foreign.toc b/tests/foreign/foreign.toc deleted file mode 100644 index d88a223..0000000 --- a/tests/foreign/foreign.toc +++ /dev/null @@ -1,25 +0,0 @@ -fwrite ::= #foreign("fwrite", "libc.so.6") fn (#C &"void const", #C size_t, #C size_t, &u8) #C size_t; -fputc ::= #foreign("fputc", "libc.so.6") fn (#C int, &u8) #C int; - -writes ::= fn(x : []char) { - fwrite(&x[0], 1, x.len as u64, #builtin("stdout")); -}; - -puts ::= fn(x : []char) { - writes(x); - fputc('\n' as i32, #builtin("stdout")); -}; - -hw ::= fn() int { - writes("Hello,"); - if #builtin("compiling") { - writes(" compiling"); - } - puts(" world!"); - 3 -}; - -main ::= fn() { - hw(); - x ::= hw(); -};
\ No newline at end of file diff --git a/tests/foreign/test.sh b/tests/foreign/test.sh deleted file mode 100755 index 1d6eb8f..0000000 --- a/tests/foreign/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -./foreign.bin > got || exit 1 -diff got expected || exit 1 |