Skip to content

Commit 3ce4213

Browse files
committed
misc/wasm: move wasm runtime files to lib/wasm
1 parent d363534 commit 3ce4213

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/syscall/js/js_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// To run these tests:
88
//
99
// - Install Node
10-
// - Add /path/to/go/misc/wasm to your $PATH (so that "go test" can find
10+
// - Add /path/to/go/lib/wasm to your $PATH (so that "go test" can find
1111
// "go_js_wasm_exec").
1212
// - GOOS=js GOARCH=wasm go test
1313
//
@@ -587,13 +587,13 @@ func TestGarbageCollection(t *testing.T) {
587587
// Note: All JavaScript functions return a JavaScript array, which will cause
588588
// one allocation to be created to track the Value.gcPtr for the Value finalizer.
589589
var allocTests = []struct {
590-
argLen int // The number of arguments to use for the syscall
590+
argLen int // The number of arguments to use for the syscall
591591
expected int // The expected number of allocations
592592
}{
593593
// For less than or equal to 16 arguments, we expect 1 alloction:
594594
// - makeValue new(ref)
595-
{0, 1},
596-
{2, 1},
595+
{0, 1},
596+
{2, 1},
597597
{15, 1},
598598
{16, 1},
599599
// For greater than 16 arguments, we expect 3 alloction:
@@ -613,7 +613,7 @@ func TestCallAllocations(t *testing.T) {
613613
tmpArray := js.Global().Get("Array").New(0)
614614
numAllocs := testing.AllocsPerRun(100, func() {
615615
tmpArray.Call("concat", args...)
616-
});
616+
})
617617

618618
if numAllocs != float64(test.expected) {
619619
t.Errorf("got numAllocs %#v, want %#v", numAllocs, test.expected)
@@ -630,7 +630,7 @@ func TestInvokeAllocations(t *testing.T) {
630630
concatFunc := tmpArray.Get("concat").Call("bind", tmpArray)
631631
numAllocs := testing.AllocsPerRun(100, func() {
632632
concatFunc.Invoke(args...)
633-
});
633+
})
634634

635635
if numAllocs != float64(test.expected) {
636636
t.Errorf("got numAllocs %#v, want %#v", numAllocs, test.expected)
@@ -647,7 +647,7 @@ func TestNewAllocations(t *testing.T) {
647647

648648
numAllocs := testing.AllocsPerRun(100, func() {
649649
arrayConstructor.New(args...)
650-
});
650+
})
651651

652652
if numAllocs != float64(test.expected) {
653653
t.Errorf("got numAllocs %#v, want %#v", numAllocs, test.expected)

0 commit comments

Comments
 (0)