Mercurial > repos > public > sbplib_julia
comparison test/Grids/zero_dim_grid_test.jl @ 1268:dbddd0f61bde refactor/grids
Add refine, coarsen, boundary_identifiers, and boundary_grid methods to ZeroDimGrid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 24 Feb 2023 21:54:39 +0100 |
parents | b0819f6b9d4a |
children | 4ad1282f8bab |
comparison
equal
deleted
inserted
replaced
1267:30729cba1095 | 1268:dbddd0f61bde |
---|---|
23 @test size(g) == () | 23 @test size(g) == () |
24 @test collect(g) == fill(@SVector[1,2]) | 24 @test collect(g) == fill(@SVector[1,2]) |
25 end | 25 end |
26 | 26 |
27 @testset "refine" begin | 27 @testset "refine" begin |
28 @test_broken false | 28 @test refine(ZeroDimGrid(@SVector[1.0,2.0]),1) == ZeroDimGrid(@SVector[1.0,2.0]) |
29 @test refine(ZeroDimGrid(@SVector[1.0,2.0]),2) == ZeroDimGrid(@SVector[1.0,2.0]) | |
29 end | 30 end |
30 | 31 |
31 @testset "coarsen" begin | 32 @testset "coarsen" begin |
32 @test_broken false | 33 @test coarsen(ZeroDimGrid(@SVector[1.0,2.0]),1) == ZeroDimGrid(@SVector[1.0,2.0]) |
34 @test coarsen(ZeroDimGrid(@SVector[1.0,2.0]),2) == ZeroDimGrid(@SVector[1.0,2.0]) | |
33 end | 35 end |
34 | 36 |
35 @testset "boundary_identifiers" begin | 37 @testset "boundary_identifiers" begin |
36 @test_broken false | 38 @test boundary_identifiers(ZeroDimGrid(@SVector[1.0,2.0])) == () |
37 end | 39 end |
38 | 40 |
39 @testset "boundary_grid" begin | 41 @testset "boundary_grid" begin |
40 @test_broken false | 42 @test_throws ArgumentError("ZeroDimGrid has no boundaries") boundary_grid(ZeroDimGrid(@SVector[1.0,2.0]), :bid) |
41 # Test that it throws an error | |
42 end | 43 end |
43 end | 44 end |