Browse Source

test: suppress a few warnings (container)

Michele Caini 3 năm trước cách đây
mục cha
commit
f3beb5670a
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      test/entt/container/dense_map.cpp
  2. 1 1
      test/entt/container/dense_set.cpp

+ 1 - 1
test/entt/container/dense_map.cpp

@@ -1159,7 +1159,7 @@ TEST(DenseMap, Reserve) {
     map.reserve(minimum_bucket_count);
 
     ASSERT_EQ(map.bucket_count(), 2 * minimum_bucket_count);
-    ASSERT_EQ(map.bucket_count(), entt::next_power_of_two(std::ceil(minimum_bucket_count / map.max_load_factor())));
+    ASSERT_EQ(map.bucket_count(), entt::next_power_of_two(static_cast<std::size_t>(std::ceil(minimum_bucket_count / map.max_load_factor()))));
 }
 
 TEST(DenseMap, ThrowingAllocator) {

+ 1 - 1
test/entt/container/dense_set.cpp

@@ -877,7 +877,7 @@ TEST(DenseSet, Reserve) {
     set.reserve(minimum_bucket_count);
 
     ASSERT_EQ(set.bucket_count(), 2 * minimum_bucket_count);
-    ASSERT_EQ(set.bucket_count(), entt::next_power_of_two(std::ceil(minimum_bucket_count / set.max_load_factor())));
+    ASSERT_EQ(set.bucket_count(), entt::next_power_of_two(static_cast<std::size_t>(std::ceil(minimum_bucket_count / set.max_load_factor()))));
 }
 
 TEST(DenseSet, ThrowingAllocator) {