Skip to content

Commit

Permalink
Add tests to verify that the new metadata file is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann authored and oschulz committed Jul 31, 2023
1 parent a9a3d6a commit 523925f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ version = "0.2.1"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[extras]
PropDicts = "4dc08600-4268-439e-8673-d706fafbb426"
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[deps]
PropDicts = "4dc08600-4268-439e-8673-d706fafbb426"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
PropDicts = "0.2"
14 changes: 12 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# This file is a part of LegendTestData.jl, licensed under the MIT License (MIT).

using LegendTestData
using PropDicts
using Test

@testset "Package LegendTestData" begin

@info legend_test_data_path()
@test isdir(joinpath(legend_test_data_path(), "data"))
@info legend_test_data_path()
@test isdir(joinpath(legend_test_data_path(), "data"))

@testset "Inverted coax metadata" begin
invcoax_metadata = joinpath(legend_test_data_path(), "data", "ldsim", "invcoax-metadata.json")
@test isfile(invcoax_metadata)
invcoax = readprops(invcoax_metadata)
@test haskey(invcoax.geometry.borehole, :depth_in_mm)
@test invcoax.geometry.borehole.depth_in_mm == 55
@test !haskey(invcoax.geometry.borehole, :gap_in_mm)
end

end # testset

0 comments on commit 523925f

Please sign in to comment.