mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Update behavior tests
This commit is contained in:
parent
43cb19ea4d
commit
21f0503c01
@ -2315,6 +2315,7 @@ pub const FuncGen = struct {
|
||||
.wrap_errunion_err => try self.airWrapErrUnionErr(inst),
|
||||
|
||||
.wasm_memory_size => try self.airWasmMemorySize(inst),
|
||||
.wasm_memory_grow => try self.airWasmMemoryGrow(inst),
|
||||
|
||||
.constant => unreachable,
|
||||
.const_ty => unreachable,
|
||||
|
||||
@ -96,6 +96,10 @@ test {
|
||||
_ = @import("behavior/void.zig");
|
||||
_ = @import("behavior/while.zig");
|
||||
|
||||
if (builtin.zig_backend == .stage2_wasm) {
|
||||
_ = @import("behavior/wasm.zig");
|
||||
}
|
||||
|
||||
if (builtin.zig_backend != .stage1) {
|
||||
_ = @import("behavior/decltest.zig");
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
const std = @import("std");
|
||||
const expect = std.testing.expect;
|
||||
const builtin = @import("builtin");
|
||||
|
||||
test "memory size and grow" {
|
||||
if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
|
||||
|
||||
var prev = @wasmMemorySize(0);
|
||||
try expect(prev == @wasmMemoryGrow(0, 1));
|
||||
try expect(prev + 1 == @wasmMemorySize(0));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user