Skip to content

Commit 94646ae

Browse files
committed
add tests
1 parent 22b5964 commit 94646ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/geometrytypes.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ end
188188
@test Rect2{UInt32}(0.8, 0.1, 1.3, 1.9) == Rect2i(1,0,1,2)
189189
@test Rect3i(0.3, 0.6, 0.9, 1.2, 1.5, 1.8) == Rect3i(0,1,1,1,2,2)
190190
end
191+
@testset "Vector inputs" begin
192+
@test Rect([1,2], [2,3]) == Rect2i(1,2,2,3)
193+
@test Rect2f([0,1], [2,3]) == Rect2f(0,1,2,3)
194+
@test RectT{Float64}([0,1,0], [2,2,2]) == Rect3d(0,1,0, 2,2,2)
195+
@test Rect3([0,1,0], [2,2,2]) == Rect3i(0,1,0, 2,2,2)
196+
end
191197

192198
# TODO: These don't really make sense...
193199
r = Rect2f()

0 commit comments

Comments
 (0)