GeezerVison is showing github.com — test: clean up wasm fixtures · nodejs/node@c826af7
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboard +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +;; Compiled using the WebAssembly Tootkit (https://github.com/WebAssembly/wabt) |
| 2 | +;; $ wat2wasm --enable-threads shared-memory.wat -o shared-memory.wasm |
| 3 | + |
| 4 | +(module |
| 5 | + ;; Create shared memory with initial 1 page (64KiB) and max 1 page |
| 6 | + (memory $mem 1 1 shared) |
| 7 | + (export "memory" (memory $mem)) |
| 8 | +) |
Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboard +11Lines changed: 11 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +;; Compiled using the WebAssembly Tootkit (https://github.com/WebAssembly/wabt) |
| 2 | +;; $ wat2wasm simple.wat -o simple.wasm |
| 3 | + |
| 4 | +(module |
| 5 | + (func $add (param $a i32) (param $b i32) (result i32) |
| 6 | + ;; return $a + $b |
| 7 | + (i32.add (get_local $a) (get_local $b)) |
| 8 | + ) |
| 9 | + |
| 10 | + (export "add" (func $add)) |
| 11 | +) |
Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboardExpand all lines: test/fixtures/test.wat -10Lines changed: 0 additions & 10 deletions Collapse file
Copy file name to clipboard Collapse file
Copy file name to clipboardExpand all lines: test/fixtures/wasm-threads-shared-memory.wat -4Lines changed: 0 additions & 4 deletions Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-util-types.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ const { internalBinding } = require('internal/test/binding'); |
9 | 9 | const { JSStream } = internalBinding('js_stream'); |
10 | 10 |
|
11 | 11 | const external = (new JSStream())._externalStream; |
12 | | -const wasmBuffer = fixtures.readSync('test.wasm'); |
| 12 | +const wasmBuffer = fixtures.readSync('simple.wasm'); |
13 | 13 |
|
14 | 14 | for (const [ value, _method ] of [ |
15 | 15 | [ external, 'isExternal' ], |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-v8-serdes.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ const os = require('os'); |
12 | 12 | const circular = {}; |
13 | 13 | circular.circular = circular; |
14 | 14 |
|
15 | | -const wasmModule = new WebAssembly.Module(fixtures.readSync('test.wasm')); |
| 15 | +const wasmModule = new WebAssembly.Module(fixtures.readSync('simple.wasm')); |
16 | 16 |
|
17 | 17 | const objects = [ |
18 | 18 | { foo: 'bar' }, |
@@ -238,5 +238,5 @@ const deserializerTypeError = |
238 | 238 | { |
239 | 239 | const deserializedWasmModule = v8.deserialize(v8.serialize(wasmModule)); |
240 | 240 | const instance = new WebAssembly.Instance(deserializedWasmModule); |
241 | | - assert.strictEqual(instance.exports.addTwo(10, 20), 30); |
| 241 | + assert.strictEqual(instance.exports.add(10, 20), 30); |
242 | 242 | } |