Browse Source

test: const correctness

Michele Caini 2 years ago
parent
commit
57ec8d9ca3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      test/entt/signal/sigh.cpp

+ 3 - 3
test/entt/signal/sigh.cpp

@@ -275,7 +275,7 @@ TEST(SigH, ScopedConnection) {
     {
     {
         ASSERT_FALSE(listener.k);
         ASSERT_FALSE(listener.k);
 
 
-        entt::scoped_connection conn = sink.connect<&sigh_listener::g>(listener);
+        const entt::scoped_connection conn = sink.connect<&sigh_listener::g>(listener);
         sigh.publish(42);
         sigh.publish(42);
 
 
         ASSERT_FALSE(sigh.empty());
         ASSERT_FALSE(sigh.empty());
@@ -300,7 +300,7 @@ TEST(SigH, ScopedConnectionMove) {
     ASSERT_TRUE(outer);
     ASSERT_TRUE(outer);
 
 
     {
     {
-        entt::scoped_connection inner{std::move(outer)};
+        const entt::scoped_connection inner{std::move(outer)};
 
 
         ASSERT_FALSE(listener.k);
         ASSERT_FALSE(listener.k);
         ASSERT_FALSE(outer);
         ASSERT_FALSE(outer);
@@ -455,7 +455,7 @@ TEST(SigH, ConnectAndAutoDisconnect) {
 }
 }
 
 
 TEST(SigH, CustomAllocator) {
 TEST(SigH, CustomAllocator) {
-    std::allocator<void (*)(int)> allocator;
+    const std::allocator<void (*)(int)> allocator;
     entt::sigh<void(int), decltype(allocator)> sigh{allocator};
     entt::sigh<void(int), decltype(allocator)> sigh{allocator};
 
 
     ASSERT_EQ(sigh.get_allocator(), allocator);
     ASSERT_EQ(sigh.get_allocator(), allocator);