Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimbrand committed Nov 25, 2023
1 parent a15e829 commit 7d7439a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/lomc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ using DataFrames
@test state.replicas[1].params.shift == state.shift == 5.0
@test state.replica == NoStats{1}() # uses getfield method
end
@testset "default_starting_vector" begin
addr = BoseFS{5,2}((2,3))
H = HubbardReal1D(addr; u=0.1)
@test default_starting_vector(H) == default_starting_vector(addr)
@test default_starting_vector(addr; threading=false) isa DVec
@test default_starting_vector(addr; threading=true) isa PDVec
v = default_starting_vector(addr; threading=true)
@test_logs (:warn, Regex("(Starting)")) lomc!(H, v; laststep=0, threading=false)
@test_logs (:warn, Regex("(Starting)")) lomc!(H, v; laststep=0, style=IsStochasticInteger())
end
@testset "Setting walkernumber" begin
add = BoseFS{2,5}((0,0,2,0,0))
H = HubbardMom1D(add; u=0.5)
Expand Down

0 comments on commit 7d7439a

Please sign in to comment.