mirror of
https://github.com/gonum/gonum.git
synced 2025-09-26 19:21:17 +08:00
cmplxs,floats: fix testing.T.Errorf compilation error
This CL fixes the following compilation error while running 'go test': ``` Error: cmplxs/cmplxs_test.go:476:12: non-constant format string in call to (*testing.common).Errorf ``` Signed-off-by: Sebastien Binet <binet@cern.ch>
This commit is contained in:
@@ -473,7 +473,7 @@ func TestFind(t *testing.T) {
|
||||
trueInds := allTrueInds[:2]
|
||||
str := eqIntSlice(inds, trueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Find first two: " + str)
|
||||
t.Errorf("Find first two: %s", str)
|
||||
}
|
||||
|
||||
// Test finding no elements with non nil slice
|
||||
@@ -484,7 +484,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, []int{})
|
||||
if str != "" {
|
||||
t.Errorf("Find no non-nil: " + str)
|
||||
t.Errorf("Find no non-nil: %s", str)
|
||||
}
|
||||
|
||||
// Test finding first two elements with non nil slice
|
||||
@@ -495,7 +495,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, trueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Find first two non-nil: " + str)
|
||||
t.Errorf("Find first two non-nil: %s", str)
|
||||
}
|
||||
|
||||
// Test finding too many elements
|
||||
@@ -505,7 +505,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, allTrueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Request too many: Does not match all of the inds: " + str)
|
||||
t.Errorf("Request too many: Does not match all of the inds: %s", str)
|
||||
}
|
||||
|
||||
// Test finding all elements
|
||||
@@ -515,7 +515,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, allTrueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Find all: Does not match all of the inds: " + str)
|
||||
t.Errorf("Find all: Does not match all of the inds: %s", str)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -570,7 +570,7 @@ func TestFind(t *testing.T) {
|
||||
trueInds := allTrueInds[:2]
|
||||
str := eqIntSlice(inds, trueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Find first two: " + str)
|
||||
t.Errorf("Find first two: %s", str)
|
||||
}
|
||||
|
||||
// Test finding no elements with non nil slice
|
||||
@@ -581,7 +581,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, []int{})
|
||||
if str != "" {
|
||||
t.Errorf("Find no non-nil: " + str)
|
||||
t.Errorf("Find no non-nil: %s", str)
|
||||
}
|
||||
|
||||
// Test finding first two elements with non nil slice
|
||||
@@ -592,7 +592,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, trueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Find first two non-nil: " + str)
|
||||
t.Errorf("Find first two non-nil: %s", str)
|
||||
}
|
||||
|
||||
// Test finding too many elements
|
||||
@@ -602,7 +602,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, allTrueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Request too many: Does not match all of the inds: " + str)
|
||||
t.Errorf("Request too many: Does not match all of the inds: %s", str)
|
||||
}
|
||||
|
||||
// Test finding all elements
|
||||
@@ -612,7 +612,7 @@ func TestFind(t *testing.T) {
|
||||
}
|
||||
str = eqIntSlice(inds, allTrueInds)
|
||||
if str != "" {
|
||||
t.Errorf("Find all: Does not match all of the inds: " + str)
|
||||
t.Errorf("Find all: Does not match all of the inds: %s", str)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user