Fix test error messages
This commit is contained in:
parent
35ff0de855
commit
53c158fbd7
|
@ -188,8 +188,7 @@ func checkFatal(t *testing.T, err error) {
|
||||||
// The failure happens at wherever we were called, not here
|
// The failure happens at wherever we were called, not here
|
||||||
_, file, line, ok := runtime.Caller(1)
|
_, file, line, ok := runtime.Caller(1)
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal()
|
t.Fatalf("Unable to get caller")
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Fatalf("Fail at %v:%v; %v", file, line, err)
|
t.Fatalf("Fail at %v:%v; %v", file, line, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,8 +199,7 @@ func checkRefType(t *testing.T, ref *Reference, kind ReferenceType) {
|
||||||
// The failure happens at wherever we were called, not here
|
// The failure happens at wherever we were called, not here
|
||||||
_, file, line, ok := runtime.Caller(1)
|
_, file, line, ok := runtime.Caller(1)
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal()
|
t.Fatalf("Unable to get caller")
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Fatalf("Wrong ref type at %v:%v; have %v, expected %v", file, line, ref.Type(), kind)
|
t.Fatalf("Wrong ref type at %v:%v; have %v, expected %v", file, line, ref.Type(), kind)
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,6 @@ func TestSubmoduleForeach(t *testing.T) {
|
||||||
checkFatal(t, err)
|
checkFatal(t, err)
|
||||||
|
|
||||||
if i != 1 {
|
if i != 1 {
|
||||||
t.Fatalf("expected one submodule found but got %i", i)
|
t.Fatalf("expected one submodule found but got %d", i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue