Mercurial > repos > public > sbplib_julia
diff test/Grids/parameter_space_test.jl @ 1951:6c1bb9bdb092 feature/grids/geometry_functions
Merge feature/grids/manifolds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Feb 2025 22:38:39 +0100 |
parents | 15be190a40cd |
children | 77ff0a2acbe5 |
line wrap: on
line diff
--- a/test/Grids/parameter_space_test.jl Mon Feb 03 15:44:07 2025 +0100 +++ b/test/Grids/parameter_space_test.jl Fri Feb 07 22:38:39 2025 +0100 @@ -1,5 +1,7 @@ using Test +using Diffinitive.Grids + @testset "ParameterSpace" begin @test ndims(HyperBox([1,1], [2,2])) == 2 @test ndims(unittetrahedron()) == 3 @@ -18,6 +20,8 @@ @test unitinterval(Int) isa Interval{Int} @test unitinterval(Int) == Interval(0,1) @test limits(unitinterval(Int)) == (0,1) + + @test boundary_identifiers(unitinterval()) == (LowerBoundary(), UpperBoundary()) end @testset "HyperBox" begin @@ -38,6 +42,23 @@ @test unithyperbox(4) isa HyperBox{Float64,4} @test limits(unithyperbox(4)) == ([0,0,0,0],[1,1,1,1]) + + + @test boundary_identifiers(unitsquare()) == [ + CartesianBoundary{1,LowerBoundary}(), + CartesianBoundary{1,UpperBoundary}(), + CartesianBoundary{2,LowerBoundary}(), + CartesianBoundary{2,UpperBoundary}(), + ] + + @test boundary_identifiers(unitcube()) == [ + CartesianBoundary{1,LowerBoundary}(), + CartesianBoundary{1,UpperBoundary}(), + CartesianBoundary{2,LowerBoundary}(), + CartesianBoundary{2,UpperBoundary}(), + CartesianBoundary{3,LowerBoundary}(), + CartesianBoundary{3,UpperBoundary}(), + ] end @testset "Simplex" begin