Skip to content

Commit

Permalink
Use Infinity 0.2.3
Browse files Browse the repository at this point in the history
Version fixes cjdoris/Infinity.jl#29 which was
blocking this PR.
  • Loading branch information
omus committed Aug 12, 2020
1 parent 53b006e commit 93b79df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"

[compat]
Documenter = "0.23, 0.24"
Infinity = "0.2"
Infinity = "0.2.3"
RecipesBase = "0.7, 0.8, 1"
TimeZones = "0.7, 0.8, 0.9, 0.10, 0.11, 1"
julia = "1"
Expand Down
32 changes: 0 additions & 32 deletions test/interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -746,38 +746,6 @@ isinf(::TimeType) = false
end
parser(::Type{T}, str) where T = parse(T, str)

# Workaround until Infinity.jl supports parsing
# https://github.com/cjdoris/Infinity.jl/pull/22
function parser(::Type{Infinite}, str)
if str == ""
elseif str == "-∞"
-
else
throw(ArgumentError("cannot parse \"$str\" as Infinity"))
end
end

function parser(::Type{InfExtendedReal{T}}, str) where T
if str == ""
InfExtendedReal{T}(∞)
elseif str == "-∞"
InfExtendedReal{T}(-∞)
else
InfExtendedReal{T}(parse(T, str))
end
end

function parser(::Type{InfExtendedTime{T}}, str) where T
if str == ""
InfExtendedTime{T}(∞)
elseif str == "-∞"
InfExtendedTime{T}(-∞)
else
InfExtendedTime{T}(parse(T, str))
end
end

for (left, right, _) in test_values, (lb, rb) in product(('[', '('), (']', ')'))
T = promote_type(typeof(left), typeof(right))

Expand Down

0 comments on commit 93b79df

Please sign in to comment.