Skip to content

Commit 1cebcbd

Browse files
authored
Fix the test to match with Matrix value type (#2885)
[no important files changed]
1 parent 023fb73 commit 1cebcbd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

exercises/practice/matrix/matrix_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ func TestNew(t *testing.T) {
162162
}
163163
case err != nil:
164164
t.Fatalf("New(%q) returned error %q. Error not expected", tc.in, err)
165-
case got == nil:
166-
t.Fatalf("New(%q) = %v, want non-nil *Matrix", tc.in, got)
167165
}
168166
})
169167
}
@@ -282,7 +280,7 @@ func BenchmarkNew(b *testing.B) {
282280
b.Fatalf("Failed to create the matrix: %v", err)
283281
}
284282
}
285-
if matrix == nil {
283+
if reflect.DeepEqual(matrix, Matrix{}) {
286284
b.Fatalf("No matrix parsed")
287285
}
288286
}

0 commit comments

Comments
 (0)