From f901e1b2424bb858e98e0a964fdda8ad7dd5e8a1 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Mon, 23 Dec 2024 09:44:02 +0530 Subject: [PATCH] add 2 basic tests --- test/runtests.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 58549b56..71c33cd9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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)