Skip to content

Commit 9c86eea

Browse files
committed
test(matrices): update test_linearalgrbra_functions
more friendly error log for finding error function
1 parent 1557fdc commit 9c86eea

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Diff for: test/runtests.jl

+13-12
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ end
1010

1111
function test_linearalgrbra_functions(A::AbstractMatrix)
1212
matrix = Matrix(A)
13-
result = [
14-
isdiag(A) == isdiag(matrix),
15-
ishermitian(A) == ishermitian(matrix),
16-
isposdef(A) == isposdef(matrix),
17-
issymmetric(A) == issymmetric(matrix),
18-
adjoint(A) adjoint(matrix),
19-
transpose(A) transpose(matrix),
20-
det(A) == det(matrix),
21-
inv(A) inv(matrix),
22-
eigvals(A) eigvals(matrix),
23-
]
24-
if all(result)
13+
result = Dict([
14+
isdiag => isdiag(A) == isdiag(matrix),
15+
ishermitian => ishermitian(A) == ishermitian(matrix),
16+
issymmetric => issymmetric(A) == issymmetric(matrix),
17+
isposdef => isposdef(A) == isposdef(matrix),
18+
adjoint => adjoint(A) adjoint(matrix),
19+
transpose => transpose(A) transpose(matrix),
20+
det => det(A) == det(matrix),
21+
inv => inv(A) inv(matrix),
22+
eigvals => eigvals(A) eigvals(matrix),
23+
])
24+
25+
if all(values(result))
2526
return true
2627
else
2728
@error result

0 commit comments

Comments
 (0)