Mercurial > repos > public > sbplib_julia
diff test/Grids/geometry_test.jl @ 2072:c36812de3f2d feature/grids/geometry_functions
Add parameter validation when evaluating jacobian for transfinite interpolation
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 17 Feb 2026 20:40:21 +0100 |
| parents | 9e9c56f5a656 |
| children |
line wrap: on
line diff
--- a/test/Grids/geometry_test.jl Tue Feb 17 20:37:53 2026 +0100 +++ b/test/Grids/geometry_test.jl Tue Feb 17 20:40:21 2026 +0100 @@ -393,5 +393,13 @@ @test Grids.jacobian(ti, [1/2, 1]) ≈ [c-d mid(c,d)-mid(a,b)] @test Grids.jacobian(ti, [0, 1/2]) ≈ [mid(b,c)-mid(a,d) d-a] @test Grids.jacobian(ti, [1, 1/2]) ≈ [mid(b,c)-mid(a,d) c-b] + + @testset "Out of domain error" begin + @test_throws DomainError Grids.jacobian(ti, [-0.1, 0]) + @test_throws DomainError Grids.jacobian(ti, [1.1, 0]) + @test_throws DomainError Grids.jacobian(ti, [0, -0.1]) + @test_throws DomainError Grids.jacobian(ti, [0, 1.1]) + @test_throws DomainError Grids.jacobian(ti, [1.1, -0.1]) + end end end
