Skip to content

Commit

Permalink
Add missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Oct 29, 2024
1 parent 29dec85 commit 5edb013
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/crs/domains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,17 @@
end
end

@testset "Albers Forward" begin
@testset "Albers" begin
atol = T === Float32 ? 1.0f-1° : 1e-7°
AlbersUS = CoordRefSystems.shift(Albers{23.0°,29.5°,45.5°,NAD83}, lonₒ=-96.0°)
for lat in T.(-90:90), lon in T.(-180:180)
c1 = LatLon{NAD83}(lat, lon)
if indomain(AlbersUS, c1)
c2 = convert(AlbersUS, c1)
@test isfinite(c2.x)
@test isfinite(c2.y)
c3 = convert(LatLon{NAD83}, c2)
@test allapprox(c3, c1; atol)
else
@test_throws ArgumentError convert(AlbersUS, c1)
end
Expand Down

0 comments on commit 5edb013

Please sign in to comment.