@@ -4,8 +4,6 @@ using ColorVectorSpace, Colors, FixedPointNumbers, Compat, StatsBase
44
55using Base. Test
66
7- const use_broadcast_rules = VERSION >= v " 0.6.0-dev.1839"
8-
97macro test_colortype_approx_eq (a, b)
108 :(test_colortype_approx_eq ($ (esc (a)), $ (esc (b)), $ (string (a)), $ (string (b))))
119end
9189 @test typeof (acu- acf) == Vector{Gray{Float32}}
9290 @test typeof (acu.+ acf) == Vector{Gray{Float32}}
9391 @test typeof (acu.- acf) == Vector{Gray{Float32}}
94- if use_broadcast_rules
95- @test typeof (acu+ cf) == Vector{Gray{Float32}}
96- @test typeof (acu- cf) == Vector{Gray{Float32}}
97- @test typeof (acu.+ cf) == Vector{Gray{Float32}}
98- @test typeof (acu.- cf) == Vector{Gray{Float32}}
99- else
100- @test typeof (acu+ cf) == Vector{Gray{N0f8}}
101- @test typeof (acu- cf) == Vector{Gray{N0f8}}
102- @test typeof (acu.+ cf) == Vector{Gray{N0f8}}
103- @test typeof (acu.- cf) == Vector{Gray{N0f8}}
104- end
92+ @test typeof (acu+ cf) == Vector{Gray{Float32}}
93+ @test typeof (acu- cf) == Vector{Gray{Float32}}
94+ @test typeof (acu.+ cf) == Vector{Gray{Float32}}
95+ @test typeof (acu.- cf) == Vector{Gray{Float32}}
10596 @test typeof (2 * acf) == Vector{Gray{Float32}}
10697 @test typeof (2. * acf) == Vector{Gray{Float32}}
10798 @test typeof (0x02 * acu) == Vector{Gray{Float32}}
@@ -245,17 +236,10 @@ end
245236 @test typeof (acu- acf) == Vector{RGB{Float32}}
246237 @test typeof (acu.+ acf) == Vector{RGB{Float32}}
247238 @test typeof (acu.- acf) == Vector{RGB{Float32}}
248- if use_broadcast_rules
249- @test typeof (acu+ cf) == Vector{RGB{Float32}}
250- @test typeof (acu- cf) == Vector{RGB{Float32}}
251- @test typeof (acu.+ cf) == Vector{RGB{Float32}}
252- @test typeof (acu.- cf) == Vector{RGB{Float32}}
253- else
254- @test typeof (acu+ cf) == Vector{RGB{N0f8}}
255- @test typeof (acu- cf) == Vector{RGB{N0f8}}
256- @test typeof (acu.+ cf) == Vector{RGB{N0f8}}
257- @test typeof (acu.- cf) == Vector{RGB{N0f8}}
258- end
239+ @test typeof (acu+ cf) == Vector{RGB{Float32}}
240+ @test typeof (acu- cf) == Vector{RGB{Float32}}
241+ @test typeof (acu.+ cf) == Vector{RGB{Float32}}
242+ @test typeof (acu.- cf) == Vector{RGB{Float32}}
259243 @test typeof (2 * acf) == Vector{RGB{Float32}}
260244 @test typeof (convert (UInt8, 2 )* acu) == Vector{RGB{Float32}}
261245 @test typeof (acu/ 2 ) == Vector{RGB{typeof (N0f8 (0.5 )/ 2 )}}
@@ -323,17 +307,10 @@ end
323307 @test typeof (acu- acf) == Vector{RGBA{Float32}}
324308 @test typeof (acu.+ acf) == Vector{RGBA{Float32}}
325309 @test typeof (acu.- acf) == Vector{RGBA{Float32}}
326- if use_broadcast_rules
327- @test typeof (acu+ cf) == Vector{RGBA{Float32}}
328- @test typeof (acu- cf) == Vector{RGBA{Float32}}
329- @test typeof (acu.+ cf) == Vector{RGBA{Float32}}
330- @test typeof (acu.- cf) == Vector{RGBA{Float32}}
331- else
332- @test typeof (acu+ cf) == Vector{RGBA{N0f8}}
333- @test typeof (acu- cf) == Vector{RGBA{N0f8}}
334- @test typeof (acu.+ cf) == Vector{RGBA{N0f8}}
335- @test typeof (acu.- cf) == Vector{RGBA{N0f8}}
336- end
310+ @test typeof (acu+ cf) == Vector{RGBA{Float32}}
311+ @test typeof (acu- cf) == Vector{RGBA{Float32}}
312+ @test typeof (acu.+ cf) == Vector{RGBA{Float32}}
313+ @test typeof (acu.- cf) == Vector{RGBA{Float32}}
337314 @test typeof (2 * acf) == Vector{RGBA{Float32}}
338315 @test typeof (convert (UInt8, 2 )* acu) == Vector{RGBA{Float32}}
339316 @test typeof (acu/ 2 ) == Vector{RGBA{typeof (N0f8 (0.5 )/ 2 )}}
0 commit comments