aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index c9855e8606..d4460bbdc2 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -213,6 +213,25 @@ static void add_compiling_test_cases(void) {
exit(0);
}
)SOURCE", "1 is true\n!0 is true\n");
+
+ add_simple_case("params", R"SOURCE(
+ #link("c")
+ extern {
+ fn puts(s: *const u8) -> i32;
+ fn exit(code: i32) -> unreachable;
+ }
+
+ fn add(a: i32, b: i32) -> i32 {
+ a + b
+ }
+
+ export fn _start() -> unreachable {
+ if add(22, 11) == 33 {
+ puts("pass");
+ }
+ exit(0);
+ }
+ )SOURCE", "pass\n");
}
static void add_compile_failure_test_cases(void) {