Commit f78d4ed30c

Andrew Kelley <superjoe30@gmail.com>
2018-07-14 17:31:46
add an assertion to the test
1 parent 722b9b9
Changed files (1)
test
cases
test/cases/bugs/1230.zig
@@ -1,11 +1,14 @@
+const assert = @import("std").debug.assert;
+
 const S = extern struct {
     x: i32,
 };
 
 extern fn ret_struct() S {
-    return S { .x = 0 };
+    return S{ .x = 42 };
 }
 
 test "extern return small struct (bug 1230)" {
     const s = ret_struct();
+    assert(s.x == 42);
 }