Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolaru committed Jul 20, 2018
1 parent c0b87d1 commit 43a1073
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/interval_tests/construction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 43a1073

Please sign in to comment.