Mercurial > repos > public > sbplib_julia
diff test/Grids/parameter_space_test.jl @ 1910:15be190a40cd feature/grids/parameter_spaces
Add boundary_intifiers(::Interval) and boundary_identifiers(::HyperBox)
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Feb 2025 15:29:05 +0100 |
parents | 4209290cb377 |
children | 77ff0a2acbe5 |
line wrap: on
line diff
--- a/test/Grids/parameter_space_test.jl Fri Feb 07 15:28:01 2025 +0100 +++ b/test/Grids/parameter_space_test.jl Fri Feb 07 15:29:05 2025 +0100 @@ -20,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 @@ -40,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