Mercurial > repos > public > sbplib_julia
comparison test/testGrids.jl @ 661:f0ceddeae993 feature/get_boundary_identifiers
Fix and test type stability of boundary_identifiers.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sun, 31 Jan 2021 13:04:19 +0100 |
parents | b21fea54ca10 |
children | 1d3e29ffc6c6 |
comparison
equal
deleted
inserted
replaced
660:b21fea54ca10 | 661:f0ceddeae993 |
---|---|
55 @test restrict(g, [1,3]) == EquidistantGrid((2,3),(0.0,0.0),(2.0,3.0)) | 55 @test restrict(g, [1,3]) == EquidistantGrid((2,3),(0.0,0.0),(2.0,3.0)) |
56 @test restrict(g, [2,1]) == EquidistantGrid((5,2),(0.0,0.0),(1.0,2.0)) | 56 @test restrict(g, [2,1]) == EquidistantGrid((5,2),(0.0,0.0),(1.0,2.0)) |
57 | 57 |
58 @testset "boundary_identifiers" begin | 58 @testset "boundary_identifiers" begin |
59 g = EquidistantGrid((2,5,3), (0.0,0.0,0.0), (2.0,1.0,3.0)) | 59 g = EquidistantGrid((2,5,3), (0.0,0.0,0.0), (2.0,1.0,3.0)) |
60 @test boundary_identifiers(g) == (CartesianBoundary{1,Lower}(),CartesianBoundary{1,Upper}(), | 60 bids = (CartesianBoundary{1,Lower}(),CartesianBoundary{1,Upper}(), |
61 CartesianBoundary{2,Lower}(),CartesianBoundary{2,Upper}(), | 61 CartesianBoundary{2,Lower}(),CartesianBoundary{2,Upper}(), |
62 CartesianBoundary{3,Lower}(),CartesianBoundary{3,Upper}()) | 62 CartesianBoundary{3,Lower}(),CartesianBoundary{3,Upper}()) |
63 @test boundary_identifiers(g) == bids | |
64 @inferred boundary_identifiers(g) | |
63 end | 65 end |
64 end | 66 end |
65 | 67 |
66 end | 68 end |