Permalink
Browse files

natives/strings: Skip TestBuilderGrow.

The test has started relying on testing.AllocsPerRun and
runtime.ReadMemStats in Go 1.11, which are not supported
by GopherJS. Skip the test, just like TestBuilderAllocs.

Fixes:

	$ gopherjs test --short strings
	--- FAIL: TestBuilderGrow (0.24s)
	    test.992502099:29524: growLen=100: got 0 allocs during Write; want 1
	    test.992502099:29524: growLen=1000: got 0 allocs during Write; want 1
	    test.992502099:29524: growLen=10000: got 0 allocs during Write; want 1
	    test.992502099:29524: growLen=100000: got 0 allocs during Write; want 1
	FAIL
	FAIL  strings     1.501s
  • Loading branch information...
dmitshur committed Jun 28, 2018
1 parent 4867319 commit 3446fac2d84343b9326d87447f2edf740ba0849e
Showing with 4 additions and 0 deletions.
  1. +4 −0 compiler/natives/src/strings/strings_test.go
@@ -7,3 +7,7 @@ import "testing"
func TestBuilderAllocs(t *testing.T) {
t.Skip("runtime.ReadMemStats, testing.AllocsPerRun not supported in GopherJS")
}
func TestBuilderGrow(t *testing.T) {
t.Skip("runtime.ReadMemStats, testing.AllocsPerRun not supported in GopherJS")
}

0 comments on commit 3446fac

Please sign in to comment.