<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">CDSUNIT_ENABLE_BOOST_CONTAINER;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CDSUNIT_ENABLE_BOOST_CONTAINER;_SCL_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_flat_map.cpp" />
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_list.cpp" />
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_map.cpp" />
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_slist.cpp" />
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_unordered_map.cpp" />
<ClCompile Include="..\..\..\test\unit\striped-map\map_std_list.cpp" />
<ClCompile Include="..\..\..\test\unit\striped-map\map_std_map.cpp" />
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_std_unordered_map.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\test\unit\striped-map\test_map.h" />
<ClCompile Include="..\..\..\test\unit\striped-map\map_std_map.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_std_unordered_map.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_slist.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_list.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_map.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_flat_map.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\unit\striped-map\map_boost_unordered_map.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\test\unit\striped-map\test_map_data.h">
set(CDSGTEST_STRIPED_MAP_SOURCES
../main.cpp
cuckoo_map.cpp
+ map_boost_flat_map.cpp
+ map_boost_list.cpp
+ map_boost_map.cpp
+ map_boost_slist.cpp
+ map_boost_unordered_map.cpp
map_std_list.cpp
map_std_map.cpp
+ map_std_unordered_map.cpp
)
include_directories(
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#include <cds/details/defs.h>
+#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION < 105500
+ // Skipped; for Microsoft Visual C++ 2013 and boost::container::flat_map you should use boost version 1.55 or above" );
+#elif BOOST_VERSION >= 104800
+
+#include <cds/container/striped_map/boost_flat_map.h>
+#include "test_striped_map.h"
+
+namespace {
+ struct test_traits
+ {
+ typedef boost::container::flat_map<
+ cds_test::striped_map_fixture::key_type,
+ cds_test::striped_map_fixture::value_type,
+ cds_test::striped_map_fixture::less
+ > container_type;
+
+ struct copy_policy {
+ typedef container_type::iterator iterator;
+
+ void operator()( container_type& m, iterator /*itInsert*/, iterator itWhat )
+ {
+ m.insert( *itWhat );
+ }
+ };
+
+ static bool const c_hasFindWith = false;
+ static bool const c_hasEraseWith = false;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostFlatMap, StripedMap, test_traits );
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostFlatMap, RefinableMap, test_traits );
+
+} // namespace
+
+#else // BOOST_VERSION < 104800
+// Skipped; for boost::container::flat_map you should use boost version 1.48 or above
+#endif // BOOST_VERSION
+
+#endif // #ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#include <cds/details/defs.h>
+#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION < 105500
+ // Skipped; for Microsoft Visual C++ 2013 and boost::container::list you should use boost version 1.55 or above" );
+#elif BOOST_VERSION >= 104800
+
+#include <cds/container/striped_map/boost_list.h>
+#include "test_striped_map.h"
+
+namespace {
+ struct test_traits
+ {
+ typedef boost::container::list< std::pair< cds_test::striped_map_fixture::key_type const, cds_test::striped_map_fixture::value_type >> container_type;
+
+ struct copy_policy {
+ typedef container_type::iterator iterator;
+
+ void operator()( container_type& list, iterator itInsert, iterator itWhat )
+ {
+ list.insert( itInsert, *itWhat );
+ }
+ };
+
+ static bool const c_hasFindWith = true;
+ static bool const c_hasEraseWith = true;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostList, StripedMap, test_traits );
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostList, RefinableMap, test_traits );
+
+} // namespace
+
+#else // BOOST_VERSION < 104800
+// Skipped; for boost::container::list you should use boost version 1.48 or above
+#endif // BOOST_VERSION
+
+#endif // #ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#include <cds/details/defs.h>
+#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION < 105500
+ // Skipped; for Microsoft Visual C++ 2013 and boost::container::map you should use boost version 1.55 or above" );
+#elif BOOST_VERSION >= 104800
+
+#include <cds/container/striped_map/boost_map.h>
+#include "test_striped_map.h"
+
+namespace {
+ struct test_traits
+ {
+ typedef boost::container::map<
+ cds_test::striped_map_fixture::key_type,
+ cds_test::striped_map_fixture::value_type,
+ cds_test::striped_map_fixture::less
+ > container_type;
+
+ struct copy_policy {
+ typedef container_type::iterator iterator;
+
+ void operator()( container_type& map, iterator itWhat )
+ {
+ map.insert( *itWhat );
+ }
+ };
+
+ static bool const c_hasFindWith = false;
+ static bool const c_hasEraseWith = false;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostMap, StripedMap, test_traits );
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostMap, RefinableMap, test_traits );
+
+} // namespace
+
+#else // BOOST_VERSION < 104800
+// Skipped; for boost::container::map you should use boost version 1.48 or above
+#endif // BOOST_VERSION
+
+#endif // #ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#include <cds/details/defs.h>
+#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION < 105500
+ // Skipped; for Microsoft Visual C++ 2013 and boost::container::slist you should use boost version 1.55 or above" );
+#elif BOOST_VERSION >= 104800
+
+#include <cds/container/striped_map/boost_slist.h>
+#include "test_striped_map.h"
+
+namespace {
+ struct test_traits
+ {
+ typedef boost::container::slist< std::pair< cds_test::striped_map_fixture::key_type const, cds_test::striped_map_fixture::value_type >> container_type;
+
+ struct copy_policy {
+ typedef container_type::iterator iterator;
+
+ void operator()( container_type& list, iterator itInsert, iterator itWhat )
+ {
+ list.insert_after( itInsert, *itWhat );
+ }
+ };
+
+ static bool const c_hasFindWith = true;
+ static bool const c_hasEraseWith = true;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostSList, StripedMap, test_traits );
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostSList, RefinableMap, test_traits );
+
+} // namespace
+
+#else // BOOST_VERSION < 104800
+// Skipped; for boost::container::slist you should use boost version 1.48 or above
+#endif // BOOST_VERSION
+
+#endif // #ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <cds/container/striped_map/boost_unordered_map.h>
+#include "test_striped_map.h"
+
+namespace {
+ struct test_traits
+ {
+ typedef boost::unordered_map<
+ cds_test::striped_map_fixture::key_type
+ ,cds_test::striped_map_fixture::value_type
+ ,cds_test::striped_map_fixture::hash2
+ ,cds_test::striped_map_fixture::equal_to
+ > container_type;
+
+ struct copy_policy {
+ typedef container_type::iterator iterator;
+
+ void operator()( container_type& m, iterator /*itInsert*/, iterator itWhat )
+ {
+ m.insert( *itWhat );
+ }
+ };
+
+ static bool const c_hasFindWith = false;
+ static bool const c_hasEraseWith = false;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostUnorderedMap, StripedMap, test_traits );
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostUnorderedMap, RefinableMap, test_traits );
+
+} // namespace
+
+#endif // #ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <cds/container/striped_map/std_hash_map.h>
+#include "test_striped_map.h"
+
+namespace {
+ struct test_traits
+ {
+ typedef std::unordered_map<
+ cds_test::striped_map_fixture::key_type
+ , cds_test::striped_map_fixture::value_type
+ , cds_test::striped_map_fixture::hash2
+ , cds_test::striped_map_fixture::equal_to
+ > container_type;
+
+ struct copy_policy {
+ typedef container_type::iterator iterator;
+
+ void operator()( container_type& m, iterator /*itInsert*/, iterator itWhat )
+ {
+ m.insert( std::make_pair( itWhat->first, itWhat->second ));
+ }
+ };
+
+ static bool const c_hasFindWith = false;
+ static bool const c_hasEraseWith = false;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( StdUnorderedMap, StripedMap, test_traits );
+ INSTANTIATE_TYPED_TEST_CASE_P( StdUnorderedMap, RefinableMap, test_traits );
+
+} // namespace
ASSERT_TRUE( str.empty());
str = val.strVal;
ASSERT_FALSE( m.emplace( i, std::move( str )));
- ASSERT_TRUE( str.empty());
}
break;
case 15:
ASSERT_TRUE( str.empty());
str = val.strVal;
ASSERT_FALSE( m.emplace( i, i.nKey, std::move( str )));
- ASSERT_TRUE( str.empty());
}
break;
}