Commit 8b8c103b authored by Russ Cox's avatar Russ Cox

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

TBR=r
CC=golang-dev
https://golang.org/cl/198081
parent cd4a6842
......@@ -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
}
......
......@@ -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
}
......
......@@ -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
}
......
......@@ -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()
}
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