From 523925f86b36c0c84b518f909e063ac3cf684358 Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Mon, 31 Jul 2023 11:10:29 +0200 Subject: [PATCH] Add tests to verify that the new metadata file is loaded --- Project.toml | 3 +++ test/Project.toml | 4 ++++ test/runtests.jl | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index b9ec0c9..1aae802 100644 --- a/Project.toml +++ b/Project.toml @@ -4,3 +4,6 @@ version = "0.2.1" [deps] Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[extras] +PropDicts = "4dc08600-4268-439e-8673-d706fafbb426" diff --git a/test/Project.toml b/test/Project.toml index 0c36332..ca68a3a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,2 +1,6 @@ [deps] +PropDicts = "4dc08600-4268-439e-8673-d706fafbb426" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] +PropDicts = "0.2" \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 0ef6c82..d348deb 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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