github.com/goplusjs/gopherjs@v1.2.6-0.20211206034512-f187917453b8/compiler/natives/src/math/math_test.go (about) 1 // +build js 2 3 package math_test 4 5 import ( 6 "testing" 7 ) 8 9 // Slighly higher tolerances than upstream, otherwise TestGamma fails. 10 // TODO: Is there a better way to fix TestGamma? It's weird that only one test 11 // requires increasing tolerances. Perhaps there's a better fix? Maybe we 12 // should override TestGamma specifically and not the package-wide tolerances, 13 // because this will cause many other tests to be less accurate. Or maybe this 14 // is fine? 15 func close(a, b float64) bool { return tolerance(a, b, 4e-14) } 16 func veryclose(a, b float64) bool { return tolerance(a, b, 6e-15) } 17 18 func testExp(t *testing.T, Exp func(float64) float64, name string) { 19 t.Skip("inaccurate") 20 }