Skip to content

Commit

Permalink
compat: IntervalSets v0.7 (#210)
Browse files Browse the repository at this point in the history
* compat: IntervalSets v0.7

* fix tests
  • Loading branch information
johnnychen94 authored May 31, 2022
1 parent 57f62f0 commit e7342c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
RangeArrays = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d"

[compat]
IntervalSets = "0.1, 0.2, 0.3, 0.4, 0.5, 0.6"
IntervalSets = "0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7"
IterTools = "1"
RangeArrays = "0.3"
julia = "1"
Expand Down
7 changes: 5 additions & 2 deletions test/intervals.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Specific intervals tests
import IntervalSets

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

v = [1 .. 2, 3.0 .. 4.0]
@test v[1] === 1.0 .. 2.0
Expand Down

0 comments on commit e7342c4

Please sign in to comment.