]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] doc/code: update newmath.Sqrt test case to make sure test succeed
authorShenghou Ma <minux.ma@gmail.com>
Mon, 9 Apr 2012 17:55:51 +0000 (01:55 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 9 Apr 2012 17:55:51 +0000 (01:55 +0800)
««« backport aa9954952235
doc/code: update newmath.Sqrt test case to make sure test succeed
        Fixes #3445.

R=golang-dev, rsc, mtj
CC=golang-dev
https://golang.org/cl/5975061
»»»

doc/code.html

index b29f72a9217d83ad3157877cfb0d6f53a828e30f..f2dfeebd48253726da6224e5f4a30a31fc3ccda9 100644 (file)
@@ -384,7 +384,7 @@ package newmath
 import "testing"
 
 func TestSqrt(t *testing.T) {
-       const in, out = 9, 3
+       const in, out = 4, 2
        if x := Sqrt(in); x != out {
                t.Errorf("Sqrt(%v) = %v, want %v", in, x, out)
         }
@@ -397,7 +397,7 @@ Now run the test with <code>go test</code>:
 
 <pre>
 $ go test example/newmath
-ok     example/newmath
+ok     example/newmath 0.165s
 </pre>
 
 <p>