Mercurial > repos > public > sbplib_julia
diff test/Grids/grid_test.jl @ 1518:0cd6cf62af93 feature/grids/componentview
Merge refactor/component_type
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 21 Mar 2024 15:51:29 +0100 |
parents | 7ee7df7d9b61 d50ea06813d5 |
children | 43aaf710463e |
line wrap: on
line diff
--- a/test/Grids/grid_test.jl Thu Mar 21 07:43:48 2024 +0100 +++ b/test/Grids/grid_test.jl Thu Mar 21 15:51:29 2024 +0100 @@ -15,19 +15,21 @@ @test coordinate_size(DummyGrid{SVector{3,Float64}, 2}()) == 3 @test coordinate_size(DummyGrid{SVector{3,Float64}, 2}) == 3 +end - @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 +@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 + @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 - @test component_type(DummyGrid{Float64,1}) == Float64 - @test component_type(DummyGrid{SVector{2,Float64},3}) == Float64 - end + @test component_type(DummyGrid{Float64,1}) == Float64 + @test component_type(DummyGrid{SVector{2,Float64},3}) == Float64 + + @test component_type(fill(@SVector[1,2], 4,2)) == Int end @testset "eval_on" begin