diff --git a/test/interval_tests/construction.jl b/test/interval_tests/construction.jl index 97237e5c2..848ca73e8 100644 --- a/test/interval_tests/construction.jl +++ b/test/interval_tests/construction.jl @@ -72,6 +72,11 @@ end @test_throws ArgumentError interval(-Inf, -Inf) @test_throws ArgumentError interval(Inf, Inf) + # Disallowed creation of interval witha a or b an interval + @test_throws TypeError Interval(1, 1..2) + @test_throws TypeError Interval(1..2, 1) + @test_throws TypeError Interval(1..2, 1..2) + # Conversion to Interval without type @test convert(Interval, 1) == Interval(1.0) @test convert(Interval, pi) == @interval(pi)