mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
all tests pass
This commit is contained in:
Vendored
+4
@@ -42,6 +42,10 @@ option(PHMAP_BUILD_TESTS "Whether or not to build the tests" OFF)
|
||||
option(PHMAP_BUILD_EXAMPLES "Whether or not to build the examples" OFF)
|
||||
|
||||
if (PHMAP_BUILD_TESTS)
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
||||
endif()
|
||||
|
||||
include(cmake/DownloadGTest.cmake)
|
||||
|
||||
check_target(gtest)
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#include "unordered_set_constructor_test.h"
|
||||
#include "unordered_set_lookup_test.h"
|
||||
#include "unordered_set_modifiers_test.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
|
||||
namespace phmap {
|
||||
namespace container_internal {
|
||||
@@ -44,11 +42,13 @@ INSTANTIATE_TYPED_TEST_SUITE_P(ParallelFlatHashSet, ConstructorTest, SetTypes);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(ParallelFlatHashSet, LookupTest, SetTypes);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(ParallelFlatHashSet, ModifiersTest, SetTypes);
|
||||
|
||||
#if PHMAP_HAVE_STD_STRING_VIEW
|
||||
TEST(ParallelFlatHashSet, EmplaceString) {
|
||||
std::vector<std::string> v = {"a", "b"};
|
||||
phmap::parallel_flat_hash_set<phmap::string_view> hs(v.begin(), v.end());
|
||||
EXPECT_THAT(hs, UnorderedElementsAreArray(v));
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(ParallelFlatHashSet, BitfieldArgument) {
|
||||
union {
|
||||
|
||||
Reference in New Issue
Block a user