add test case for previous commit

This commit is contained in:
Andrew Kelley 2019-01-20 14:09:17 -05:00
parent 0d1ce1fb5f
commit 1357bc7430
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -1,6 +1,15 @@
const tests = @import("tests.zig");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
"compile log a pointer to an opaque value",
\\export fn entry() void {
\\ @compileLog(@ptrCast(*const c_void, &entry));
\\}
,
".tmp_source.zig:2:5: error: found compile log statement",
);
cases.add(
"duplicate boolean switch value",
\\comptime {