1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:07:56 -07:00

fix build - misc ... vs ...T fixes

TBR=r
CC=golang-dev
https://golang.org/cl/198081
This commit is contained in:
Russ Cox 2010-02-02 18:19:27 -08:00
parent cd4a684214
commit 8b8c103b2b
4 changed files with 8 additions and 19 deletions

View File

@ -8,7 +8,6 @@ import (
"bytes"
"io/ioutil"
"os"
"reflect"
"strings"
"testing"
)
@ -34,11 +33,8 @@ var pairs = []testpair{
var bigtest = pairs[len(pairs)-1]
func testEqual(t *testing.T, msg string, args ...) bool {
v := reflect.NewValue(args).(*reflect.StructValue)
v1 := v.Field(v.NumField() - 2)
v2 := v.Field(v.NumField() - 1)
if v1.Interface() != v2.Interface() {
func testEqual(t *testing.T, msg string, args ...interface{}) bool {
if args[len(args)-2] != args[len(args)-1] {
t.Errorf(msg, args)
return false
}

View File

@ -8,7 +8,6 @@ import (
"bytes"
"io/ioutil"
"os"
"reflect"
"strings"
"testing"
)
@ -48,11 +47,8 @@ var bigtest = testpair{
"VHdhcyBicmlsbGlnLCBhbmQgdGhlIHNsaXRoeSB0b3Zlcw==",
}
func testEqual(t *testing.T, msg string, args ...) bool {
v := reflect.NewValue(args).(*reflect.StructValue)
v1 := v.Field(v.NumField() - 2)
v2 := v.Field(v.NumField() - 1)
if v1.Interface() != v2.Interface() {
func testEqual(t *testing.T, msg string, args ...interface{}) bool {
if args[len(args)-2] != args[len(args)-1] {
t.Errorf(msg, args)
return false
}

View File

@ -8,7 +8,6 @@ import (
"bytes"
"io/ioutil"
"os"
"reflect"
"strings"
"testing"
)
@ -17,11 +16,8 @@ type testpair struct {
decoded, encoded string
}
func testEqual(t *testing.T, msg string, args ...) bool {
v := reflect.NewValue(args).(*reflect.StructValue)
v1 := v.Field(v.NumField() - 2)
v2 := v.Field(v.NumField() - 1)
if v1.Interface() != v2.Interface() {
func testEqual(t *testing.T, msg string, args ...interface{}) bool {
if args[len(args)-2] != args[len(args)-1] {
t.Errorf(msg, args)
return false
}

View File

@ -721,7 +721,8 @@ func (f Format) Sprint(args ...) string {
var buf bytes.Buffer
_, err := f.Fprint(&buf, nil, args)
if err != nil {
fmt.Fprintf(&buf, "--- Sprint(%s) failed: %v", fmt.Sprint(args), err)
var i interface{} = args
fmt.Fprintf(&buf, "--- Sprint(%s) failed: %v", fmt.Sprint(i), err)
}
return buf.String()
}