summaryrefslogtreecommitdiff
path: root/test/cmplxdivide.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-11-08 15:43:02 -0800
committerRob Pike <r@golang.org>2011-11-08 15:43:02 -0800
commit0f11cfc61b07dc4959bacf613ddfc4704d8c75f0 (patch)
tree8a13cfd19ab9be4e7ada24ea253caef9c01d584d /test/cmplxdivide.go
parentba0a9639eebf5dc9c638633cc4e54338243d1bf8 (diff)
downloadgo-0f11cfc61b07dc4959bacf613ddfc4704d8c75f0.tar.gz
renaming_4: gofix -r everything/but/src/pkg
R=rsc CC=golang-dev http://codereview.appspot.com/5338043
Diffstat (limited to 'test/cmplxdivide.go')
-rw-r--r--test/cmplxdivide.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/cmplxdivide.go b/test/cmplxdivide.go
index 6a67b175d..461ee9796 100644
--- a/test/cmplxdivide.go
+++ b/test/cmplxdivide.go
@@ -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")