Commit 1893d3b3 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/big: update and apply vendor.bash

Package-external tests must use the vendored math/big package, not
the original one, otherwise tests may fail if there are discrepancies
in the implementation.

Change-Id: Ic5f0489aa6420ffea1f488633453f871ce1f0f66
Reviewed-on: https://go-review.googlesource.com/10380Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 75250a9f
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
package big_test package big_test
import ( import (
"cmd/compile/internal/big"
"fmt" "fmt"
"log" "log"
"math/big"
) )
func ExampleRat_SetString() { func ExampleRat_SetString() {
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
package big_test package big_test
import ( import (
"cmd/compile/internal/big"
"fmt" "fmt"
"math" "math"
"math/big"
) )
func ExampleFloat_Add() { func ExampleFloat_Add() {
......
...@@ -15,9 +15,15 @@ rm *.go ...@@ -15,9 +15,15 @@ rm *.go
cp $BIGDIR/*.go . cp $BIGDIR/*.go .
# Use pure Go arith ops w/o build tag. # Use pure Go arith ops w/o build tag.
sed 's/^\/\/ \+build math_big_pure_go$//' arith_decl_pure.go > arith_decl.go sed 's|^// \+build math_big_pure_go$||' arith_decl_pure.go > arith_decl.go
rm arith_decl_pure.go rm arith_decl_pure.go
# Import vendored math/big in external tests (e.g., floatexample_test.go).
for f in *_test.go; do
sed 's|"math/big"|"cmd/compile/internal/big"|' $f > foo.go
mv foo.go $f
done
# gofmt to clean up after sed # gofmt to clean up after sed
gofmt -w . gofmt -w .
......
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