Skip to content

Commit

Permalink
Added test for show function
Browse files Browse the repository at this point in the history
  • Loading branch information
tpa447 committed Dec 5, 2023
1 parent 713077f commit fc6c6c7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/Hamiltonians.jl
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,9 @@ end
@test get_offdiagonal(SuperfluidCorrelator(0), add2, 1) == (add2, 1/m)
@test get_offdiagonal(SuperfluidCorrelator(1), add2, 1) == (BoseFS((0,2,1,1,1,1)), sqrt(2)/m)

# Test for a specific type, e.g., Int
sc = SuperfluidCorrelator{Int}()
io = IOBuffer()
@test String(take!(io)) == "SuperfluidCorrelator(Int)"
# Test show function
@test parse_address(sprint(show, fermi; context=:compact => true)) == fermi


end

Expand Down

0 comments on commit fc6c6c7

Please sign in to comment.