Skip to content

Commit

Permalink
Suppress info in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
david-pl committed Jul 9, 2018
1 parent e36f652 commit ba5ebec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_spectralanalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ d = [-3, -2.6, -0.1, 0.0, 0.6]
D = DenseOperator(b, diagm(d))
Dsp = sparse(D)
@test eigenenergies(D) d
@test eigenenergies(Dsp, 3) d[1:3]
@test eigenenergies(Dsp, 3, info=false) d[1:3]

R = U*D*dagger(U)
Rsp = sparse(R)
@test eigenenergies((R+dagger(R))/2) d
@test eigenenergies((Rsp+dagger(Rsp))/2, 3; info=false) d[1:3]

E, states = eigenstates((R+dagger(R))/2, 3)
Esp, states_sp = eigenstates((Rsp+dagger(Rsp))/2, 3)
Esp, states_sp = eigenstates((Rsp+dagger(Rsp))/2, 3, info=false)
for i=1:3
@test E[i] d[i]
@test Esp[i] d[i]
Expand All @@ -53,15 +53,15 @@ d = [-3+0.2im, -2.6-0.1im, -0.1+0.5im, 0.0, 0.6+0.3im]
D = DenseOperator(b, diagm(d))
Dsp = sparse(D)
@test eigenenergies(D; warning=false) d
@test eigenenergies(Dsp, 3; warning=false) d[1:3]
@test eigenenergies(Dsp, 3; warning=false, info=false) d[1:3]

R = U*D*dagger(U)
Rsp = sparse(R)
@test eigenenergies(R; warning=false) d
@test eigenenergies(Rsp, 3; warning=false) d[1:3]
@test eigenenergies(Rsp, 3; warning=false, info=false) d[1:3]

E, states = eigenstates(R, 3; warning=false)
Esp, states_sp = eigenstates(Rsp, 3; warning=false)
Esp, states_sp = eigenstates(Rsp, 3; warning=false, info=false)
for i=1:3
@test E[i] d[i]
@test Esp[i] d[i]
Expand Down

0 comments on commit ba5ebec

Please sign in to comment.