Skip to content

Commit

Permalink
tests for issubset between Intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed May 28, 2024
1 parent 7928b89 commit 8cf91fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/Sets/Interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,15 @@ for N in [Float64, Float32, Rational{Int}]
@test reflect(Interval(N(1), N(2))) == Interval(N(-2), N(-1))
@test reflect(Interval(N(-1), N(2))) == Interval(N(-2), N(1))
@test reflect(Interval(N(-2), N(-1))) == Interval(N(1), N(2))

# issubset
I13 = Interval(N(1), N(3))
I02 = Interval(N(0), N(2))
I24 = Interval(N(2), N(4))
for I in (I02, I24)
res, w = (I13, I, true)
@test !((I13, I)) && !res && w I13 && w I
end
res, w = (I13, I13, true)
@test (I13, I13) && res && w == N[]
end

0 comments on commit 8cf91fd

Please sign in to comment.