1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:44:39 -07:00

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
This commit is contained in:
Shenghou Ma 2012-04-10 01:55:51 +08:00
parent 9bc8dd3985
commit 25e02d519d

View 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>