Skip to content

Commit 50c3abc

Browse files
committed
add more connect tests
1 parent e330dec commit 50c3abc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/runtests.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,14 @@ end
8080
@testset "connected views" begin
8181
numbers = [1, 2, 3, 4, 5, 6]
8282
x = connect(numbers, Point{2})
83-
84-
@test x == Point[(1, 2), (3, 4), (5, 6)]
83+
@test x == Point{2, Int}[(1, 2), (3, 4), (5, 6)]
84+
xf = connect(numbers, Point2f)
85+
@test xf == Point2f[(1, 2), (3, 4), (5, 6)]
8586

8687
line = connect(x, Line, 1)
87-
@test line == [Line(Point(1, 2), Point(3, 4)), Line(Point(3, 4), Point(5, 6))]
88+
@test line == [Line(Point{2, Int}(1, 2), Point{2, Int}(3, 4)), Line(Point{2, Int}(3, 4), Point{2, Int}(5, 6))]
89+
linef = connect(xf, Line, 1)
90+
@test linef == [Line(Point2f(1, 2), Point2f(3, 4)), Line(Point2f(3, 4), Point2f(5, 6))]
8891

8992
triangles = connect(x, Triangle)
9093
@test triangles == [Triangle(Point(1, 2), Point(3, 4), Point(5, 6))]

0 commit comments

Comments
 (0)