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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index b57228e50e..bc04d3adcd 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -575,6 +575,7 @@ export fn main(argc : isize, argv : &&u8, env : &&u8) -> i32 {
}
test_point_to_self();
test_byval_assign();
+ test_initializer();
print_str("OK\n");
return 0;
}
@@ -625,6 +626,10 @@ fn test_byval_assign() {
if foo2.a != 1234 { print_str("BAD - byval assignment failed\n"); }
}
+fn test_initializer() {
+ const val = Val { .x = 42 };
+ if val.x != 42 { print_str("BAD\n"); }
+}
)SOURCE", "OK\n");
add_simple_case("global variables", R"SOURCE(