From 2bf840925ba7781d16406ac28438f8bdc5f7d08c Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Tue, 3 Mar 2020 17:05:28 -0500 Subject: new, better test system --- tests/foreign/foreign.toc | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 tests/foreign/foreign.toc (limited to 'tests/foreign/foreign.toc') 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 -- cgit v1.2.3