Skip to content

Commit

Permalink
add 2 basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Dec 23, 2024
1 parent 312a8a0 commit f901e1b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ display(m)
@test GeoInterface.crs(m) == Tyler.MapTiles.WebMercator()
end

@testset "NamedTuple axis syntax" begin
b = Rect2f(-20.0, -20.0, 40.0, 40.0)
m = @test_nowarn Tyler.Map(b, provider=OpenStreetMap(), axis = (; type = Axis, aspect = AxisAspect(1)))
@test only(contents(m.figure.layout[1, 1])) isa Axis
@test only(contents(m.figure.layout[1, 1])).aspect == AxisAspect(1)
end

@testset "Pass GridPosition to figure kwarg" begin
f = Figure()
m = @test_nowarn Tyler.Map(b, provider = OpenStreetMap(), figure = f[1, 2])
@test only(contents(m.figure.layout[1, 2])) isa Axis
end

# Reference tests?
# provider = TileProviders.NASAGIBS()
# m = Tyler.Map(Rect2f(0, 50, 40, 20), 5; provider=provider, min_tiles=8, max_tiles=32)
Expand Down

0 comments on commit f901e1b

Please sign in to comment.