Skip to content

Commit 802d6a7

Browse files
Merge pull request #56 from Jan-LucaKlees/fixed-util-tests
Actaully test `recursive_unitless_eltype`
2 parents f5e3c91 + 3118af6 commit 802d6a7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

test/utils_test.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,19 @@ A = [[1 2; 3 4],[1 3;4 6],[5 6;7 8]]
1212
4.6666666666 6.0]
1313

1414
A = zeros(5,5)
15-
recursive_unitless_eltype(A) == Float64
15+
@test recursive_unitless_eltype(A) == Float64
1616

1717
using Unitful
1818
A = zeros(5,5)*1u"kg"
19-
recursive_unitless_eltype(A) == Float64
19+
@test recursive_unitless_eltype(A) == Float64
2020
AA = [zeros(5,5) for i in 1:5]
21-
recursive_unitless_eltype(AA) == Array{Float64,2}
21+
@test recursive_unitless_eltype(AA) == Array{Float64,2}
2222
AofA = [copy(A) for i in 1:5]
23-
recursive_unitless_eltype(AofA) == Array{Float64,2}
23+
@test recursive_unitless_eltype(AofA) == Array{Float64,2}
2424
AofSA = [@SVector [2.0,3.0] for i in 1:5]
25-
recursive_unitless_eltype(AofSA) == SVector{2,Float64}
25+
@test recursive_unitless_eltype(AofSA) == SVector{2,Float64}
2626
AofuSA = [@SVector [2.0u"kg",3.0u"kg"] for i in 1:5]
27-
recursive_unitless_eltype(AofuSA) == SVector{2,Float64}
28-
29-
@inferred recursive_unitless_eltype(AofuSA)
27+
@test recursive_unitless_eltype(AofuSA) == SVector{2,Float64}
3028

3129
A = [ArrayPartition(ones(1),ones(1)),]
3230
@test repr("text/plain", A) == "1-element Array{ArrayPartition{Float64,Tuple{Array{Float64,1},Array{Float64,1}}},1}:\n [1.0][1.0]"

0 commit comments

Comments
 (0)