Skip to content
Snippets Groups Projects
Verified Commit 256b3e1c authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

More tests for acoustics

parent bea2cc84
No related branches found
No related tags found
No related merge requests found
......@@ -11,4 +11,29 @@ const SAMPLES_DIR = joinpath(@__DIR__, "samples")
@test 123260 == length(signal.pcm)
@test 0.0031588078f0 == signal.pcm[1]
@test 0.0033951998f0 == signal.pcm[end]
mod = DetectorModule(1, UTMPosition(0, 0, 0), Location(0, 0), 0, PMT[], missing, 0, 0)
@test hydrophoneenabled(mod)
@test piezoenabled(mod)
status = 1 << KM3Acoustics.MODULE_STATUS.PIEZO_DISABLE
mod = DetectorModule(1, UTMPosition(0, 0, 0), Location(0, 0), 0, PMT[], missing, status, 0)
@test !piezoenabled(mod)
@test hydrophoneenabled(mod)
status = 1 << KM3Acoustics.MODULE_STATUS.HYDROPHONE_DISABLE
mod = DetectorModule(1, UTMPosition(0, 0, 0), Location(0, 0), 0, PMT[], missing, status, 0)
@test piezoenabled(mod)
@test !hydrophoneenabled(mod)
status = (1 << KM3Acoustics.MODULE_STATUS.HYDROPHONE_DISABLE) | (1 << KM3Acoustics.MODULE_STATUS.PIEZO_DISABLE)
mod = DetectorModule(1, UTMPosition(0, 0, 0), Location(0, 0), 0, PMT[], missing, status, 0)
@test !piezoenabled(mod)
@test !hydrophoneenabled(mod)
@test ["Foo13", "Foo101"] == sort(["Foo101", "Foo13"], lt=natural)
@test 42 == parse_runs("42")
@test 42:47 == parse_runs("42:47")
@test [42, 43, 47] == parse_runs("42,43,47")
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment