Skip to content

Go 1.16 support: bufio, crypto/x509, embed/internal/embedtest, sync. #999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .std_test_pkg_exclusions
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ crypto/tls
crypto/x509/pkix
debug/gosym
debug/plan9obj
embed/internal/embedtest
encoding
go/build
go/importer
Expand Down
2 changes: 1 addition & 1 deletion compiler/gopherjspkg/fs_vfsdata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 48 additions & 25 deletions compiler/natives/fs_vfsdata.go

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions compiler/natives/src/bufio/bufio_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//+build js

package bufio_test

import "testing"

func TestReadStringAllocs(t *testing.T) {
t.Skip("Memory allocation counters are not available in GopherJS.")
}
4 changes: 4 additions & 0 deletions compiler/natives/src/crypto/x509/x509_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ func TestSystemRoots(t *testing.T) {
t.Skip("no system roots")
}

func TestLoadSystemCertsLoadColonSeparatedDirs(t *testing.T) {
t.Skip("no system roots")
}

func TestEnvVars(t *testing.T) {
t.Skip("no system roots")
}
Expand Down
9 changes: 9 additions & 0 deletions compiler/natives/src/sync/cond_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//+build js

package sync_test

import "testing"

func TestCondCopy(t *testing.T) {
t.Skip("Copy checker requires raw pointers, which GopherJS doesn't fully support.")
}
7 changes: 0 additions & 7 deletions compiler/natives/src/sync/export_test.go

This file was deleted.

9 changes: 9 additions & 0 deletions compiler/natives/src/sync/map_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//+build js

package sync_test

import "testing"

func TestIssue40999(t *testing.T) {
t.Skip("test relies on runtime.SetFinalizer, which GopherJS does not implement")
}
4 changes: 4 additions & 0 deletions compiler/natives/src/sync/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ func (p *Pool) Put(x interface{}) {
}
p.store = append(p.store, x)
}

// These are referenced by tests, but are no-ops in GopherJS runtime.
func runtime_procPin() int { return 0 }
func runtime_procUnpin() {}
43 changes: 43 additions & 0 deletions compiler/natives/src/sync/pool_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// +build js

package sync_test

import (
. "sync"
"testing"
)

func TestPool(t *testing.T) {
var p Pool
if p.Get() != nil {
t.Fatal("expected empty")
}

p.Put("a")
p.Put("b")

want := []interface{}{"b", "a", nil}
for i := range want {
got := p.Get()
if got != want[i] {
t.Fatalf("Got: p.Get() returned: %s. Want: %s.", got, want)
}
}

}

func TestPoolGC(t *testing.T) {
t.Skip("This test uses runtime.GC(), which GopherJS doesn't support.")
}

func TestPoolRelease(t *testing.T) {
t.Skip("This test uses runtime.GC(), which GopherJS doesn't support.")
}

func TestPoolDequeue(t *testing.T) {
t.Skip("This test targets upstream pool implementation, which is not used by GopherJS.")
}

func TestPoolChain(t *testing.T) {
t.Skip("This test targets upstream pool implementation, which is not used by GopherJS.")
}
23 changes: 0 additions & 23 deletions compiler/natives/src/sync/sync_test.go

This file was deleted.