Add WebSocketTestSuite

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE 2015-12-29 19:46:18 +01:00
parent a482cb9517
commit 3ef803d40b
5 changed files with 65 additions and 58 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|Win32"> <ProjectConfiguration Include="debug_shared|Win32">
@ -32,7 +32,7 @@
<RootNamespace>TestSuite</RootNamespace> <RootNamespace>TestSuite</RootNamespace>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@ -63,27 +63,27 @@
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v120</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"/> <ImportGroup Label="ExtensionSettings" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/> <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros"/> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion> <_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
@ -136,7 +136,7 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
@ -167,9 +167,9 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/> <DebugInformationFormat />
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@ -196,7 +196,7 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
@ -227,9 +227,9 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/> <DebugInformationFormat />
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@ -256,7 +256,7 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
@ -287,9 +287,9 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/> <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/> <DebugInformationFormat />
<CompileAs>Default</CompileAs> <CompileAs>Default</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@ -304,28 +304,32 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="src\HTTPSClientSessionTest.h"/> <ClInclude Include="src\HTTPSClientSessionTest.h" />
<ClInclude Include="src\HTTPSClientTestSuite.h"/> <ClInclude Include="src\HTTPSClientTestSuite.h" />
<ClInclude Include="src\HTTPSServerTest.h"/> <ClInclude Include="src\HTTPSServerTest.h" />
<ClInclude Include="src\HTTPSServerTestSuite.h"/> <ClInclude Include="src\HTTPSServerTestSuite.h" />
<ClInclude Include="src\HTTPSStreamFactoryTest.h"/> <ClInclude Include="src\HTTPSStreamFactoryTest.h" />
<ClInclude Include="src\HTTPSTestServer.h"/> <ClInclude Include="src\HTTPSTestServer.h" />
<ClInclude Include="src\NetSSLTestSuite.h"/> <ClInclude Include="src\NetSSLTestSuite.h" />
<ClInclude Include="src\TCPServerTest.h"/> <ClInclude Include="src\TCPServerTest.h" />
<ClInclude Include="src\TCPServerTestSuite.h"/> <ClInclude Include="src\TCPServerTestSuite.h" />
<ClInclude Include="src\WebSocketTest.h" />
<ClInclude Include="src\WebSocketTestSuite.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\Driver.cpp"/> <ClCompile Include="src\Driver.cpp" />
<ClCompile Include="src\HTTPSClientSessionTest.cpp"/> <ClCompile Include="src\HTTPSClientSessionTest.cpp" />
<ClCompile Include="src\HTTPSClientTestSuite.cpp"/> <ClCompile Include="src\HTTPSClientTestSuite.cpp" />
<ClCompile Include="src\HTTPSServerTest.cpp"/> <ClCompile Include="src\HTTPSServerTest.cpp" />
<ClCompile Include="src\HTTPSServerTestSuite.cpp"/> <ClCompile Include="src\HTTPSServerTestSuite.cpp" />
<ClCompile Include="src\HTTPSStreamFactoryTest.cpp"/> <ClCompile Include="src\HTTPSStreamFactoryTest.cpp" />
<ClCompile Include="src\HTTPSTestServer.cpp"/> <ClCompile Include="src\HTTPSTestServer.cpp" />
<ClCompile Include="src\NetSSLTestSuite.cpp"/> <ClCompile Include="src\NetSSLTestSuite.cpp" />
<ClCompile Include="src\TCPServerTest.cpp"/> <ClCompile Include="src\TCPServerTest.cpp" />
<ClCompile Include="src\TCPServerTestSuite.cpp"/> <ClCompile Include="src\TCPServerTestSuite.cpp" />
<ClCompile Include="src\WebSocketTest.cpp" />
<ClCompile Include="src\WebSocketTestSuite.cpp" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"/> <ImportGroup Label="ExtensionTargets" />
</Project> </Project>

View File

@ -52,6 +52,9 @@
<Filter Include="HTTPSClient\Source Files"> <Filter Include="HTTPSClient\Source Files">
<UniqueIdentifier>{40e36c0c-5808-4c87-aa2e-04c0ffa6f35e}</UniqueIdentifier> <UniqueIdentifier>{40e36c0c-5808-4c87-aa2e-04c0ffa6f35e}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Websocket">
<UniqueIdentifier>{9243a946-e87f-42f5-adba-efbb4823f93c}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="src\HTTPSTestServer.h"> <ClInclude Include="src\HTTPSTestServer.h">
@ -81,6 +84,12 @@
<ClInclude Include="src\HTTPSStreamFactoryTest.h"> <ClInclude Include="src\HTTPSStreamFactoryTest.h">
<Filter>HTTPSClient\Header Files</Filter> <Filter>HTTPSClient\Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\WebSocketTest.h">
<Filter>Websocket</Filter>
</ClInclude>
<ClInclude Include="src\WebSocketTestSuite.h">
<Filter>Websocket</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\HTTPSTestServer.cpp"> <ClCompile Include="src\HTTPSTestServer.cpp">
@ -113,5 +122,11 @@
<ClCompile Include="src\HTTPSStreamFactoryTest.cpp"> <ClCompile Include="src\HTTPSStreamFactoryTest.cpp">
<Filter>HTTPSClient\Source Files</Filter> <Filter>HTTPSClient\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\WebSocketTest.cpp">
<Filter>Websocket</Filter>
</ClCompile>
<ClCompile Include="src\WebSocketTestSuite.cpp">
<Filter>Websocket</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -15,6 +15,7 @@
#include "HTTPSClientTestSuite.h" #include "HTTPSClientTestSuite.h"
#include "TCPServerTestSuite.h" #include "TCPServerTestSuite.h"
#include "HTTPSServerTestSuite.h" #include "HTTPSServerTestSuite.h"
#include "WebSocketTestSuite.h"
CppUnit::Test* NetSSLTestSuite::suite() CppUnit::Test* NetSSLTestSuite::suite()
@ -24,6 +25,7 @@ CppUnit::Test* NetSSLTestSuite::suite()
pSuite->addTest(HTTPSClientTestSuite::suite()); pSuite->addTest(HTTPSClientTestSuite::suite());
pSuite->addTest(TCPServerTestSuite::suite()); pSuite->addTest(TCPServerTestSuite::suite());
pSuite->addTest(HTTPSServerTestSuite::suite()); pSuite->addTest(HTTPSServerTestSuite::suite());
pSuite->addTest(WebSocketTestSuite::suite());
return pSuite; return pSuite;
} }

View File

@ -1,10 +1,3 @@
//
// TimeHandler.cpp
//
// This file has been generated from TimeHandler.cpsp on 2010-01-28 08:49:54.
//
#include "TimeHandler.h" #include "TimeHandler.h"
#include "Poco/Net/HTTPServerRequest.h" #include "Poco/Net/HTTPServerRequest.h"
#include "Poco/Net/HTTPServerResponse.h" #include "Poco/Net/HTTPServerResponse.h"
@ -28,7 +21,7 @@ void TimeHandler::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net
responseStream << "\n"; responseStream << "\n";
responseStream << "\n"; responseStream << "\n";
responseStream << ""; responseStream << "";
#line 6 "/ws/poco-1.3/PageCompiler/samples/HTTPTimeServer/src/TimeHandler.cpsp" #line 6 "/cygdrive/z/git/poco/PageCompiler/samples/HTTPTimeServer/src/TimeHandler.cpsp"
Poco::DateTime now; Poco::DateTime now;
std::string dt(Poco::DateTimeFormatter::format(now, "%W, %e %b %y %H:%M:%S %Z")); std::string dt(Poco::DateTimeFormatter::format(now, "%W, %e %b %y %H:%M:%S %Z"));
@ -40,7 +33,7 @@ void TimeHandler::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net
responseStream << "</head>\n"; responseStream << "</head>\n";
responseStream << "<body>\n"; responseStream << "<body>\n";
responseStream << "<p style=\"text-align: center; font-size: 48px;\">"; responseStream << "<p style=\"text-align: center; font-size: 48px;\">";
#line 16 "/ws/poco-1.3/PageCompiler/samples/HTTPTimeServer/src/TimeHandler.cpsp" #line 16 "/cygdrive/z/git/poco/PageCompiler/samples/HTTPTimeServer/src/TimeHandler.cpsp"
responseStream << ( dt ); responseStream << ( dt );
responseStream << "</p>\n"; responseStream << "</p>\n";
responseStream << "</body>\n"; responseStream << "</body>\n";

View File

@ -1,10 +1,3 @@
//
// TimeHandler.h
//
// This file has been generated from TimeHandler.cpsp on 2010-01-28 08:49:54.
//
#ifndef TimeHandler_INCLUDED #ifndef TimeHandler_INCLUDED
#define TimeHandler_INCLUDED #define TimeHandler_INCLUDED