Skip to content

Commit

Permalink
natives/strings: Skip TestBuilderGrow.
Browse files Browse the repository at this point in the history
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 29, 2018
1 parent 2556912 commit d562e02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/natives/src/strings/strings_test.go
Expand Up @@ -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 d562e02

Please sign in to comment.