Moved priority_queue unit test to gtest framework
authorkhizmax <libcds.dev@gmail.com>
Fri, 15 Jan 2016 21:25:48 +0000 (00:25 +0300)
committerkhizmax <libcds.dev@gmail.com>
Fri, 15 Jan 2016 21:25:48 +0000 (00:25 +0300)
31 files changed:
cds/container/mspriority_queue.h
cds/intrusive/mspriority_queue.h
projects/Win/vc14/cds.sln
projects/Win/vc14/gtest-pqueue.vcxproj [new file with mode: 0644]
projects/Win/vc14/gtest-pqueue.vcxproj.filters [new file with mode: 0644]
projects/Win/vc14/gtest-stack.vcxproj
projects/Win/vc14/hdr-test-priority_queue.vcxproj [deleted file]
projects/Win/vc14/hdr-test-priority_queue.vcxproj.filters [deleted file]
projects/source.test-hdr.mk
test/include/cds_test/fixture.h [new file with mode: 0644]
test/unit/CMakeLists.txt
test/unit/pqueue/CMakeLists.txt [new file with mode: 0644]
test/unit/pqueue/fcpqueue_boost_stable_vector.cpp [new file with mode: 0644]
test/unit/pqueue/fcpqueue_deque.cpp [new file with mode: 0644]
test/unit/pqueue/fcpqueue_vector.cpp [new file with mode: 0644]
test/unit/pqueue/intrusive_mspqueue.cpp [new file with mode: 0644]
test/unit/pqueue/main.cpp [new file with mode: 0644]
test/unit/pqueue/mspqueue.cpp [new file with mode: 0644]
test/unit/pqueue/test_data.h [new file with mode: 0644]
test/unit/pqueue/test_fcpqueue.h [new file with mode: 0644]
tests/test-hdr/CMakeLists.txt
tests/test-hdr/priority_queue/hdr_fcpqueue_boost_stable_vector.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_fcpqueue_deque.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_fcpqueue_vector.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_dyn.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_static.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h [deleted file]
tests/test-hdr/priority_queue/hdr_mspqueue_dyn.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_mspqueue_static.cpp [deleted file]
tests/test-hdr/priority_queue/hdr_pqueue.h [deleted file]
tests/test-hdr/priority_queue/hdr_priority_queue_reg.cpp [deleted file]

index 4b916f042d128e2891734c6253e4b2a43aebb9b2..23b2324b4c7f7b5594bdc26f4584ebde442eddb9 100644 (file)
@@ -164,7 +164,7 @@ namespace cds { namespace container {
     public:
         /// Constructs empty priority queue
         /**
-            For cds::opt::v::static_buffer the \p nCapacity parameter is ignored.
+            For \p cds::opt::v::static_buffer the \p nCapacity parameter is ignored.
         */
         MSPriorityQueue( size_t nCapacity )
             : base_class( nCapacity )
index c85989adb8907bf495530fb330347939a6ebb30f..8dfbad07831fdd3b5ddb7f0a43c8bc3f55d2bbab 100644 (file)
@@ -245,7 +245,7 @@ namespace cds { namespace intrusive {
     public:
         /// Constructs empty priority queue
         /**
-            For cds::opt::v::static_buffer the \p nCapacity parameter is ignored.
+            For \p cds::opt::v::static_buffer the \p nCapacity parameter is ignored.
         */
         MSPriorityQueue( size_t nCapacity )
             : m_Heap( nCapacity )
index 1299dddca63cea3c18e2a0928cad6fff3843ba92..9404ae70a325154845182754bd8362c92569856a 100644 (file)
@@ -135,12 +135,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-set-insdel", "unit-set
                {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
        EndProjectSection\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-priority_queue", "hdr-test-priority_queue.vcxproj", "{90192F7D-5850-41DD-AE89-62D26B387162}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81}\r
-               {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
-       EndProjectSection\r
-EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-queue", "hdr-test-queue.vcxproj", "{33664E63-8D24-4FF4-A744-9782EB711509}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81}\r
@@ -192,6 +186,19 @@ EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unit", "unit", "{810490B7-31E5-49AE-8455-CAF99A9658B6}"\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-stack", "gtest-stack.vcxproj", "{5407E9D2-67D9-4266-976E-7A90BDE2541D}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-pqueue", "gtest-pqueue.vcxproj", "{EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
+       EndProjectSection\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cds_test", "cds_test", "{3A510E45-180B-4ADC-AFCD-D75774B68580}"\r
+       ProjectSection(SolutionItems) = preProject\r
+               ..\..\..\test\include\cds_test\fixture.h = ..\..\..\test\include\cds_test\fixture.h\r
+       EndProjectSection\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -371,18 +378,6 @@ Global
                {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|Win32.Build.0 = Release|Win32\r
                {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.ActiveCfg = Release|x64\r
                {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.Build.0 = Release|x64\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Debug|Win32.Build.0 = Debug|Win32\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Debug|x64.ActiveCfg = Debug|x64\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Debug|x64.Build.0 = Debug|x64\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Release|Win32.ActiveCfg = Release|Win32\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Release|Win32.Build.0 = Release|Win32\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Release|x64.ActiveCfg = Release|x64\r
-               {90192F7D-5850-41DD-AE89-62D26B387162}.Release|x64.Build.0 = Release|x64\r
                {33664E63-8D24-4FF4-A744-9782EB711509}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {33664E63-8D24-4FF4-A744-9782EB711509}.Debug|Win32.Build.0 = Debug|Win32\r
                {33664E63-8D24-4FF4-A744-9782EB711509}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -491,6 +486,18 @@ Global
                {5407E9D2-67D9-4266-976E-7A90BDE2541D}.Release|Win32.Build.0 = Release|Win32\r
                {5407E9D2-67D9-4266-976E-7A90BDE2541D}.Release|x64.ActiveCfg = Release|x64\r
                {5407E9D2-67D9-4266-976E-7A90BDE2541D}.Release|x64.Build.0 = Release|x64\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Debug|Win32.Build.0 = Debug|Win32\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Debug|x64.ActiveCfg = Debug|x64\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Debug|x64.Build.0 = Debug|x64\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Release|Win32.ActiveCfg = Release|Win32\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Release|Win32.Build.0 = Release|Win32\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Release|x64.ActiveCfg = Release|x64\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
@@ -511,7 +518,6 @@ Global
                {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
                {AF7B2253-2E6D-4992-94D9-4B3699C54929} = {A64449B7-90FB-4E2B-A686-9EFC0E298644}\r
                {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1} = {A64449B7-90FB-4E2B-A686-9EFC0E298644}\r
-               {90192F7D-5850-41DD-AE89-62D26B387162} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
                {33664E63-8D24-4FF4-A744-9782EB711509} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
                {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
                {A38E5597-6916-4480-A343-C9846EF544E4} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
@@ -521,6 +527,7 @@ Global
                {CA6F0834-0628-4CD7-8800-AEABCD636360} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
                {DE256E91-EE96-412E-82EE-DD7BD1A1130D} = {A64449B7-90FB-4E2B-A686-9EFC0E298644}\r
                {5407E9D2-67D9-4266-976E-7A90BDE2541D} = {810490B7-31E5-49AE-8455-CAF99A9658B6}\r
+               {EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A} = {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-pqueue.vcxproj b/projects/Win/vc14/gtest-pqueue.vcxproj
new file mode 100644 (file)
index 0000000..7aa5b94
--- /dev/null
@@ -0,0 +1,251 @@
+<?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\pqueue\fcpqueue_boost_stable_vector.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\fcpqueue_deque.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\fcpqueue_vector.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\intrusive_mspqueue.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\main.cpp" />\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\mspqueue.cpp" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\..\test\unit\pqueue\test_data.h" />\r
+    <ClInclude Include="..\..\..\test\unit\pqueue\test_fcpqueue.h" />\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <ProjectGuid>{EAD522BF-E7DA-4A20-94FF-4D3EAF0A540A}</ProjectGuid>\r
+    <Keyword>Win32Proj</Keyword>\r
+    <RootNamespace>stack</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>\r
+      </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
+    </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>\r
+      </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
+    </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>\r
+      </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
+    </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>\r
+      </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
+    </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>\r
+      </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
+    </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>\r
+      </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
+    </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-pqueue.vcxproj.filters b/projects/Win/vc14/gtest-pqueue.vcxproj.filters
new file mode 100644 (file)
index 0000000..228156a
--- /dev/null
@@ -0,0 +1,45 @@
+<?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\pqueue\main.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\fcpqueue_vector.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\fcpqueue_deque.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\fcpqueue_boost_stable_vector.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\mspqueue.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\..\..\test\unit\pqueue\intrusive_mspqueue.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClInclude Include="..\..\..\test\unit\pqueue\test_fcpqueue.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\test\unit\pqueue\test_data.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index acbcad6d4af639f50cfbd67727e65993b645b636..3741d2e1e107bcc18660eca20dc0c6dd5ef5633a 100644 (file)
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <LinkIncremental>false</LinkIncremental>\r
-    <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\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)\</OutDir>\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
diff --git a/projects/Win/vc14/hdr-test-priority_queue.vcxproj b/projects/Win/vc14/hdr-test-priority_queue.vcxproj
deleted file mode 100644 (file)
index 8603df3..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-<?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="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</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="..\..\..\tests\test-hdr\priority_queue\hdr_fcpqueue_boost_stable_vector.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_fcpqueue_deque.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_fcpqueue_vector.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_intrusive_mspqueue_dyn.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_intrusive_mspqueue_static.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_mspqueue_dyn.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_mspqueue_static.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_priority_queue_reg.cpp" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="..\..\..\tests\test-hdr\priority_queue\hdr_intrusive_pqueue.h" />\r
-    <ClInclude Include="..\..\..\tests\test-hdr\priority_queue\hdr_pqueue.h" />\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{90192F7D-5850-41dd-AE89-62D26B387162}</ProjectGuid>\r
-    <RootNamespace>hdrtestpriority_queue</RootNamespace>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v140</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <PlatformToolset>v140</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v140</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v140</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <PlatformToolset>v140</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v140</PlatformToolset>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\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 Condition="'$(Configuration)|$(Platform)'=='Release|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 Condition="'$(Configuration)|$(Platform)'=='Debug|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 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 Condition="'$(Configuration)|$(Platform)'=='Release|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 Condition="'$(Configuration)|$(Platform)'=='Debug|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
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">false</LinkIncremental>\r
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)_d</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)_d</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(ProjectName)_d</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(ProjectName)_d</TargetName>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <CallingConvention>Cdecl</CallingConvention>\r
-      <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(TargetPath)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CallingConvention>Cdecl</CallingConvention>\r
-      <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(TargetPath)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Full</Optimization>\r
-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
-      <OmitFramePointers>false</OmitFramePointers>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CallingConvention>Cdecl</CallingConvention>\r
-      <EnablePREfast>false</EnablePREfast>\r
-      <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>unit-prerequisites.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(TargetPath)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <Profile>true</Profile>\r
-      <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Full</Optimization>\r
-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
-      <OmitFramePointers>false</OmitFramePointers>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CallingConvention>Cdecl</CallingConvention>\r
-      <EnablePREfast>false</EnablePREfast>\r
-      <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>unit-prerequisites.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(TargetPath)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <Profile>true</Profile>\r
-      <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">\r
-    <ClCompile>\r
-      <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <CallingConvention>Cdecl</CallingConvention>\r
-      <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(TargetPath)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
-      <CallingConvention>Cdecl</CallingConvention>\r
-      <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
-    </ClCompile>\r
-    <Link>\r
-      <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(TargetPath)</OutputFile>\r
-      <AdditionalLibraryDirectories>$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <DataExecutionPrevention>\r
-      </DataExecutionPrevention>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\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/hdr-test-priority_queue.vcxproj.filters b/projects/Win/vc14/hdr-test-priority_queue.vcxproj.filters
deleted file mode 100644 (file)
index 3a2eb19..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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="intrusive">\r
-      <UniqueIdentifier>{2e5ccb52-5287-4912-8d3f-aeaf257134cd}</UniqueIdentifier>\r
-    </Filter>\r
-    <Filter Include="container">\r
-      <UniqueIdentifier>{d864adcf-d418-48b8-85be-6f4d39ac6941}</UniqueIdentifier>\r
-    </Filter>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_priority_queue_reg.cpp" />\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_intrusive_mspqueue_dyn.cpp">\r
-      <Filter>intrusive</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_intrusive_mspqueue_static.cpp">\r
-      <Filter>intrusive</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_mspqueue_dyn.cpp">\r
-      <Filter>container</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_mspqueue_static.cpp">\r
-      <Filter>container</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_fcpqueue_boost_stable_vector.cpp">\r
-      <Filter>container</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_fcpqueue_deque.cpp">\r
-      <Filter>container</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\test-hdr\priority_queue\hdr_fcpqueue_vector.cpp">\r
-      <Filter>container</Filter>\r
-    </ClCompile>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="..\..\..\tests\test-hdr\priority_queue\hdr_intrusive_pqueue.h">\r
-      <Filter>intrusive</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="..\..\..\tests\test-hdr\priority_queue\hdr_pqueue.h">\r
-      <Filter>container</Filter>\r
-    </ClInclude>\r
-  </ItemGroup>\r
-</Project>
\ No newline at end of file
index 3bfc132ec36d90fcc6c12457dc72f85b34a411c5..65171891142cca710c942a3f5f194e8ed347cce2 100644 (file)
@@ -103,16 +103,6 @@ CDS_TESTHDR_LIST := \
     tests/test-hdr/list/hdr_michael_kv_rcu_shb.cpp \
     tests/test-hdr/list/hdr_michael_kv_rcu_sht.cpp
 
-CDS_TESTHDR_PQUEUE := \
-    tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_dyn.cpp \
-    tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_static.cpp \
-    tests/test-hdr/priority_queue/hdr_mspqueue_dyn.cpp \
-    tests/test-hdr/priority_queue/hdr_mspqueue_static.cpp \
-    tests/test-hdr/priority_queue/hdr_fcpqueue_boost_stable_vector.cpp \
-    tests/test-hdr/priority_queue/hdr_fcpqueue_deque.cpp \
-    tests/test-hdr/priority_queue/hdr_fcpqueue_vector.cpp \
-    tests/test-hdr/priority_queue/hdr_priority_queue_reg.cpp
-
 CDS_TESTHDR_QUEUE := \
     tests/test-hdr/queue/hdr_queue_register.cpp \
     tests/test-hdr/queue/hdr_intrusive_fcqueue.cpp \
@@ -287,7 +277,6 @@ CDS_TESTHDR_MISC := \
 
 CDS_TESTHDR_SOURCES := \
     $(CDS_TESTHDR_QUEUE) \
-    $(CDS_TESTHDR_PQUEUE) \
     $(CDS_TESTHDR_MAP) \
     $(CDS_TESTHDR_DEQUE) \
     $(CDS_TESTHDR_LIST) \
diff --git a/test/include/cds_test/fixture.h b/test/include/cds_test/fixture.h
new file mode 100644 (file)
index 0000000..aa9fcff
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+    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 CDSTEST_FIXTURE_H
+#define CDSTEST_FIXTURE_H
+
+#include <gtest/gtest.h>
+#include <algorithm>
+#include <random>
+
+namespace cds_test {
+
+    class fixture : public ::testing::Test
+    {
+    protected:
+        template <typename RandomIt>
+        static void shuffle( RandomIt first, RandomIt last )
+        {
+            static std::random_device random_dev;
+            static std::mt19937       random_gen( random_dev() );
+
+            std::shuffle( first, last, random_gen );
+        }
+    };
+
+} // namespace cds_test
+
+#endif // CDSTEST_FIXTURE_H
index 3f7336053a58c18116fa17916bc87e105e85b14e..c25c24e077fd89ac426eeb811d740d21e5bd501c 100644 (file)
@@ -1 +1,2 @@
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pqueue)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stack)
diff --git a/test/unit/pqueue/CMakeLists.txt b/test/unit/pqueue/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8da85f9
--- /dev/null
@@ -0,0 +1,25 @@
+set(PACKAGE_NAME unit-pqueue)
+
+set(CDSGTEST_PQUEUE_SOURCES
+    fcpqueue_boost_stable_vector.cpp
+    fcpqueue_deque.cpp
+    fcpqueue_vector.cpp
+    intrusive_mspqueue.cpp
+    main.cpp
+    mspqueue.cpp
+)
+
+include_directories(
+    ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_executable(${PACKAGE_NAME} ${CDSGTEST_PQUEUE_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/pqueue/fcpqueue_boost_stable_vector.cpp b/test/unit/pqueue/fcpqueue_boost_stable_vector.cpp
new file mode 100644 (file)
index 0000000..9104479
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+    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_fcpqueue.h"
+#include <cds/container/fcpriority_queue.h>
+#include <boost/container/stable_vector.hpp>
+#include <boost/container/deque.hpp>
+
+namespace cds_test {
+
+    TEST_F( FCPQueue, stable_vector )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,boost::container::stable_vector<value_type>
+                ,less
+            >
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, stable_vector_stat )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,boost::container::stable_vector<value_type>
+                ,less
+            >
+            ,cds::container::fcpqueue::make_traits<
+                cds::opt::stat< cds::container::fcpqueue::stat<> >
+            >::type
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, boost_deque )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,boost::container::deque<value_type>
+                ,less
+            >
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, boost_deque_stat )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,boost::container::deque<value_type>
+                ,less
+            >
+            ,cds::container::fcpqueue::make_traits<
+                cds::opt::stat< cds::container::fcpqueue::stat<> >
+            >::type
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+} // namespace cds_test
diff --git a/test/unit/pqueue/fcpqueue_deque.cpp b/test/unit/pqueue/fcpqueue_deque.cpp
new file mode 100644 (file)
index 0000000..0f7e0b9
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+    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_fcpqueue.h"
+#include <cds/container/fcpriority_queue.h>
+#include <deque>
+
+namespace cds_test {
+
+    TEST_F( FCPQueue, deque )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,std::deque<value_type>
+                ,less
+            >
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, deque_stat )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,std::deque<value_type>
+                ,less
+            >
+            ,cds::container::fcpqueue::make_traits<
+                cds::opt::stat< cds::container::fcpqueue::stat<> >
+            >::type
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, deque_mutex )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue<
+                value_type
+                ,std::deque<value_type>
+            >
+            ,cds::container::fcpqueue::make_traits<
+                cds::opt::lock_type< std::mutex >
+            >::type
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+} // namespace cds_test
diff --git a/test/unit/pqueue/fcpqueue_vector.cpp b/test/unit/pqueue/fcpqueue_vector.cpp
new file mode 100644 (file)
index 0000000..6de4855
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+    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_fcpqueue.h"
+#include <cds/container/fcpriority_queue.h>
+
+namespace cds_test {
+
+    TEST_F( FCPQueue, vector )
+    {
+        typedef cds::container::FCPriorityQueue< FCPQueue::value_type > pqueue_type;
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, vector_stat )
+    {
+        struct pqueue_traits : public cds::container::fcpqueue::traits
+        {
+            typedef cds::container::fcpqueue::stat<> stat;
+        };
+
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            , std::priority_queue<
+                value_type
+                , std::vector<value_type>
+                , less
+            >
+            , pqueue_traits
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, vector_mutex )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue< value_type >
+            ,cds::container::fcpqueue::make_traits<
+                cds::opt::lock_type< std::mutex >
+            >::type
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+} // namespace cds_test
diff --git a/test/unit/pqueue/intrusive_mspqueue.cpp b/test/unit/pqueue/intrusive_mspqueue.cpp
new file mode 100644 (file)
index 0000000..1c01994
--- /dev/null
@@ -0,0 +1,270 @@
+/*
+    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_data.h"
+#include <cds/intrusive/mspriority_queue.h>
+
+namespace {
+
+    struct disposer {
+        size_t   m_nCallCount;
+
+        disposer()
+            : m_nCallCount( 0 )
+        {}
+
+        template <typename T>
+        void operator()( T& )
+        {
+            ++m_nCallCount;
+        }
+    };
+
+    class IntrusiveMSPQueue : public cds_test::PQueueTest
+    {
+        typedef cds_test::PQueueTest base_class;
+    protected:
+        template <class PQueue>
+        void test( PQueue& pq )
+        {
+            data_array<value_type> arr( pq.capacity() );
+            value_type * pFirst = arr.begin();
+            value_type * pLast = arr.end();
+
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_FALSE( pq.full() );
+            ASSERT_EQ( pq.size(), 0 );
+            ASSERT_EQ( pq.capacity(), base_class::c_nCapacity - 1 );
+
+            size_t nSize = 0;
+
+            // Push test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_FALSE( pq.empty() );
+                ASSERT_EQ( pq.size(), ++nSize );
+            }
+
+            ASSERT_TRUE( pq.full() );
+            ASSERT_EQ( pq.size(), pq.capacity() );
+
+            // The queue is full
+            {
+                value_type k( base_class::c_nMinValue + key_type( base_class::c_nCapacity ));
+                ASSERT_FALSE( pq.push( k ) );
+                ASSERT_TRUE( pq.full() );
+                ASSERT_EQ( pq.size(), pq.capacity() );
+            }
+
+            // Pop test
+            key_type nPrev = base_class::c_nMinValue + key_type( pq.capacity() ) - 1;
+            value_type * p = pq.pop();
+            ASSERT_TRUE( p != nullptr );
+            EXPECT_EQ( p->k, nPrev );
+
+            ASSERT_EQ( pq.size(), pq.capacity() - 1 );
+            ASSERT_FALSE( pq.full() );
+            ASSERT_FALSE( pq.empty() );
+
+            nSize = pq.size();
+            while ( pq.size() > 1 ) {
+                p = pq.pop();
+                ASSERT_TRUE( p != nullptr );
+                EXPECT_EQ( p->k, nPrev - 1 );
+                nPrev = p->k;
+                --nSize;
+                ASSERT_EQ( pq.size(), nSize );
+            }
+
+            ASSERT_FALSE( pq.full() );
+            ASSERT_FALSE( pq.empty() );
+            ASSERT_EQ( pq.size(), 1 );
+
+            p = pq.pop();
+            ASSERT_TRUE( p != nullptr );
+            EXPECT_EQ( p->k, base_class::c_nMinValue );
+
+            ASSERT_FALSE( pq.full() );
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_EQ( pq.size(), 0 );
+
+            // Clear test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                ASSERT_TRUE( pq.push( *p ) );
+            }
+            EXPECT_FALSE( pq.empty() );
+            EXPECT_TRUE( pq.full() );
+            EXPECT_EQ( pq.size(), pq.capacity() );
+            pq.clear();
+            EXPECT_TRUE( pq.empty() );
+            EXPECT_FALSE( pq.full() );
+            EXPECT_EQ( pq.size(), 0 );
+
+            // clear_with test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                ASSERT_TRUE( pq.push( *p ) );
+            }
+            ASSERT_FALSE( pq.empty() );
+            ASSERT_TRUE( pq.full() );
+            ASSERT_EQ( pq.size(), pq.capacity() );
+
+            {
+                disposer disp;
+                pq.clear_with( std::ref( disp ) );
+                ASSERT_TRUE( pq.empty() );
+                ASSERT_FALSE( pq.full() );
+                ASSERT_EQ( pq.size(), 0 );
+                ASSERT_EQ( disp.m_nCallCount, pq.capacity() );
+            }
+        }
+    };
+
+    typedef cds::opt::v::dynamic_buffer< char > dyn_buffer_type;
+    typedef cds::opt::v::static_buffer< char, IntrusiveMSPQueue::c_nCapacity > static_buffer_type;
+
+    TEST_F( IntrusiveMSPQueue, dynamic )
+    {
+        struct traits : public cds::intrusive::mspriority_queue::traits
+        {
+            typedef dyn_buffer_type buffer;
+        };
+        typedef cds::intrusive::MSPriorityQueue< value_type, traits > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, dynamic_cmp )
+    {
+        struct traits : public cds::intrusive::mspriority_queue::traits
+        {
+            typedef dyn_buffer_type buffer;
+            typedef IntrusiveMSPQueue::compare compare;
+        };
+        typedef cds::intrusive::MSPriorityQueue< value_type, traits > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, dynamic_less )
+    {
+        typedef cds::intrusive::MSPriorityQueue< value_type,
+            cds::intrusive::mspriority_queue::make_traits<
+                cds::opt::buffer< dyn_buffer_type >
+                ,cds::opt::less< std::less<value_type> >
+            >::type
+        > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, dynamic_cmp_less )
+    {
+        typedef cds::intrusive::MSPriorityQueue< value_type,
+            cds::intrusive::mspriority_queue::make_traits<
+                cds::opt::buffer< dyn_buffer_type >
+                ,cds::opt::less< std::less<value_type> >
+                ,cds::opt::compare< IntrusiveMSPQueue::compare >
+            >::type
+        > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, dynamic_mutex )
+    {
+        struct traits : public cds::intrusive::mspriority_queue::traits
+        {
+            typedef dyn_buffer_type buffer;
+            typedef IntrusiveMSPQueue::compare compare;
+            typedef std::mutex lock_type;
+        };
+        typedef cds::intrusive::MSPriorityQueue< value_type, traits > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, stat )
+    {
+        struct traits : public cds::intrusive::mspriority_queue::traits
+        {
+            typedef static_buffer_type buffer;
+        };
+        typedef cds::intrusive::MSPriorityQueue< value_type, traits > pqueue;
+
+        std::unique_ptr<pqueue> pq( new pqueue(0));
+        test( *pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, stat_cmp )
+    {
+        typedef cds::intrusive::MSPriorityQueue< value_type,
+            cds::intrusive::mspriority_queue::make_traits<
+                cds::opt::buffer< static_buffer_type >
+                ,cds::opt::compare< compare >
+            >::type
+        > pqueue;
+
+        std::unique_ptr<pqueue> pq( new pqueue( 0 ) );
+        test( *pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, stat_less )
+    {
+        typedef cds::intrusive::MSPriorityQueue< value_type,
+            cds::intrusive::mspriority_queue::make_traits<
+                cds::opt::buffer< static_buffer_type >
+                ,cds::opt::less< less >
+            >::type
+        > pqueue;
+
+        std::unique_ptr<pqueue> pq( new pqueue( 0 ) );
+        test( *pq );
+    }
+
+    TEST_F( IntrusiveMSPQueue, stat_mutex )
+    {
+        struct traits : public cds::intrusive::mspriority_queue::traits
+        {
+            typedef static_buffer_type buffer;
+            typedef IntrusiveMSPQueue::compare compare;
+            typedef std::mutex lock_type;
+        };
+        typedef cds::intrusive::MSPriorityQueue< value_type, traits > pqueue;
+
+        std::unique_ptr<pqueue> pq( new pqueue( 0 ) );
+        test( *pq );
+    }
+
+} // namespace
diff --git a/test/unit/pqueue/main.cpp b/test/unit/pqueue/main.cpp
new file mode 100644 (file)
index 0000000..e690d55
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+    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 <gtest/gtest.h>
+#include <cds/init.h>
+
+int main( int argc, char **argv ) \r
+{\r
+    int result;\r
+    cds::Initialize();\r
+    {\r
+        ::testing::InitGoogleTest( &argc, argv );\r
+        result =  RUN_ALL_TESTS();\r
+    }\r
+    cds::Terminate();\r
+    return result;\r
+}
diff --git a/test/unit/pqueue/mspqueue.cpp b/test/unit/pqueue/mspqueue.cpp
new file mode 100644 (file)
index 0000000..1966883
--- /dev/null
@@ -0,0 +1,285 @@
+/*
+    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_data.h"
+#include <cds/container/mspriority_queue.h>
+
+namespace {
+
+    struct disposer {
+        size_t   m_nCallCount;
+
+        disposer()
+            : m_nCallCount( 0 )
+        {}
+
+        template <typename T>
+        void operator()( T& )
+        {
+            ++m_nCallCount;
+        }
+    };
+
+    class MSPQueue : public cds_test::PQueueTest
+    {
+        typedef cds_test::PQueueTest base_class;
+    protected:
+        template <class PQueue>
+        void test( PQueue& pq )
+        {
+            data_array<value_type> arr( pq.capacity() );
+            value_type * pFirst = arr.begin();
+            value_type * pLast = pFirst + pq.capacity();
+
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_EQ( pq.size(), 0 );
+            ASSERT_EQ( pq.capacity(), base_class::c_nCapacity - 1 );
+
+            size_t nSize = 0;
+
+            // Push test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                switch ( pq.size() & 3 ) {
+                case 0:
+                    ASSERT_TRUE( pq.push_with( [p]( value_type& dest ) { dest = *p; } ) );
+                    break;
+                case 1:
+                    ASSERT_TRUE( pq.emplace( p->k, p->v ) );
+                    break;
+                case 2:
+                    ASSERT_TRUE( pq.emplace( std::make_pair( p->k, p->v ) ) );
+                    break;
+                default:
+                    ASSERT_TRUE( pq.push( *p ) );
+                }
+                ASSERT_TRUE( !pq.empty() );
+                ASSERT_TRUE( pq.size() == ++nSize );
+            }
+
+            ASSERT_TRUE( pq.full() );
+            ASSERT_EQ( pq.size(), pq.capacity() );
+
+            // The queue is full
+            key_type k = base_class::c_nMinValue + key_type( base_class::c_nCapacity );
+            ASSERT_TRUE( !pq.push( k ) );
+            ASSERT_TRUE( pq.full() );
+            ASSERT_EQ( pq.size(), pq.capacity() );
+
+            // Pop test
+            key_type nPrev = base_class::c_nMinValue + key_type( pq.capacity() ) - 1;
+            value_type kv( 0 );
+            key_type   key;
+            ASSERT_TRUE( pq.pop( kv ) );
+            EXPECT_EQ( kv.k, nPrev );
+
+            ASSERT_EQ( pq.size(), pq.capacity() - 1 );
+            ASSERT_TRUE( !pq.full() );
+            ASSERT_TRUE( !pq.empty() );
+
+            nSize = pq.size();
+            while ( pq.size() > 1 ) {
+                if ( pq.size() & 1 ) {
+                    ASSERT_TRUE( pq.pop( kv ) );
+                    EXPECT_EQ( kv.k, nPrev - 1 );
+                    nPrev = kv.k;
+                }
+                else {
+                    ASSERT_TRUE( pq.pop_with( [&key]( value_type& src ) { key = src.k;  } ) );
+                    EXPECT_EQ( key, nPrev - 1 );
+                    nPrev = key;
+                }
+
+                --nSize;
+                ASSERT_EQ( pq.size(), nSize );
+            }
+
+            ASSERT_TRUE( !pq.full() );
+            ASSERT_TRUE( !pq.empty() );
+            ASSERT_EQ( pq.size(), 1 );
+
+            ASSERT_TRUE( pq.pop( kv ) );
+            EXPECT_EQ( kv.k, base_class::c_nMinValue );
+
+            ASSERT_TRUE( !pq.full() );
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_EQ( pq.size(), 0 );
+
+            // Clear test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                ASSERT_TRUE( pq.push( *p ) );
+            }
+            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( pq.full() );
+            ASSERT_EQ( pq.size(), pq.capacity() );
+            pq.clear();
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( !pq.full() );
+            ASSERT_EQ( pq.size(), 0 );
+
+            // clear_with test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                ASSERT_TRUE( pq.push( *p ) );
+            }
+            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( pq.full() );
+            ASSERT_EQ( pq.size(), pq.capacity() );
+
+            {
+                disposer disp;
+                pq.clear_with( std::ref( disp ) );
+                ASSERT_TRUE( pq.empty() );
+                ASSERT_TRUE( !pq.full() );
+                ASSERT_EQ( pq.size(), 0 );
+                ASSERT_EQ( disp.m_nCallCount, pq.capacity() );
+            }
+        }
+    };
+
+    typedef cds::opt::v::dynamic_buffer< char > dyn_buffer_type;
+    typedef cds::opt::v::static_buffer< char, MSPQueue::c_nCapacity > static_buffer_type;
+
+    TEST_F( MSPQueue, dynamic )
+    {
+        typedef cds::container::MSPriorityQueue< MSPQueue::value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< dyn_buffer_type >
+            >::type
+        > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( MSPQueue, dynamic_cmp )
+    {
+        typedef cds::container::MSPriorityQueue< value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< dyn_buffer_type >
+                , cds::opt::compare< compare >
+            >::type
+        > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( MSPQueue, dynamic_less )
+    {
+        typedef cds::container::MSPriorityQueue< value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< dyn_buffer_type >
+                ,cds::opt::less< less >
+            >::type
+        > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+    TEST_F( MSPQueue, dynamic_cmp_less )
+    {
+        struct pqueue_traits : public cds::container::mspriority_queue::traits
+        {
+            typedef dyn_buffer_type buffer;
+            typedef MSPQueue::less less;
+            typedef MSPQueue::compare compare;
+        };
+        typedef cds::container::MSPriorityQueue< value_type, pqueue_traits > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( MSPQueue, dynamic_mutex )
+    {
+        typedef cds::container::MSPriorityQueue< value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< dyn_buffer_type >
+                ,cds::opt::compare< compare >
+                ,cds::opt::lock_type<std::mutex>
+            >::type
+        > pqueue;
+
+        pqueue pq( c_nCapacity );
+        test( pq );
+    }
+
+    TEST_F( MSPQueue, stat )
+    {
+        typedef cds::container::MSPriorityQueue< MSPQueue::value_type,
+            cds::container::mspriority_queue::make_traits<
+            cds::opt::buffer< static_buffer_type >
+            >::type
+        > pqueue;
+
+        std::unique_ptr< pqueue > pq( new pqueue(0));
+        test( *pq );
+    }
+
+    TEST_F( MSPQueue, stat_cmp )
+    {
+        typedef cds::container::MSPriorityQueue< value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< static_buffer_type >
+                ,cds::opt::compare< compare >
+            >::type
+        > pqueue;
+
+        std::unique_ptr< pqueue > pq( new pqueue(0));
+        test( *pq );
+    }
+
+    TEST_F( MSPQueue, stat_less )
+    {
+        typedef cds::container::MSPriorityQueue< value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< static_buffer_type >
+                ,cds::opt::less< less >
+            >::type
+        > pqueue;
+
+        std::unique_ptr< pqueue > pq( new pqueue(0));
+        test( *pq );
+    }
+
+    TEST_F( MSPQueue, stat_mutex )
+    {
+        typedef cds::container::MSPriorityQueue< value_type,
+            cds::container::mspriority_queue::make_traits<
+                cds::opt::buffer< static_buffer_type >
+                ,cds::opt::less< less >
+                ,cds::opt::lock_type<std::mutex>
+            >::type
+        > pqueue;
+
+        std::unique_ptr< pqueue > pq( new pqueue(0));
+        test( *pq );
+    }
+
+} // namespace
diff --git a/test/unit/pqueue/test_data.h b/test/unit/pqueue/test_data.h
new file mode 100644 (file)
index 0000000..7145d4c
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+    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_PQUEUE_TEST_DATA_H
+#define CDSUNIT_PQUEUE_TEST_DATA_H
+
+#include <cds_test/fixture.h>
+#include <memory>
+
+namespace cds_test {
+
+    class PQueueTest : public ::cds_test::fixture
+    {
+    public:
+        typedef int     key_type;
+
+        struct value_type {
+            key_type    k;
+            int         v;
+
+            value_type()
+            {}
+
+            value_type( value_type const& kv )
+                : k( kv.k )
+                , v( kv.v )
+            {}
+
+            value_type( key_type key )
+                : k( key )
+                , v( key )
+            {}
+
+            value_type( key_type key, int val )
+                : k( key )
+                , v( val )
+            {}
+
+            value_type( std::pair<key_type, int> const& p )
+                : k( p.first )
+                , v( p.second )
+            {}
+        };
+
+        struct compare {
+            int operator()( value_type k1, value_type k2 ) const
+            {
+                return k1.k - k2.k;
+            }
+        };
+
+        struct less {
+            bool operator()( value_type k1, value_type k2 ) const
+            {
+                return k1.k < k2.k;
+            }
+        };
+
+        enum {
+            c_nMinValue = -123,
+            c_nCapacity = 1024
+        };
+
+    protected:
+        template <typename T>
+        class data_array
+        {
+            std::unique_ptr<T[]> pFirst;
+            T *     pLast;
+
+        public:
+            data_array( size_t nSize )
+                : pFirst( new T[nSize] )
+                , pLast( pFirst.get() + nSize )
+            {
+                key_type i = c_nMinValue;
+                for ( T * p = pFirst.get(); p != pLast; ++p, ++i )
+                    p->k = p->v = i;
+
+                shuffle( pFirst.get(), pLast );
+            }
+
+            T * begin() { return pFirst.get(); }
+            T * end()   { return pLast; }
+            size_t size() const
+            {
+                return pLast - pFirst;
+            }
+        };
+    };
+} // namespace cds_test
+
+namespace std {
+    template<>
+    struct less<cds_test::PQueueTest::value_type>
+    {
+        bool operator()( cds_test::PQueueTest::value_type const& v1, cds_test::PQueueTest::value_type const& v2 ) const
+        {
+            return cds_test::PQueueTest::less()(v1, v2);
+        }
+    };
+}
+
+#endif // CDSUNIT_PQUEUE_FCPQUEUE_H
diff --git a/test/unit/pqueue/test_fcpqueue.h b/test/unit/pqueue/test_fcpqueue.h
new file mode 100644 (file)
index 0000000..9943a7a
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+    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_PQUEUE_FCPQUEUE_H
+#define CDSUNIT_PQUEUE_FCPQUEUE_H
+
+#include "test_data.h"
+
+namespace cds_test {
+
+    class FCPQueue : public PQueueTest
+    {
+    protected:
+        template <class PQueue>
+        void test( PQueue& pq )
+        {
+            data_array<value_type> arr( PQueueTest::c_nCapacity );
+            value_type * pFirst = arr.begin();
+            value_type * pLast = arr.end();
+
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( pq.size() == 0 );
+
+            size_t nSize = 0;
+
+            // Push test
+            for ( value_type * p = pFirst; p < pLast; ++p ) {
+                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_TRUE( !pq.empty() );
+                ASSERT_EQ( pq.size(), ++nSize );
+            }
+
+            ASSERT_EQ( pq.size(), PQueueTest::c_nCapacity );
+
+            // Pop test
+            key_type nPrev = PQueueTest::c_nMinValue + key_type( PQueueTest::c_nCapacity ) - 1;
+            value_type kv( 0 );
+
+            ASSERT_TRUE( pq.pop( kv ) );
+            EXPECT_EQ( kv.k, nPrev );
+
+            ASSERT_EQ( pq.size(), PQueueTest::c_nCapacity - 1 );
+            ASSERT_TRUE( !pq.empty() );
+
+            nSize = pq.size();
+            while ( pq.size() > 1 ) {
+                ASSERT_TRUE( pq.pop( kv ) );
+                EXPECT_EQ( kv.k, nPrev - 1 );
+                nPrev = kv.k;
+
+                --nSize;
+                ASSERT_EQ( pq.size(), nSize );
+            }
+
+            ASSERT_TRUE( !pq.empty() );
+            ASSERT_EQ( pq.size(), 1 );
+
+            ASSERT_TRUE( pq.pop( kv ) );
+            EXPECT_EQ( kv.k, PQueueTest::c_nMinValue );
+
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_EQ( pq.size(), 0 );
+
+            // pop from empty pqueue
+            kv.k = PQueueTest::c_nCapacity * 2;
+            ASSERT_FALSE( pq.pop( kv ));
+            EXPECT_EQ( kv.k, PQueueTest::c_nCapacity * 2 );
+
+            // Clear test
+            for ( value_type * p = pFirst; p < pLast; ++p )
+                ASSERT_TRUE( pq.push( *p ) );
+
+            ASSERT_TRUE( !pq.empty() );
+            ASSERT_EQ( pq.size(), PQueueTest::c_nCapacity );
+
+            pq.clear();
+            ASSERT_TRUE( pq.empty() );
+            ASSERT_EQ( pq.size(), 0 );
+        }
+    };
+} // namespace cds_test
+
+#endif // CDSUNIT_PQUEUE_FCPQUEUE_H
index 40988a05e60f0cb1754fca15ccd7751235984c25..df1fba994f88e0dfc0f39c8c6edbd7ceef777166 100644 (file)
@@ -105,16 +105,6 @@ set(CDS_TESTHDR_LIST
     list/hdr_michael_kv_rcu_shb.cpp\r
     list/hdr_michael_kv_rcu_sht.cpp)\r
 \r
-set(CDS_TESTHDR_PQUEUE\r
-    priority_queue/hdr_intrusive_mspqueue_dyn.cpp\r
-    priority_queue/hdr_intrusive_mspqueue_static.cpp\r
-    priority_queue/hdr_mspqueue_dyn.cpp\r
-    priority_queue/hdr_mspqueue_static.cpp\r
-    priority_queue/hdr_fcpqueue_boost_stable_vector.cpp\r
-    priority_queue/hdr_fcpqueue_deque.cpp\r
-    priority_queue/hdr_fcpqueue_vector.cpp\r
-    priority_queue/hdr_priority_queue_reg.cpp)\r
-\r
 set(CDS_TESTHDR_QUEUE\r
     queue/hdr_queue_register.cpp\r
     queue/hdr_intrusive_fcqueue.cpp\r
@@ -364,12 +354,6 @@ set(CDS_TESTHDR_OFFSETOF_QUEUE
     queue/hdr_intrusive_optimisticqueue_hp.cpp\r
     queue/hdr_intrusive_optimisticqueue_dhp.cpp)\r
 \r
-set(CDS_TESTHDR_OFFSETOF_STACK\r
-    stack/hdr_intrusive_treiber_stack_hp.cpp\r
-    stack/hdr_intrusive_treiber_stack_dhp.cpp\r
-    stack/hdr_intrusive_elimination_stack_hp.cpp\r
-    stack/hdr_intrusive_elimination_stack_dhp.cpp)\r
-\r
 set(CDS_TESTHDR_OFFSETOF_TREE\r
     tree/hdr_intrusive_ellen_bintree_hp_member.cpp\r
     tree/hdr_intrusive_ellen_bintree_dhp_member.cpp\r
@@ -381,7 +365,6 @@ set(CDS_TESTHDR_OFFSETOF_TREE
 \r
 set(CDS_TESTHDR_OFFSETOF_SOURCES\r
        ${CDS_TESTHDR_OFFSETOF_QUEUE}\r
-       ${CDS_TESTHDR_OFFSETOF_STACK}\r
        ${CDS_TESTHDR_OFFSETOF_MAP}\r
        ${CDS_TESTHDR_OFFSETOF_SET}\r
        ${CDS_TESTHDR_OFFSETOF_LIST}\r
@@ -395,7 +378,6 @@ endif(CMAKE_COMPILER_IS_GNUCC)
 \r
 set(CDS_TESTHDR_SOURCES\r
     ${CDS_TESTHDR_QUEUE}\r
-    ${CDS_TESTHDR_PQUEUE}\r
     ${CDS_TESTHDR_MAP}\r
     ${CDS_TESTHDR_DEQUE}\r
     ${CDS_TESTHDR_LIST}\r
diff --git a/tests/test-hdr/priority_queue/hdr_fcpqueue_boost_stable_vector.cpp b/tests/test-hdr/priority_queue/hdr_fcpqueue_boost_stable_vector.cpp
deleted file mode 100644 (file)
index 204f456..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-    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 "priority_queue/hdr_pqueue.h"
-#include <cds/container/fcpriority_queue.h>
-#include <boost/container/stable_vector.hpp>
-#include <boost/container/deque.hpp>
-
-namespace priority_queue {
-
-    void PQueueHdrTest::FCPQueue_stablevector()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,boost::container::stable_vector<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-    void PQueueHdrTest::FCPQueue_stablevector_stat()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,boost::container::stable_vector<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-            ,cds::container::fcpqueue::make_traits<
-                cds::opt::stat< cds::container::fcpqueue::stat<> >
-            >::type
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-        void PQueueHdrTest::FCPQueue_boost_deque()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,boost::container::deque<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-    void PQueueHdrTest::FCPQueue_boost_deque_stat()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,boost::container::deque<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-            ,cds::container::fcpqueue::make_traits<
-                cds::opt::stat< cds::container::fcpqueue::stat<> >
-            >::type
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-} // namespace priorty_queue
diff --git a/tests/test-hdr/priority_queue/hdr_fcpqueue_deque.cpp b/tests/test-hdr/priority_queue/hdr_fcpqueue_deque.cpp
deleted file mode 100644 (file)
index b4e27b3..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-    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 "priority_queue/hdr_pqueue.h"
-#include <cds/container/fcpriority_queue.h>
-#include <deque>
-
-namespace priority_queue {
-
-    void PQueueHdrTest::FCPQueue_deque()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,std::deque<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-    void PQueueHdrTest::FCPQueue_deque_stat()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,std::deque<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-            ,cds::container::fcpqueue::make_traits<
-                cds::opt::stat< cds::container::fcpqueue::stat<> >
-            >::type
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-    void PQueueHdrTest::FCPQueue_deque_mutex()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,std::deque<PQueueHdrTest::value_type>
-            >
-            ,cds::container::fcpqueue::make_traits<
-                cds::opt::lock_type< std::mutex >
-            >::type
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-} // namespace priorty_queue
diff --git a/tests/test-hdr/priority_queue/hdr_fcpqueue_vector.cpp b/tests/test-hdr/priority_queue/hdr_fcpqueue_vector.cpp
deleted file mode 100644 (file)
index 1914861..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-    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 "priority_queue/hdr_pqueue.h"
-#include <cds/container/fcpriority_queue.h>
-
-namespace priority_queue {
-
-    void PQueueHdrTest::FCPQueue_vector()
-    {
-        typedef cds::container::FCPriorityQueue< PQueueHdrTest::value_type > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-    void PQueueHdrTest::FCPQueue_vector_stat()
-    {
-        struct pqueue_traits : public cds::container::fcpqueue::traits
-        {
-            typedef cds::container::fcpqueue::stat<> stat;
-        };
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue<
-                PQueueHdrTest::value_type
-                ,std::vector<PQueueHdrTest::value_type>
-                ,PQueueHdrTest::less
-            >
-            ,pqueue_traits
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-    void PQueueHdrTest::FCPQueue_vector_mutex()
-    {
-        typedef cds::container::FCPriorityQueue<
-            PQueueHdrTest::value_type
-            ,std::priority_queue< PQueueHdrTest::value_type >
-            ,cds::container::fcpqueue::make_traits<
-                cds::opt::lock_type< std::mutex >
-            >::type
-        > pqueue_type;
-        test_fcpqueue<pqueue_type>();
-    }
-
-} // namespace priorty_queue
diff --git a/tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_dyn.cpp b/tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_dyn.cpp
deleted file mode 100644 (file)
index 635311c..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-    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 "priority_queue/hdr_intrusive_pqueue.h"
-#include <cds/intrusive/mspriority_queue.h>
-
-namespace priority_queue {
-    namespace intrusive_pqueue {
-        template <typename T, typename Traits>
-        struct constants<cds::intrusive::MSPriorityQueue<T, Traits> > {
-            static size_t const nCapacity = c_nCapacity - 1;
-        };
-    }
-
-    namespace {
-        typedef cds::opt::v::dynamic_buffer< char > buffer_type;
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_dyn()
-    {
-        struct pqueue_traits : public cds::intrusive::mspriority_queue::traits
-        {
-            typedef buffer_type buffer;
-        };
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type, pqueue_traits > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_dyn_cmp()
-    {
-        struct pqueue_traits : public cds::intrusive::mspriority_queue::traits
-        {
-            typedef buffer_type buffer;
-            typedef IntrusivePQueueHdrTest::compare compare;
-        };
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type, pqueue_traits > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_dyn_less()
-    {
-        struct pqueue_traits : public
-            cds::intrusive::mspriority_queue::make_traits <
-                cds::opt::buffer< buffer_type >
-                , cds::opt::less < std::less<IntrusivePQueueHdrTest::key_type> >
-            > ::type
-        {};
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type, pqueue_traits > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_dyn_cmpless()
-    {
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type,
-            cds::intrusive::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::less< std::less<IntrusivePQueueHdrTest::key_type> >
-                ,cds::opt::compare< IntrusivePQueueHdrTest::compare >
-            >::type
-        > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_dyn_cmp_mtx()
-    {
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type,
-            cds::intrusive::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::compare< IntrusivePQueueHdrTest::compare >
-                ,cds::opt::lock_type<std::mutex>
-            >::type
-        > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-} // namespace priority_queue
diff --git a/tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_static.cpp b/tests/test-hdr/priority_queue/hdr_intrusive_mspqueue_static.cpp
deleted file mode 100644 (file)
index 51ff761..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-    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 "priority_queue/hdr_intrusive_pqueue.h"
-#include <cds/intrusive/mspriority_queue.h>
-
-namespace priority_queue {
-    namespace intrusive_pqueue {
-        template <typename T, typename Traits>
-        struct constants<cds::intrusive::MSPriorityQueue<T, Traits> > {
-            static size_t const nCapacity = c_nCapacity - 1;
-        };
-    }
-
-    namespace {
-        typedef cds::opt::v::static_buffer< char, IntrusivePQueueHdrTest::c_nCapacity > buffer_type;
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_st()
-    {
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type,
-            cds::intrusive::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_st_cmp()
-    {
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type,
-            cds::intrusive::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::compare< IntrusivePQueueHdrTest::compare >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_st_less()
-    {
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type,
-            cds::intrusive::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::less< std::less<IntrusivePQueueHdrTest::key_type> >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_st_cmpless()
-    {
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type,
-            cds::intrusive::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::less< std::less<IntrusivePQueueHdrTest::key_type> >
-                ,cds::opt::compare< IntrusivePQueueHdrTest::compare >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void IntrusivePQueueHdrTest::MSPQueue_st_cmp_mtx()
-    {
-        struct pqueue_traits : public cds::intrusive::mspriority_queue::traits
-        {
-            typedef buffer_type buffer;
-            typedef IntrusivePQueueHdrTest::compare compare;
-            typedef std::mutex lock_type;
-        };
-        typedef cds::intrusive::MSPriorityQueue< IntrusivePQueueHdrTest::key_type, pqueue_traits > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-} // namespace priority_queue
diff --git a/tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h b/tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h
deleted file mode 100644 (file)
index e038c8f..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
-    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 CDSTEST_HDR_INTRUSIVE_PQUEUE_H
-#define CDSTEST_HDR_INTRUSIVE_PQUEUE_H
-
-#include "cppunit/cppunit_proxy.h"
-#include "size_check.h"
-#include <algorithm>
-#include <functional>   // ref
-
-namespace priority_queue {
-
-    namespace intrusive_pqueue {
-        static size_t const c_nCapacity = 1024 * 16;
-
-        struct another_disposer {
-            size_t   m_nCallCount;
-
-            another_disposer()
-                : m_nCallCount(0)
-            {}
-            template <typename T>
-            void operator()( T& )
-            {
-                ++m_nCallCount;
-            }
-        };
-
-        template <typename PQueue>
-        struct constants {
-            static size_t const nCapacity = c_nCapacity;
-        };
-    } // namespace intrusive_pqueue
-
-    class IntrusivePQueueHdrTest: public CppUnitMini::TestCase
-    {
-    public:
-        static size_t const c_nCapacity = intrusive_pqueue::c_nCapacity;
-
-        typedef int     key_type;
-        static key_type const c_nMinValue = -123;
-
-        struct compare {
-            int operator()( key_type k1, key_type k2 ) const
-            {
-                return k1 - k2;
-            }
-        };
-
-        template <typename T>
-        class data_array
-        {
-            T *     pFirst;
-            T *     pLast;
-
-        public:
-            data_array( size_t nSize )
-                : pFirst( new T[nSize] )
-                , pLast( pFirst + nSize )
-            {
-                T i = c_nMinValue;
-                for ( T * p = pFirst; p != pLast; ++p, ++i )
-                    *p = i;
-
-                CppUnitMini::TestCase::shuffle( pFirst, pLast );
-            }
-
-            ~data_array()
-            {
-                delete [] pFirst;
-            }
-
-            T * begin() { return pFirst; }
-            T * end()   { return pLast ; }
-            size_t size() const
-            {
-                return pLast - pFirst;
-            }
-        };
-
-    protected:
-        template <class PQueue>
-        void test_bounded_with( PQueue& pq )
-        {
-            data_array<key_type> arr( pq.capacity() );
-            key_type * pFirst = arr.begin();
-            key_type * pLast  = pFirst + pq.capacity();
-
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-            CPPUNIT_ASSERT( pq.capacity() == intrusive_pqueue::constants<PQueue>::nCapacity );
-
-            size_t nSize = 0;
-
-            // Push test
-            for ( key_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-                CPPUNIT_ASSERT( !pq.empty() );
-                CPPUNIT_ASSERT( pq.size() == ++nSize );
-            }
-
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-
-            // The queue is full
-            key_type k = c_nMinValue + key_type(c_nCapacity);
-            CPPUNIT_ASSERT( !pq.push( k ));
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-
-            // Pop test
-            key_type nPrev = c_nMinValue + key_type(pq.capacity()) - 1;
-            key_type * p = pq.pop();
-            CPPUNIT_ASSERT( p != nullptr );
-            CPPUNIT_CHECK_EX( *p == nPrev, "Expected=" << nPrev << ", current=" << *p );
-
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() - 1 );
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( !pq.empty() );
-
-            nSize = pq.size();
-            while ( pq.size() > 1 ) {
-                p = pq.pop();
-                CPPUNIT_ASSERT( p != nullptr );
-                CPPUNIT_CHECK_EX( *p == nPrev - 1, "Expected=" << nPrev - 1 << ", current=" << *p );
-                nPrev = *p;
-                --nSize;
-                CPPUNIT_ASSERT( pq.size() == nSize );
-            }
-
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 1 );
-
-            p = pq.pop();
-            CPPUNIT_ASSERT( p != nullptr );
-            CPPUNIT_CHECK_EX( *p == c_nMinValue, "Expected=" << c_nMinValue << ", current=" << *p );
-
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-
-            // Clear test
-            for ( key_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-            }
-            CPPUNIT_CHECK( !pq.empty() );
-            CPPUNIT_CHECK( pq.full() );
-            CPPUNIT_CHECK( pq.size() == pq.capacity() );
-            pq.clear();
-            CPPUNIT_CHECK( pq.empty() );
-            CPPUNIT_CHECK( !pq.full() );
-            CPPUNIT_CHECK( pq.size() == 0 );
-
-            // clear_with test
-            for ( key_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-            }
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-
-            {
-                intrusive_pqueue::another_disposer disp;
-                pq.clear_with( std::ref(disp) );
-                CPPUNIT_ASSERT( pq.empty() );
-                CPPUNIT_ASSERT( !pq.full() );
-                CPPUNIT_ASSERT( pq.size() == 0 );
-                CPPUNIT_ASSERT( disp.m_nCallCount == pq.capacity() );
-            }
-        }
-
-        template <class PQueue>
-        void test_msq_stat()
-        {
-            std::unique_ptr< PQueue > pq( new PQueue(0)); // argument should be ignored for static buffer
-            test_bounded_with( *pq );
-        }
-        template <class PQueue>
-        void test_msq_dyn()
-        {
-            PQueue pq( c_nCapacity );
-            test_bounded_with( pq );
-        }
-
-    public:
-        void MSPQueue_st();
-        void MSPQueue_st_cmp();
-        void MSPQueue_st_less();
-        void MSPQueue_st_cmpless();
-        void MSPQueue_st_cmp_mtx();
-        void MSPQueue_dyn();
-        void MSPQueue_dyn_cmp();
-        void MSPQueue_dyn_less();
-        void MSPQueue_dyn_cmpless();
-        void MSPQueue_dyn_cmp_mtx();
-
-        CPPUNIT_TEST_SUITE(IntrusivePQueueHdrTest)
-            CPPUNIT_TEST(MSPQueue_st)
-            CPPUNIT_TEST(MSPQueue_st_cmp)
-            CPPUNIT_TEST(MSPQueue_st_less)
-            CPPUNIT_TEST(MSPQueue_st_cmpless)
-            CPPUNIT_TEST(MSPQueue_st_cmp_mtx)
-            CPPUNIT_TEST(MSPQueue_dyn)
-            CPPUNIT_TEST(MSPQueue_dyn_cmp)
-            CPPUNIT_TEST(MSPQueue_dyn_less)
-            CPPUNIT_TEST(MSPQueue_dyn_cmpless)
-            CPPUNIT_TEST(MSPQueue_dyn_cmp_mtx)
-        CPPUNIT_TEST_SUITE_END()
-    };
-
-} // namespace priority_queue
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_PQUEUE_H
diff --git a/tests/test-hdr/priority_queue/hdr_mspqueue_dyn.cpp b/tests/test-hdr/priority_queue/hdr_mspqueue_dyn.cpp
deleted file mode 100644 (file)
index 248f4c8..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-    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 "priority_queue/hdr_pqueue.h"
-#include <cds/container/mspriority_queue.h>
-
-namespace priority_queue {
-    namespace pqueue {
-        template <typename T, typename Traits>
-        struct constants<cds::container::MSPriorityQueue<T, Traits> > {
-            static size_t const nCapacity = c_nCapacity - 1;
-        };
-    }
-
-    namespace {
-        typedef cds::opt::v::dynamic_buffer< char > buffer_type;
-    }
-
-    void PQueueHdrTest::MSPQueue_dyn()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-            >::type
-        > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_dyn_cmp()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::compare< PQueueHdrTest::compare >
-            >::type
-        > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_dyn_less()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::less< PQueueHdrTest::less >
-            >::type
-        > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_dyn_cmpless()
-    {
-        struct pqueue_traits : public cds::container::mspriority_queue::traits
-        {
-            typedef buffer_type buffer;
-            typedef PQueueHdrTest::less less;
-            typedef PQueueHdrTest::compare compare;
-        };
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type, pqueue_traits > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_dyn_cmp_mtx()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::compare< PQueueHdrTest::compare >
-                ,cds::opt::lock_type<std::mutex>
-            >::type
-        > pqueue;
-
-        test_msq_dyn<pqueue>();
-    }
-
-} // namespace priority_queue
diff --git a/tests/test-hdr/priority_queue/hdr_mspqueue_static.cpp b/tests/test-hdr/priority_queue/hdr_mspqueue_static.cpp
deleted file mode 100644 (file)
index cd70a81..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-    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 "priority_queue/hdr_pqueue.h"
-#include <cds/container/mspriority_queue.h>
-
-namespace priority_queue {
-    namespace pqueue {
-        template <typename T, typename Traits>
-        struct constants<cds::container::MSPriorityQueue<T, Traits> > {
-            static size_t const nCapacity = c_nCapacity - 1;
-        };
-    }
-
-    namespace {
-        typedef cds::opt::v::static_buffer< char, PQueueHdrTest::c_nCapacity > buffer_type;
-    }
-
-    void PQueueHdrTest::MSPQueue_st()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_st_cmp()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::compare< PQueueHdrTest::compare >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_st_less()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::less< PQueueHdrTest::less >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_st_cmpless()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::less< PQueueHdrTest::less >
-                ,cds::opt::compare< PQueueHdrTest::compare >
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-    void PQueueHdrTest::MSPQueue_st_cmp_mtx()
-    {
-        typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
-            cds::container::mspriority_queue::make_traits<
-                cds::opt::buffer< buffer_type >
-                ,cds::opt::compare< PQueueHdrTest::compare >
-                ,cds::opt::lock_type<std::mutex>
-            >::type
-        > pqueue;
-
-        test_msq_stat<pqueue>();
-    }
-
-} // namespace priority_queue
diff --git a/tests/test-hdr/priority_queue/hdr_pqueue.h b/tests/test-hdr/priority_queue/hdr_pqueue.h
deleted file mode 100644 (file)
index a9ef86c..0000000
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
-    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 CDSTEST_HDR_PQUEUE_H
-#define CDSTEST_HDR_PQUEUE_H
-
-#include "cppunit/cppunit_proxy.h"
-#include "size_check.h"
-#include <algorithm>
-#include <functional>   // ref
-
-namespace priority_queue {
-
-    namespace pqueue {
-        static size_t const c_nCapacity = 1024 * 16;
-
-        struct disposer {
-            size_t   m_nCallCount;
-
-            disposer()
-                : m_nCallCount(0)
-            {}
-
-            template <typename T>
-            void operator()( T& )
-            {
-                ++m_nCallCount;
-            }
-        };
-
-        template <typename PQueue>
-        struct constants {
-            static size_t const nCapacity = c_nCapacity;
-        };
-    } // namespace pqueue
-
-    class PQueueHdrTest: public CppUnitMini::TestCase
-    {
-    public:
-        static size_t const c_nCapacity = pqueue::c_nCapacity;
-
-        typedef int     key_type;
-        static key_type const c_nMinValue = -123;
-
-        struct value_type {
-            key_type    k;
-            int         v;
-
-            value_type()
-            {}
-
-            value_type( value_type const& kv )
-                : k(kv.k)
-                , v(kv.v)
-            {}
-
-            value_type( key_type key )
-                : k(key)
-                , v(key)
-            {}
-
-            value_type( key_type key, int val )
-                : k(key)
-                , v(val)
-            {}
-
-            value_type( std::pair<key_type, int> const& p )
-                : k(p.first)
-                , v(p.second)
-            {}
-        };
-
-        struct compare {
-            int operator()( value_type k1, value_type k2 ) const
-            {
-                return k1.k - k2.k;
-            }
-        };
-
-        struct less {
-            bool operator()( value_type k1, value_type k2 ) const
-            {
-                return k1.k < k2.k;
-            }
-        };
-
-        template <typename T>
-        class data_array
-        {
-            T *     pFirst;
-            T *     pLast;
-
-        public:
-            data_array( size_t nSize )
-                : pFirst( new T[nSize] )
-                , pLast( pFirst + nSize )
-            {
-                key_type i = c_nMinValue;
-                for ( T * p = pFirst; p != pLast; ++p, ++i )
-                    p->k = p->v = i;
-
-                shuffle( pFirst, pLast );
-            }
-
-            ~data_array()
-            {
-                delete [] pFirst;
-            }
-
-            T * begin() { return pFirst; }
-            T * end()   { return pLast ; }
-            size_t size() const
-            {
-                return pLast - pFirst;
-            }
-        };
-
-    protected:
-        template <class PQueue>
-        void test_bounded_with( PQueue& pq )
-        {
-            data_array<value_type> arr( pq.capacity() );
-            value_type * pFirst = arr.begin();
-            value_type * pLast  = pFirst + pq.capacity();
-
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-            CPPUNIT_ASSERT_EX( pq.capacity() == pqueue::constants<PQueue>::nCapacity,
-                "pq.capacity() = " << pq.capacity() << ", pqueue::constants<PQueue>::nCapacity = " << pqueue::constants<PQueue>::nCapacity
-                );
-
-            size_t nSize = 0;
-
-            // Push test
-            for ( value_type * p = pFirst; p < pLast; ++p ) {
-                switch ( pq.size() & 3 ) {
-                    case 0:
-                        CPPUNIT_ASSERT( pq.push_with( [p]( value_type& dest ) { dest = *p; } ));
-                        break;
-                    case 1:
-                        CPPUNIT_ASSERT( pq.emplace( p->k, p->v ));
-                        break;
-                    case 2:
-                        CPPUNIT_ASSERT( pq.emplace( std::make_pair( p->k, p->v ) ));
-                        break;
-                    default:
-                        CPPUNIT_ASSERT( pq.push( *p ));
-                }
-                CPPUNIT_ASSERT( !pq.empty() );
-                CPPUNIT_ASSERT( pq.size() == ++nSize );
-            }
-
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-
-            // The queue is full
-            key_type k = c_nMinValue + key_type(c_nCapacity);
-            CPPUNIT_ASSERT( !pq.push( k ));
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-
-            // Pop test
-            key_type nPrev = c_nMinValue + key_type(pq.capacity()) - 1;
-            value_type kv(0);
-            key_type   key;
-            CPPUNIT_ASSERT( pq.pop(kv) );
-            CPPUNIT_CHECK_EX( kv.k == nPrev, "Expected=" << nPrev << ", current=" << kv.k );
-
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() - 1 );
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( !pq.empty() );
-
-            nSize = pq.size();
-            while ( pq.size() > 1 ) {
-                if ( pq.size() & 1 ) {
-                    CPPUNIT_ASSERT( pq.pop(kv) );
-                    CPPUNIT_CHECK_EX( kv.k == nPrev - 1, "Expected=" << nPrev - 1 << ", current=" << kv.k );
-                    nPrev = kv.k;
-                }
-                else {
-                    CPPUNIT_ASSERT( pq.pop_with( [&key]( value_type& src ) { key = src.k;  } ) );
-                    CPPUNIT_CHECK_EX( key == nPrev - 1, "Expected=" << nPrev - 1 << ", current=" << key );
-                    nPrev = key;
-                }
-
-                --nSize;
-                CPPUNIT_ASSERT( pq.size() == nSize );
-            }
-
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 1 );
-
-            CPPUNIT_ASSERT( pq.pop(kv) );
-            CPPUNIT_CHECK_EX( kv.k == c_nMinValue, "Expected=" << c_nMinValue << ", current=" << kv.k );
-
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-
-            // Clear test
-            for ( value_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-            }
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-            pq.clear();
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( !pq.full() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-
-            // clear_with test
-            for ( value_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-            }
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.full() );
-            CPPUNIT_ASSERT( pq.size() == pq.capacity() );
-
-            {
-                pqueue::disposer disp;
-                pq.clear_with( std::ref(disp) );
-                CPPUNIT_ASSERT( pq.empty() );
-                CPPUNIT_ASSERT( !pq.full() );
-                CPPUNIT_ASSERT( pq.size() == 0 );
-                CPPUNIT_ASSERT( disp.m_nCallCount == pq.capacity() );
-            }
-        }
-
-        template <class PQueue>
-        void test_msq_stat()
-        {
-            std::unique_ptr< PQueue > pq( new PQueue( 0 )); // argument should be ignored for static buffer
-            test_bounded_with( *pq );
-        }
-        template <class PQueue>
-        void test_msq_dyn()
-        {
-            PQueue pq( c_nCapacity );
-            test_bounded_with( pq );
-        }
-
-        template <class PQueue>
-        void test_fcpqueue()
-        {
-            PQueue pq;
-
-            data_array<value_type> arr( c_nCapacity );
-            value_type * pFirst = arr.begin();
-            value_type * pLast  = pFirst + c_nCapacity;
-
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-
-            size_t nSize = 0;
-
-            // Push test
-            for ( value_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-                CPPUNIT_ASSERT( !pq.empty() );
-                CPPUNIT_ASSERT( pq.size() == ++nSize );
-            }
-
-            CPPUNIT_ASSERT( pq.size() == c_nCapacity );
-
-            // Pop test
-            key_type nPrev = c_nMinValue + key_type(c_nCapacity) - 1;
-            value_type kv(0);
-            //key_type   key;
-            CPPUNIT_ASSERT( pq.pop(kv) );
-            CPPUNIT_CHECK_EX( kv.k == nPrev, "Expected=" << nPrev << ", current=" << kv.k );
-
-            CPPUNIT_ASSERT( pq.size() == c_nCapacity - 1 );
-            CPPUNIT_ASSERT( !pq.empty() );
-
-            nSize = pq.size();
-            while ( pq.size() > 1 ) {
-                CPPUNIT_ASSERT( pq.pop(kv) );
-                CPPUNIT_CHECK_EX( kv.k == nPrev - 1, "Expected=" << nPrev - 1 << ", current=" << kv.k );
-                nPrev = kv.k;
-
-                --nSize;
-                CPPUNIT_ASSERT( pq.size() == nSize );
-            }
-
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 1 );
-
-            CPPUNIT_ASSERT( pq.pop(kv) );
-            CPPUNIT_CHECK_EX( kv.k == c_nMinValue, "Expected=" << c_nMinValue << ", current=" << kv.k );
-
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-
-            // Clear test
-            for ( value_type * p = pFirst; p < pLast; ++p ) {
-                CPPUNIT_ASSERT( pq.push( *p ));
-            }
-            CPPUNIT_ASSERT( !pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == c_nCapacity );
-
-            pq.clear();
-            CPPUNIT_ASSERT( pq.empty() );
-            CPPUNIT_ASSERT( pq.size() == 0 );
-        }
-
-    public:
-        void MSPQueue_st();
-        void MSPQueue_st_cmp();
-        void MSPQueue_st_less();
-        void MSPQueue_st_cmpless();
-        void MSPQueue_st_cmp_mtx();
-        void MSPQueue_dyn();
-        void MSPQueue_dyn_cmp();
-        void MSPQueue_dyn_less();
-        void MSPQueue_dyn_cmpless();
-        void MSPQueue_dyn_cmp_mtx();
-
-        void FCPQueue_vector();
-        void FCPQueue_vector_stat();
-        void FCPQueue_vector_mutex();
-        void FCPQueue_deque();
-        void FCPQueue_deque_stat();
-        void FCPQueue_deque_mutex();
-        void FCPQueue_boost_deque();
-        void FCPQueue_boost_deque_stat();
-        void FCPQueue_stablevector();
-        void FCPQueue_stablevector_stat();
-
-        CPPUNIT_TEST_SUITE(PQueueHdrTest)
-            CPPUNIT_TEST(MSPQueue_st)
-            CPPUNIT_TEST(MSPQueue_st_cmp)
-            CPPUNIT_TEST(MSPQueue_st_less)
-            CPPUNIT_TEST(MSPQueue_st_cmpless)
-            CPPUNIT_TEST(MSPQueue_st_cmp_mtx)
-            CPPUNIT_TEST(MSPQueue_dyn)
-            CPPUNIT_TEST(MSPQueue_dyn_cmp)
-            CPPUNIT_TEST(MSPQueue_dyn_less)
-            CPPUNIT_TEST(MSPQueue_dyn_cmpless)
-            CPPUNIT_TEST(MSPQueue_dyn_cmp_mtx)
-
-            CPPUNIT_TEST(FCPQueue_vector)
-            CPPUNIT_TEST(FCPQueue_vector_stat)
-            CPPUNIT_TEST(FCPQueue_vector_mutex)
-            CPPUNIT_TEST(FCPQueue_deque)
-            CPPUNIT_TEST(FCPQueue_deque_stat)
-            CPPUNIT_TEST(FCPQueue_deque_mutex)
-            CPPUNIT_TEST(FCPQueue_boost_deque)
-            CPPUNIT_TEST(FCPQueue_boost_deque_stat)
-            CPPUNIT_TEST(FCPQueue_stablevector)
-            CPPUNIT_TEST(FCPQueue_stablevector_stat)
-        CPPUNIT_TEST_SUITE_END()
-    };
-
-} // namespace priority_queue
-
-namespace std {
-    template<>
-    struct less<priority_queue::PQueueHdrTest::value_type>
-    {
-        bool operator()( priority_queue::PQueueHdrTest::value_type const& v1, priority_queue::PQueueHdrTest::value_type const& v2) const
-        {
-            return priority_queue::PQueueHdrTest::less()( v1, v2 );
-        }
-    };
-}
-
-#endif // #ifndef CDSTEST_HDR_PQUEUE_H
diff --git a/tests/test-hdr/priority_queue/hdr_priority_queue_reg.cpp b/tests/test-hdr/priority_queue/hdr_priority_queue_reg.cpp
deleted file mode 100644 (file)
index 8db5ae4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-    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 "priority_queue/hdr_intrusive_pqueue.h"
-#include "priority_queue/hdr_pqueue.h"
-
-
-CPPUNIT_TEST_SUITE_REGISTRATION_(priority_queue::IntrusivePQueueHdrTest, s_IntrusivePQueueHdrTest);
-CPPUNIT_TEST_SUITE_REGISTRATION_(priority_queue::PQueueHdrTest, s_PQueueHdrTest);