Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3io.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
common
KM3io.jl
Commits
7395f0e8
Verified
Commit
7395f0e8
authored
2 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Fix hardware tests
parent
198cdd5b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/hardware.jl
+18
-17
18 additions, 17 deletions
test/hardware.jl
with
18 additions
and
17 deletions
test/hardware.jl
+
18
−
17
View file @
7395f0e8
...
...
@@ -13,31 +13,31 @@ const SAMPLES_DIR = joinpath(@__DIR__, "samples")
@test
version
==
d
.
version
mods
=
DetectorModule
[]
for
mod
in
d
push!
(
mods
,
mod
)
end
if
version
<
4
# no base modules in DETX
# no base modules in DETX
version <4
@test
342
==
length
(
d
)
@test
342
==
length
(
d
.
modules
)
@test
DetectorModule
==
eltype
(
d
)
mods
=
DetectorModule
[]
for
mod
in
d
push!
(
mods
,
mod
)
end
@test
342
==
length
(
mods
)
else
# base module attributes @test 361 == length(d.modules)
@test
361
==
length
(
d
)
@test
DetectorModule
==
eltype
(
d
)
mods
=
DetectorModule
[]
for
mod
in
d
push!
(
mods
,
mod
)
end
else
@test
361
==
length
(
mods
)
@test
116.600007
≈
d
.
modules
[
808992603
]
.
pos
.
x
# optical module
@test
106.95
≈
d
.
modules
[
808469291
]
.
pos
.
y
# base module
@test
97.3720395
≈
d
.
modules
[
808974928
]
.
pos
.
z
# base module
end
@test
116.600
≈
d
.
modules
[
808992603
]
.
pos
.
x
atol
=
1e-5
# optical module
if
version
>
3
@test
Quaternion
(
1
,
0
,
0
,
0
)
≈
d
.
modules
[
808995481
]
.
q
if
version
>
5
# module status introduced in v5
@test
0
==
d
.
modules
[
808966287
]
.
status
end
end
if
version
>
4
# module status introduced in v5
@test
0
==
d
.
modules
[
808966287
]
.
status
end
if
version
>
1
...
...
@@ -55,6 +55,7 @@ const SAMPLES_DIR = joinpath(@__DIR__, "samples")
@test
9
==
d
.
strings
[
1
]
@test
30
==
d
.
strings
[
end
]
@test
19
==
length
(
d
.
strings
)
end
comments
=
Detector
(
joinpath
(
SAMPLES_DIR
,
"v3.detx"
))
.
comments
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment