diff --git a/README.md b/README.md index 149cbe70..2de4e002 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ Here are the Go packages that can be imported correctly: * [unicode](https://pkg.go.dev/unicode) * [unicode/utf8](https://pkg.go.dev/unicode/utf8) * [unicode/utf16](https://pkg.go.dev/unicode/utf16) +* [math/bits](https://pkg.go.dev/math/bits) ## How to install diff --git a/cl/_testlibgo/math/in.go b/cl/_testlibgo/math/in.go index 2b07ec66..92d94ca5 100644 --- a/cl/_testlibgo/math/in.go +++ b/cl/_testlibgo/math/in.go @@ -6,4 +6,5 @@ import ( func main() { println(bits.Len8(20)) + println(bits.OnesCount(20)) } diff --git a/cl/builtin_test.go b/cl/builtin_test.go index abdbb8e4..5f5a49dd 100644 --- a/cl/builtin_test.go +++ b/cl/builtin_test.go @@ -27,6 +27,12 @@ import ( "golang.org/x/tools/go/ssa" ) +func TestReplaceGoName(t *testing.T) { + if ret := replaceGoName("foo", 0); ret != "foo" { + t.Fatal("replaceGoName:", ret) + } +} + func TestIsAllocVargs(t *testing.T) { if isAllocVargs(nil, ssaAlloc(&ssa.Return{})) { t.Fatal("isVargs?")