From ce42f39139ca039cc9140dcb434a720c14d3c9b0 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 24 Mar 2019 19:01:05 -0400 Subject: [PATCH] cleanup some tests --- tests/flat_hash_map_test.cc | 16 ++++++++-------- tests/flat_hash_set_test.cc | 2 -- tests/parallel_flat_hash_map_test.cc | 3 ++- tests/parallel_flat_hash_set_test.cc | 3 ++- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/flat_hash_map_test.cc b/tests/flat_hash_map_test.cc index d8ed648..810d3f3 100644 --- a/tests/flat_hash_map_test.cc +++ b/tests/flat_hash_map_test.cc @@ -211,30 +211,30 @@ TEST(FlatHashMap, MergeExtractInsert) { } #if !defined(__ANDROID__) && !defined(__APPLE__) && !defined(__EMSCRIPTEN__) && defined(PHMAP_HAVE_STD_ANY) TEST(FlatHashMap, Any) { - phmap::flat_hash_map m; + phmap::flat_hash_map m; m.emplace(1, 7); auto it = m.find(1); ASSERT_NE(it, m.end()); - EXPECT_EQ(7, phmap::any_cast(it->second)); + EXPECT_EQ(7, std::any_cast(it->second)); m.emplace(std::piecewise_construct, std::make_tuple(2), std::make_tuple(8)); it = m.find(2); ASSERT_NE(it, m.end()); - EXPECT_EQ(8, phmap::any_cast(it->second)); + EXPECT_EQ(8, std::any_cast(it->second)); m.emplace(std::piecewise_construct, std::make_tuple(3), - std::make_tuple(phmap::any(9))); + std::make_tuple(std::any(9))); it = m.find(3); ASSERT_NE(it, m.end()); - EXPECT_EQ(9, phmap::any_cast(it->second)); + EXPECT_EQ(9, std::any_cast(it->second)); struct H { - size_t operator()(const phmap::any&) const { return 0; } + size_t operator()(const std::any&) const { return 0; } }; struct E { - bool operator()(const phmap::any&, const phmap::any&) const { return true; } + bool operator()(const std::any&, const std::any&) const { return true; } }; - phmap::flat_hash_map m2; + phmap::flat_hash_map m2; m2.emplace(1, 7); auto it2 = m2.find(1); ASSERT_NE(it2, m2.end()); diff --git a/tests/flat_hash_set_test.cc b/tests/flat_hash_set_test.cc index 4337a20..54481a2 100644 --- a/tests/flat_hash_set_test.cc +++ b/tests/flat_hash_set_test.cc @@ -22,8 +22,6 @@ #include "unordered_set_members_test.h" #include "unordered_set_modifiers_test.h" -// #include "absl/memory/memory.h" - namespace phmap { namespace container_internal { namespace { diff --git a/tests/parallel_flat_hash_map_test.cc b/tests/parallel_flat_hash_map_test.cc index 7007027..c89b898 100644 --- a/tests/parallel_flat_hash_map_test.cc +++ b/tests/parallel_flat_hash_map_test.cc @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ #include "hash_generator_testing.h" #include "unordered_map_constructor_test.h" #include "unordered_map_lookup_test.h" +#include "unordered_map_members_test.h" #include "unordered_map_modifiers_test.h" namespace phmap { diff --git a/tests/parallel_flat_hash_set_test.cc b/tests/parallel_flat_hash_set_test.cc index 7e208e3..15981aa 100644 --- a/tests/parallel_flat_hash_set_test.cc +++ b/tests/parallel_flat_hash_set_test.cc @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -19,6 +19,7 @@ #include "hash_generator_testing.h" #include "unordered_set_constructor_test.h" #include "unordered_set_lookup_test.h" +#include "unordered_set_members_test.h" #include "unordered_set_modifiers_test.h" namespace phmap {