Commit 25e02d51 authored by Shenghou Ma's avatar Shenghou Ma

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
parent 9bc8dd39
...@@ -384,7 +384,7 @@ package newmath ...@@ -384,7 +384,7 @@ package newmath
import "testing" import "testing"
func TestSqrt(t *testing.T) { func TestSqrt(t *testing.T) {
const in, out = 9, 3 const in, out = 4, 2
if x := Sqrt(in); x != out { if x := Sqrt(in); x != out {
t.Errorf("Sqrt(%v) = %v, want %v", 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>: ...@@ -397,7 +397,7 @@ Now run the test with <code>go test</code>:
<pre> <pre>
$ go test example/newmath $ go test example/newmath
ok example/newmath ok example/newmath 0.165s
</pre> </pre>
<p> <p>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment