From 234f8c0a1e79d28cc6102ce01e34dc8aa776f60a Mon Sep 17 00:00:00 2001 From: OlivierHnt <38465572+OlivierHnt@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:48:19 +0200 Subject: [PATCH] Add error message for `issetequal` --- src/intervals/real_interface.jl | 3 +++ test/interval_tests/consistency.jl | 1 + 2 files changed, 4 insertions(+) diff --git a/src/intervals/real_interface.jl b/src/intervals/real_interface.jl index 32f4d26ac..82f980b02 100644 --- a/src/intervals/real_interface.jl +++ b/src/intervals/real_interface.jl @@ -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`.")) diff --git a/test/interval_tests/consistency.jl b/test/interval_tests/consistency.jl index d91184fcd..3448991e4 100644 --- a/test/interval_tests/consistency.jl +++ b/test/interval_tests/consistency.jl @@ -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)