Skip to content

Commit 25e9074

Browse files
committed
Bring back eig_trunc tests
1 parent 394fec2 commit 25e9074

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

test/test_fillarrays_matrixalgebrakit.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,26 +72,26 @@ herm(a) = parent(hermitianpart(a))
7272
@test arguments(v, 2) isa Eye{elt}
7373
end
7474

75-
## for f in (eig_trunc, eigh_trunc)
76-
## a = Eye(3) ⊗ parent(hermitianpart(randn(3, 3)))
77-
## d, v = f(a; trunc=(; maxrank=7))
78-
## @test a * v ≈ v * d
79-
## @test arguments(d, 1) isa Eye
80-
## @test arguments(v, 1) isa Eye
81-
## @test size(d) == (6, 6)
82-
## @test size(v) == (9, 6)
75+
for f in (eig_trunc, eigh_trunc)
76+
a = Eye(3) parent(hermitianpart(randn(3, 3)))
77+
d, v = f(a; trunc=(; maxrank=7))
78+
@test a * v v * d
79+
@test arguments(d, 1) isa Eye
80+
@test arguments(v, 1) isa Eye
81+
@test size(d) == (6, 6)
82+
@test size(v) == (9, 6)
8383

84-
## a = parent(hermitianpart(randn(3, 3))) ⊗ Eye(3)
85-
## d, v = f(a; trunc=(; maxrank=7))
86-
## @test a * v ≈ v * d
87-
## @test arguments(d, 2) isa Eye
88-
## @test arguments(v, 2) isa Eye
89-
## @test size(d) == (6, 6)
90-
## @test size(v) == (9, 6)
84+
a = parent(hermitianpart(randn(3, 3))) Eye(3)
85+
d, v = f(a; trunc=(; maxrank=7))
86+
@test a * v v * d
87+
@test arguments(d, 2) isa Eye
88+
@test arguments(v, 2) isa Eye
89+
@test size(d) == (6, 6)
90+
@test size(v) == (9, 6)
9191

92-
## a = Eye(3) ⊗ Eye(3)
93-
## @test_throws ArgumentError f(a)
94-
## end
92+
a = Eye(3) Eye(3)
93+
@test_throws ArgumentError f(a)
94+
end
9595

9696
for f in (eig_vals, eigh_vals)
9797
a = Eye(3) parent(hermitianpart(randn(3, 3)))

0 commit comments

Comments
 (0)