Skip to content

Commit

Permalink
Add test of at-interval with fields from a type (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsanders authored Mar 6, 2017
1 parent a24a7f3 commit 2bd3b82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/interval_tests/construction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,9 @@ end
@test Interval{Float64}(3..4) == Interval(3.0, 4.0)
@test Interval{BigFloat}(3..4) == Interval{BigFloat}(3, 4)
end

@testset "@interval with fields" begin
a = 3..4
x = @interval(a.lo, 2*a.hi)
@test x == Interval(3, 8)
end

0 comments on commit 2bd3b82

Please # to comment.