From cbd67fe1cff212991d20a4a9512b43727157152c Mon Sep 17 00:00:00 2001 From: tmadlener Date: Wed, 17 Jul 2024 11:41:33 +0200 Subject: [PATCH] Add tests for inequality operator --- tests/unittests/associations.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unittests/associations.cpp b/tests/unittests/associations.cpp index 55586a8e3..00a048f76 100644 --- a/tests/unittests/associations.cpp +++ b/tests/unittests/associations.cpp @@ -128,6 +128,11 @@ TEST_CASE("Association basics", "[associations]") { // Mutable and immutable associations should be comparable TestA assoc = mutAssoc; REQUIRE(assoc == mutAssoc); + + // operator!= is also defined and working + auto newAssoc = TestA{}; + REQUIRE(otherAssoc != newAssoc); + REQUIRE(assoc != newAssoc); } }