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