@@ -5,51 +5,52 @@ atlasFileName = joinpath(@__DIR__, "test.jsonl") # Path to your test file
55atlasFileNameGziped = joinpath(@__DIR__, " test.jsonl.gz" ) # Path to your test file
66first_map_truth= Dict{Tuple{Vararg{String}}, Int64}((" p2" , " c2" ) => 1 , (" p1" , " c2" ) => 1 , (" p3" , " c7" , " b100" ) => 2 )
77second_map_truth= Dict{Tuple{Vararg{String}}, Int64}((" p2" , " c2" ) => 2 , (" p1" , " c2" ) => 1 , (" p3" , " c7" , " b100" ) => 1 )
8-
9- @testset " Atlas Reading" begin
10-
11- io = smartOpen(atlasFileName, " r" )
12- atlas = openAtlas(io)
13- @test ! eof(atlas) # The atlas should have content
14- @test atlas. description == " Test Atlas" # Replace with expected description
15-
16- # Read the first map and check its properties
17- first_map = nextMap(atlas)
18- # Example checks — adapt to your test file fields
19- @test first_map. name == " map1" # Replace "map1" with expected map name
20- @test length(first_map. districting) == 3 # Replace 100 with expected size
21- @test first_map. districting == first_map_truth # Check if the first map matches the expected structure
22-
23- second_map = nextMap(atlas)
24- @test second_map. name == " map2" # Replace "map1" with expected map name
25- @test length(second_map. districting) == 3 # Replace 100 with expected size
26- @test second_map. districting == second_map_truth # Check if the first map matches the expected structure
27-
28-
29- # Clean up
30- close(io)
31- end
32-
33- @testset " Compressed Atlas Reading" begin
34-
35- io = smartOpen(atlasFileNameGziped, " r" )
36- atlas = openAtlas(io)
37- @test ! eof(atlas) # The atlas should have content
38- @test atlas. description == " Test Atlas" # Replace with expected description
39-
40- # Read the first map and check its properties
41- first_map = nextMap(atlas)
42- # Example checks — adapt to your test file fields
43- @test first_map. name == " map1" # Replace "map1" with expected map name
44- @test length(first_map. districting) == 3 # Replace 100 with expected size
45- @test first_map. districting == first_map_truth # Check if the first map matches the expected structure
46-
47- second_map = nextMap(atlas)
48- @test second_map. name == " map2" # Replace "map1" with expected map name
49- @test length(second_map. districting) == 3 # Replace 100 with expected size
50- @test second_map. districting == second_map_truth # Check if the first map matches the expected structure
51-
52-
53- # Clean up
54- close(io)
55- end
8+ @testset verbose = true " Atlas Tests" begin
9+ @testset " Compressed Atlas Reading" begin
10+
11+ io = smartOpen(atlasFileName, " r" )
12+ atlas = openAtlas(io)
13+ @test ! eof(atlas) # The atlas should have content
14+ @test atlas. description == " Test Atlas" # Replace with expected description
15+
16+ # Read the first map and check its properties
17+ first_map = nextMap(atlas)
18+ # Example checks — adapt to your test file fields
19+ @test first_map. name == " map1" # Replace "map1" with expected map name
20+ @test length(first_map. districting) == 3 # Replace 100 with expected size
21+ @test first_map. districting == first_map_truth # Check if the first map matches the expected structure
22+
23+ second_map = nextMap(atlas)
24+ @test second_map. name == " map2" # Replace "map1" with expected map name
25+ @test length(second_map. districting) == 3 # Replace 100 with expected size
26+ @test second_map. districting == second_map_truth # Check if the first map matches the expected structure
27+
28+
29+ # Clean up
30+ close(io)
31+ end
32+
33+ @testset " Compressed Atlas Reading" begin
34+
35+ io = smartOpen(atlasFileNameGziped, " r" )
36+ atlas = openAtlas(io)
37+ @test ! eof(atlas) # The atlas should have content
38+ @test atlas. description == " Test Atlas" # Replace with expected description
39+
40+ # Read the first map and check its properties
41+ first_map = nextMap(atlas)
42+ # Example checks — adapt to your test file fields
43+ @test first_map. name == " map1" # Replace "map1" with expected map name
44+ @test length(first_map. districting) == 3 # Replace 100 with expected size
45+ @test first_map. districting == first_map_truth # Check if the first map matches the expected structure
46+
47+ second_map = nextMap(atlas)
48+ @test second_map. name == " map2" # Replace "map1" with expected map name
49+ @test length(second_map. districting) == 3 # Replace 100 with expected size
50+ @test second_map. districting == second_map_truth # Check if the first map matches the expected structure
51+
52+
53+ # Clean up
54+ close(io)
55+ end ;
56+ end ;
0 commit comments