Skip to content

Commit

Permalink
Finish comparisons tests using ∞
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jul 28, 2020
1 parent 9b06dd8 commit cbea139
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions test/comparisons.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ end
[
Interval{Closed, Closed}(1, 2),
Interval{Closed, Closed}(-Inf, 2),
Interval{Unbounded,Closed}(nothing, 2),
Interval{Closed, Closed}(-∞, 2),
Interval{Unbounded,Closed}(nothing, 2),
],
[
Interval{Closed, Closed}(4, 5),
Interval{Closed, Closed}(4, Inf),
Interval{Closed,Unbounded}(4, nothing),
Interval{Closed, Closed}(4, ∞),
Interval{Closed,Unbounded}(4, nothing),
],
)

Expand Down Expand Up @@ -89,14 +89,14 @@ end
[
Interval{Open, Open}(1, 3),
Interval{Open, Open}(-Inf, 3),
Interval{Unbounded,Open}(nothing, 3),
Interval{Open, Open}(-∞, 3),
Interval{Unbounded,Open}(nothing, 3),
],
[
Interval{Open, Open}(3, 5),
Interval{Open, Open}(3, Inf),
Interval{Open,Unbounded}(3, nothing),
Interval{Open, Open}(3, ∞),
Interval{Open,Unbounded}(3, nothing),
],
)

Expand Down Expand Up @@ -144,14 +144,14 @@ end
[
Interval{Open, Open}(1, 3),
Interval{Open, Open}(-Inf, 3),
Interval{Unbounded,Open}(nothing, 3),
Interval{Open, Open}(-∞, 3),
Interval{Unbounded,Open}(nothing, 3),
],
[
Interval{Closed, Closed}(3, 5),
Interval{Closed, Closed}(3, Inf),
Interval{Closed,Unbounded}(3, nothing),
Interval{Closed, Closed}(3, ∞),
Interval{Closed,Unbounded}(3, nothing),
],
)

Expand Down Expand Up @@ -199,14 +199,14 @@ end
[
Interval{Closed, Closed}(1, 3),
Interval{Closed, Closed}(-Inf, 3),
Interval{Unbounded,Closed}(nothing, 3),
Interval{Closed, Closed}(-∞, 3),
Interval{Unbounded,Closed}(nothing, 3),
],
[
Interval{Open, Open}(3, 5),
Interval{Open, Open}(3, Inf),
Interval{Open,Unbounded}(3, nothing),
Interval{Open, Open}(3, ∞),
Interval{Open,Unbounded}(3, nothing),
],
)

Expand Down Expand Up @@ -254,14 +254,14 @@ end
[
Interval{Closed, Closed}(1, 3),
Interval{Closed, Closed}(-Inf, 3),
Interval{Unbounded,Closed}(nothing, 3),
Interval{Closed, Closed}(-∞, 3),
Interval{Unbounded,Closed}(nothing, 3),
],
[
Interval{Closed, Closed}(3, 5),
Interval{Closed, Closed}(3, Inf),
Interval{Closed,Unbounded}(3, nothing),
Interval{Closed, Closed}(3, ∞),
Interval{Closed,Unbounded}(3, nothing),
],
)

Expand Down Expand Up @@ -309,14 +309,14 @@ end
[
Interval{Closed, Closed}(1, 4),
Interval{Closed, Closed}(-Inf, 4),
Interval{Unbounded,Closed}(nothing, 4),
Interval{Closed, Closed}(-∞, 4),
Interval{Unbounded,Closed}(nothing, 4),
],
[
Interval{Closed, Closed}(2, 5),
Interval{Closed, Closed}(2, Inf),
Interval{Closed,Unbounded}(2, nothing),
Interval{Closed, Closed}(2, ∞),
Interval{Closed,Unbounded}(2, nothing),
],
)

Expand Down Expand Up @@ -360,7 +360,7 @@ end
Interval{Open, Open}(l, u),
Interval{Open, Open}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -403,7 +403,7 @@ end
Interval{Closed, Open}(l, u),
Interval{Open, Open}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -446,7 +446,7 @@ end
Interval{Open, Closed}(l, u),
Interval{Open, Open}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -489,7 +489,7 @@ end
Interval{Closed, Closed}(l, u),
Interval{Open, Open}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -532,7 +532,7 @@ end
Interval{Closed, Open}(l, u),
Interval{Closed, Closed}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -575,7 +575,7 @@ end
Interval{Open, Closed}(l, u),
Interval{Closed, Closed}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -618,7 +618,7 @@ end
Interval{Closed, Closed}(l, u),
Interval{Closed, Closed}(l, u),
]
for (l, u) in product((1, -Inf), (5, Inf))
for (l, u) in product((1, -Inf, -), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -661,7 +661,7 @@ end
Interval{Closed,Unbounded}(l, u),
Interval{Open,Unbounded}(l, u),
]
for (l, u) in product((1, -Inf), (nothing,))
for (l, u) in product((1, -Inf, -), (nothing,))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -704,7 +704,7 @@ end
Interval{Unbounded,Closed}(l, u),
Interval{Unbounded,Open}(l, u),
]
for (l, u) in product((nothing,), (5, Inf))
for (l, u) in product((nothing,), (5, Inf, ∞))
)

@testset "$a vs. $b" for (a, b) in test_intervals
Expand Down Expand Up @@ -834,12 +834,14 @@ end
Interval{Closed, Closed}(-Inf, 5),
Interval{Closed, Closed}(-∞, 5),
Interval{Closed, Closed}(-Inf, Inf),
Interval{Closed, Closed}(-∞, ∞),
Interval{Closed, Unbounded}(1, nothing),
Interval{Closed, Unbounded}(-Inf, nothing),
Interval{Closed, Unbounded}(-∞, nothing),
Interval{Unbounded, Closed}(nothing, 5),
Interval{Unbounded, Closed}(nothing, Inf),
Interval{Unbounded, Closed}(nothing, ∞),
Interval{Unbounded, Unbounded}(nothing, nothing),
Interval{Closed, Closed}(-∞, ∞),
],
)

Expand Down

0 comments on commit cbea139

Please sign in to comment.