| 1 | const std = @import("std"); |
| 2 | const native_arch = @import("builtin").target.cpu.arch; |
| 3 | const expectEqual = std.testing.expectEqual; |
| 4 | |
| 5 | test "@wasmMemoryGrow" { |
| 6 | if (native_arch != .wasm32) return error.SkipZigTest; |
| 7 | |
| 8 | const prev = @wasmMemorySize(0); |
| 9 | try expectEqual(@wasmMemoryGrow(0, 1), prev); |
| 10 | try expectEqual(@wasmMemorySize(0), prev + 1); |
| 11 | } |
| 12 | |
| 13 | // test |