Skip to content

Commit

Permalink
Add error message for issetequal
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Sep 19, 2023
1 parent 338eed9 commit 234f8c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/intervals/real_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ Base.isdisjoint(::Interval, ::Interval) =
Base.issubset(::Interval, ::Interval) =
throw(ArgumentError("`issubset` is purposely not supported for intervals. See instead `isweaksubset`."))

Base.issetequal(::Interval, ::Interval) =
throw(ArgumentError("`issetequal` is purposely not supported for intervals. See instead `isequalinterval`."))

Base.in(::Interval, ::Interval) =
throw(ArgumentError("`in` is purposely not supported for intervals. See instead `ismember`."))

Expand Down
1 change: 1 addition & 0 deletions test/interval_tests/consistency.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ import IntervalArithmetic: unsafe_interval
@test_throws ArgumentError x < y
@test_throws ArgumentError isdisjoint(x, y)
@test_throws ArgumentError issubset(x, y)
@test_throws ArgumentError issetequal(x, y)
@test_throws ArgumentError x in y
@test_throws ArgumentError isempty(x)
@test_throws ArgumentError isfinite(x)
Expand Down

0 comments on commit 234f8c0

Please sign in to comment.