aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-06-09 00:22:43 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-06-09 00:22:43 -0400
commit4302f276ed3083b4f261f9e50a9546c9877d2785 (patch)
treec857775bf067e7838764125d68210376491058c5 /test/compile_errors.zig
parent12051b02f1f455b85d5a519dd1747a67d4bb68d0 (diff)
parent42c95a64d67ec6fc2839fad36ef50bacc7545258 (diff)
downloadzig-4302f276ed3083b4f261f9e50a9546c9877d2785.tar.gz
zig-4302f276ed3083b4f261f9e50a9546c9877d2785.zip
Merge branch 'kubkon-wasm-instrinsics'
closes #5507
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 17a9e0663e..278d66ab9f 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -7504,4 +7504,22 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
, &[_][]const u8{
":3:52: error: slice '[]const u8' cannot have its bytes reinterpreted",
});
+
+ cases.add("wasmMemorySize is a compile error in non-Wasm targets",
+ \\export fn foo() void {
+ \\ _ = @wasmMemorySize(0);
+ \\ return;
+ \\}
+ , &[_][]const u8{
+ "tmp.zig:2:9: error: @wasmMemorySize is a wasm32 feature only",
+ });
+
+ cases.add("wasmMemoryGrow is a compile error in non-Wasm targets",
+ \\export fn foo() void {
+ \\ _ = @wasmMemoryGrow(0, 1);
+ \\ return;
+ \\}
+ , &[_][]const u8{
+ "tmp.zig:2:9: error: @wasmMemoryGrow is a wasm32 feature only",
+ });
}