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

Add tests for haslocation/hasstring

parent 3f59a3bd
Branches
Tags
1 merge request!45Improve detector api
...@@ -113,6 +113,13 @@ end ...@@ -113,6 +113,13 @@ end
@test 0 < length(det) @test 0 < length(det)
end end
end end
@testset "DETX tools" begin
det = Detector(datapath("detx", "orca_115strings_av20min17mhorizontal_18OMs_alt9mvertical_v2.detx"))
@test haslocation(det, Location(1, 1))
@test !haslocation(det, Location(1, 100))
@test hasstring(det, 1)
@test !hasstring(det, 200)
end
@testset "DETX floor == -1 bug" begin @testset "DETX floor == -1 bug" begin
det = Detector(datapath("detx", "orca_115strings_av20min17mhorizontal_18OMs_alt9mvertical_v2.detx")) det = Detector(datapath("detx", "orca_115strings_av20min17mhorizontal_18OMs_alt9mvertical_v2.detx"))
@test Location(1, 1) == det[1].location @test Location(1, 1) == det[1].location
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment