From f4668329b34ef6323c42b6171c470286f5c1ad54 Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Tue, 5 Nov 2024 09:28:44 +0100 Subject: [PATCH] Update `test_geant4` --- test/runtests.jl | 2 +- test/{Geant4.jl => test_geant4.jl} | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) rename test/{Geant4.jl => test_geant4.jl} (90%) diff --git a/test/runtests.jl b/test/runtests.jl index 4db2ca54d..daae38bc1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -326,7 +326,7 @@ end end @timed_testset "Geant4 extension" begin - if Sys.WORD_SIZE == 64 include("Geant4.jl") end + if Sys.WORD_SIZE == 64 include("test_geant4.jl") end end display(testtimer()) diff --git a/test/Geant4.jl b/test/test_geant4.jl similarity index 90% rename from test/Geant4.jl rename to test/test_geant4.jl index b5903345d..033ca7265 100644 --- a/test/Geant4.jl +++ b/test/test_geant4.jl @@ -1,3 +1,7 @@ +# This file is a part of SolidStateDetectors.jl, licensed under the MIT License (MIT). + +using Test + using SolidStateDetectors using Geant4 using RadiationDetectorSignals @@ -59,10 +63,13 @@ end # Simulate 100 events evts = run_geant4_simulation(app, 100) @test evts isa Table + @test length(evts) == 100 # Generate waveforms simulate!(sim, refinement_limits = [0.2,0.1,0.05,0.03,0.02]) wf = simulate_waveforms(evts, sim, Δt = 1u"ns", max_nsteps = 2000) @test wf isa Table + @test :waveform in columnnames(wf) + @test length(wf) == length(evts) * sum(.!ismissing.(sim.weighting_potentials)) end \ No newline at end of file