From ed4e5cc64785417ae7170b58b6650a701b8ade43 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 12 Aug 2020 15:36:03 -0500 Subject: [PATCH] Use Infinity 0.2.3 Version fixes https://github.com/cjdoris/Infinity.jl/issues/29 which was blocking this PR. --- Project.toml | 2 +- test/interval.jl | 32 -------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/Project.toml b/Project.toml index 82e9b848..c42376d8 100644 --- a/Project.toml +++ b/Project.toml @@ -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.8, 1" TimeZones = "0.7, 0.8, 0.9, 0.10, 0.11, 1" julia = "1" diff --git a/test/interval.jl b/test/interval.jl index 962e6b9b..037acb12 100644 --- a/test/interval.jl +++ b/test/interval.jl @@ -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))