mat: add Tridiag to list_test
MODIFY
mat/matrix_test.go
mat/matrix_test.go
@@ -542,7 +542,7 @@ func TestTrace(t *testing.T) {
denseComparison := func(a *Dense) interface{} {
return Trace(a)
}
- testOneInputFunc(t, "Trace", f, denseComparison, sameAnswerFloat, isAnyType, isSquare)
+ testOneInputFunc(t, "Trace", f, denseComparison, sameAnswerFloatApproxTol(1e-15), isAnyType, isSquare)
}
func TestTracer(t *testing.T) {

MODIFY
mat/tridiag_test.go
mat/tridiag_test.go
@@ -325,18 +325,6 @@ func TestTridiagZero(t *testing.T) {
}
}
-func TestTridiagTrace(t *testing.T) {
- t.Parallel()
- for _, n := range []int{1, 2, 3, 4, 7, 10} {
- a, ref := newTestTridiag(n)
- want := ref.Trace()
- got := a.Trace()
- if got != want {
- t.Errorf("Case n=%d: unexpected trace: got %f, want %f", n, got, want)
- }
- }
-}
-
func TestTridiagNorm(t *testing.T) {
t.Parallel()
for _, n := range []int{1, 2, 3, 4, 7, 10} {

mat: add Tridiag to list_test