Browse Source

test: minor changes to make all major compilers agree at least on something :)

Michele Caini 4 years ago
parent
commit
36a9456e0d

+ 4 - 0
test/entt/common/throwing_allocator.hpp

@@ -56,6 +56,10 @@ public:
         return true;
     }
 
+    bool operator!=(const throwing_allocator<Type> &other) const {
+        return !(*this == other);
+    }
+
     static inline bool trigger_on_allocate{};
     static inline bool trigger_after_allocate{};
 };

+ 1 - 0
test/entt/entity/storage.cpp

@@ -1377,6 +1377,7 @@ TEST(Storage, UpdateFromDestructor) {
 TEST(Storage, CustomAllocator) {
     auto test = [](auto pool, auto alloc) {
         ASSERT_EQ(pool.get_allocator(), alloc);
+        ASSERT_FALSE(pool.get_allocator() != alloc);
 
         pool.reserve(1u);
 

+ 1 - 0
test/entt/signal/sigh.cpp

@@ -536,6 +536,7 @@ TEST_F(SigH, CustomAllocator) {
 
     auto test = [&](auto curr) {
         ASSERT_EQ(curr.get_allocator(), allocator);
+        ASSERT_FALSE(curr.get_allocator() != allocator);
         ASSERT_TRUE(curr.empty());
 
         entt::sink sink{curr};