mirror of
https://github.com/golang/go
synced 2025-05-12 04:22:50 +00:00
renaming_4: gofix -r everything/but/src/pkg
R=rsc CC=golang-dev https://golang.org/cl/5338043
This commit is contained in:
doc
misc
src/cmd
cgo
go
godoc
gofix
gofmt
goinstall
gotest
govet
hgpatch
test
@ -9,14 +9,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cmath"
|
||||
"fmt"
|
||||
"math"
|
||||
"math/cmplx"
|
||||
)
|
||||
|
||||
type Test struct{
|
||||
f, g complex128
|
||||
out complex128
|
||||
type Test struct {
|
||||
f, g complex128
|
||||
out complex128
|
||||
}
|
||||
|
||||
var nan = math.NaN()
|
||||
@ -25,9 +25,9 @@ var negzero = math.Copysign(0, -1)
|
||||
|
||||
func calike(a, b complex128) bool {
|
||||
switch {
|
||||
case cmath.IsInf(a) && cmath.IsInf(b):
|
||||
case cmplx.IsInf(a) && cmplx.IsInf(b):
|
||||
return true
|
||||
case cmath.IsNaN(a) && cmath.IsNaN(b):
|
||||
case cmplx.IsNaN(a) && cmplx.IsNaN(b):
|
||||
return true
|
||||
}
|
||||
return a == b
|
||||
@ -36,7 +36,7 @@ func calike(a, b complex128) bool {
|
||||
func main() {
|
||||
bad := false
|
||||
for _, t := range tests {
|
||||
x := t.f/t.g
|
||||
x := t.f / t.g
|
||||
if !calike(x, t.out) {
|
||||
if !bad {
|
||||
fmt.Printf("BUG\n")
|
||||
|
Reference in New Issue
Block a user