Migrated intrusive::CuckooSet unit test to gtest
authorkhizmax <libcds.dev@gmail.com>
Sun, 20 Mar 2016 09:03:51 +0000 (12:03 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 20 Mar 2016 09:03:51 +0000 (12:03 +0300)
projects/Win/vc14/cds.sln
projects/Win/vc14/gtest-striped-set.vcxproj [new file with mode: 0644]
projects/Win/vc14/gtest-striped-set.vcxproj.filters [new file with mode: 0644]
test/unit/CMakeLists.txt
test/unit/striped-set/CMakeLists.txt [new file with mode: 0644]
test/unit/striped-set/intrusive_cuckoo_set.cpp [new file with mode: 0644]
test/unit/striped-set/test_intrusive_set.h [new file with mode: 0644]

index 4ccf4b30ba79a4a2dff9965b4d752f7d829beb06..ea0d622ed9e64fe34ab484ff48cee53c47a5776d 100644 (file)
@@ -215,6 +215,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-intrusive-set", "gtes
                {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-striped-set", "gtest-striped-set.vcxproj", "{648021D3-6E18-4B94-88B8-F6A59609E210}"\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -549,6 +551,18 @@ Global
                {EC1EF263-7E34-4867-9ED9-77AA7963CD4A}.Release|Win32.Build.0 = Release|Win32\r
                {EC1EF263-7E34-4867-9ED9-77AA7963CD4A}.Release|x64.ActiveCfg = Release|x64\r
                {EC1EF263-7E34-4867-9ED9-77AA7963CD4A}.Release|x64.Build.0 = Release|x64\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Debug|Win32.Build.0 = Debug|Win32\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Debug|x64.ActiveCfg = Debug|x64\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Debug|x64.Build.0 = Debug|x64\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Release|Win32.ActiveCfg = Release|Win32\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Release|Win32.Build.0 = Release|Win32\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Release|x64.ActiveCfg = Release|x64\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
@@ -582,6 +596,7 @@ Global
                {51AC349E-B365-4FCF-8778-17A1534E4584} = {10E1FAF2-904D-405E-8AB5-6878A1B03346}\r
                {A589D3F1-A749-4268-ADEC-D0CE13D1E359} = {810490B7-31E5-49AE-8455-CAF99A9658B6}\r
                {EC1EF263-7E34-4867-9ED9-77AA7963CD4A} = {810490B7-31E5-49AE-8455-CAF99A9658B6}\r
+               {648021D3-6E18-4B94-88B8-F6A59609E210} = {810490B7-31E5-49AE-8455-CAF99A9658B6}\r
        EndGlobalSection\r
        GlobalSection(DPCodeReviewSolutionGUID) = preSolution\r
                DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}\r
diff --git a/projects/Win/vc14/gtest-striped-set.vcxproj b/projects/Win/vc14/gtest-striped-set.vcxproj
new file mode 100644 (file)
index 0000000..1540a60
--- /dev/null
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="DebugVLD|Win32">\r
+      <Configuration>DebugVLD</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="DebugVLD|x64">\r
+      <Configuration>DebugVLD</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\..\test\unit\main.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_cuckoo_set.cpp">\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\..\test\unit\striped-set\test_intrusive_set.h" />\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{648021D3-6E18-4B94-88B8-F6A59609E210}</ProjectGuid>\r
+    <Keyword>Win32Proj</Keyword>\r
+    <RootNamespace>striped-set</RootNamespace>\r
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <PlatformToolset>v140</PlatformToolset>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="Shared">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
+    <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)_d</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
+    <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)_d</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
+    <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)_d</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
+    <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
+    <TargetName>$(ProjectName)_d</TargetName>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>\r
+    <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>\r
+    <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>gtestd.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>\r
+      <AdditionalDependencies>gtest.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/projects/Win/vc14/gtest-striped-set.vcxproj.filters b/projects/Win/vc14/gtest-striped-set.vcxproj.filters
new file mode 100644 (file)
index 0000000..0c3d663
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <Filter Include="Source Files">\r
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+    </Filter>\r
+    <Filter Include="Header Files">\r
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+    </Filter>\r
+    <Filter Include="Resource Files">\r
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+    </Filter>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\..\test\unit\main.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_cuckoo_set.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\..\test\unit\striped-set\test_intrusive_set.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index fb88bf81a1748d5412d3b676432a139174aa1740..9ae3717740e3d7eb6789086b2002de6782dd3362 100644 (file)
@@ -4,4 +4,5 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/queue)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/intrusive-set)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/striped-set)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack)
diff --git a/test/unit/striped-set/CMakeLists.txt b/test/unit/striped-set/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0a6fe2f
--- /dev/null
@@ -0,0 +1,23 @@
+set(PACKAGE_NAME unit-striped-set)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -DCDSUNIT_ENABLE_BOOST_CONTAINER")
+
+set(CDSGTEST_SET_SOURCES
+    ../main.cpp
+    intrusive_cuckoo_set.cpp
+)
+
+include_directories(
+    ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_executable(${PACKAGE_NAME} ${CDSGTEST_SET_SOURCES})
+target_link_libraries(${PACKAGE_NAME} 
+    ${CDS_SHARED_LIBRARY}
+    ${GTEST_LIBRARY}
+    ${Boost_THREAD_LIBRARY}
+    ${Boost_SYSTEM_LIBRARY}
+    ${CMAKE_THREAD_LIBS_INIT}
+)
+
+add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
\ No newline at end of file
diff --git a/test/unit/striped-set/intrusive_cuckoo_set.cpp b/test/unit/striped-set/intrusive_cuckoo_set.cpp
new file mode 100644 (file)
index 0000000..8109719
--- /dev/null
@@ -0,0 +1,1278 @@
+/*
+    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 "test_intrusive_set.h"
+
+#include <cds/intrusive/cuckoo_set.h>
+
+namespace {
+    namespace ci = cds::intrusive;
+
+    class IntrusiveCuckooSet : public cds_test::intrusive_set
+    {
+    protected:
+        typedef cds_test::intrusive_set base_class;
+
+        typedef base_class::hash_int hash1;
+
+        struct hash2: private hash1
+        {
+            typedef hash1 base_class;
+
+            size_t operator()( int i ) const
+            {
+                size_t h = ~(base_class::operator()( i ));
+                return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
+            }
+            template <typename Item>
+            size_t operator()( const Item& i ) const
+            {
+                size_t h = ~(base_class::operator()( i ));
+                return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
+            }
+        };
+
+        struct disposer2
+        {
+            template <typename T>
+            void operator ()( T * p )
+            {
+                ++p->nEraseCount;
+            }
+        };
+
+        template <typename Set>
+        void test( Set& s )
+        {
+            // Precondition: set is empty
+            // Postcondition: set is empty
+
+            base_class::test_< Set::c_isSorted>( s );
+
+            ASSERT_TRUE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, 0 );
+
+            typedef typename Set::value_type value_type;
+
+            std::vector< value_type > data;
+            std::vector< size_t> indices;
+            data.reserve( kSize );
+            indices.reserve( kSize );
+            size_t const nSetSize = kSize;
+            for ( size_t key = 0; key < kSize; ++key ) {
+                data.push_back( value_type( static_cast<int>(key) ) );
+                indices.push_back( key );
+            }
+            shuffle( indices.begin(), indices.end() );
+
+            // clear_and_dispose
+            for ( auto& i : data ) {
+                i.clear_stat();
+                ASSERT_TRUE( s.insert( i ) );
+            }
+            ASSERT_FALSE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, nSetSize );
+
+            s.clear_and_dispose( disposer2());
+
+            ASSERT_TRUE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, 0 );
+            for ( auto& i : data ) {
+                EXPECT_EQ( i.nDisposeCount, 0 );
+                EXPECT_EQ( i.nEraseCount, 1 );
+            }
+
+        }
+
+        //void SetUp()
+        //{}
+
+        //void TearDown()
+        //{}
+    };
+
+
+//************************************************************
+// striped base hook
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_unordered )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_unordered )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_cmp )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s( 32, 6, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_cmp )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                , ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_less )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                , ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 4, ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_less )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_cmpmix )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_cmpmix )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_stat )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_stat )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_unordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::base_hook< 
+                ci::cuckoo::probeset_type< item_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::hash_array_size >
+            > hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_unordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::base_hook< 
+                ci::cuckoo::probeset_type< item_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::hash_array_size >
+            > hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::hash_array_size >
+                > >
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::hash_array_size >
+                > >
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+//************************************************************
+// striped member hook
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_unordered )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember )> hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_unordered )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ), ci::cuckoo::probeset_type< item_type::member_type::probeset_type >> hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_cmp )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s( 32, 6, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_cmp )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                , ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_less )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                , ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 4, ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_less )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_cmpmix )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_cmpmix )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_stat )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_stat )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_unordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+            > hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_unordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+            > hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+                > >
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+                > >
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+//************************************************************
+// refinable base hook
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_unordered )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_unordered )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_cmp )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s( 32, 6, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_cmp )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                , ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_less )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 4, ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_less )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_cmpmix )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_cmpmix )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_stat )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_stat )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_unordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::base_hook< 
+                ci::cuckoo::probeset_type< item_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::hash_array_size >
+            > hook;
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_unordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::base_hook< 
+                ci::cuckoo::probeset_type< item_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::hash_array_size >
+            > hook;
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::hash_array_size >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_storehash )
+    {
+        typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::base_hook<
+                    ci::cuckoo::probeset_type< item_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::hash_array_size >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+//************************************************************
+// refinable member hook
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_unordered )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember )> hook;
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_unordered )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ), ci::cuckoo::probeset_type< item_type::member_type::probeset_type >> hook;
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_cmp )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s( 32, 6, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_cmp )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_less )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 4, ht );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_less )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_cmpmix )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_cmpmix )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_stat )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_stat )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,ci::opt::hash< std::tuple< hash1, hash2 > >
+                ,ci::opt::less< less<item_type> >
+                ,ci::opt::compare< cmp<item_type> >
+                ,ci::opt::stat< ci::cuckoo::stat >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_unordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+            > hook;
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s;
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_unordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
+        struct set_traits: public ci::cuckoo::traits
+        {
+            typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+            > hook;
+            typedef ci::cuckoo::refinable<> mutex_policy;
+            typedef cds::opt::hash_tuple< hash1, hash2 > hash;
+            typedef base_class::equal_to<item_type> equal_to;
+            typedef mock_disposer disposer;
+            typedef ci::cuckoo::stat stat;
+        };
+        typedef ci::CuckooSet< item_type, set_traits > set_type;
+
+        set_type s( 32, 4 );
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( 32, 6, 0, std::move( ht ));
+        test( s );
+    }
+
+    TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_storehash )
+    {
+        typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
+
+        typedef ci::CuckooSet< item_type
+            ,ci::cuckoo::make_traits<
+                ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
+                    ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
+                    ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
+                > >
+                ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
+                ,cds::opt::hash< std::tuple< hash1, hash2 > >
+                ,cds::opt::less< less<item_type> >
+                ,cds::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        > set_type; 
+
+        typename set_type::hash_tuple_type ht;
+        set_type s( std::move( ht ));
+        test( s );
+    }
+
+} // namespace
diff --git a/test/unit/striped-set/test_intrusive_set.h b/test/unit/striped-set/test_intrusive_set.h
new file mode 100644 (file)
index 0000000..b8c673f
--- /dev/null
@@ -0,0 +1,461 @@
+/*
+    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.     
+*/
+
+#ifndef CDSUNIT_SET_TEST_INTRUSIVE_SET_H
+#define CDSUNIT_SET_TEST_INTRUSIVE_SET_H
+
+#include <cds_test/check_size.h>
+#include <cds_test/fixture.h>
+
+#include <cds/opt/hash.h>
+
+// forward declaration
+namespace cds { namespace intrusive {}}
+
+namespace cds_test {
+
+    namespace ci = cds::intrusive;
+    namespace co = cds::opt;
+
+    class intrusive_set: public fixture
+    {
+    public:
+        static size_t const kSize = 1000;
+
+        struct stat
+        {
+            unsigned int nDisposeCount  ;   // count of disposer calling
+            unsigned int nFindCount     ;   // count of find-functor calling
+            unsigned int nUpdateNewCount;
+            unsigned int nUpdateCount;
+            mutable unsigned int nEraseCount;
+
+            stat()
+            {
+                clear_stat();
+            }
+
+            void clear_stat()
+            {
+                memset( this, 0, sizeof( *this ) );
+            }
+        };
+
+        template <typename Node>
+        struct base_int_item
+            : public Node
+            , public stat
+
+        {
+            int nKey;
+            int nVal;
+
+            base_int_item()
+            {}
+
+            explicit base_int_item( int key )
+                : nKey( key )
+                , nVal( key )
+            {}
+
+            base_int_item(int key, int val)
+                : nKey( key )
+                , nVal(val)
+            {}
+
+            base_int_item( base_int_item const& v )
+                : Node()
+                , stat()
+                , nKey( v.nKey )
+                , nVal( v.nVal )
+            {}
+
+            int key() const
+            {
+                return nKey;
+            }
+        };
+
+        template <typename Node>
+        struct member_int_item: public stat
+        {
+            typedef Node member_type;
+
+            int nKey;
+            int nVal;
+
+            Node hMember;
+
+            stat s;
+
+            member_int_item()
+            {}
+
+            explicit member_int_item( int key )
+                : nKey( key )
+                , nVal( key )
+            {}
+
+            member_int_item(int key, int val)
+                : nKey( key )
+                , nVal(val)
+            {}
+
+            member_int_item(member_int_item const& v )
+                : stat()
+                , nKey( v.nKey )
+                , nVal( v.nVal )
+            {}
+
+            int key() const
+            {
+                return nKey;
+            }
+        };
+
+        struct hash_int {
+            size_t operator()( int i ) const
+            {
+                return co::v::hash<int>()( i );
+            }
+            template <typename Item>
+            size_t operator()( const Item& i ) const
+            {
+                return (*this)( i.key() );
+            }
+        };
+
+        struct simple_item_counter {
+            size_t  m_nCount;
+
+            simple_item_counter()
+                : m_nCount(0)
+            {}
+
+            size_t operator ++()
+            {
+                return ++m_nCount;
+            }
+
+            size_t operator --()
+            {
+                return --m_nCount;
+            }
+
+            void reset()
+            {
+                m_nCount = 0;
+            }
+
+            operator size_t() const
+            {
+                return m_nCount;
+            }
+        };
+
+
+        template <typename T>
+        struct less
+        {
+            bool operator ()(const T& v1, const T& v2 ) const
+            {
+                return v1.key() < v2.key();
+            }
+
+            template <typename Q>
+            bool operator ()(const T& v1, const Q& v2 ) const
+            {
+                return v1.key() < v2;
+            }
+
+            template <typename Q>
+            bool operator ()(const Q& v1, const T& v2 ) const
+            {
+                return v1 < v2.key();
+            }
+        };
+
+        template <typename T>
+        struct cmp {
+            int operator ()(const T& v1, const T& v2 ) const
+            {
+                if ( v1.key() < v2.key() )
+                    return -1;
+                return v1.key() > v2.key() ? 1 : 0;
+            }
+
+            template <typename Q>
+            int operator ()(const T& v1, const Q& v2 ) const
+            {
+                if ( v1.key() < v2 )
+                    return -1;
+                return v1.key() > v2 ? 1 : 0;
+            }
+
+            template <typename Q>
+            int operator ()(const Q& v1, const T& v2 ) const
+            {
+                if ( v1 < v2.key() )
+                    return -1;
+                return v1 > v2.key() ? 1 : 0;
+            }
+        };
+
+        template <typename T>
+        struct equal_to {
+            int operator ()( const T& v1, const T& v2 ) const
+            {
+                return v1.key() == v2.key();
+            }
+
+            template <typename Q>
+            int operator ()( const T& v1, const Q& v2 ) const
+            {
+                return v1.key() == v2;
+            }
+
+            template <typename Q>
+            int operator ()( const Q& v1, const T& v2 ) const
+            {
+                return v1 == v2.key();
+            }
+        };
+
+        struct other_item {
+            int nKey;
+
+            explicit other_item( int k )
+                : nKey( k )
+            {}
+
+            int key() const
+            {
+                return nKey;
+            }
+        };
+
+        struct other_less {
+            template <typename Q, typename T>
+            bool operator()( Q const& lhs, T const& rhs ) const
+            {
+                return lhs.key() < rhs.key();
+            }
+        };
+
+        struct other_equal_to {
+            template <typename Q, typename T>
+            bool operator()( Q const& lhs, T const& rhs ) const
+            {
+                return lhs.key() == rhs.key();
+            }
+        };
+
+        struct mock_disposer
+        {
+            template <typename T>
+            void operator ()( T * p )
+            {
+                ++p->nDisposeCount;
+            }
+        };
+
+    protected:
+        template <typename Set>
+        void test( Set& s )
+        {
+            test_< true >( s );
+        }
+
+        template <bool Sorted, class Set>
+        void test_( Set& s )
+        {
+            // Precondition: set is empty
+            // Postcondition: set is empty
+
+            ASSERT_TRUE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, 0 );
+
+            typedef typename Set::value_type value_type;
+            typedef typename std::conditional< Sorted, other_less, other_equal_to >::type other_predicate;
+            size_t const nSetSize = kSize;
+
+            std::vector< value_type > data;
+            std::vector< size_t> indices;
+            data.reserve( kSize );
+            indices.reserve( kSize );
+            for ( size_t key = 0; key < kSize; ++key ) {
+                data.push_back( value_type( static_cast<int>( key )));
+                indices.push_back( key );
+            }
+            shuffle( indices.begin(), indices.end() );
+
+            // insert/find
+            for ( auto idx : indices ) {
+                auto& i = data[ idx ];
+
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_predicate()));
+                ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
+                ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} ));
+
+                std::pair<bool, bool> updResult;
+
+                updResult = s.update( i, []( bool bNew, value_type&, value_type& )
+                {
+                    ASSERT_TRUE( false );
+                }, false );
+                EXPECT_FALSE( updResult.first );
+                EXPECT_FALSE( updResult.second );
+
+                switch ( i.key() % 3 ) {
+                case 0:
+                    ASSERT_TRUE( s.insert( i ));
+                    ASSERT_FALSE( s.insert( i ));
+                    updResult = s.update( i, []( bool bNew, value_type& val, value_type& arg) 
+                        {
+                            EXPECT_FALSE( bNew );
+                            EXPECT_EQ( &val, &arg );
+                        }, false );
+                    EXPECT_TRUE( updResult.first );
+                    EXPECT_FALSE( updResult.second );
+                    break;
+                case 1:
+                    EXPECT_EQ( i.nUpdateNewCount, 0 );
+                    ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
+                    EXPECT_EQ( i.nUpdateNewCount, 1 );
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
+                    EXPECT_EQ( i.nUpdateNewCount, 1 );
+                    i.nUpdateNewCount = 0;
+                    break;
+                case 2:
+                    updResult = s.update( i, []( bool bNew, value_type& val, value_type& arg )
+                    {
+                        EXPECT_TRUE( bNew );
+                        EXPECT_EQ( &val, &arg );
+                    });
+                    EXPECT_TRUE( updResult.first );
+                    EXPECT_TRUE( updResult.second );
+                    break;
+                }
+
+                ASSERT_TRUE( s.contains( i.nKey ) );
+                ASSERT_TRUE( s.contains( i ) );
+                ASSERT_TRUE( s.contains( other_item( i.key() ), other_predicate()));
+                EXPECT_EQ( i.nFindCount, 0 );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
+                EXPECT_EQ( i.nFindCount, 1 );
+                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                EXPECT_EQ( i.nFindCount, 2 );
+            }
+            ASSERT_FALSE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, nSetSize );
+
+            std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
+
+            // erase
+            shuffle( indices.begin(), indices.end() );
+            for ( auto idx : indices ) {
+                auto& i = data[ idx ];
+
+                ASSERT_TRUE( s.contains( i.nKey ) );
+                ASSERT_TRUE( s.contains( i ) );
+                ASSERT_TRUE( s.contains( other_item( i.key() ), other_predicate() ) );
+                EXPECT_EQ( i.nFindCount, 0 );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ) );
+                EXPECT_EQ( i.nFindCount, 1 );
+                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
+                EXPECT_EQ( i.nFindCount, 2 );
+
+                value_type v( i );
+                switch ( i.key() % 6 ) {
+                case 0:
+                    ASSERT_FALSE( s.unlink( v ));
+                    ASSERT_TRUE( s.unlink( i ));
+                    ASSERT_FALSE( s.unlink( i ) );
+                    break;
+                case 1:
+                    ASSERT_TRUE( s.erase( i.key()));
+                    ASSERT_FALSE( s.erase( i.key() ) );
+                    break;
+                case 2:
+                    ASSERT_TRUE( s.erase( v ));
+                    ASSERT_FALSE( s.erase( v ) );
+                    break;
+                case 3:
+                    ASSERT_TRUE( s.erase_with( other_item( i.key()), other_predicate()));
+                    ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_predicate() ) );
+                    break;
+                case 4:
+                    EXPECT_EQ( i.nEraseCount, 0 );
+                    ASSERT_TRUE( s.erase( v, []( value_type& val ) { ++val.nEraseCount; } ));
+                    EXPECT_EQ( i.nEraseCount, 1 );
+                    ASSERT_FALSE( s.erase( v, []( value_type& val ) { ++val.nEraseCount; } ));
+                    EXPECT_EQ( i.nEraseCount, 1 );
+                    break;
+                case 5:
+                    EXPECT_EQ( i.nEraseCount, 0 );
+                    ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    EXPECT_EQ( i.nEraseCount, 1 );
+                    ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    EXPECT_EQ( i.nEraseCount, 1 );
+                    break;
+                }
+
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_predicate()));
+                ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
+                ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} ));
+            }
+            ASSERT_TRUE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, 0 );
+
+            // clear
+            for ( auto& i : data ) {
+                i.clear_stat();
+                ASSERT_TRUE( s.insert( i ));
+            }
+            ASSERT_FALSE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, nSetSize );
+
+            s.clear();
+
+            ASSERT_TRUE( s.empty() );
+            ASSERT_CONTAINER_SIZE( s, 0 );
+            for ( auto& i : data ) {
+                EXPECT_EQ( i.nDisposeCount, 1 );
+            }
+        }
+    };
+
+} // namespace cds_test
+
+#endif // #ifndef CDSUNIT_SET_TEST_INTRUSIVE_SET_H