Skip to content

Commit

Permalink
add test of run_sim
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 committed Oct 24, 2023
1 parent 4833deb commit ad1f745
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/test_ref_out.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,26 @@ end
end
end
end

@testset "deprecated full run example" begin
test_out = joinpath(@__DIR__, "example/output/deprecated-full")
rm(test_out; force=true, recursive=true)
args = ["--out=$test_out","--batch=1"]
with_logger(warn_only_logger) do
MEDYANSimRunner.run_sim(args;
UserCode.jobs,
UserCode.setup,
save_snapshot=UserCode.save,
load_snapshot=UserCode.load,
UserCode.loop,
UserCode.done,
)
end
out_diff = sprint(MEDYANSimRunner.print_traj_diff, joinpath(ref_out,"a"), joinpath(test_out,"a"))
if !isempty(out_diff)
println(out_diff)
@test false
end
end
end
end

0 comments on commit ad1f745

Please sign in to comment.