Skip to content

Commit e7342c4

Browse files
authored
compat: IntervalSets v0.7 (#210)
* compat: IntervalSets v0.7 * fix tests
1 parent 57f62f0 commit e7342c4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
99
RangeArrays = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d"
1010

1111
[compat]
12-
IntervalSets = "0.1, 0.2, 0.3, 0.4, 0.5, 0.6"
12+
IntervalSets = "0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7"
1313
IterTools = "1"
1414
RangeArrays = "0.3"
1515
julia = "1"

test/intervals.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Specific intervals tests
2+
import IntervalSets
23

34
# Promotion behaviors -- we only allow concrete endpoints of the same type
45
@test 1.0 .. 2 === 1.0 .. 2.0
56
@test 1//2 .. 3.5 === 0.5 .. 3.5
6-
@test_throws ArgumentError :a .. "b"
7-
@test_throws ArgumentError 1 .. (2,3)
7+
# IntervalSets v0.7: https://github.com/JuliaMath/IntervalSets.jl/pull/93
8+
thrown_err = isdefined(IntervalSets, :duration) ? ArgumentError : ErrorException
9+
@test_throws thrown_err :a .. "b"
10+
@test_throws thrown_err 1 .. (2,3)
811

912
v = [1 .. 2, 3.0 .. 4.0]
1013
@test v[1] === 1.0 .. 2.0

0 commit comments

Comments
 (0)