add an assertion to the test

This commit is contained in:
Andrew Kelley 2018-07-14 11:31:46 -04:00
parent 722b9b9e59
commit f78d4ed30c

View File

@ -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);
}