Mercurial > repos > public > sbplib_julia
diff test/Grids/grid_test.jl @ 1288:7de1df0aad6a refactor/grids
Add component_type function to Grid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 03 Mar 2023 15:42:05 +0100 |
parents | 1157f889bf50 |
children | 3b7ebd135918 |
line wrap: on
line diff
--- a/test/Grids/grid_test.jl Fri Mar 03 15:40:20 2023 +0100 +++ b/test/Grids/grid_test.jl Fri Mar 03 15:42:05 2023 +0100 @@ -14,6 +14,16 @@ @test target_manifold_dim(DummyGrid{Int, 1}()) == 1 @test target_manifold_dim(DummyGrid{SVector{3,Float64}, 2}()) == 3 + + @testset "component_type" begin + @test component_type(DummyGrid{Int,1}()) == Int + @test component_type(DummyGrid{Float64,1}()) == Float64 + @test component_type(DummyGrid{Rational,1}()) == Rational + + @test component_type(DummyGrid{SVector{3,Int},2}()) == Int + @test component_type(DummyGrid{SVector{2,Float64},3}()) == Float64 + @test component_type(DummyGrid{SVector{4,Rational},4}()) == Rational + end end @testset "eval_on" begin