mirror of
https://github.com/gonum/gonum.git
synced 2025-10-21 06:09:26 +08:00
testlapack: be more tolerant of singularity misses
Also remove Errorf in favour of Error where possible.
This commit is contained in:
@@ -94,7 +94,7 @@ func Dgetf2Test(t *testing.T, impl Dgetf2er) {
|
||||
},
|
||||
} {
|
||||
if impl.Dgetf2(test.m, test.n, test.a, test.lda, make([]int, min(test.m, test.n))) {
|
||||
t.Errorf("Returned ok with singular matrix.")
|
||||
t.Log("Returned ok with singular matrix.")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,10 +110,10 @@ func checkPLU(t *testing.T, ok bool, m, n, lda int, ipiv []int, factorized, orig
|
||||
}
|
||||
}
|
||||
if hasZeroDiagonal && ok {
|
||||
t.Errorf("Has a zero diagonal but returned ok")
|
||||
t.Error("Has a zero diagonal but returned ok")
|
||||
}
|
||||
if !hasZeroDiagonal && !ok {
|
||||
t.Errorf("Non-zero diagonal but returned !ok")
|
||||
t.Error("Non-zero diagonal but returned !ok")
|
||||
}
|
||||
|
||||
// Check that the LU decomposition is correct.
|
||||
@@ -185,6 +185,6 @@ func checkPLU(t *testing.T, ok bool, m, n, lda int, ipiv []int, factorized, orig
|
||||
t.Errorf("PLU multiplication does not match original matrix.\nWant: %v\nGot: %v", original, aComp.Data)
|
||||
return
|
||||
}
|
||||
t.Errorf("PLU multiplication does not match original matrix.")
|
||||
t.Error("PLU multiplication does not match original matrix.")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user