Declare overloaded comparison operators as non-member functions

Change-Id: I4fd4638c29d01b39df69ad6d8cbc3a0dc9604db3
diff --git a/tests/unit/util/scheduler.t.cpp b/tests/unit/util/scheduler.t.cpp
index 3c13c70..d403a7c 100644
--- a/tests/unit/util/scheduler.t.cpp
+++ b/tests/unit/util/scheduler.t.cpp
@@ -222,23 +222,31 @@
   BOOST_CHECK(!eid);
 }
 
-BOOST_AUTO_TEST_CASE(Compare)
+BOOST_AUTO_TEST_CASE(Equality)
 {
   EventId eid, eid2;
-  BOOST_CHECK_EQUAL(eid == eid2, true);
-  BOOST_CHECK_EQUAL(eid != eid2, false);
+  BOOST_CHECK(eid == eid2);
 
   eid = scheduler.schedule(10_ms, []{});
-  BOOST_CHECK_EQUAL(eid == eid2, false);
-  BOOST_CHECK_EQUAL(eid != eid2, true);
-
-  eid2 = eid;
-  BOOST_CHECK_EQUAL(eid, eid2);
-  BOOST_CHECK_EQUAL(eid != eid2, false);
+  BOOST_CHECK(eid != eid2);
 
   eid2 = scheduler.schedule(10_ms, []{});
-  BOOST_CHECK_EQUAL(eid == eid2, false);
-  BOOST_CHECK_NE(eid, eid2);
+  BOOST_CHECK(eid != eid2);
+
+  eid.cancel();
+  BOOST_CHECK(eid != eid2);
+  BOOST_CHECK(eid == EventId{});
+
+  eid2.cancel();
+  BOOST_CHECK(eid == eid2);
+
+  eid = eid2 = scheduler.schedule(20_ms, []{});
+  BOOST_CHECK(eid == eid2);
+  BOOST_CHECK(eid != EventId{});
+
+  eid.cancel();
+  BOOST_CHECK(eid == eid2);
+  BOOST_CHECK(eid == EventId{});
 }
 
 BOOST_AUTO_TEST_CASE(Valid)