zig/test/cases/void.zig
Andrew Kelley af536ac343 introduce new test syntax
* remove setFnTest builtin
 * add test "name" { ... } syntax
 * remove --check-unused argument. functions are always lazy now.
2017-03-16 16:02:35 -04:00

19 lines
304 B
Zig

const assert = @import("std").debug.assert;
const Foo = struct {
a: void,
b: i32,
c: void,
};
test "compareVoidWithVoidCompileTimeKnown" {
comptime {
const foo = Foo {
.a = {},
.b = 1,
.c = {},
};
assert(foo.a == {});
}
}