Mercurial > repos > public > sbplib_julia
comparison test/Grids/grid_test.jl @ 1289:3b7ebd135918 refactor/grids
Remove _component_type and replace with eltype
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 03 Mar 2023 15:44:39 +0100 |
parents | 7de1df0aad6a |
children | 356ec6a72974 |
comparison
equal
deleted
inserted
replaced
1288:7de1df0aad6a | 1289:3b7ebd135918 |
---|---|
61 | 61 |
62 @test Grids._ncomponents(SVector{3,Int}) == 3 | 62 @test Grids._ncomponents(SVector{3,Int}) == 3 |
63 @test Grids._ncomponents(SVector{2,Float64}) == 2 | 63 @test Grids._ncomponents(SVector{2,Float64}) == 2 |
64 @test Grids._ncomponents(SVector{4,Rational}) == 4 | 64 @test Grids._ncomponents(SVector{4,Rational}) == 4 |
65 end | 65 end |
66 | |
67 @testset "_component_type" begin | |
68 @test Grids._component_type(Int) == Int | |
69 @test Grids._component_type(Float64) == Float64 | |
70 @test Grids._component_type(Rational) == Rational | |
71 | |
72 @test Grids._component_type(SVector{3,Int}) == Int | |
73 @test Grids._component_type(SVector{2,Float64}) == Float64 | |
74 @test Grids._component_type(SVector{4,Rational}) == Rational | |
75 end |