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:
Sebastien Binet
2025-09-01 13:59:42 +02:00
parent 23a9d8b2b9
commit ceaa7d4909
2 changed files with 10 additions and 10 deletions

View File

@@ -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)
}
}

View File

@@ -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)
}
}