Mercurial > repos > public > sbplib_julia
diff test/testGrids.jl @ 660:b21fea54ca10 feature/get_boundary_identifiers
Add tests for Grids.boundary_identifiers
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sat, 30 Jan 2021 20:30:55 +0100 |
parents | b7734413003d |
children | f0ceddeae993 |
line wrap: on
line diff
--- a/test/testGrids.jl Sat Jan 30 20:23:44 2021 +0100 +++ b/test/testGrids.jl Sat Jan 30 20:30:55 2021 +0100 @@ -1,5 +1,6 @@ using Sbplib.Grids using Test +using Sbplib.RegionIndices @testset "Grids" begin @@ -53,6 +54,13 @@ @test restrict(g, 2:3) == EquidistantGrid((5,3),(0.0,0.0),(1.0,3.0)) @test restrict(g, [1,3]) == EquidistantGrid((2,3),(0.0,0.0),(2.0,3.0)) @test restrict(g, [2,1]) == EquidistantGrid((5,2),(0.0,0.0),(1.0,2.0)) + + @testset "boundary_identifiers" begin + g = EquidistantGrid((2,5,3), (0.0,0.0,0.0), (2.0,1.0,3.0)) + @test boundary_identifiers(g) == (CartesianBoundary{1,Lower}(),CartesianBoundary{1,Upper}(), + CartesianBoundary{2,Lower}(),CartesianBoundary{2,Upper}(), + CartesianBoundary{3,Lower}(),CartesianBoundary{3,Upper}()) + end end end