Skip to content

Commit ff6ebc4

Browse files
committed
test isnan
1 parent 380c44b commit ff6ebc4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/fixed_size_arrays.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ RGB{T}(x::T) = RGB{T}(x, x, x)
2727
StaticArrays.similar_type{SV <: RGB, T}(::Type{SV}, ::Type{T}, ::Size{(3,)}) = RGB{T}
2828

2929
# TODO find equivalent in StaticArrays
30-
# testset "scalar nan" begin
31-
# for (p, r) in (
32-
# (Point{2, Float32}(NaN, 1), true),
33-
# (Point{2, Float64}(1, NaN), true),
34-
# (Vec{11, Float64}(NaN), true),
35-
# (Point{2, Float32}(1, 1), false),
36-
# (RGB{Float32}(NaN), true),
37-
# )
38-
# @fact isnan(p) == r
39-
# end
40-
# end
30+
@testset "scalar nan" begin
31+
for (p, r) in (
32+
(Point{2, Float32}(NaN, 1), true),
33+
(Point{2, Float64}(1, NaN), true),
34+
(Vec{11, Float64}(NaN), true),
35+
(Point{2, Float32}(1, 1), false),
36+
(RGB{Float32}(NaN), true),
37+
)
38+
@test all(isnan, p) == r
39+
end
40+
end
4141

4242
# methods I needed to define:
4343

0 commit comments

Comments
 (0)