1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 22:57:12 +02:00

Major plugin refactor and cleanup.

Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
This commit is contained in:
Sandu Liviu Catalin
2021-01-30 08:51:39 +02:00
parent e0e34b4030
commit 4a6bfc086c
6219 changed files with 1209835 additions and 454916 deletions

View File

@ -0,0 +1,32 @@
# Sources
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
# Headers
file(GLOB_RECURSE HDRS_G "src/*.h")
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
src/WinDriver.cpp
)
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
src/WinCEDriver.cpp
)
add_executable(XML-testrunner ${TEST_SRCS})
if(ANDROID)
add_test(
NAME XML
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/XML-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
)
else()
add_test(
NAME XML
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND XML-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
)
set_tests_properties(XML PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
endif()
target_link_libraries(XML-testrunner PUBLIC Poco::XML CppUnit)

24
vendor/POCO/XML/testsuite/Makefile vendored Normal file
View File

@ -0,0 +1,24 @@
#
# Makefile
#
# Makefile for Poco XML testsuite
#
include $(POCO_BASE)/build/rules/global
objects = AttributesImplTest ChildNodesTest DOMTestSuite DocumentTest \
DocumentTypeTest Driver ElementTest EventTest NamePoolTest NameTest \
NamespaceSupportTest NodeIteratorTest NodeTest ParserWriterTest \
SAXParserTest SAXTestSuite TextTest TreeWalkerTest \
XMLTestSuite XMLWriterTest NodeAppenderTest \
XMLStreamParserTest
target = testrunner
target_version = 1
target_libs = PocoXML PocoFoundation CppUnit
include $(POCO_BASE)/build/rules/exec
ifdef POCO_UNBUNDLED
SYSLIBS += -lexpat
endif

View File

@ -0,0 +1,10 @@
vc.project.guid = C9ACF028-17A1-44C2-8C09-DFD3BD9E7D45
vc.project.name = TestSuite
vc.project.target = TestSuite
vc.project.type = testsuite
vc.project.pocobase = ..\\..
vc.project.platforms = Win32
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
vc.project.prototype = TestSuite_vs90.vcproj
vc.project.compiler.include = ..\\..\\Foundation\\include
vc.project.linker.dependencies = iphlpapi.lib

View File

@ -0,0 +1,693 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|Win32">
<Configuration>debug_shared</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_shared|x64">
<Configuration>debug_shared</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_md|Win32">
<Configuration>debug_static_md</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_md|x64">
<Configuration>debug_static_md</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_mt|Win32">
<Configuration>debug_static_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_mt|x64">
<Configuration>debug_static_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_shared|Win32">
<Configuration>release_shared</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_shared|x64">
<Configuration>release_shared</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_md|Win32">
<Configuration>release_static_md</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_md|x64">
<Configuration>release_static_md</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_mt|Win32">
<Configuration>release_static_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_mt|x64">
<Configuration>release_static_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>TestSuite</ProjectName>
<ProjectGuid>{C9ACF028-17A1-44C2-8C09-DFD3BD9E7D45}</ProjectGuid>
<RootNamespace>TestSuite</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<ImportGroup Label="ExtensionSettings"/>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<OutDir>bin\static_mt\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<OutDir>bin\static_mt\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<OutDir>bin\static_md\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<OutDir>bin\static_md\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<OutDir>bin64\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<OutDir>bin64\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<OutDir>bin64\static_mt\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<OutDir>bin64\static_mt\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<OutDir>bin64\static_md\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<OutDir>bin64\static_md\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\AttributesImplTest.h"/>
<ClInclude Include="src\ChildNodesTest.h"/>
<ClInclude Include="src\DocumentTest.h"/>
<ClInclude Include="src\DocumentTypeTest.h"/>
<ClInclude Include="src\DOMTestSuite.h"/>
<ClInclude Include="src\ElementTest.h"/>
<ClInclude Include="src\EventTest.h"/>
<ClInclude Include="src\NamePoolTest.h"/>
<ClInclude Include="src\NamespaceSupportTest.h"/>
<ClInclude Include="src\NameTest.h"/>
<ClInclude Include="src\NodeAppenderTest.h"/>
<ClInclude Include="src\NodeIteratorTest.h"/>
<ClInclude Include="src\NodeTest.h"/>
<ClInclude Include="src\ParserWriterTest.h"/>
<ClInclude Include="src\SAXParserTest.h"/>
<ClInclude Include="src\SAXTestSuite.h"/>
<ClInclude Include="src\TextTest.h"/>
<ClInclude Include="src\TreeWalkerTest.h"/>
<ClInclude Include="src\XMLStreamParserTest.h"/>
<ClInclude Include="src\XMLTestSuite.h"/>
<ClInclude Include="src\XMLWriterTest.h"/>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\AttributesImplTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ChildNodesTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DocumentTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DocumentTypeTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DOMTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\Driver.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ElementTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\EventTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NamePoolTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NamespaceSupportTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NameTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeAppenderTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeIteratorTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ParserWriterTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\SAXParserTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\SAXTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\TextTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\TreeWalkerTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLStreamParserTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLWriterTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<ImportGroup Label="ExtensionTargets"/>
</Project>

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="XML">
<UniqueIdentifier>{e0f98570-0f48-4a8a-a29c-f2a91b4b81b0}</UniqueIdentifier>
</Filter>
<Filter Include="XML\Header Files">
<UniqueIdentifier>{ffff091f-7973-47c2-bea9-f1733c4e99a0}</UniqueIdentifier>
</Filter>
<Filter Include="XML\Source Files">
<UniqueIdentifier>{3c66c114-f188-4c4e-8612-624161ad9231}</UniqueIdentifier>
</Filter>
<Filter Include="SAX">
<UniqueIdentifier>{eb92d3cd-cb71-40e8-b499-c7e0dab736d1}</UniqueIdentifier>
</Filter>
<Filter Include="SAX\Header Files">
<UniqueIdentifier>{d5b1f54c-c536-4890-aa1e-53181db0d2c4}</UniqueIdentifier>
</Filter>
<Filter Include="SAX\Source Files">
<UniqueIdentifier>{2e152286-e4e8-48f9-9a25-85c7ea1acfe5}</UniqueIdentifier>
</Filter>
<Filter Include="DOM">
<UniqueIdentifier>{7165c5ca-91c3-40ee-b4e5-fed7e73754fd}</UniqueIdentifier>
</Filter>
<Filter Include="DOM\Header Files">
<UniqueIdentifier>{3b7f5805-9d65-48c5-ab08-f4ae017992f7}</UniqueIdentifier>
</Filter>
<Filter Include="DOM\Source Files">
<UniqueIdentifier>{0c628739-145a-416a-9e49-2479eadb9b64}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{0d2710c3-2d26-442b-8b67-f28bd3f9f3ab}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{31716f87-49c7-4666-9142-69ac763187e8}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{13b220b6-69ac-4bf3-8175-0dd6d7b19eca}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{4a52c6aa-67d8-4adb-b110-125792bc0426}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{f2939ff7-5ecd-45ec-b798-f47afe5b2968}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\NamePoolTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NameTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLStreamParserTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLWriterTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\AttributesImplTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NamespaceSupportTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SAXParserTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SAXTestSuite.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ChildNodesTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DocumentTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DocumentTypeTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DOMTestSuite.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ElementTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EventTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeAppenderTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeIteratorTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ParserWriterTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\TextTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\TreeWalkerTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLTestSuite.h">
<Filter>_Suite\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\NamePoolTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NameTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLStreamParserTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLWriterTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\AttributesImplTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamespaceSupportTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SAXParserTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SAXTestSuite.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ChildNodesTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DocumentTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DocumentTypeTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DOMTestSuite.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ElementTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EventTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeAppenderTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeIteratorTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ParserWriterTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TextTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TreeWalkerTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLTestSuite.cpp">
<Filter>_Suite\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Driver.cpp">
<Filter>_Driver\Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,693 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|Win32">
<Configuration>debug_shared</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_shared|x64">
<Configuration>debug_shared</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_md|Win32">
<Configuration>debug_static_md</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_md|x64">
<Configuration>debug_static_md</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_mt|Win32">
<Configuration>debug_static_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_mt|x64">
<Configuration>debug_static_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_shared|Win32">
<Configuration>release_shared</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_shared|x64">
<Configuration>release_shared</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_md|Win32">
<Configuration>release_static_md</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_md|x64">
<Configuration>release_static_md</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_mt|Win32">
<Configuration>release_static_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_mt|x64">
<Configuration>release_static_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>TestSuite</ProjectName>
<ProjectGuid>{C9ACF028-17A1-44C2-8C09-DFD3BD9E7D45}</ProjectGuid>
<RootNamespace>TestSuite</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<ImportGroup Label="ExtensionSettings"/>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<OutDir>bin\static_mt\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<OutDir>bin\static_mt\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<OutDir>bin\static_md\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<OutDir>bin\static_md\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<OutDir>bin64\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<OutDir>bin64\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<OutDir>bin64\static_mt\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<OutDir>bin64\static_mt\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<OutDir>bin64\static_md\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<OutDir>bin64\static_md\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\AttributesImplTest.h"/>
<ClInclude Include="src\ChildNodesTest.h"/>
<ClInclude Include="src\DocumentTest.h"/>
<ClInclude Include="src\DocumentTypeTest.h"/>
<ClInclude Include="src\DOMTestSuite.h"/>
<ClInclude Include="src\ElementTest.h"/>
<ClInclude Include="src\EventTest.h"/>
<ClInclude Include="src\NamePoolTest.h"/>
<ClInclude Include="src\NamespaceSupportTest.h"/>
<ClInclude Include="src\NameTest.h"/>
<ClInclude Include="src\NodeAppenderTest.h"/>
<ClInclude Include="src\NodeIteratorTest.h"/>
<ClInclude Include="src\NodeTest.h"/>
<ClInclude Include="src\ParserWriterTest.h"/>
<ClInclude Include="src\SAXParserTest.h"/>
<ClInclude Include="src\SAXTestSuite.h"/>
<ClInclude Include="src\TextTest.h"/>
<ClInclude Include="src\TreeWalkerTest.h"/>
<ClInclude Include="src\XMLStreamParserTest.h"/>
<ClInclude Include="src\XMLTestSuite.h"/>
<ClInclude Include="src\XMLWriterTest.h"/>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\AttributesImplTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ChildNodesTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DocumentTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DocumentTypeTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DOMTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\Driver.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ElementTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\EventTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NamePoolTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NamespaceSupportTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NameTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeAppenderTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeIteratorTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ParserWriterTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\SAXParserTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\SAXTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\TextTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\TreeWalkerTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLStreamParserTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLWriterTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<ImportGroup Label="ExtensionTargets"/>
</Project>

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="XML">
<UniqueIdentifier>{12e9a65e-9be0-4e42-b0dc-84f802ba8d64}</UniqueIdentifier>
</Filter>
<Filter Include="XML\Header Files">
<UniqueIdentifier>{31f89672-4086-4ed9-a9c9-a2e8e9020c17}</UniqueIdentifier>
</Filter>
<Filter Include="XML\Source Files">
<UniqueIdentifier>{4ae1fabb-2137-4c1f-8adf-98438cdf0d09}</UniqueIdentifier>
</Filter>
<Filter Include="SAX">
<UniqueIdentifier>{3bafbfea-5e99-42a9-8536-4f9ae45883f0}</UniqueIdentifier>
</Filter>
<Filter Include="SAX\Header Files">
<UniqueIdentifier>{3b2cab60-409e-4d3b-a0a5-3d8e1bd4e9e2}</UniqueIdentifier>
</Filter>
<Filter Include="SAX\Source Files">
<UniqueIdentifier>{1be3f5b8-ffb4-41f5-8320-7598a2c57add}</UniqueIdentifier>
</Filter>
<Filter Include="DOM">
<UniqueIdentifier>{d716d236-9527-4f02-88ca-ca3e8f0e10cd}</UniqueIdentifier>
</Filter>
<Filter Include="DOM\Header Files">
<UniqueIdentifier>{a3988452-fc11-4a68-8ab6-6d18b9586245}</UniqueIdentifier>
</Filter>
<Filter Include="DOM\Source Files">
<UniqueIdentifier>{631ff41c-a2b3-4926-a3d0-b6af020bfd3f}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{0c5d86d4-00c5-4a13-80fc-ca48cd546fae}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{b8698ed1-4daf-43bc-93c8-c8c59afd08eb}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{5a3f0cbe-3d39-4cd1-a3d9-55211719c6d2}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{f7c124ae-712f-458c-a15b-5494ad6f5969}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{e5cac35f-4568-4507-8f56-87454f842b8b}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\NamePoolTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NameTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLStreamParserTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLWriterTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\AttributesImplTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NamespaceSupportTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SAXParserTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SAXTestSuite.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ChildNodesTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DocumentTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DocumentTypeTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DOMTestSuite.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ElementTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EventTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeAppenderTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeIteratorTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ParserWriterTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\TextTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\TreeWalkerTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLTestSuite.h">
<Filter>_Suite\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\NamePoolTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NameTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLStreamParserTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLWriterTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\AttributesImplTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamespaceSupportTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SAXParserTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SAXTestSuite.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ChildNodesTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DocumentTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DocumentTypeTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DOMTestSuite.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ElementTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EventTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeAppenderTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeIteratorTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ParserWriterTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TextTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TreeWalkerTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLTestSuite.cpp">
<Filter>_Suite\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Driver.cpp">
<Filter>_Driver\Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,693 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|Win32">
<Configuration>debug_shared</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_shared|x64">
<Configuration>debug_shared</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_md|Win32">
<Configuration>debug_static_md</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_md|x64">
<Configuration>debug_static_md</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_mt|Win32">
<Configuration>debug_static_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="debug_static_mt|x64">
<Configuration>debug_static_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_shared|Win32">
<Configuration>release_shared</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_shared|x64">
<Configuration>release_shared</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_md|Win32">
<Configuration>release_static_md</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_md|x64">
<Configuration>release_static_md</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_mt|Win32">
<Configuration>release_static_mt</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release_static_mt|x64">
<Configuration>release_static_mt</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>TestSuite</ProjectName>
<ProjectGuid>{C9ACF028-17A1-44C2-8C09-DFD3BD9E7D45}</ProjectGuid>
<RootNamespace>TestSuite</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<ImportGroup Label="ExtensionSettings"/>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<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"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<OutDir>bin\static_mt\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<OutDir>bin\static_mt\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<OutDir>bin\static_md\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<OutDir>bin\static_md\</OutDir>
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<OutDir>bin64\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<OutDir>bin64\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<OutDir>bin64\static_mt\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<OutDir>bin64\static_mt\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<OutDir>bin64\static_md\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<OutDir>bin64\static_md\</OutDir>
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitd.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnit.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\AttributesImplTest.h"/>
<ClInclude Include="src\ChildNodesTest.h"/>
<ClInclude Include="src\DocumentTest.h"/>
<ClInclude Include="src\DocumentTypeTest.h"/>
<ClInclude Include="src\DOMTestSuite.h"/>
<ClInclude Include="src\ElementTest.h"/>
<ClInclude Include="src\EventTest.h"/>
<ClInclude Include="src\NamePoolTest.h"/>
<ClInclude Include="src\NamespaceSupportTest.h"/>
<ClInclude Include="src\NameTest.h"/>
<ClInclude Include="src\NodeAppenderTest.h"/>
<ClInclude Include="src\NodeIteratorTest.h"/>
<ClInclude Include="src\NodeTest.h"/>
<ClInclude Include="src\ParserWriterTest.h"/>
<ClInclude Include="src\SAXParserTest.h"/>
<ClInclude Include="src\SAXTestSuite.h"/>
<ClInclude Include="src\TextTest.h"/>
<ClInclude Include="src\TreeWalkerTest.h"/>
<ClInclude Include="src\XMLStreamParserTest.h"/>
<ClInclude Include="src\XMLTestSuite.h"/>
<ClInclude Include="src\XMLWriterTest.h"/>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\AttributesImplTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ChildNodesTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DocumentTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DocumentTypeTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\DOMTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\Driver.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ElementTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\EventTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NamePoolTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NamespaceSupportTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NameTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeAppenderTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeIteratorTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\NodeTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\ParserWriterTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\SAXParserTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\SAXTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\TextTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\TreeWalkerTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLStreamParserTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLTestSuite.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ClCompile Include="src\XMLWriterTest.cpp">
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<ImportGroup Label="ExtensionTargets"/>
</Project>

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="XML">
<UniqueIdentifier>{090985c4-d8cd-48bb-85f7-91a098e06299}</UniqueIdentifier>
</Filter>
<Filter Include="XML\Header Files">
<UniqueIdentifier>{a955d4a3-b63d-44f1-a1f8-36fe3fd3931c}</UniqueIdentifier>
</Filter>
<Filter Include="XML\Source Files">
<UniqueIdentifier>{39eb7904-bdd2-420a-a22d-3f92fd958847}</UniqueIdentifier>
</Filter>
<Filter Include="SAX">
<UniqueIdentifier>{8b55d89f-b749-47e7-90cc-77af1dfd17b7}</UniqueIdentifier>
</Filter>
<Filter Include="SAX\Header Files">
<UniqueIdentifier>{7cdb77d9-9d68-4da3-a583-20bd8b1178ad}</UniqueIdentifier>
</Filter>
<Filter Include="SAX\Source Files">
<UniqueIdentifier>{eac7dbb8-60bf-4c8b-85ee-3b9b18042faa}</UniqueIdentifier>
</Filter>
<Filter Include="DOM">
<UniqueIdentifier>{57991cd7-31e0-4f79-b6c2-a1e8b7e235d3}</UniqueIdentifier>
</Filter>
<Filter Include="DOM\Header Files">
<UniqueIdentifier>{bdae7d18-160f-4ff6-a360-4fc48fe160af}</UniqueIdentifier>
</Filter>
<Filter Include="DOM\Source Files">
<UniqueIdentifier>{8134b06c-7e0d-40ab-aa01-3dbda417de8f}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite">
<UniqueIdentifier>{123f3967-9ee3-4243-aa83-d2874d65ef4b}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Header Files">
<UniqueIdentifier>{eabee412-0d01-4ae6-bfbe-646177193d2a}</UniqueIdentifier>
</Filter>
<Filter Include="_Suite\Source Files">
<UniqueIdentifier>{ea096f4a-6e0f-482a-9caf-e00595d3cb40}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver">
<UniqueIdentifier>{fcd6636f-768f-47a3-b33c-a3edcfbea432}</UniqueIdentifier>
</Filter>
<Filter Include="_Driver\Source Files">
<UniqueIdentifier>{1da4dc2d-5376-48cc-9cc0-b755636ad484}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\NamePoolTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NameTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLStreamParserTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLWriterTest.h">
<Filter>XML\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\AttributesImplTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NamespaceSupportTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SAXParserTest.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\SAXTestSuite.h">
<Filter>SAX\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ChildNodesTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DocumentTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DocumentTypeTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DOMTestSuite.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ElementTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\EventTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeAppenderTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeIteratorTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\NodeTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\ParserWriterTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\TextTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\TreeWalkerTest.h">
<Filter>DOM\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\XMLTestSuite.h">
<Filter>_Suite\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\NamePoolTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NameTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLStreamParserTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLWriterTest.cpp">
<Filter>XML\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\AttributesImplTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamespaceSupportTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SAXParserTest.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SAXTestSuite.cpp">
<Filter>SAX\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ChildNodesTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DocumentTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DocumentTypeTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DOMTestSuite.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ElementTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\EventTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeAppenderTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeIteratorTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NodeTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ParserWriterTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TextTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TreeWalkerTest.cpp">
<Filter>DOM\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\XMLTestSuite.cpp">
<Filter>_Suite\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Driver.cpp">
<Filter>_Driver\Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,576 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
Name="TestSuite"
Version="9.00"
ProjectType="Visual C++"
ProjectGUID="{C9ACF028-17A1-44C2-8C09-DFD3BD9E7D45}"
RootNamespace="TestSuite"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<ToolFiles/>
<Configurations>
<Configuration
Name="debug_shared|Win32"
OutputDirectory="obj\$(ConfigurationName)"
IntermediateDirectory="obj\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\include;..\..\CppUnit\include;..\..\Foundation\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BufferSecurityCheck="true"
TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings=""
AdditionalOptions=""/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="bin\TestSuited.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="bin\TestSuited.pdb"
SubSystem="1"
TargetMachine="1"
AdditionalOptions=""/>
<Tool
Name="VCALinkTool"/>
<Tool
Name="VCManifestTool"/>
<Tool
Name="VCXDCMakeTool"/>
<Tool
Name="VCBscMakeTool"/>
<Tool
Name="VCFxCopTool"/>
<Tool
Name="VCAppVerifierTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="release_shared|Win32"
OutputDirectory="obj\$(ConfigurationName)"
IntermediateDirectory="obj\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\include;..\..\CppUnit\include;..\..\Foundation\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
CompileAs="0"
DisableSpecificWarnings=""
AdditionalOptions=""/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="bin\TestSuite.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib"
GenerateDebugInformation="false"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
AdditionalOptions=""/>
<Tool
Name="VCALinkTool"/>
<Tool
Name="VCManifestTool"/>
<Tool
Name="VCXDCMakeTool"/>
<Tool
Name="VCBscMakeTool"/>
<Tool
Name="VCFxCopTool"/>
<Tool
Name="VCAppVerifierTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="debug_static_mt|Win32"
OutputDirectory="obj\$(ConfigurationName)"
IntermediateDirectory="obj\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
AdditionalIncludeDirectories="..\include;..\..\CppUnit\include;..\..\Foundation\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
BufferSecurityCheck="true"
TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings=""
AdditionalOptions=""/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="bin\static_mt\TestSuited.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib"
IgnoreDefaultLibraryNames="nafxcwd.lib"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="bin\static_mt\TestSuited.pdb"
SubSystem="1"
TargetMachine="1"
AdditionalOptions=""/>
<Tool
Name="VCALinkTool"/>
<Tool
Name="VCManifestTool"/>
<Tool
Name="VCXDCMakeTool"/>
<Tool
Name="VCBscMakeTool"/>
<Tool
Name="VCFxCopTool"/>
<Tool
Name="VCAppVerifierTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="release_static_mt|Win32"
OutputDirectory="obj\$(ConfigurationName)"
IntermediateDirectory="obj\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\include;..\..\CppUnit\include;..\..\Foundation\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
CompileAs="0"
DisableSpecificWarnings=""
AdditionalOptions=""/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="bin\static_mt\TestSuite.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib"
IgnoreDefaultLibraryNames="nafxcw.lib"
GenerateDebugInformation="false"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
AdditionalOptions=""/>
<Tool
Name="VCALinkTool"/>
<Tool
Name="VCManifestTool"/>
<Tool
Name="VCXDCMakeTool"/>
<Tool
Name="VCBscMakeTool"/>
<Tool
Name="VCFxCopTool"/>
<Tool
Name="VCAppVerifierTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="debug_static_md|Win32"
OutputDirectory="obj\$(ConfigurationName)"
IntermediateDirectory="obj\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
AdditionalIncludeDirectories="..\include;..\..\CppUnit\include;..\..\Foundation\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BufferSecurityCheck="true"
TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings=""
AdditionalOptions=""/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="bin\static_md\TestSuited.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="bin\static_md\TestSuited.pdb"
SubSystem="1"
TargetMachine="1"
AdditionalOptions=""/>
<Tool
Name="VCALinkTool"/>
<Tool
Name="VCManifestTool"/>
<Tool
Name="VCXDCMakeTool"/>
<Tool
Name="VCBscMakeTool"/>
<Tool
Name="VCFxCopTool"/>
<Tool
Name="VCAppVerifierTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="release_static_md|Win32"
OutputDirectory="obj\$(ConfigurationName)"
IntermediateDirectory="obj\$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="2">
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\include;..\..\CppUnit\include;..\..\Foundation\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
TreatWChar_tAsBuiltInType="true"
ForceConformanceInForLoopScope="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
CompileAs="0"
DisableSpecificWarnings=""
AdditionalOptions=""/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
OutputFile="bin\static_md\TestSuite.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib"
GenerateDebugInformation="false"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
AdditionalOptions=""/>
<Tool
Name="VCALinkTool"/>
<Tool
Name="VCManifestTool"/>
<Tool
Name="VCXDCMakeTool"/>
<Tool
Name="VCBscMakeTool"/>
<Tool
Name="VCFxCopTool"/>
<Tool
Name="VCAppVerifierTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
</Configurations>
<References/>
<Files>
<Filter
Name="XML">
<Filter
Name="Header Files">
<File
RelativePath=".\src\NamePoolTest.h"/>
<File
RelativePath=".\src\NameTest.h"/>
<File
RelativePath=".\src\XMLStreamParserTest.h"/>
<File
RelativePath=".\src\XMLWriterTest.h"/>
</Filter>
<Filter
Name="Source Files">
<File
RelativePath=".\src\NamePoolTest.cpp"/>
<File
RelativePath=".\src\NameTest.cpp"/>
<File
RelativePath=".\src\XMLStreamParserTest.cpp"/>
<File
RelativePath=".\src\XMLWriterTest.cpp"/>
</Filter>
</Filter>
<Filter
Name="SAX">
<Filter
Name="Header Files">
<File
RelativePath=".\src\AttributesImplTest.h"/>
<File
RelativePath=".\src\NamespaceSupportTest.h"/>
<File
RelativePath=".\src\SAXParserTest.h"/>
<File
RelativePath=".\src\SAXTestSuite.h"/>
</Filter>
<Filter
Name="Source Files">
<File
RelativePath=".\src\AttributesImplTest.cpp"/>
<File
RelativePath=".\src\NamespaceSupportTest.cpp"/>
<File
RelativePath=".\src\SAXParserTest.cpp"/>
<File
RelativePath=".\src\SAXTestSuite.cpp"/>
</Filter>
</Filter>
<Filter
Name="DOM">
<Filter
Name="Header Files">
<File
RelativePath=".\src\ChildNodesTest.h"/>
<File
RelativePath=".\src\DocumentTest.h"/>
<File
RelativePath=".\src\DocumentTypeTest.h"/>
<File
RelativePath=".\src\DOMTestSuite.h"/>
<File
RelativePath=".\src\ElementTest.h"/>
<File
RelativePath=".\src\EventTest.h"/>
<File
RelativePath=".\src\NodeAppenderTest.h"/>
<File
RelativePath=".\src\NodeIteratorTest.h"/>
<File
RelativePath=".\src\NodeTest.h"/>
<File
RelativePath=".\src\ParserWriterTest.h"/>
<File
RelativePath=".\src\TextTest.h"/>
<File
RelativePath=".\src\TreeWalkerTest.h"/>
</Filter>
<Filter
Name="Source Files">
<File
RelativePath=".\src\ChildNodesTest.cpp"/>
<File
RelativePath=".\src\DocumentTest.cpp"/>
<File
RelativePath=".\src\DocumentTypeTest.cpp"/>
<File
RelativePath=".\src\DOMTestSuite.cpp"/>
<File
RelativePath=".\src\ElementTest.cpp"/>
<File
RelativePath=".\src\EventTest.cpp"/>
<File
RelativePath=".\src\NodeAppenderTest.cpp"/>
<File
RelativePath=".\src\NodeIteratorTest.cpp"/>
<File
RelativePath=".\src\NodeTest.cpp"/>
<File
RelativePath=".\src\ParserWriterTest.cpp"/>
<File
RelativePath=".\src\TextTest.cpp"/>
<File
RelativePath=".\src\TreeWalkerTest.cpp"/>
</Filter>
</Filter>
<Filter
Name="_Suite">
<Filter
Name="Header Files">
<File
RelativePath=".\src\XMLTestSuite.h"/>
</Filter>
<Filter
Name="Source Files">
<File
RelativePath=".\src\XMLTestSuite.cpp"/>
</Filter>
</Filter>
<Filter
Name="_Driver">
<Filter
Name="Source Files">
<File
RelativePath=".\src\Driver.cpp"/>
</Filter>
</Filter>
</Files>
<Globals/>
</VisualStudioProject>

View File

@ -0,0 +1,244 @@
//
// AttributesImplTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "AttributesImplTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/SAX/AttributesImpl.h"
using Poco::XML::AttributesImpl;
AttributesImplTest::AttributesImplTest(const std::string& name): CppUnit::TestCase(name)
{
}
AttributesImplTest::~AttributesImplTest()
{
}
void AttributesImplTest::testNoNamespaces()
{
AttributesImpl attrs;
assertTrue (attrs.getLength() == 0);
assertTrue (attrs.getIndex("foo") == -1);
assertTrue (attrs.getValue("foo").empty());
attrs.addAttribute("", "", "a1", "CDATA", "v1");
assertTrue (attrs.getLength() == 1);
assertTrue (attrs.getIndex("a1") == 0);
assertTrue (attrs.getQName(0) == "a1");
assertTrue (attrs.getType(0) == "CDATA");
assertTrue (attrs.getValue(0) == "v1");
assertTrue (attrs.isSpecified(0));
assertTrue (attrs.getType("a1") == "CDATA");
assertTrue (attrs.getValue("a1") == "v1");
attrs.addAttribute("", "", "a2", "CDATA", "v2");
assertTrue (attrs.getLength() == 2);
assertTrue (attrs.getIndex("a2") == 1);
assertTrue (attrs.getQName(1) == "a2");
assertTrue (attrs.getType(1) == "CDATA");
assertTrue (attrs.getValue(1) == "v2");
assertTrue (attrs.isSpecified(1));
assertTrue (attrs.getType("a2") == "CDATA");
assertTrue (attrs.getValue("a2") == "v2");
attrs.addAttribute("", "", "a3", "CDATA", "v3");
assertTrue (attrs.getLength() == 3);
assertTrue (attrs.getIndex("a3") == 2);
assertTrue (attrs.getValue("a3") == "v3");
attrs.removeAttribute(0);
assertTrue (attrs.getLength() == 2);
assertTrue (attrs.getIndex("a1") == -1);
assertTrue (attrs.getIndex("a2") == 0);
assertTrue (attrs.getIndex("a3") == 1);
assertTrue (attrs.getQName(0) == "a2");
assertTrue (attrs.getQName(1) == "a3");
attrs.removeAttribute("a3");
assertTrue (attrs.getLength() == 1);
assertTrue (attrs.getIndex("a1") == -1);
assertTrue (attrs.getIndex("a2") == 0);
assertTrue (attrs.getIndex("a3") == -1);
assertTrue (attrs.getQName(0) == "a2");
}
void AttributesImplTest::testNamespaces()
{
AttributesImpl attrs;
assertTrue (attrs.getLength() == 0);
assertTrue (attrs.getIndex("urn:ns", "foo") == -1);
assertTrue (attrs.getValue("urn:ns", "foo").empty());
attrs.addAttribute("urn:ns", "a1", "p:a1", "CDATA", "v1");
assertTrue (attrs.getLength() == 1);
assertTrue (attrs.getIndex("urn:ns", "a1") == 0);
assertTrue (attrs.getQName(0) == "p:a1");
assertTrue (attrs.getLocalName(0) == "a1");
assertTrue (attrs.getURI(0) == "urn:ns");
assertTrue (attrs.getType(0) == "CDATA");
assertTrue (attrs.getValue(0) == "v1");
assertTrue (attrs.isSpecified(0));
assertTrue (attrs.getType("urn:ns", "a1") == "CDATA");
assertTrue (attrs.getValue("urn:ns", "a1") == "v1");
attrs.addAttribute("urn:ns", "a2", "p:a2", "CDATA", "v2");
assertTrue (attrs.getLength() == 2);
assertTrue (attrs.getIndex("urn:ns", "a2") == 1);
assertTrue (attrs.getQName(1) == "p:a2");
assertTrue (attrs.getLocalName(1) == "a2");
assertTrue (attrs.getURI(1) == "urn:ns");
assertTrue (attrs.getType(1) == "CDATA");
assertTrue (attrs.getValue(1) == "v2");
assertTrue (attrs.isSpecified(1));
assertTrue (attrs.getType("urn:ns", "a2") == "CDATA");
assertTrue (attrs.getValue("urn:ns", "a2") == "v2");
assertTrue (attrs.getIndex("urn:ns2", "a2") == -1);
attrs.addAttribute("urn:ns2", "a3", "q:a3", "CDATA", "v3");
assertTrue (attrs.getLength() == 3);
assertTrue (attrs.getIndex("urn:ns2", "a3") == 2);
assertTrue (attrs.getValue("urn:ns2", "a3") == "v3");
attrs.removeAttribute(0);
assertTrue (attrs.getLength() == 2);
assertTrue (attrs.getIndex("urn:ns", "a1") == -1);
assertTrue (attrs.getIndex("urn:ns", "a2") == 0);
assertTrue (attrs.getIndex("urn:ns2", "a3") == 1);
assertTrue (attrs.getQName(0) == "p:a2");
assertTrue (attrs.getLocalName(0) == "a2");
assertTrue (attrs.getURI(0) == "urn:ns");
assertTrue (attrs.getQName(1) == "q:a3");
assertTrue (attrs.getLocalName(1) == "a3");
assertTrue (attrs.getURI(1) == "urn:ns2");
attrs.removeAttribute("urn:ns", "a3");
assertTrue (attrs.getLength() == 2);
attrs.removeAttribute("urn:ns2", "a3");
assertTrue (attrs.getLength() == 1);
assertTrue (attrs.getIndex("urn:ns", "a1") == -1);
assertTrue (attrs.getIndex("urn:ns", "a2") == 0);
assertTrue (attrs.getIndex("urn:ns2", "a3") == -1);
assertTrue (attrs.getQName(0) == "p:a2");
}
void AttributesImplTest::testAccessors()
{
AttributesImpl attrs;
attrs.addAttribute("urn:ns1", "a1", "p:a1", "CDATA", "v1");
attrs.addAttribute("urn:ns1", "a2", "p:a2", "CDATA", "v2", false);
attrs.addAttribute("urn:ns2", "a3", "q:a3", "CDATA", "v3", true);
assertTrue (attrs.getQName(0) == "p:a1");
assertTrue (attrs.getQName(1) == "p:a2");
assertTrue (attrs.getQName(2) == "q:a3");
assertTrue (attrs.getLocalName(0) == "a1");
assertTrue (attrs.getLocalName(1) == "a2");
assertTrue (attrs.getLocalName(2) == "a3");
assertTrue (attrs.getURI(0) == "urn:ns1");
assertTrue (attrs.getURI(1) == "urn:ns1");
assertTrue (attrs.getURI(2) == "urn:ns2");
assertTrue (attrs.getValue(0) == "v1");
assertTrue (attrs.getValue(1) == "v2");
assertTrue (attrs.getValue(2) == "v3");
assertTrue (attrs.isSpecified(0));
assertTrue (!attrs.isSpecified(1));
assertTrue (attrs.isSpecified(2));
attrs.setType(0, "NMTOKEN");
assertTrue (attrs.getType(0) == "NMTOKEN");
assertTrue (attrs.getType("urn:ns1", "a1") == "NMTOKEN");
attrs.setValue(1, "v2 v2");
assertTrue (attrs.getValue(1) == "v2 v2");
assertTrue (attrs.getValue("urn:ns1", "a2") == "v2 v2");
assertTrue (attrs.isSpecified(1));
attrs.setLocalName(2, "A3");
assertTrue (attrs.getLocalName(2) == "A3");
attrs.setQName(2, "p:A3");
assertTrue (attrs.getQName(2) == "p:A3");
attrs.setURI(2, "urn:ns1");
assertTrue (attrs.getURI(2) == "urn:ns1");
assertTrue (attrs.getValue("urn:ns1", "A3") == "v3");
}
void AttributesImplTest::testCopy()
{
AttributesImpl attrs;
attrs.addAttribute("urn:ns1", "a1", "p:a1", "CDATA", "v1");
attrs.addAttribute("urn:ns1", "a2", "p:a2", "CDATA", "v2");
attrs.addAttribute("urn:ns2", "a3", "q:a3", "CDATA", "v3");
AttributesImpl attrs2;
attrs2.setAttributes(attrs);
assertTrue (attrs2.getLength() == 3);
assertTrue (attrs2.getQName(0) == "p:a1");
assertTrue (attrs2.getQName(1) == "p:a2");
assertTrue (attrs2.getQName(2) == "q:a3");
assertTrue (attrs2.getLocalName(0) == "a1");
assertTrue (attrs2.getLocalName(1) == "a2");
assertTrue (attrs2.getLocalName(2) == "a3");
assertTrue (attrs2.getURI(0) == "urn:ns1");
assertTrue (attrs2.getURI(1) == "urn:ns1");
assertTrue (attrs2.getURI(2) == "urn:ns2");
assertTrue (attrs2.getValue(0) == "v1");
assertTrue (attrs2.getValue(1) == "v2");
assertTrue (attrs2.getValue(2) == "v3");
}
void AttributesImplTest::setUp()
{
}
void AttributesImplTest::tearDown()
{
}
CppUnit::Test* AttributesImplTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("AttributesImplTest");
CppUnit_addTest(pSuite, AttributesImplTest, testNoNamespaces);
CppUnit_addTest(pSuite, AttributesImplTest, testNamespaces);
CppUnit_addTest(pSuite, AttributesImplTest, testAccessors);
CppUnit_addTest(pSuite, AttributesImplTest, testCopy);
return pSuite;
}

View File

@ -0,0 +1,41 @@
//
// AttributesImplTest.h
//
// Definition of the AttributesImplTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef AttributesImplTest_INCLUDED
#define AttributesImplTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class AttributesImplTest: public CppUnit::TestCase
{
public:
AttributesImplTest(const std::string& name);
~AttributesImplTest();
void testNoNamespaces();
void testNamespaces();
void testAccessors();
void testCopy();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // AttributesImplTest_INCLUDED

View File

@ -0,0 +1,102 @@
//
// ChildNodesTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "ChildNodesTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/NodeList.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::NodeList;
using Poco::XML::Node;
using Poco::XML::AutoPtr;
ChildNodesTest::ChildNodesTest(const std::string& name): CppUnit::TestCase(name)
{
}
ChildNodesTest::~ChildNodesTest()
{
}
void ChildNodesTest::testChildNodes()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
assertTrue (!pRoot->hasChildNodes());
AutoPtr<NodeList> pNL = pRoot->childNodes();
assertTrue (pNL->length() == 0);
AutoPtr<Element> pChild1 = pDoc->createElement("child1");
pRoot->appendChild(pChild1);
assertTrue (pRoot->hasChildNodes());
assertTrue (pNL->length() == 1);
assertTrue (pNL->item(0) == pChild1);
AutoPtr<Element> pChild2 = pDoc->createElement("child2");
pRoot->appendChild(pChild2);
assertTrue (pNL->length() == 2);
assertTrue (pNL->item(0) == pChild1);
assertTrue (pNL->item(1) == pChild2);
AutoPtr<Element> pChild0 = pDoc->createElement("child0");
pRoot->insertBefore(pChild0, pChild1);
assertTrue (pNL->length() == 3);
assertTrue (pNL->item(0) == pChild0);
assertTrue (pNL->item(1) == pChild1);
assertTrue (pNL->item(2) == pChild2);
pRoot->removeChild(pChild1);
assertTrue (pNL->length() == 2);
assertTrue (pNL->item(0) == pChild0);
assertTrue (pNL->item(1) == pChild2);
pRoot->removeChild(pChild0);
assertTrue (pNL->length() == 1);
assertTrue (pNL->item(0) == pChild2);
pRoot->removeChild(pChild2);
assertTrue (pNL->length() == 0);
assertTrue (pNL->item(0) == 0);
assertTrue (!pRoot->hasChildNodes());
}
void ChildNodesTest::setUp()
{
}
void ChildNodesTest::tearDown()
{
}
CppUnit::Test* ChildNodesTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ChildNodesTest");
CppUnit_addTest(pSuite, ChildNodesTest, testChildNodes);
return pSuite;
}

View File

@ -0,0 +1,38 @@
//
// ChildNodesTest.h
//
// Definition of the ChildNodesTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef ChildNodesTest_INCLUDED
#define ChildNodesTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class ChildNodesTest: public CppUnit::TestCase
{
public:
ChildNodesTest(const std::string& name);
~ChildNodesTest();
void testChildNodes();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // ChildNodesTest_INCLUDED

View File

@ -0,0 +1,42 @@
//
// DOMTestSuite.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "DOMTestSuite.h"
#include "NodeTest.h"
#include "ChildNodesTest.h"
#include "ElementTest.h"
#include "TextTest.h"
#include "DocumentTest.h"
#include "DocumentTypeTest.h"
#include "EventTest.h"
#include "NodeIteratorTest.h"
#include "TreeWalkerTest.h"
#include "ParserWriterTest.h"
#include "NodeAppenderTest.h"
CppUnit::Test* DOMTestSuite::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DOMTestSuite");
pSuite->addTest(NodeTest::suite());
pSuite->addTest(ChildNodesTest::suite());
pSuite->addTest(ElementTest::suite());
pSuite->addTest(TextTest::suite());
pSuite->addTest(DocumentTest::suite());
pSuite->addTest(DocumentTypeTest::suite());
pSuite->addTest(EventTest::suite());
pSuite->addTest(NodeIteratorTest::suite());
pSuite->addTest(TreeWalkerTest::suite());
pSuite->addTest(ParserWriterTest::suite());
pSuite->addTest(NodeAppenderTest::suite());
return pSuite;
}

View File

@ -0,0 +1,27 @@
//
// DOMTestSuite.h
//
// Definition of the DOMTestSuite class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef DOMTestSuite_INCLUDED
#define DOMTestSuite_INCLUDED
#include "CppUnit/TestSuite.h"
class DOMTestSuite
{
public:
static CppUnit::Test* suite();
};
#endif // DOMTestSuite_INCLUDED

View File

@ -0,0 +1,288 @@
//
// DocumentTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "DocumentTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Text.h"
#include "Poco/DOM/NodeList.h"
#include "Poco/DOM/AutoPtr.h"
#include "Poco/DOM/DOMException.h"
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::Text;
using Poco::XML::Node;
using Poco::XML::NodeList;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
using Poco::XML::DOMException;
DocumentTest::DocumentTest(const std::string& name): CppUnit::TestCase(name)
{
}
DocumentTest::~DocumentTest()
{
}
void DocumentTest::testDocumentElement()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
assertTrue (pDoc->documentElement() == 0);
pDoc->appendChild(pRoot);
assertTrue (pDoc->documentElement() == pRoot);
AutoPtr<Text> pText = pDoc->createTextNode(" ");
pDoc->insertBefore(pText, pRoot);
assertTrue (pDoc->documentElement() == pRoot);
}
void DocumentTest::testImport()
{
AutoPtr<Document> pDoc1 = new Document;
AutoPtr<Element> pRoot1 = pDoc1->createElement("root");
AutoPtr<Document> pDoc2 = new Document;
try
{
pDoc2->appendChild(pRoot1);
fail("wrong document - must throw exception");
}
catch (DOMException&)
{
}
AutoPtr<Element> pRoot2 = static_cast<Element*>(pDoc2->importNode(pRoot1, false));
assertTrue (pRoot2->ownerDocument() == pDoc2);
assertTrue (pRoot1->ownerDocument() == pDoc1);
pDoc2->appendChild(pRoot2);
}
void DocumentTest::testImportDeep()
{
AutoPtr<Document> pDoc1 = new Document;
AutoPtr<Element> pRoot1 = pDoc1->createElement("root");
AutoPtr<Element> pElem1 = pDoc1->createElement("elem");
AutoPtr<Text> pText1 = pDoc1->createTextNode("text");
pElem1->appendChild(pText1);
pRoot1->appendChild(pElem1);
pRoot1->setAttribute("a1", "v1");
pRoot1->setAttribute("a2", "v2");
AutoPtr<Document> pDoc2 = new Document;
try
{
pDoc2->appendChild(pRoot1);
fail("wrong document - must throw exception");
}
catch (DOMException&)
{
}
AutoPtr<Element> pRoot2 = static_cast<Element*>(pDoc2->importNode(pRoot1, true));
assertTrue (pRoot2->ownerDocument() == pDoc2);
assertTrue (pRoot2->firstChild()->ownerDocument() == pDoc2);
assertTrue (pRoot2->firstChild()->firstChild()->ownerDocument() == pDoc2);
assertTrue (pRoot1->ownerDocument() == pDoc1);
assertTrue (pRoot1->firstChild()->ownerDocument() == pDoc1);
assertTrue (pRoot1->firstChild()->firstChild()->ownerDocument() == pDoc1);
pDoc2->appendChild(pRoot2);
}
void DocumentTest::testElementsByTagName()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
pDoc->appendChild(pRoot);
AutoPtr<NodeList> pNL1 = pDoc->getElementsByTagName("*");
AutoPtr<NodeList> pNL2 = pDoc->getElementsByTagName("elem");
assertTrue (pNL1->length() == 1);
assertTrue (pNL1->item(0) == pRoot);
assertTrue (pNL2->length() == 0);
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
pRoot->appendChild(pElem1);
assertTrue (pNL1->length() == 2);
assertTrue (pNL2->length() == 1);
assertTrue (pNL1->item(0) == pRoot);
assertTrue (pNL1->item(1) == pElem1);
assertTrue (pNL2->item(0) == pElem1);
AutoPtr<Element> pElem2 = pDoc->createElement("Elem");
pRoot->appendChild(pElem2);
assertTrue (pNL1->length() == 3);
assertTrue (pNL2->length() == 1);
assertTrue (pNL1->item(0) == pRoot);
assertTrue (pNL1->item(1) == pElem1);
assertTrue (pNL1->item(2) == pElem2);
assertTrue (pNL2->item(0) == pElem1);
}
void DocumentTest::testElementsByTagNameNS()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElementNS("urn:ns1", "root");
pDoc->appendChild(pRoot);
AutoPtr<NodeList> pNL1 = pDoc->getElementsByTagNameNS("*", "*");
AutoPtr<NodeList> pNL2 = pDoc->getElementsByTagNameNS("*", "elem");
assertTrue (pNL1->length() == 1);
assertTrue (pNL1->item(0) == pRoot);
assertTrue (pNL2->length() == 0);
AutoPtr<Element> pElem1 = pDoc->createElementNS("urn:ns1", "elem");
pRoot->appendChild(pElem1);
assertTrue (pNL1->length() == 2);
assertTrue (pNL2->length() == 1);
assertTrue (pNL1->item(0) == pRoot);
assertTrue (pNL1->item(1) == pElem1);
assertTrue (pNL2->item(0) == pElem1);
AutoPtr<Element> pElem2 = pDoc->createElementNS("urn:ns1", "Elem");
pRoot->appendChild(pElem2);
assertTrue (pNL1->length() == 3);
assertTrue (pNL2->length() == 1);
assertTrue (pNL1->item(0) == pRoot);
assertTrue (pNL1->item(1) == pElem1);
assertTrue (pNL1->item(2) == pElem2);
assertTrue (pNL2->item(0) == pElem1);
}
void DocumentTest::testElementById()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
pRoot->setAttribute("id", "0");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
pElem1->setAttribute("id", "1");
AutoPtr<Text> pText1 = pDoc->createTextNode("text");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
pElem2->setAttribute("id", "2");
AutoPtr<Element> pElem3 = pDoc->createElement("elem");
pElem3->setAttribute("id", "3");
pElem1->appendChild(pText1);
pElem1->appendChild(pElem2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem3);
pDoc->appendChild(pRoot);
Element* pFound = pDoc->getElementById("0", "id");
assertTrue (pFound == pRoot);
pFound = pDoc->getElementById("1", "id");
assertTrue (pFound == pElem1);
pFound = pDoc->getElementById("2", "id");
assertTrue (pFound == pElem2);
pFound = pDoc->getElementById("3", "id");
assertTrue (pFound == pElem3);
pFound = pDoc->getElementById("4", "id");
assertTrue (pFound == 0);
pFound = pDoc->getElementById("0", "ID");
assertTrue (pFound == 0);
}
void DocumentTest::testElementByIdNS()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElementNS("urn:ns1", "root");
pRoot->setAttributeNS("urn:ns1", "id", "0");
AutoPtr<Element> pElem1 = pDoc->createElementNS("urn:ns1", "elem");
pElem1->setAttributeNS("urn:ns1", "id", "1");
AutoPtr<Text> pText1 = pDoc->createTextNode("text");
AutoPtr<Element> pElem2 = pDoc->createElementNS("urn:ns1", "elem");
pElem2->setAttributeNS("urn:ns1", "id", "2");
AutoPtr<Element> pElem3 = pDoc->createElementNS("urn:ns1", "elem");
pElem3->setAttributeNS("urn:ns1", "id", "3");
pElem1->appendChild(pText1);
pElem1->appendChild(pElem2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem3);
pDoc->appendChild(pRoot);
Element* pFound = pDoc->getElementByIdNS("0", "urn:ns1", "id");
assertTrue (pFound == pRoot);
pFound = pDoc->getElementByIdNS("1", "urn:ns1", "id");
assertTrue (pFound == pElem1);
pFound = pDoc->getElementByIdNS("2", "urn:ns1", "id");
assertTrue (pFound == pElem2);
pFound = pDoc->getElementByIdNS("3", "urn:ns1", "id");
assertTrue (pFound == pElem3);
pFound = pDoc->getElementByIdNS("4", "urn:ns1", "id");
assertTrue (pFound == 0);
pFound = pDoc->getElementByIdNS("0", "urn:ns1", "ID");
assertTrue (pFound == 0);
pFound = pDoc->getElementByIdNS("0", "urn:ns2", "id");
assertTrue (pFound == 0);
}
void DocumentTest::setUp()
{
}
void DocumentTest::tearDown()
{
}
CppUnit::Test* DocumentTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DocumentTest");
CppUnit_addTest(pSuite, DocumentTest, testDocumentElement);
CppUnit_addTest(pSuite, DocumentTest, testImport);
CppUnit_addTest(pSuite, DocumentTest, testImportDeep);
CppUnit_addTest(pSuite, DocumentTest, testElementsByTagName);
CppUnit_addTest(pSuite, DocumentTest, testElementsByTagNameNS);
CppUnit_addTest(pSuite, DocumentTest, testElementById);
CppUnit_addTest(pSuite, DocumentTest, testElementByIdNS);
return pSuite;
}

View File

@ -0,0 +1,44 @@
//
// DocumentTest.h
//
// Definition of the DocumentTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef DocumentTest_INCLUDED
#define DocumentTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class DocumentTest: public CppUnit::TestCase
{
public:
DocumentTest(const std::string& name);
~DocumentTest();
void testDocumentElement();
void testImport();
void testImportDeep();
void testElementsByTagName();
void testElementsByTagNameNS();
void testElementById();
void testElementByIdNS();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // DocumentTest_INCLUDED

View File

@ -0,0 +1,108 @@
//
// DocumentTypeTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "DocumentTypeTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/DocumentType.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Notation.h"
#include "Poco/DOM/Entity.h"
#include "Poco/DOM/DOMImplementation.h"
#include "Poco/DOM/NamedNodeMap.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::DocumentType;
using Poco::XML::Document;
using Poco::XML::Entity;
using Poco::XML::Notation;
using Poco::XML::DOMImplementation;
using Poco::XML::NamedNodeMap;
using Poco::XML::AutoPtr;
DocumentTypeTest::DocumentTypeTest(const std::string& name): CppUnit::TestCase(name)
{
}
DocumentTypeTest::~DocumentTypeTest()
{
}
void DocumentTypeTest::testDocumentType()
{
AutoPtr<DocumentType> pDoctype = DOMImplementation::instance().createDocumentType("test", "public", "system");
assertTrue (pDoctype->ownerDocument() == 0);
assertTrue (pDoctype->name() == "test");
assertTrue (pDoctype->publicId() == "public");
assertTrue (pDoctype->systemId() == "system");
AutoPtr<Document> pDoc = new Document(pDoctype);
assertTrue (pDoc->doctype() == pDoctype);
assertTrue (pDoctype->ownerDocument() == pDoc);
AutoPtr<NamedNodeMap> pEntities = pDoctype->entities();
AutoPtr<NamedNodeMap> pNotations = pDoctype->notations();
assertTrue (pEntities->length() == 0);
assertTrue (pNotations->length() == 0);
AutoPtr<Entity> pEntity1 = pDoc->createEntity("entity1", "public1", "system1", "");
pDoctype->appendChild(pEntity1);
assertTrue (pEntities->length() == 1);
assertTrue (pNotations->length() == 0);
assertTrue (pEntities->item(0) == pEntity1);
assertTrue (pEntities->getNamedItem("entity1") == pEntity1);
AutoPtr<Entity> pEntity2 = pDoc->createEntity("entity2", "public2", "system2", "");
pDoctype->appendChild(pEntity2);
assertTrue (pEntities->length() == 2);
assertTrue (pNotations->length() == 0);
assertTrue (pEntities->item(0) == pEntity1);
assertTrue (pEntities->item(1) == pEntity2);
assertTrue (pEntities->getNamedItem("entity1") == pEntity1);
assertTrue (pEntities->getNamedItem("entity2") == pEntity2);
AutoPtr<Notation> pNotation = pDoc->createNotation("notation", "public", "system");
pDoctype->appendChild(pNotation);
assertTrue (pEntities->length() == 2);
assertTrue (pNotations->length() == 1);
assertTrue (pEntities->item(0) == pEntity1);
assertTrue (pEntities->item(1) == pEntity2);
assertTrue (pNotations->item(0) == pNotation);
assertTrue (pEntities->getNamedItem("entity1") == pEntity1);
assertTrue (pEntities->getNamedItem("entity2") == pEntity2);
assertTrue (pNotations->getNamedItem("notation") == pNotation);
}
void DocumentTypeTest::setUp()
{
}
void DocumentTypeTest::tearDown()
{
}
CppUnit::Test* DocumentTypeTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DocumentTypeTest");
CppUnit_addTest(pSuite, DocumentTypeTest, testDocumentType);
return pSuite;
}

View File

@ -0,0 +1,38 @@
//
// DocumentTypeTest.h
//
// Definition of the DocumentTypeTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef DocumentTypeTest_INCLUDED
#define DocumentTypeTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class DocumentTypeTest: public CppUnit::TestCase
{
public:
DocumentTypeTest(const std::string& name);
~DocumentTypeTest();
void testDocumentType();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // DocumentTypeTest_INCLUDED

View File

@ -0,0 +1,17 @@
//
// Driver.cpp
//
// Console-based test driver for Poco XML.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "CppUnit/TestRunner.h"
#include "XMLTestSuite.h"
CppUnitMain(XMLTestSuite)

View File

@ -0,0 +1,948 @@
//
// ElementTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "ElementTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Attr.h"
#include "Poco/DOM/Text.h"
#include "Poco/DOM/NamedNodeMap.h"
#include "Poco/DOM/NodeList.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::Attr;
using Poco::XML::Text;
using Poco::XML::Node;
using Poco::XML::NamedNodeMap;
using Poco::XML::NodeList;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
ElementTest::ElementTest(const std::string& name): CppUnit::TestCase(name)
{
}
ElementTest::~ElementTest()
{
}
void ElementTest::testAttributes()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pElem = pDoc->createElement("elem");
assertTrue (!pElem->hasAttributes());
pElem->setAttribute("a1", "v1");
assertTrue (pElem->hasAttributes());
assertTrue (pElem->hasAttribute("a1"));
assertTrue (pElem->getAttribute("a1") == "v1");
Attr* pAttr1 = pElem->getAttributeNode("a1");
assertTrue (pAttr1 != 0);
assertTrue (pAttr1->name() == "a1");
assertTrue (pAttr1->nodeName() == "a1");
assertTrue (pAttr1->value() == "v1");
assertTrue (pAttr1->nodeValue() == "v1");
assertTrue (pAttr1->ownerElement() == pElem);
assertTrue (pAttr1->ownerDocument() == pDoc);
assertTrue (pAttr1->innerText() == "v1");
assertTrue (pAttr1->previousSibling() == 0);
assertTrue (pAttr1->nextSibling() == 0);
pAttr1->setValue("V1");
assertTrue (pElem->getAttribute("a1") == "V1");
pElem->setAttribute("a2", "v2");
assertTrue (pElem->hasAttribute("a1"));
assertTrue (pElem->getAttribute("a1") == "V1");
assertTrue (pElem->hasAttribute("a2"));
assertTrue (pElem->getAttribute("a2") == "v2");
Attr* pAttr2 = pElem->getAttributeNode("a2");
assertTrue (pAttr2 != 0);
assertTrue (pAttr2->name() == "a2");
assertTrue (pAttr2->value() == "v2");
assertTrue (pAttr2->ownerElement() == pElem);
assertTrue (pAttr1->previousSibling() == 0);
assertTrue (pAttr1->nextSibling() == pAttr2);
assertTrue (pAttr2->previousSibling() == pAttr1);
assertTrue (pAttr2->nextSibling() == 0);
Attr* pAttr3 = pElem->getAttributeNode("a3");
assertTrue (pAttr3 == 0);
pAttr3 = pDoc->createAttribute("a3");
pAttr3->setValue("v3");
pElem->setAttributeNode(pAttr3);
pAttr3->release();
assertTrue (pElem->hasAttribute("a1"));
assertTrue (pElem->getAttribute("a1") == "V1");
assertTrue (pElem->hasAttribute("a2"));
assertTrue (pElem->getAttribute("a2") == "v2");
assertTrue (pElem->hasAttribute("a3"));
assertTrue (pElem->getAttribute("a3") == "v3");
assertTrue (pAttr1->previousSibling() == 0);
assertTrue (pAttr1->nextSibling() == pAttr2);
assertTrue (pAttr2->previousSibling() == pAttr1);
assertTrue (pAttr2->nextSibling() == pAttr3);
assertTrue (pAttr3->previousSibling() == pAttr2);
assertTrue (pAttr3->nextSibling() == 0);
pAttr2 = pDoc->createAttribute("a2");
pAttr2->setValue("V2");
pElem->setAttributeNode(pAttr2);
pAttr2->release();
assertTrue (pElem->hasAttribute("a1"));
assertTrue (pElem->getAttribute("a1") == "V1");
assertTrue (pElem->hasAttribute("a2"));
assertTrue (pElem->getAttribute("a2") == "V2");
assertTrue (pElem->hasAttribute("a3"));
assertTrue (pElem->getAttribute("a3") == "v3");
pAttr1 = pDoc->createAttribute("a1");
pAttr1->setValue("v1");
pElem->setAttributeNode(pAttr1);
pAttr1->release();
assertTrue (pElem->hasAttribute("a1"));
assertTrue (pElem->getAttribute("a1") == "v1");
assertTrue (pElem->hasAttribute("a2"));
assertTrue (pElem->getAttribute("a2") == "V2");
assertTrue (pElem->hasAttribute("a3"));
assertTrue (pElem->getAttribute("a3") == "v3");
pAttr3 = pDoc->createAttribute("a3");
pAttr3->setValue("V3");
pElem->setAttributeNode(pAttr3);
pAttr3->release();
assertTrue (pElem->hasAttribute("a1"));
assertTrue (pElem->getAttribute("a1") == "v1");
assertTrue (pElem->hasAttribute("a2"));
assertTrue (pElem->getAttribute("a2") == "V2");
assertTrue (pElem->hasAttribute("a3"));
assertTrue (pElem->getAttribute("a3") == "V3");
pElem->removeAttributeNode(pAttr3);
assertTrue (!pElem->hasAttribute("a3"));
pElem->removeAttribute("a1");
assertTrue (!pElem->hasAttribute("a1"));
pElem->removeAttribute("a2");
assertTrue (!pElem->hasAttribute("a2"));
assertTrue (!pElem->hasAttributes());
}
void ElementTest::testAttributesNS()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pElem = pDoc->createElementNS("urn:ns1", "p:elem");
assertTrue (pElem->namespaceURI() == "urn:ns1");
assertTrue (pElem->prefix() == "p");
assertTrue (pElem->tagName() == "p:elem");
assertTrue (pElem->localName() == "elem");
assertTrue (!pElem->hasAttributes());
pElem->setAttributeNS("urn:ns1", "a1", "v1");
assertTrue (pElem->hasAttributes());
assertTrue (pElem->hasAttributeNS("urn:ns1", "a1"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "v1");
Attr* pAttr1 = pElem->getAttributeNodeNS("urn:ns1", "a1");
assertTrue (pAttr1 != 0);
assertTrue (pAttr1->name() == "a1");
assertTrue (pAttr1->namespaceURI() == "urn:ns1");
assertTrue (pAttr1->prefix().empty());
assertTrue (pAttr1->localName() == "a1");
assertTrue (pAttr1->nodeName() == "a1");
assertTrue (pAttr1->value() == "v1");
assertTrue (pAttr1->nodeValue() == "v1");
assertTrue (pAttr1->ownerElement() == pElem);
pAttr1->setValue("V1");
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "V1");
pElem->setAttributeNS("urn:ns1", "a2", "v2");
assertTrue (pElem->hasAttributeNS("urn:ns1", "a1"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "V1");
assertTrue (pElem->hasAttributeNS("urn:ns1", "a2"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a2") == "v2");
Attr* pAttr2 = pElem->getAttributeNodeNS("urn:ns1", "a2");
assertTrue (pAttr2 != 0);
assertTrue (pAttr2->name() == "a2");
assertTrue (pAttr2->namespaceURI() == "urn:ns1");
assertTrue (pAttr2->prefix().empty());
assertTrue (pAttr2->localName() == "a2");
assertTrue (pAttr2->value() == "v2");
assertTrue (pAttr2->ownerElement() == pElem);
Attr* pAttr3 = pElem->getAttributeNodeNS("urn:ns2", "p:a3");
assertTrue (pAttr3 == 0);
pAttr3 = pDoc->createAttributeNS("urn:ns2", "p:a3");
pAttr3->setValue("v3");
pElem->setAttributeNodeNS(pAttr3);
pAttr3->release();
assertTrue (pElem->hasAttributeNS("urn:ns1", "a1"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "V1");
assertTrue (pElem->hasAttributeNS("urn:ns1", "a2"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a2") == "v2");
assertTrue (pElem->hasAttributeNS("urn:ns2", "a3"));
assertTrue (pElem->getAttributeNS("urn:ns2", "a3") == "v3");
pAttr2 = pDoc->createAttributeNS("urn:ns1", "a2");
pAttr2->setValue("V2");
pElem->setAttributeNodeNS(pAttr2);
pAttr2->release();
assertTrue (pElem->hasAttributeNS("urn:ns1", "a1"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "V1");
assertTrue (pElem->hasAttributeNS("urn:ns1", "a2"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a2") == "V2");
assertTrue (pElem->hasAttributeNS("urn:ns2", "a3"));
assertTrue (pElem->getAttributeNS("urn:ns2", "a3") == "v3");
pAttr1 = pDoc->createAttributeNS("urn:ns1", "a1");
pAttr1->setValue("v1");
pElem->setAttributeNodeNS(pAttr1);
pAttr1->release();
assertTrue (pElem->hasAttributeNS("urn:ns1", "a1"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "v1");
assertTrue (pElem->hasAttributeNS("urn:ns1", "a2"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a2") == "V2");
assertTrue (pElem->hasAttributeNS("urn:ns2", "a3"));
assertTrue (pElem->getAttributeNS("urn:ns2", "a3") == "v3");
pAttr3 = pDoc->createAttributeNS("urn:ns2", "q:a3");
pAttr3->setValue("V3");
pElem->setAttributeNodeNS(pAttr3);
pAttr3->release();
assertTrue (pElem->hasAttributeNS("urn:ns1", "a1"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a1") == "v1");
assertTrue (pElem->hasAttributeNS("urn:ns1", "a2"));
assertTrue (pElem->getAttributeNS("urn:ns1", "a2") == "V2");
assertTrue (pElem->hasAttributeNS("urn:ns2", "a3"));
assertTrue (pElem->getAttributeNS("urn:ns2", "a3") == "V3");
pElem->removeAttributeNode(pAttr3);
assertTrue (!pElem->hasAttributeNS("urn:ns2", "a3"));
pElem->removeAttributeNS("urn:ns1", "a1");
assertTrue (!pElem->hasAttributeNS("urn:ns1", "a1"));
pElem->removeAttributeNS("urn:ns1", "a2");
assertTrue (!pElem->hasAttributeNS("urn:ns1", "a2"));
assertTrue (!pElem->hasAttributes());
}
void ElementTest::testAttrMap()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pElem = pDoc->createElement("elem");
AutoPtr<NamedNodeMap> pNNM = pElem->attributes();
assertTrue (pNNM->length() == 0);
pElem->setAttribute("a1", "v1");
assertTrue (pNNM->length() == 1);
assertTrue (pNNM->item(0)->nodeName() == "a1");
assertTrue (pNNM->getNamedItem("a1")->nodeName() == "a1");
pElem->setAttribute("a2", "v2");
assertTrue (pNNM->length() == 2);
assertTrue (pNNM->item(0)->nodeName() == "a1");
assertTrue (pNNM->getNamedItem("a1")->nodeName() == "a1");
assertTrue (pNNM->item(1)->nodeName() == "a2");
assertTrue (pNNM->getNamedItem("a2")->nodeName() == "a2");
Attr* pAttr = pDoc->createAttribute("a3");
pNNM->setNamedItem(pAttr);
pAttr->release();
assertTrue (pNNM->length() == 3);
assertTrue (pNNM->item(0)->nodeName() == "a1");
assertTrue (pNNM->getNamedItem("a1")->nodeName() == "a1");
assertTrue (pNNM->item(1)->nodeName() == "a2");
assertTrue (pNNM->getNamedItem("a2")->nodeName() == "a2");
assertTrue (pNNM->item(2)->nodeName() == "a3");
assertTrue (pNNM->getNamedItem("a3")->nodeName() == "a3");
pNNM->removeNamedItem("a2");
assertTrue (pNNM->length() == 2);
assertTrue (!pElem->hasAttribute("a2"));
pNNM->removeNamedItem("a3");
assertTrue (pNNM->length() == 1);
assertTrue (!pElem->hasAttribute("a3"));
pElem->removeAttribute("a1");
assertTrue (pNNM->length() == 0);
}
void ElementTest::testAttrMapNS()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pElem = pDoc->createElementNS("urn:ns1", "elem");
AutoPtr<NamedNodeMap> pNNM = pElem->attributes();
assertTrue (pNNM->length() == 0);
pElem->setAttributeNS("urn:ns1", "a1", "v1");
assertTrue (pNNM->length() == 1);
assertTrue (pNNM->item(0)->nodeName() == "a1");
assertTrue (pNNM->getNamedItemNS("urn:ns1", "a1")->nodeName() == "a1");
pElem->setAttributeNS("urn:ns1", "a2", "v2");
assertTrue (pNNM->length() == 2);
assertTrue (pNNM->item(0)->nodeName() == "a1");
assertTrue (pNNM->getNamedItem("a1")->nodeName() == "a1");
assertTrue (pNNM->item(1)->nodeName() == "a2");
assertTrue (pNNM->getNamedItem("a2")->nodeName() == "a2");
Attr* pAttr = pDoc->createAttributeNS("urn:ns2", "a3");
pNNM->setNamedItem(pAttr);
pAttr->release();
assertTrue (pNNM->length() == 3);
assertTrue (pNNM->item(0)->nodeName() == "a1");
assertTrue (pNNM->getNamedItemNS("urn:ns1", "a1")->nodeName() == "a1");
assertTrue (pNNM->item(1)->nodeName() == "a2");
assertTrue (pNNM->getNamedItemNS("urn:ns1", "a2")->nodeName() == "a2");
assertTrue (pNNM->item(2)->nodeName() == "a3");
assertTrue (pNNM->getNamedItemNS("urn:ns2", "a3")->nodeName() == "a3");
pNNM->removeNamedItemNS("urn:ns1", "a2");
assertTrue (pNNM->length() == 2);
assertTrue (!pElem->hasAttributeNS("urn:ns1", "a2"));
pNNM->removeNamedItemNS("urn:ns2", "a3");
assertTrue (pNNM->length() == 1);
assertTrue (!pElem->hasAttributeNS("urn:ns2", "a3"));
pElem->removeAttributeNS("urn:ns1", "a1");
assertTrue (pNNM->length() == 0);
}
void ElementTest::testElementsByTagName()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<NodeList> pNL1 = pRoot->getElementsByTagName("*");
AutoPtr<NodeList> pNL2 = pRoot->getElementsByTagName("elem");
assertTrue (pNL1->length() == 0);
assertTrue (pNL2->length() == 0);
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
pRoot->appendChild(pElem1);
assertTrue (pNL1->length() == 1);
assertTrue (pNL2->length() == 1);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL2->item(0) == pElem1);
AutoPtr<Element> pElem2 = pDoc->createElement("Elem");
pRoot->appendChild(pElem2);
assertTrue (pNL1->length() == 2);
assertTrue (pNL2->length() == 1);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem2);
assertTrue (pNL2->item(0) == pElem1);
AutoPtr<Element> pElem3 = pDoc->createElement("elem");
pRoot->appendChild(pElem3);
assertTrue (pNL1->length() == 3);
assertTrue (pNL2->length() == 2);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem2);
assertTrue (pNL1->item(2) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem3);
AutoPtr<Element> pElem11 = pDoc->createElement("elem");
pElem1->appendChild(pElem11);
assertTrue (pNL1->length() == 4);
assertTrue (pNL2->length() == 3);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem11);
assertTrue (pNL1->item(2) == pElem2);
assertTrue (pNL1->item(3) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem11);
assertTrue (pNL2->item(2) == pElem3);
AutoPtr<Element> pElem12 = pDoc->createElement("Elem");
pElem1->appendChild(pElem12);
assertTrue (pNL1->length() == 5);
assertTrue (pNL2->length() == 3);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem11);
assertTrue (pNL1->item(2) == pElem12);
assertTrue (pNL1->item(3) == pElem2);
assertTrue (pNL1->item(4) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem11);
assertTrue (pNL2->item(2) == pElem3);
AutoPtr<Element> pElem21 = pDoc->createElement("elem");
pElem2->appendChild(pElem21);
assertTrue (pNL1->length() == 6);
assertTrue (pNL2->length() == 4);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem11);
assertTrue (pNL1->item(2) == pElem12);
assertTrue (pNL1->item(3) == pElem2);
assertTrue (pNL1->item(4) == pElem21);
assertTrue (pNL1->item(5) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem11);
assertTrue (pNL2->item(2) == pElem21);
assertTrue (pNL2->item(3) == pElem3);
}
void ElementTest::testElementsByTagNameNS()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElementNS("urn:ns1", "root");
AutoPtr<NodeList> pNL1 = pRoot->getElementsByTagNameNS("*", "*");
AutoPtr<NodeList> pNL2 = pRoot->getElementsByTagNameNS("*", "elem");
AutoPtr<NodeList> pNL3 = pRoot->getElementsByTagNameNS("urn:ns1", "elem");
assertTrue (pNL1->length() == 0);
assertTrue (pNL2->length() == 0);
AutoPtr<Element> pElem1 = pDoc->createElementNS("urn:ns1", "elem");
pRoot->appendChild(pElem1);
assertTrue (pNL1->length() == 1);
assertTrue (pNL2->length() == 1);
assertTrue (pNL3->length() == 1);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL3->item(0) == pElem1);
AutoPtr<Element> pElem2 = pDoc->createElementNS("urn:ns1", "Elem");
pRoot->appendChild(pElem2);
assertTrue (pNL1->length() == 2);
assertTrue (pNL2->length() == 1);
assertTrue (pNL3->length() == 1);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem2);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL3->item(0) == pElem1);
AutoPtr<Element> pElem3 = pDoc->createElementNS("urn:ns2", "elem");
pRoot->appendChild(pElem3);
assertTrue (pNL1->length() == 3);
assertTrue (pNL2->length() == 2);
assertTrue (pNL3->length() == 1);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem2);
assertTrue (pNL1->item(2) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem3);
assertTrue (pNL3->item(0) == pElem1);
AutoPtr<Element> pElem11 = pDoc->createElementNS("urn:ns1", "elem");
pElem1->appendChild(pElem11);
assertTrue (pNL1->length() == 4);
assertTrue (pNL2->length() == 3);
assertTrue (pNL3->length() == 2);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem11);
assertTrue (pNL1->item(2) == pElem2);
assertTrue (pNL1->item(3) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem11);
assertTrue (pNL2->item(2) == pElem3);
assertTrue (pNL3->item(0) == pElem1);
assertTrue (pNL3->item(1) == pElem11);
AutoPtr<Element> pElem12 = pDoc->createElementNS("urn:ns1", "Elem");
pElem1->appendChild(pElem12);
assertTrue (pNL1->length() == 5);
assertTrue (pNL2->length() == 3);
assertTrue (pNL3->length() == 2);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem11);
assertTrue (pNL1->item(2) == pElem12);
assertTrue (pNL1->item(3) == pElem2);
assertTrue (pNL1->item(4) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem11);
assertTrue (pNL2->item(2) == pElem3);
assertTrue (pNL3->item(0) == pElem1);
assertTrue (pNL3->item(1) == pElem11);
AutoPtr<Element> pElem21 = pDoc->createElementNS("urn:ns1", "elem");
pElem2->appendChild(pElem21);
assertTrue (pNL1->length() == 6);
assertTrue (pNL2->length() == 4);
assertTrue (pNL3->length() == 3);
assertTrue (pNL1->item(0) == pElem1);
assertTrue (pNL1->item(1) == pElem11);
assertTrue (pNL1->item(2) == pElem12);
assertTrue (pNL1->item(3) == pElem2);
assertTrue (pNL1->item(4) == pElem21);
assertTrue (pNL1->item(5) == pElem3);
assertTrue (pNL2->item(0) == pElem1);
assertTrue (pNL2->item(1) == pElem11);
assertTrue (pNL2->item(2) == pElem21);
assertTrue (pNL2->item(3) == pElem3);
assertTrue (pNL3->item(0) == pElem1);
assertTrue (pNL3->item(1) == pElem11);
assertTrue (pNL3->item(2) == pElem21);
}
void ElementTest::testInnerText()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Element> pElem1 = pDoc->createElement("elem1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
AutoPtr<Text> pText3 = pDoc->createTextNode("text3");
pElem1->appendChild(pText2);
pRoot->appendChild(pText1);
pRoot->appendChild(pElem1);
pRoot->appendChild(pText3);
XMLString innerText = pRoot->innerText();
assertTrue (innerText == "text1text2text3");
}
void ElementTest::testChildElement()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem1");
AutoPtr<Element> pElem2 = pDoc->createElement("elem2");
AutoPtr<Element> pElem3 = pDoc->createElement("elem3");
AutoPtr<Element> pElem4 = pDoc->createElement("elem3");
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pRoot->appendChild(pElem3);
pRoot->appendChild(pElem4);
assertTrue (pRoot->getChildElement("elem1") == pElem1);
assertTrue (pRoot->getChildElement("elem2") == pElem2);
assertTrue (pRoot->getChildElement("elem3") == pElem3);
assertTrue (pRoot->getChildElement("elem4") == 0);
assertTrue (pElem1->getChildElement("elem11") == 0);
}
void ElementTest::testChildElementNS()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElementNS("urn:ns", "root");
AutoPtr<Element> pElem1 = pDoc->createElementNS("urn:ns", "elem1");
AutoPtr<Element> pElem2 = pDoc->createElementNS("urn:ns", "elem2");
AutoPtr<Element> pElem3 = pDoc->createElementNS("urn:ns", "elem3");
AutoPtr<Element> pElem4 = pDoc->createElementNS("urn:ns", "elem3");
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pRoot->appendChild(pElem3);
pRoot->appendChild(pElem4);
assertTrue (pRoot->getChildElementNS("urn:ns", "elem1") == pElem1);
assertTrue (pRoot->getChildElementNS("urn:ns", "elem2") == pElem2);
assertTrue (pRoot->getChildElementNS("urn:ns", "elem3") == pElem3);
assertTrue (pRoot->getChildElementNS("urn:ns", "elem4") == 0);
assertTrue (pRoot->getChildElementNS("urn:NS", "elem1") == 0);
assertTrue (pElem1->getChildElementNS("urn:ns", "elem11") == 0);
}
void ElementTest::testNodeByPath()
{
/*
<root>
<elem1>
<elemA/>
<elemA/>
</elem1>
<elem2>
<elemB attr1="value1"/>
<elemB attr1="value2"/>
<elemB attr1="value3"/>
<elemC attr1="value1">
<elemC1 attr1="value1"/>
<elemC2/>
</elemC>
<elemC attr1="value2"/>
</elem2>
<elem2>
<elemB attr1="value4"/>
</elem2>
</root>
*/
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem1");
AutoPtr<Element> pElem11 = pDoc->createElement("elemA");
AutoPtr<Element> pElem12 = pDoc->createElement("elemA");
AutoPtr<Element> pElem2 = pDoc->createElement("elem2");
AutoPtr<Element> pElem21 = pDoc->createElement("elemB");
AutoPtr<Element> pElem22 = pDoc->createElement("elemB");
AutoPtr<Element> pElem23 = pDoc->createElement("elemB");
AutoPtr<Element> pElem24 = pDoc->createElement("elemC");
AutoPtr<Element> pElem25 = pDoc->createElement("elemC");
AutoPtr<Element> pElem3 = pDoc->createElement("elem2");
AutoPtr<Element> pElem31 = pDoc->createElement("elemB");
pElem21->setAttribute("attr1", "value1");
pElem22->setAttribute("attr1", "value2");
pElem23->setAttribute("attr1", "value3");
pElem24->setAttribute("attr1", "value1");
pElem25->setAttribute("attr1", "value2");
pElem31->setAttribute("attr1", "value4");
AutoPtr<Element> pElem241 = pDoc->createElement("elemC1");
AutoPtr<Element> pElem242 = pDoc->createElement("elemC2");
pElem241->setAttribute("attr1", "value1");
pElem24->appendChild(pElem241);
pElem24->appendChild(pElem242);
pElem1->appendChild(pElem11);
pElem1->appendChild(pElem12);
pElem2->appendChild(pElem21);
pElem2->appendChild(pElem22);
pElem2->appendChild(pElem23);
pElem2->appendChild(pElem24);
pElem2->appendChild(pElem25);
pElem3->appendChild(pElem31);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pRoot->appendChild(pElem3);
pDoc->appendChild(pRoot);
Node* pNode = pRoot->getNodeByPath("/");
assertTrue (pNode == pRoot);
pNode = pRoot->getNodeByPath("/elem1");
assertTrue (pNode == pElem1);
pNode = pDoc->getNodeByPath("/root/elem1");
assertTrue (pNode == pElem1);
pNode = pRoot->getNodeByPath("/elem2");
assertTrue (pNode == pElem2);
pNode = pRoot->getNodeByPath("/elem1/elemA");
assertTrue (pNode == pElem11);
pNode = pRoot->getNodeByPath("/elem1/elemA[0]");
assertTrue (pNode == pElem11);
pNode = pRoot->getNodeByPath("/elem1/elemA[1]");
assertTrue (pNode == pElem12);
pNode = pRoot->getNodeByPath("/elem1/elemA[2]");
assertTrue (pNode == 0);
pNode = pRoot->getNodeByPath("/elem2/elemB");
assertTrue (pNode == pElem21);
pNode = pRoot->getNodeByPath("/elem2/elemB[0]");
assertTrue (pNode == pElem21);
pNode = pRoot->getNodeByPath("/elem2/elemB[1]");
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPath("/elem2/elemB[2]");
assertTrue (pNode == pElem23);
pNode = pRoot->getNodeByPath("/elem2/elemB[3]");
assertTrue (pNode == 0);
pNode = pRoot->getNodeByPath("/elem2/elemB[@attr1]");
assertTrue (pNode && pNode->nodeValue() == "value1");
pNode = pRoot->getNodeByPath("/elem2/elemB[@attr2]");
assertTrue (pNode == 0);
pNode = pRoot->getNodeByPath("/elem2/elemB[@attr1='value2']");
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPath("/elem2/elemC[@attr1='value1']/elemC1");
assertTrue (pNode == pElem241);
pNode = pRoot->getNodeByPath("/elem2/elemC[@attr1='value1']/elemC1[@attr1]");
assertTrue (pNode && pNode->nodeValue() == "value1");
pNode = pDoc->getNodeByPath("//elemB[@attr1='value1']");
assertTrue (pNode == pElem21);
pNode = pDoc->getNodeByPath("//elemB[@attr1='value2']");
assertTrue (pNode == pElem22);
pNode = pDoc->getNodeByPath("//elemB[@attr1='value3']");
assertTrue (pNode == pElem23);
pNode = pDoc->getNodeByPath("//elemB[@attr1='value4']");
assertTrue (pNode == pElem31);
pNode = pDoc->getNodeByPath("//elemB[@attr1='value5']");
assertTrue (pNode == 0);
pNode = pDoc->getNodeByPath("//[@attr1='value1']");
assertTrue (pNode == pElem21);
pNode = pDoc->getNodeByPath("//[@attr1='value2']");
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPath("/elem2/*[@attr1='value2']");
assertTrue (pNode == pElem22);
}
void ElementTest::testNodeByPathNS()
{
/*
<ns1:root xmlns:ns1="urn:ns1">
<ns1:elem1>
<ns2:elemA xmlns:ns2="urn:ns2"/>
<ns3:elemA xmlns:ns3="urn:ns2"/>
</ns1:elem1>
<ns1:elem2>
<ns2:elemB ns2:attr1="value1" xmlns:ns2="urn:ns2"/>
<ns2:elemB ns2:attr1="value2" xmlns:ns2="urn:ns2"/>
<ns2:elemB ns2:attr1="value3" xmlns:ns2="urn:ns2"/>
<ns2:elemC ns2:attr1="value1" xmlns:ns2="urn:ns2">
<ns2:elemC1 ns2:attr1="value1"/>
<ns2:elemC2/>
</ns2:elemC>
<ns2:elemC ns2:attr1="value2" xmlns:ns2="urn:ns2"/>
</ns1:elem2>
<ns1:elem2>
<ns2:elemB ns2:attr1="value4" xmlns:ns2="urn:ns2"/>
</ns1:elem2>
</ns1:root>
*/
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElementNS("urn:ns1", "ns1:root");
AutoPtr<Element> pElem1 = pDoc->createElementNS("urn:ns1", "ns1:elem1");
AutoPtr<Element> pElem11 = pDoc->createElementNS("urn:ns2", "ns2:elemA");
AutoPtr<Element> pElem12 = pDoc->createElementNS("urn:ns2", "ns2:elemA");
AutoPtr<Element> pElem2 = pDoc->createElementNS("urn:ns1", "ns1:elem2");
AutoPtr<Element> pElem21 = pDoc->createElementNS("urn:ns2", "ns2:elemB");
AutoPtr<Element> pElem22 = pDoc->createElementNS("urn:ns2", "ns2:elemB");
AutoPtr<Element> pElem23 = pDoc->createElementNS("urn:ns2", "ns2:elemB");
AutoPtr<Element> pElem24 = pDoc->createElementNS("urn:ns2", "ns2:elemC");
AutoPtr<Element> pElem25 = pDoc->createElementNS("urn:ns2", "ns2:elemC");
AutoPtr<Element> pElem3 = pDoc->createElementNS("urn:ns1", "ns1:elem2");
AutoPtr<Element> pElem31 = pDoc->createElementNS("urn:ns2", "ns2:elemB");
pElem21->setAttributeNS("urn:ns2", "ns2:attr1", "value1");
pElem22->setAttributeNS("urn:ns2", "ns2:attr1", "value2");
pElem23->setAttributeNS("urn:ns2", "ns2:attr1", "value3");
pElem31->setAttributeNS("urn:ns2", "ns2:attr1", "value4");
pElem24->setAttributeNS("urn:ns2", "ns2:attr1", "value1");
pElem25->setAttributeNS("urn:ns2", "ns2:attr1", "value2");
AutoPtr<Element> pElem241 = pDoc->createElementNS("urn:ns2", "elemC1");
AutoPtr<Element> pElem242 = pDoc->createElementNS("urn:ns2", "elemC2");
pElem241->setAttributeNS("urn:ns2", "ns2:attr1", "value1");
pElem24->appendChild(pElem241);
pElem24->appendChild(pElem242);
pElem1->appendChild(pElem11);
pElem1->appendChild(pElem12);
pElem2->appendChild(pElem21);
pElem2->appendChild(pElem22);
pElem2->appendChild(pElem23);
pElem2->appendChild(pElem24);
pElem2->appendChild(pElem25);
pElem3->appendChild(pElem31);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pRoot->appendChild(pElem3);
pDoc->appendChild(pRoot);
Element::NSMap nsMap;
nsMap.declarePrefix("ns1", "urn:ns1");
nsMap.declarePrefix("NS2", "urn:ns2");
Node* pNode = pRoot->getNodeByPathNS("/", nsMap);
assertTrue (pNode == pRoot);
pNode = pRoot->getNodeByPathNS("/ns1:elem1", nsMap);
assertTrue (pNode == pElem1);
pNode = pDoc->getNodeByPathNS("/ns1:root/ns1:elem1", nsMap);
assertTrue (pNode == pElem1);
pNode = pRoot->getNodeByPathNS("/ns1:elem2", nsMap);
assertTrue (pNode == pElem2);
pNode = pRoot->getNodeByPathNS("/ns1:elem1/NS2:elemA", nsMap);
assertTrue (pNode == pElem11);
pNode = pRoot->getNodeByPathNS("/ns1:elem1/NS2:elemA[0]", nsMap);
assertTrue (pNode == pElem11);
pNode = pRoot->getNodeByPathNS("/ns1:elem1/NS2:elemA[1]", nsMap);
assertTrue (pNode == pElem12);
pNode = pRoot->getNodeByPathNS("/ns1:elem1/NS2:elemA[2]", nsMap);
assertTrue (pNode == 0);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB", nsMap);
assertTrue (pNode == pElem21);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[0]", nsMap);
assertTrue (pNode == pElem21);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[1]", nsMap);
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[2]", nsMap);
assertTrue (pNode == pElem23);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[3]", nsMap);
assertTrue (pNode == 0);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[@NS2:attr1]", nsMap);
assertTrue (pNode && pNode->nodeValue() == "value1");
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[@NS2:attr2]", nsMap);
assertTrue (pNode == 0);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemB[@NS2:attr1='value2']", nsMap);
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemC[@NS2:attr1='value1']/NS2:elemC1", nsMap);
assertTrue (pNode == pElem241);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:elemC[@NS2:attr1='value1']/NS2:elemC1[@NS2:attr1]", nsMap);
assertTrue (pNode && pNode->nodeValue() == "value1");
pNode = pRoot->getNodeByPathNS("/NS2:elem1", nsMap);
assertTrue (pNode == 0);
pNode = pDoc->getNodeByPathNS("//NS2:elemB[@NS2:attr1='value1']", nsMap);
assertTrue (pNode == pElem21);
pNode = pDoc->getNodeByPathNS("//NS2:elemB[@NS2:attr1='value2']", nsMap);
assertTrue (pNode == pElem22);
pNode = pDoc->getNodeByPathNS("//NS2:elemB[@NS2:attr1='value3']", nsMap);
assertTrue (pNode == pElem23);
pNode = pDoc->getNodeByPathNS("//NS2:elemB[@NS2:attr1='value4']", nsMap);
assertTrue (pNode == pElem31);
pNode = pDoc->getNodeByPathNS("//NS2:elemB[@NS2:attr1='value5']", nsMap);
assertTrue (pNode == 0);
pNode = pDoc->getNodeByPathNS("//[@NS2:attr1='value1']", nsMap);
assertTrue (pNode == pElem21);
pNode = pDoc->getNodeByPathNS("//[@NS2:attr1='value2']", nsMap);
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/*[@NS2:attr1='value2']", nsMap);
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/NS2:*[@NS2:attr1='value2']", nsMap);
assertTrue (pNode == pElem22);
pNode = pRoot->getNodeByPathNS("/ns1:elem2/ns1:*[@NS2:attr1='value2']", nsMap);
assertTrue (pNode == 0);
}
void ElementTest::setUp()
{
}
void ElementTest::tearDown()
{
}
CppUnit::Test* ElementTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ElementTest");
CppUnit_addTest(pSuite, ElementTest, testAttributes);
CppUnit_addTest(pSuite, ElementTest, testAttributesNS);
CppUnit_addTest(pSuite, ElementTest, testAttrMap);
CppUnit_addTest(pSuite, ElementTest, testAttrMapNS);
CppUnit_addTest(pSuite, ElementTest, testElementsByTagName);
CppUnit_addTest(pSuite, ElementTest, testElementsByTagNameNS);
CppUnit_addTest(pSuite, ElementTest, testInnerText);
CppUnit_addTest(pSuite, ElementTest, testChildElement);
CppUnit_addTest(pSuite, ElementTest, testChildElementNS);
CppUnit_addTest(pSuite, ElementTest, testNodeByPath);
CppUnit_addTest(pSuite, ElementTest, testNodeByPathNS);
return pSuite;
}

View File

@ -0,0 +1,48 @@
//
// ElementTest.h
//
// Definition of the ElementTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef ElementTest_INCLUDED
#define ElementTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class ElementTest: public CppUnit::TestCase
{
public:
ElementTest(const std::string& name);
~ElementTest();
void testAttributes();
void testAttributesNS();
void testAttrMap();
void testAttrMapNS();
void testElementsByTagName();
void testElementsByTagNameNS();
void testInnerText();
void testChildElement();
void testChildElementNS();
void testNodeByPath();
void testNodeByPathNS();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // ElementTest_INCLUDED

View File

@ -0,0 +1,571 @@
//
// EventTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "EventTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/Event.h"
#include "Poco/DOM/MutationEvent.h"
#include "Poco/DOM/EventListener.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Attr.h"
#include "Poco/DOM/Text.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::Event;
using Poco::XML::MutationEvent;
using Poco::XML::EventListener;
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::Attr;
using Poco::XML::Text;
using Poco::XML::Node;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
class TestEventListener: public EventListener
{
public:
TestEventListener(const XMLString& name, bool cancel = false, bool readd = false, bool capture = false):
_name(name),
_cancel(cancel),
_readd(readd),
_capture(capture)
{
}
void handleEvent(Event* evt)
{
XMLString type = evt->type();
XMLString phase;
switch (evt->eventPhase())
{
case Event::CAPTURING_PHASE:
phase = "CAPTURING_PHASE"; break;
case Event::AT_TARGET:
phase = "AT_TARGET"; break;
case Event::BUBBLING_PHASE:
phase = "BUBBLING_PHASE"; break;
}
Node* pTarget = static_cast<Node*>(evt->target());
Node* pCurrentTarget = static_cast<Node*>(evt->currentTarget());
_log.append(_name);
_log.append(":");
_log.append(type);
_log.append(":");
_log.append(phase);
_log.append(":");
_log.append(pTarget->nodeName());
_log.append(":");
_log.append(pCurrentTarget->nodeName());
_log.append(":");
_log.append(evt->bubbles() ? "B" : "-");
_log.append(":");
_log.append(evt->cancelable() ? "C" : "-");
MutationEvent* pME = dynamic_cast<MutationEvent*>(evt);
if (pME)
{
XMLString attrChange;
switch (pME->attrChange())
{
case MutationEvent::MODIFICATION:
attrChange = "MODIFICATION"; break;
case MutationEvent::ADDITION:
attrChange = "ADDITION"; break;
case MutationEvent::REMOVAL:
attrChange = "REMOVAL"; break;
}
XMLString relatedNode;
Node* pRelatedNode = pME->relatedNode();
if (pRelatedNode) relatedNode = pRelatedNode->nodeName();
_log.append(":");
_log.append(attrChange);
_log.append(":");
_log.append(relatedNode);
_log.append(":");
_log.append(pME->attrName());
_log.append(":");
_log.append(pME->prevValue());
_log.append(":");
_log.append(pME->newValue());
}
_log.append("\n");
if (_cancel) evt->stopPropagation();
if (_readd)
pCurrentTarget->addEventListener(type, this, _capture);
}
static const XMLString& log()
{
return _log;
}
static void reset()
{
_log.clear();
}
private:
XMLString _name;
bool _cancel;
bool _readd;
bool _capture;
static XMLString _log;
};
XMLString TestEventListener::_log;
EventTest::EventTest(const std::string& name): CppUnit::TestCase(name)
{
}
EventTest::~EventTest()
{
}
void EventTest::testInsert()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
TestEventListener docListener("doc");
TestEventListener docCapListener("docCap");
TestEventListener rootListener("root");
TestEventListener rootCapListener("rootCap");
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeInserted, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeInserted, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeInserted, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeInserted, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &rootCapListener, true);
pDoc->appendChild(pRoot);
const XMLString& log = TestEventListener::log();
assertTrue (log ==
"docCap:DOMNodeInserted:CAPTURING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"rootCap:DOMNodeInserted:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"root:DOMNodeInserted:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"doc:DOMNodeInserted:BUBBLING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"docCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:root:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeInsertedIntoDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"root:DOMNodeInsertedIntoDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
);
TestEventListener::reset();
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
assertTrue (log ==
"docCap:DOMNodeInserted:CAPTURING_PHASE:#text:#document:B:-:MODIFICATION:root:::\n"
"rootCap:DOMNodeInserted:CAPTURING_PHASE:#text:root:B:-:MODIFICATION:root:::\n"
"root:DOMNodeInserted:BUBBLING_PHASE:#text:root:B:-:MODIFICATION:root:::\n"
"doc:DOMNodeInserted:BUBBLING_PHASE:#text:#document:B:-:MODIFICATION:root:::\n"
"docCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:#text:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:#text:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:CAPTURING_PHASE:root:#document:B:-:MODIFICATION::::\n"
"rootCap:DOMSubtreeModified:AT_TARGET:root:root:B:-:MODIFICATION::::\n"
"root:DOMSubtreeModified:AT_TARGET:root:root:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:BUBBLING_PHASE:root:#document:B:-:MODIFICATION::::\n"
);
}
void EventTest::testInsertSubtree()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
TestEventListener docListener("doc");
TestEventListener docCapListener("docCap");
TestEventListener rootListener("root");
TestEventListener rootCapListener("rootCap");
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeInserted, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeInserted, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeInserted, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeInserted, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &rootCapListener, true);
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
TestEventListener::reset();
pDoc->appendChild(pRoot);
const XMLString& log = TestEventListener::log();
assertTrue (log ==
"docCap:DOMNodeInserted:CAPTURING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"rootCap:DOMNodeInserted:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"root:DOMNodeInserted:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"doc:DOMNodeInserted:BUBBLING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"docCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:root:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeInsertedIntoDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"root:DOMNodeInsertedIntoDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"docCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:#text:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:#text:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
);
}
void EventTest::testRemove()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
TestEventListener docListener("doc");
TestEventListener docCapListener("docCap");
TestEventListener rootListener("root");
TestEventListener rootCapListener("rootCap");
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeRemoved, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeRemoved, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeRemoved, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeRemoved, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &rootCapListener, true);
pDoc->appendChild(pRoot);
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
TestEventListener::reset();
pRoot->removeChild(pText);
const XMLString& log = TestEventListener::log();
assertTrue (log ==
"docCap:DOMNodeRemoved:CAPTURING_PHASE:#text:#document:B:-:MODIFICATION:root:::\n"
"rootCap:DOMNodeRemoved:CAPTURING_PHASE:#text:root:B:-:MODIFICATION:root:::\n"
"root:DOMNodeRemoved:BUBBLING_PHASE:#text:root:B:-:MODIFICATION:root:::\n"
"doc:DOMNodeRemoved:BUBBLING_PHASE:#text:#document:B:-:MODIFICATION:root:::\n"
"docCap:DOMNodeRemovedFromDocument:CAPTURING_PHASE:#text:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeRemovedFromDocument:CAPTURING_PHASE:#text:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:CAPTURING_PHASE:root:#document:B:-:MODIFICATION::::\n"
"rootCap:DOMSubtreeModified:AT_TARGET:root:root:B:-:MODIFICATION::::\n"
"root:DOMSubtreeModified:AT_TARGET:root:root:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:BUBBLING_PHASE:root:#document:B:-:MODIFICATION::::\n"
);
}
void EventTest::testRemoveSubtree()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
TestEventListener docListener("doc");
TestEventListener docCapListener("docCap");
TestEventListener rootListener("root");
TestEventListener rootCapListener("rootCap");
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeRemoved, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeRemoved, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeRemoved, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeRemoved, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeRemovedFromDocument, &rootCapListener, true);
pDoc->appendChild(pRoot);
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
TestEventListener::reset();
pDoc->removeChild(pRoot);
const XMLString& log = TestEventListener::log();
assertTrue (log ==
"docCap:DOMNodeRemoved:CAPTURING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"rootCap:DOMNodeRemoved:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"root:DOMNodeRemoved:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"doc:DOMNodeRemoved:BUBBLING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"docCap:DOMNodeRemovedFromDocument:CAPTURING_PHASE:root:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeRemovedFromDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"root:DOMNodeRemovedFromDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"docCap:DOMNodeRemovedFromDocument:CAPTURING_PHASE:#text:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeRemovedFromDocument:CAPTURING_PHASE:#text:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
);
}
void EventTest::testCharacterData()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
pDoc->appendChild(pRoot);
TestEventListener docListener("doc");
TestEventListener docCapListener("docCap");
TestEventListener rootListener("root");
TestEventListener rootCapListener("rootCap");
TestEventListener textListener("text");
TestEventListener textCapListener("textCap");
pDoc->addEventListener(MutationEvent::DOMCharacterDataModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMCharacterDataModified, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMCharacterDataModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMCharacterDataModified, &rootCapListener, true);
pText->addEventListener(MutationEvent::DOMCharacterDataModified, &textListener, false);
pText->addEventListener(MutationEvent::DOMCharacterDataModified, &textCapListener, true);
TestEventListener::reset();
pText->setData("modified");
const XMLString& log = TestEventListener::log();
assertTrue (log ==
"docCap:DOMCharacterDataModified:CAPTURING_PHASE:#text:#document:B:-:MODIFICATION:::text:modified\n"
"rootCap:DOMCharacterDataModified:CAPTURING_PHASE:#text:root:B:-:MODIFICATION:::text:modified\n"
"textCap:DOMCharacterDataModified:AT_TARGET:#text:#text:B:-:MODIFICATION:::text:modified\n"
"text:DOMCharacterDataModified:AT_TARGET:#text:#text:B:-:MODIFICATION:::text:modified\n"
"root:DOMCharacterDataModified:BUBBLING_PHASE:#text:root:B:-:MODIFICATION:::text:modified\n"
"doc:DOMCharacterDataModified:BUBBLING_PHASE:#text:#document:B:-:MODIFICATION:::text:modified\n"
);
}
void EventTest::testCancel()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
pDoc->appendChild(pRoot);
TestEventListener docListener("doc");
TestEventListener docCapListener("docCap", true);
TestEventListener rootListener("root");
TestEventListener rootCapListener("rootCap");
TestEventListener textListener("text");
TestEventListener textCapListener("textCap");
pDoc->addEventListener(MutationEvent::DOMCharacterDataModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMCharacterDataModified, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMCharacterDataModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMCharacterDataModified, &rootCapListener, true);
pText->addEventListener(MutationEvent::DOMCharacterDataModified, &textListener, false);
pText->addEventListener(MutationEvent::DOMCharacterDataModified, &textCapListener, true);
TestEventListener::reset();
pText->setData("modified");
const XMLString& log = TestEventListener::log();
assertTrue (log == "docCap:DOMCharacterDataModified:CAPTURING_PHASE:#text:#document:B:-:MODIFICATION:::text:modified\n");
}
void EventTest::testAttributes()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
TestEventListener rootListener("root");
pRoot->addEventListener(MutationEvent::DOMAttrModified, &rootListener, false);
pRoot->setAttribute("a1", "v1");
const XMLString& log = TestEventListener::log();
assertTrue (log == "root:DOMAttrModified:AT_TARGET:root:root:B:-:ADDITION:a1:a1::v1\n");
TestEventListener::reset();
pRoot->setAttribute("a1", "V1");
assertTrue (log == "root:DOMAttrModified:AT_TARGET:root:root:B:-:MODIFICATION:a1:a1:v1:V1\n");
TestEventListener::reset();
pRoot->setAttribute("a2", "v2");
assertTrue (log == "root:DOMAttrModified:AT_TARGET:root:root:B:-:ADDITION:a2:a2::v2\n");
TestEventListener::reset();
pRoot->removeAttribute("a1");
assertTrue (log == "root:DOMAttrModified:AT_TARGET:root:root:B:-:REMOVAL:a1:a1:V1:\n");
}
void EventTest::testAddRemoveInEvent()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
TestEventListener docListener("doc", false, true, false);
TestEventListener docCapListener("docCap", false, true, true);
TestEventListener rootListener("root", false, true, false);
TestEventListener rootCapListener("rootCap", false, true, true);
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeInserted, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &docListener, false);
pDoc->addEventListener(MutationEvent::DOMSubtreeModified, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeInserted, &docCapListener, true);
pDoc->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &docCapListener, true);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeInserted, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &rootListener, false);
pRoot->addEventListener(MutationEvent::DOMSubtreeModified, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeInserted, &rootCapListener, true);
pRoot->addEventListener(MutationEvent::DOMNodeInsertedIntoDocument, &rootCapListener, true);
pDoc->appendChild(pRoot);
const XMLString& log = TestEventListener::log();
assertTrue (log ==
"docCap:DOMNodeInserted:CAPTURING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"rootCap:DOMNodeInserted:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"root:DOMNodeInserted:AT_TARGET:root:root:B:-:MODIFICATION:#document:::\n"
"doc:DOMNodeInserted:BUBBLING_PHASE:root:#document:B:-:MODIFICATION:#document:::\n"
"docCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:root:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeInsertedIntoDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"root:DOMNodeInsertedIntoDocument:AT_TARGET:root:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:AT_TARGET:#document:#document:B:-:MODIFICATION::::\n"
);
TestEventListener::reset();
AutoPtr<Text> pText = pDoc->createTextNode("text");
pRoot->appendChild(pText);
assertTrue (log ==
"docCap:DOMNodeInserted:CAPTURING_PHASE:#text:#document:B:-:MODIFICATION:root:::\n"
"rootCap:DOMNodeInserted:CAPTURING_PHASE:#text:root:B:-:MODIFICATION:root:::\n"
"root:DOMNodeInserted:BUBBLING_PHASE:#text:root:B:-:MODIFICATION:root:::\n"
"doc:DOMNodeInserted:BUBBLING_PHASE:#text:#document:B:-:MODIFICATION:root:::\n"
"docCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:#text:#document:-:-:MODIFICATION::::\n"
"rootCap:DOMNodeInsertedIntoDocument:CAPTURING_PHASE:#text:root:-:-:MODIFICATION::::\n"
"docCap:DOMSubtreeModified:CAPTURING_PHASE:root:#document:B:-:MODIFICATION::::\n"
"rootCap:DOMSubtreeModified:AT_TARGET:root:root:B:-:MODIFICATION::::\n"
"root:DOMSubtreeModified:AT_TARGET:root:root:B:-:MODIFICATION::::\n"
"doc:DOMSubtreeModified:BUBBLING_PHASE:root:#document:B:-:MODIFICATION::::\n"
);
}
void EventTest::testSuspended()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
pDoc->suspendEvents();
TestEventListener rootListener("root");
pRoot->addEventListener(MutationEvent::DOMAttrModified, &rootListener, false);
pRoot->setAttribute("a1", "v1");
const XMLString& log = TestEventListener::log();
assertTrue (log.empty());
TestEventListener::reset();
pRoot->setAttribute("a1", "V1");
assertTrue (log.empty());
TestEventListener::reset();
pRoot->setAttribute("a2", "v2");
assertTrue (log.empty());
TestEventListener::reset();
pRoot->removeAttribute("a1");
assertTrue (log.empty());
}
void EventTest::setUp()
{
TestEventListener::reset();
}
void EventTest::tearDown()
{
}
CppUnit::Test* EventTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("EventTest");
CppUnit_addTest(pSuite, EventTest, testInsert);
CppUnit_addTest(pSuite, EventTest, testInsertSubtree);
CppUnit_addTest(pSuite, EventTest, testRemove);
CppUnit_addTest(pSuite, EventTest, testRemoveSubtree);
CppUnit_addTest(pSuite, EventTest, testCharacterData);
CppUnit_addTest(pSuite, EventTest, testCancel);
CppUnit_addTest(pSuite, EventTest, testAttributes);
CppUnit_addTest(pSuite, EventTest, testAddRemoveInEvent);
CppUnit_addTest(pSuite, EventTest, testSuspended);
return pSuite;
}

View File

@ -0,0 +1,46 @@
//
// EventTest.h
//
// Definition of the EventTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef EventTest_INCLUDED
#define EventTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class EventTest: public CppUnit::TestCase
{
public:
EventTest(const std::string& name);
~EventTest();
void testInsert();
void testInsertSubtree();
void testRemove();
void testRemoveSubtree();
void testCharacterData();
void testCancel();
void testAttributes();
void testAddRemoveInEvent();
void testSuspended();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // EventTest_INCLUDED

View File

@ -0,0 +1,72 @@
//
// NamePoolTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "NamePoolTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/XML/NamePool.h"
#include "Poco/XML/Name.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::NamePool;
using Poco::XML::Name;
using Poco::XML::AutoPtr;
NamePoolTest::NamePoolTest(const std::string& name): CppUnit::TestCase(name)
{
}
NamePoolTest::~NamePoolTest()
{
}
void NamePoolTest::testNamePool()
{
AutoPtr<NamePool> pool = new NamePool;
const Name* pName = 0;
Name name("pre:local", "http://www.appinf.com");
pName = &pool->insert(name);
const Name* pName2 = &pool->insert("pre:local", "http://www.appinf.com", "local");
assertTrue (pName == pName2);
pName2 = &pool->insert("pre:local2", "http://www.appinf.com", "local2");
assertTrue (pName2 != pName);
pName2 = &pool->insert(name);
assertTrue (pName2 == pName);
pName2 = &pool->insert(*pName);
assertTrue (pName2 == pName);
}
void NamePoolTest::setUp()
{
}
void NamePoolTest::tearDown()
{
}
CppUnit::Test* NamePoolTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("NamePoolTest");
CppUnit_addTest(pSuite, NamePoolTest, testNamePool);
return pSuite;
}

View File

@ -0,0 +1,38 @@
//
// NamePoolTest.h
//
// Definition of the NamePoolTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NamePoolTest_INCLUDED
#define NamePoolTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class NamePoolTest: public CppUnit::TestCase
{
public:
NamePoolTest(const std::string& name);
~NamePoolTest();
void testNamePool();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // NamePoolTest_INCLUDED

View File

@ -0,0 +1,171 @@
//
// NameTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "NameTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/XML/Name.h"
using Poco::XML::Name;
NameTest::NameTest(const std::string& name): CppUnit::TestCase(name)
{
}
NameTest::~NameTest()
{
}
void NameTest::testSplit()
{
std::string qname = "name";
std::string prefix;
std::string local;
Name::split(qname, prefix, local);
assertTrue (prefix.empty());
assertTrue (local == "name");
qname = "p:l";
Name::split(qname, prefix, local);
assertTrue (prefix == "p");
assertTrue (local == "l");
qname = "pre:local";
Name::split(qname, prefix, local);
assertTrue (prefix == "pre");
assertTrue (local == "local");
}
void NameTest::testLocalName()
{
std::string qname = "name";
std::string local = Name::localName(qname);
assertTrue (local == "name");
qname = "p:l";
local = Name::localName(qname);
assertTrue (local == "l");
qname = "pre:local";
local = Name::localName(qname);
assertTrue (local == "local");
}
void NameTest::testPrefix()
{
std::string qname = "name";
std::string prefix = Name::prefix(qname);
assertTrue (prefix.empty());
qname = "p:l";
prefix = Name::prefix(qname);
assertTrue (prefix == "p");
qname = "pre:local";
prefix = Name::prefix(qname);
assertTrue (prefix == "pre");
}
void NameTest::testName()
{
std::string qname = "name";
Name name(qname);
assertTrue (name.qname() == "name");
assertTrue (name.prefix().empty());
assertTrue (name.namespaceURI().empty());
assertTrue (name.localName().empty());
qname.clear();
name.assign(qname, "http://www.appinf.com/", "local");
assertTrue (name.qname().empty());
assertTrue (name.prefix().empty());
assertTrue (name.namespaceURI() == "http://www.appinf.com/");
assertTrue (name.localName() == "local");
Name name2("pre:local", "http://www.appinf.com/");
assertTrue (name2.qname() == "pre:local");
assertTrue (name2.prefix() == "pre");
assertTrue (name2.namespaceURI() == "http://www.appinf.com/");
assertTrue (name2.localName() == "local");
name2.assign("PRE:Local", "http://www.appinf.com/");
assertTrue (name2.qname() == "PRE:Local");
assertTrue (name2.prefix() == "PRE");
assertTrue (name2.namespaceURI() == "http://www.appinf.com/");
assertTrue (name2.localName() == "Local");
}
void NameTest::testCompare()
{
Name n1("pre:local");
Name n2(n1);
Name n3("pre:local2");
assertTrue (n1.equals(n2));
assertTrue (!n1.equals(n3));
n1.assign("pre:local", "http://www.appinf.com", "local");
n2.assign("pre:local", "http://www.appinf.com", "local");
n3.assign("pre:local2", "http://www.appinf.com", "local2");
assertTrue (n1.equals(n2));
assertTrue (!n1.equals(n3));
assertTrue (n1.equals("pre:local", "http://www.appinf.com", "local"));
assertTrue (!n1.equals("pre:local", "", ""));
assertTrue (n1.equalsWeakly("pre:local", "", ""));
assertTrue (!n1.equalsWeakly("pre:local2", "", ""));
assertTrue (!n1.equals("", "http://www.appinf.com", "local"));
assertTrue (n1.equalsWeakly("", "http://www.appinf.com", "local"));
assertTrue (!n1.equalsWeakly("", "http://www.appinf.com", "local2"));
}
void NameTest::testSwap()
{
Name n1("ns:name1", "http://www.appinf.com");
Name n2("ns:name2", "http://www.foobar.com");
n1.swap(n2);
assertTrue (n1.qname() == "ns:name2");
assertTrue (n1.namespaceURI() == "http://www.foobar.com");
assertTrue (n1.localName() == "name2");
assertTrue (n2.qname() == "ns:name1");
assertTrue (n2.namespaceURI() == "http://www.appinf.com");
assertTrue (n2.localName() == "name1");
}
void NameTest::setUp()
{
}
void NameTest::tearDown()
{
}
CppUnit::Test* NameTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("NameTest");
CppUnit_addTest(pSuite, NameTest, testSplit);
CppUnit_addTest(pSuite, NameTest, testLocalName);
CppUnit_addTest(pSuite, NameTest, testPrefix);
CppUnit_addTest(pSuite, NameTest, testName);
CppUnit_addTest(pSuite, NameTest, testCompare);
CppUnit_addTest(pSuite, NameTest, testSwap);
return pSuite;
}

View File

@ -0,0 +1,43 @@
//
// NameTest.h
//
// Definition of the NameTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NameTest_INCLUDED
#define NameTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class NameTest: public CppUnit::TestCase
{
public:
NameTest(const std::string& name);
~NameTest();
void testSplit();
void testLocalName();
void testPrefix();
void testName();
void testCompare();
void testSwap();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // NameTest_INCLUDED

View File

@ -0,0 +1,190 @@
//
// NamespaceSupportTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "NamespaceSupportTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/SAX/NamespaceSupport.h"
using Poco::XML::NamespaceSupport;
NamespaceSupportTest::NamespaceSupportTest(const std::string& name): CppUnit::TestCase(name)
{
}
NamespaceSupportTest::~NamespaceSupportTest()
{
}
void NamespaceSupportTest::testNamespaceSupport()
{
NamespaceSupport ns;
NamespaceSupport::PrefixSet prefixes;
ns.getDeclaredPrefixes(prefixes);
assertTrue (prefixes.size() == 2);
assertTrue (prefixes.find("xml") != prefixes.end());
assertTrue (prefixes.find("xmlns") != prefixes.end());
ns.getPrefixes(prefixes);
assertTrue (prefixes.size() == 2);
assertTrue (prefixes.find("xml") != prefixes.end());
assertTrue (prefixes.find("xmlns") != prefixes.end());
ns.pushContext();
ns.declarePrefix("ns1", "urn:ns1");
ns.declarePrefix("ns2", "urn:ns2");
ns.getDeclaredPrefixes(prefixes);
assertTrue (prefixes.size() == 2);
assertTrue (prefixes.find("ns1") != prefixes.end());
assertTrue (prefixes.find("ns2") != prefixes.end());
ns.pushContext();
ns.declarePrefix("ns3", "urn:ns3");
ns.getDeclaredPrefixes(prefixes);
assertTrue (prefixes.size() == 1);
assertTrue (prefixes.find("ns3") != prefixes.end());
ns.getPrefixes(prefixes);
assertTrue (prefixes.size() == 5);
assertTrue (prefixes.find("xml") != prefixes.end());
assertTrue (prefixes.find("xmlns") != prefixes.end());
assertTrue (prefixes.find("ns1") != prefixes.end());
assertTrue (prefixes.find("ns2") != prefixes.end());
assertTrue (prefixes.find("ns3") != prefixes.end());
ns.popContext();
ns.getDeclaredPrefixes(prefixes);
assertTrue (prefixes.size() == 2);
assertTrue (prefixes.find("ns1") != prefixes.end());
assertTrue (prefixes.find("ns2") != prefixes.end());
assertTrue (ns.isMapped("urn:ns1"));
assertTrue (ns.isMapped("urn:ns2"));
assertTrue (ns.isMapped("http://www.w3.org/XML/1998/namespace"));
assertTrue (!ns.isMapped("urn:ns3"));
ns.getPrefixes("urn:ns2", prefixes);
assertTrue (prefixes.size() == 1);
assertTrue (prefixes.find("ns2") != prefixes.end());
ns.pushContext();
ns.declarePrefix("", "urn:ns3");
ns.declarePrefix("NS2", "urn:ns2");
ns.getPrefixes("urn:ns2", prefixes);
assertTrue (prefixes.size() == 2);
assertTrue (prefixes.find("ns2") != prefixes.end());
assertTrue (prefixes.find("NS2") != prefixes.end());
ns.getPrefixes(prefixes);
assertTrue (prefixes.size() == 5);
assertTrue (prefixes.find("xml") != prefixes.end());
assertTrue (prefixes.find("xmlns") != prefixes.end());
assertTrue (prefixes.find("ns1") != prefixes.end());
assertTrue (prefixes.find("ns2") != prefixes.end());
assertTrue (prefixes.find("NS2") != prefixes.end());
ns.getDeclaredPrefixes(prefixes);
assertTrue (prefixes.size() == 2);
assertTrue (prefixes.find("") != prefixes.end());
assertTrue (prefixes.find("NS2") != prefixes.end());
assertTrue (ns.getPrefix("urn:ns3") == "");
assertTrue (ns.getPrefix("urn:ns2") == "NS2");
assertTrue (ns.getPrefix("urn:ns4") == "");
assertTrue (ns.isMapped("urn:ns3"));
assertTrue (ns.isMapped("urn:ns2"));
assertTrue (!ns.isMapped("urn:ns4"));
assertTrue (ns.getURI("xml") == "http://www.w3.org/XML/1998/namespace");
assertTrue (ns.getURI("ns1") == "urn:ns1");
assertTrue (ns.getURI("") == "urn:ns3");
assertTrue (ns.getURI("NS2") == "urn:ns2");
std::string localName;
std::string namespaceURI;
bool declared = ns.processName("elem", namespaceURI, localName, false);
assertTrue (declared);
assertTrue (localName == "elem");
assertTrue (namespaceURI == "urn:ns3");
declared = ns.processName("NS2:elem", namespaceURI, localName, false);
assertTrue (declared);
assertTrue (localName == "elem");
assertTrue (namespaceURI == "urn:ns2");
declared = ns.processName("ns3:elem", namespaceURI, localName, false);
assertTrue (!declared);
assertTrue (localName == "elem");
assertTrue (namespaceURI == "");
declared = ns.processName("ns2:attr", namespaceURI, localName, true);
assertTrue (declared);
assertTrue (localName == "attr");
assertTrue (namespaceURI == "urn:ns2");
declared = ns.processName("attr", namespaceURI, localName, true);
assertTrue (declared);
assertTrue (localName == "attr");
assertTrue (namespaceURI == "");
declared = ns.processName("ns3:attr", namespaceURI, localName, true);
assertTrue (!declared);
assertTrue (localName == "attr");
assertTrue (namespaceURI == "");
ns.popContext();
assertTrue (ns.getURI("xml") == "http://www.w3.org/XML/1998/namespace");
assertTrue (ns.getURI("ns1") == "urn:ns1");
assertTrue (ns.getURI("") == "");
assertTrue (ns.getURI("NS2") == "");
declared = ns.processName("elem", namespaceURI, localName, false);
assertTrue (declared);
assertTrue (localName == "elem");
assertTrue (namespaceURI == "");
declared = ns.processName("ns2:elem", namespaceURI, localName, false);
assertTrue (declared);
assertTrue (localName == "elem");
assertTrue (namespaceURI == "urn:ns2");
declared = ns.processName("ns3:elem", namespaceURI, localName, false);
assertTrue (!declared);
assertTrue (localName == "elem");
assertTrue (namespaceURI == "");
}
void NamespaceSupportTest::setUp()
{
}
void NamespaceSupportTest::tearDown()
{
}
CppUnit::Test* NamespaceSupportTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("NamespaceSupportTest");
CppUnit_addTest(pSuite, NamespaceSupportTest, testNamespaceSupport);
return pSuite;
}

View File

@ -0,0 +1,38 @@
//
// NamespaceSupportTest.h
//
// Definition of the NamespaceSupportTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NamespaceSupportTest_INCLUDED
#define NamespaceSupportTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class NamespaceSupportTest: public CppUnit::TestCase
{
public:
NamespaceSupportTest(const std::string& name);
~NamespaceSupportTest();
void testNamespaceSupport();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // NamespaceSupportTest_INCLUDED

View File

@ -0,0 +1,140 @@
//
// NodeAppenderTest.cpp
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "NodeAppenderTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/NodeAppender.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/DocumentFragment.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::NodeAppender;
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::DocumentFragment;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
NodeAppenderTest::NodeAppenderTest(const std::string& name): CppUnit::TestCase(name)
{
}
NodeAppenderTest::~NodeAppenderTest()
{
}
void NodeAppenderTest::testAppendNode()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
pDoc->appendChild(pRoot);
NodeAppender appender(pRoot);
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Element> pElem3 = pDoc->createElement("elem");
appender.appendChild(pElem1);
appender.appendChild(pElem2);
appender.appendChild(pElem3);
assertTrue (pRoot->firstChild() == pElem1);
assertTrue (pRoot->lastChild() == pElem3);
assertTrue (pElem1->nextSibling() == pElem2);
assertTrue (pElem2->nextSibling() == pElem3);
assertTrue (pElem3->nextSibling() == 0);
assertTrue (pElem1->previousSibling() == 0);
assertTrue (pElem2->previousSibling() == pElem1);
assertTrue (pElem3->previousSibling() == pElem2);
assertTrue (pElem1->parentNode() == pRoot);
assertTrue (pElem2->parentNode() == pRoot);
assertTrue (pElem3->parentNode() == pRoot);
}
void NodeAppenderTest::testAppendNodeList()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
pDoc->appendChild(pRoot);
NodeAppender appender(pRoot);
AutoPtr<DocumentFragment> pFrag1 = pDoc->createDocumentFragment();
AutoPtr<DocumentFragment> pFrag2 = pDoc->createDocumentFragment();
AutoPtr<DocumentFragment> pFrag3 = pDoc->createDocumentFragment();
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Element> pElem3 = pDoc->createElement("elem");
AutoPtr<Element> pElem4 = pDoc->createElement("elem");
pFrag2->appendChild(pElem1);
pFrag2->appendChild(pElem2);
pFrag2->appendChild(pElem3);
pFrag3->appendChild(pElem4);
appender.appendChild(pFrag1);
assertTrue (pRoot->firstChild() == 0);
appender.appendChild(pFrag2);
assertTrue (pRoot->firstChild() == pElem1);
assertTrue (pRoot->lastChild() == pElem3);
assertTrue (pElem1->nextSibling() == pElem2);
assertTrue (pElem2->nextSibling() == pElem3);
assertTrue (pElem3->nextSibling() == 0);
assertTrue (pElem1->previousSibling() == 0);
assertTrue (pElem2->previousSibling() == pElem1);
assertTrue (pElem3->previousSibling() == pElem2);
assertTrue (pElem1->parentNode() == pRoot);
assertTrue (pElem2->parentNode() == pRoot);
assertTrue (pElem3->parentNode() == pRoot);
appender.appendChild(pFrag3);
assertTrue (pRoot->lastChild() == pElem4);
assertTrue (pElem4->parentNode() == pRoot);
assertTrue (pElem3->nextSibling() == pElem4);
assertTrue (pElem4->previousSibling() == pElem3);
}
void NodeAppenderTest::setUp()
{
}
void NodeAppenderTest::tearDown()
{
}
CppUnit::Test* NodeAppenderTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("NodeAppenderTest");
CppUnit_addTest(pSuite, NodeAppenderTest, testAppendNode);
CppUnit_addTest(pSuite, NodeAppenderTest, testAppendNodeList);
return pSuite;
}

View File

@ -0,0 +1,39 @@
//
// NodeAppenderTest.h
//
// Definition of the NodeAppenderTest class.
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NodeAppenderTest_INCLUDED
#define NodeAppenderTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class NodeAppenderTest: public CppUnit::TestCase
{
public:
NodeAppenderTest(const std::string& name);
~NodeAppenderTest();
void testAppendNode();
void testAppendNodeList();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // NodeAppenderTest_INCLUDED

View File

@ -0,0 +1,188 @@
//
// NodeIteratorTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "NodeIteratorTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/NodeIterator.h"
#include "Poco/DOM/NodeFilter.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Text.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::NodeIterator;
using Poco::XML::NodeFilter;
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::Text;
using Poco::XML::Node;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
namespace
{
class TestNodeFilter: public NodeFilter
{
short acceptNode(Node* node)
{
if (node->innerText() == "text1")
return NodeFilter::FILTER_ACCEPT;
else
return NodeFilter::FILTER_REJECT;
}
};
}
NodeIteratorTest::NodeIteratorTest(const std::string& name): CppUnit::TestCase(name)
{
}
NodeIteratorTest::~NodeIteratorTest()
{
}
void NodeIteratorTest::testShowAll()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
NodeIterator it(pRoot, NodeFilter::SHOW_ALL);
assertTrue (it.nextNode() == pRoot);
assertTrue (it.nextNode() == pElem1);
assertTrue (it.nextNode() == pText1);
assertTrue (it.nextNode() == pElem2);
assertTrue (it.nextNode() == pText2);
assertTrue (it.nextNode() == 0);
assertTrue (it.previousNode() == pText2);
assertTrue (it.previousNode() == pElem2);
assertTrue (it.previousNode() == pText1);
assertTrue (it.previousNode() == pElem1);
assertTrue (it.previousNode() == pRoot);
assertTrue (it.previousNode() == 0);
}
void NodeIteratorTest::testShowElements()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
NodeIterator it(pRoot, NodeFilter::SHOW_ELEMENT);
assertTrue (it.nextNode() == pRoot);
assertTrue (it.nextNode() == pElem1);
assertTrue (it.nextNode() == pElem2);
assertTrue (it.nextNode() == 0);
assertTrue (it.previousNode() == pElem2);
assertTrue (it.previousNode() == pElem1);
assertTrue (it.previousNode() == pRoot);
assertTrue (it.previousNode() == 0);
}
void NodeIteratorTest::testFilter()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
TestNodeFilter filter;
NodeIterator it(pRoot, NodeFilter::SHOW_ELEMENT, &filter);
assertTrue (it.nextNode() == pElem1);
assertTrue (it.nextNode() == 0);
assertTrue (it.previousNode() == pElem1);
assertTrue (it.previousNode() == 0);
}
void NodeIteratorTest::testShowNothing()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
NodeIterator it(pRoot, 0);
assertTrue (it.nextNode() == 0);
assertTrue (it.previousNode() == 0);
}
void NodeIteratorTest::setUp()
{
}
void NodeIteratorTest::tearDown()
{
}
CppUnit::Test* NodeIteratorTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("NodeIteratorTest");
CppUnit_addTest(pSuite, NodeIteratorTest, testShowAll);
CppUnit_addTest(pSuite, NodeIteratorTest, testShowElements);
CppUnit_addTest(pSuite, NodeIteratorTest, testFilter);
CppUnit_addTest(pSuite, NodeIteratorTest, testShowNothing);
return pSuite;
}

View File

@ -0,0 +1,41 @@
//
// NodeIteratorTest.h
//
// Definition of the NodeIteratorTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NodeIteratorTest_INCLUDED
#define NodeIteratorTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class NodeIteratorTest: public CppUnit::TestCase
{
public:
NodeIteratorTest(const std::string& name);
~NodeIteratorTest();
void testShowAll();
void testShowElements();
void testFilter();
void testShowNothing();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // NodeIteratorTest_INCLUDED

1104
vendor/POCO/XML/testsuite/src/NodeTest.cpp vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
//
// NodeTest.h
//
// Definition of the NodeTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef NodeTest_INCLUDED
#define NodeTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class NodeTest: public CppUnit::TestCase
{
public:
NodeTest(const std::string& name);
~NodeTest();
void testInsert();
void testAppend();
void testRemove();
void testReplace();
void testInsertFragment1();
void testInsertFragment2();
void testInsertFragment3();
void testAppendFragment1();
void testAppendFragment2();
void testAppendFragment3();
void testReplaceFragment1();
void testReplaceFragment2();
void testReplaceFragment3();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // NodeTest_INCLUDED

View File

@ -0,0 +1,169 @@
//
// ParserWriterTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "ParserWriterTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/DOMParser.h"
#include "Poco/DOM/DOMWriter.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/AutoPtr.h"
#include "Poco/SAX/InputSource.h"
#include "Poco/XML/XMLWriter.h"
#include <sstream>
using Poco::XML::DOMParser;
using Poco::XML::DOMWriter;
using Poco::XML::XMLReader;
using Poco::XML::XMLWriter;
using Poco::XML::Document;
using Poco::XML::AutoPtr;
using Poco::XML::InputSource;
ParserWriterTest::ParserWriterTest(const std::string& name): CppUnit::TestCase(name)
{
}
ParserWriterTest::~ParserWriterTest()
{
}
void ParserWriterTest::testParseWriteXHTML()
{
std::ostringstream ostr;
DOMParser parser;
parser.setFeature(XMLReader::FEATURE_NAMESPACE_PREFIXES, false);
DOMWriter writer;
AutoPtr<Document> pDoc = parser.parseString(XHTML);
writer.writeNode(ostr, pDoc);
std::string xml = ostr.str();
assertTrue (xml == XHTML);
}
void ParserWriterTest::testParseWriteXHTML2()
{
std::ostringstream ostr;
DOMParser parser;
parser.setFeature(XMLReader::FEATURE_NAMESPACE_PREFIXES, true);
DOMWriter writer;
AutoPtr<Document> pDoc = parser.parseString(XHTML2);
writer.writeNode(ostr, pDoc);
std::string xml = ostr.str();
assertTrue (xml == XHTML2);
}
void ParserWriterTest::testParseWriteSimple()
{
static const std::string simple =
"<config>\n"
"\t<prop1>value1</prop1>\n"
"\t<prop2>value2</prop2>\n"
"</config>\n";
std::istringstream istr(simple);
std::ostringstream ostr;
DOMParser parser;
parser.setFeature(DOMParser::FEATURE_FILTER_WHITESPACE, true);
parser.setFeature(XMLReader::FEATURE_NAMESPACE_PREFIXES, false);
DOMWriter writer;
writer.setNewLine("\n");
writer.setOptions(XMLWriter::PRETTY_PRINT);
InputSource source(istr);
AutoPtr<Document> pDoc = parser.parse(&source);
writer.writeNode(ostr, pDoc);
unsigned int numChildren = 0;
Poco::XML::Node* child = pDoc->documentElement()->firstChild();
while (child) {
numChildren++;
child = child->nextSibling();
}
assertTrue (numChildren == 2);
std::string xml = ostr.str();
assertTrue (xml == simple);
}
void ParserWriterTest::setUp()
{
}
void ParserWriterTest::tearDown()
{
}
CppUnit::Test* ParserWriterTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ParserWriterTest");
CppUnit_addTest(pSuite, ParserWriterTest, testParseWriteXHTML);
CppUnit_addTest(pSuite, ParserWriterTest, testParseWriteXHTML2);
CppUnit_addTest(pSuite, ParserWriterTest, testParseWriteSimple);
return pSuite;
}
const std::string ParserWriterTest::XHTML =
"<!--\n"
"\tThis is a comment.\n"
"-->"
"<ns1:html xml:lang=\"en\" xmlns:ns1=\"http://www.w3.org/1999/xhtml\">\n"
"\t<ns1:head>\n"
"\t\t<ns1:link href=\"styles.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
"\t\t<?xml-stylesheet href=\"styles.css\" type=\"text/css\"?>\n"
"\t\t<ns1:title>A XHTML Example</ns1:title>\n"
"\t</ns1:head>\n"
"\t<ns1:body>\n"
"\t\t<ns1:h1>XHTML Example</ns1:h1>\n"
"\t\t<ns1:p>This is a XHTML example page.</ns1:p>\n"
"\t\t<ns1:img alt=\"Example Picture\" border=\"0\" height=\"192\" src=\"example.gif\" width=\"256\"/>\n"
"\t\t<![CDATA[\n"
"\t\tThe following <tag attr=\"value\">is inside a CDATA section</tag>.\n"
"\t\t]]>\n"
"\t</ns1:body>\n"
"</ns1:html>";
const std::string ParserWriterTest::XHTML2 =
"<!--\n"
"\tThis is a comment.\n"
"-->"
"<xns:html xml:lang=\"en\" xmlns:xns=\"http://www.w3.org/1999/xhtml\">\n"
"\t<xns:head>\n"
"\t\t<xns:link href=\"styles.css\" rel=\"stylesheet\" type=\"text/css\"/>\n"
"\t\t<?xml-stylesheet href=\"styles.css\" type=\"text/css\"?>\n"
"\t\t<xns:title>A XHTML Example</xns:title>\n"
"\t</xns:head>\n"
"\t<xns:body>\n"
"\t\t<xns:h1>XHTML Example</xns:h1>\n"
"\t\t<xns:p>This is a XHTML example page.</xns:p>\n"
"\t\t<xns:img alt=\"Example Picture\" border=\"0\" height=\"192\" src=\"example.gif\" width=\"256\"/>\n"
"\t\t<![CDATA[\n"
"\t\tThe following <tag attr=\"value\">is inside a CDATA section</tag>.\n"
"\t\t]]>\n"
"\t</xns:body>\n"
"</xns:html>";

View File

@ -0,0 +1,43 @@
//
// ParserWriterTest.h
//
// Definition of the ParserWriterTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef ParserWriterTest_INCLUDED
#define ParserWriterTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class ParserWriterTest: public CppUnit::TestCase
{
public:
ParserWriterTest(const std::string& name);
~ParserWriterTest();
void testParseWriteXHTML();
void testParseWriteXHTML2();
void testParseWriteWSDL();
void testParseWriteSimple();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
static const std::string XHTML;
static const std::string XHTML2;
};
#endif // ParserWriterTest_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,82 @@
//
// SAXParserTest.h
//
// Definition of the SAXParserTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef SAXParserTest_INCLUDED
#define SAXParserTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
#include "Poco/SAX/XMLReader.h"
class SAXParserTest: public CppUnit::TestCase
{
public:
SAXParserTest(const std::string& name);
~SAXParserTest();
void testSimple1();
void testSimple2();
void testAttributes();
void testCDATA();
void testComment();
void testPI();
void testDTD();
void testInternalEntity();
void testNotation();
void testExternalUnparsed();
void testExternalParsed();
void testDefaultNamespace();
void testNamespaces();
void testNamespacesNoPrefixes();
void testNoNamespaces();
void testUndeclaredNamespace();
void testUndeclaredNamespaceNoPrefixes();
void testUndeclaredNoNamespace();
void testRSS();
void testEncoding();
void testParseMemory();
void testCharacters();
void testParsePartialReads();
void setUp();
void tearDown();
std::string parse(Poco::XML::XMLReader& reader, int options, const std::string& data);
std::string parseMemory(Poco::XML::XMLReader& reader, int options, const std::string& data);
static CppUnit::Test* suite();
static const std::string SIMPLE1;
static const std::string SIMPLE2;
static const std::string ATTRIBUTES;
static const std::string CDATA;
static const std::string COMMENT;
static const std::string PROCESSING_INSTRUCTION;
static const std::string DTD;
static const std::string INTERNAL_ENTITY;
static const std::string NOTATION;
static const std::string EXTERNAL_UNPARSED;
static const std::string EXTERNAL_PARSED;
static const std::string INCLUDE;
static const std::string DEFAULT_NAMESPACE;
static const std::string NAMESPACES;
static const std::string UNDECLARED_NAMESPACE;
static const std::string XHTML_LATIN1_ENTITIES;
static const std::string RSS;
static const std::string ENCODING;
static const std::string WSDL;
};
#endif // SAXParserTest_INCLUDED

View File

@ -0,0 +1,26 @@
//
// SAXTestSuite.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "SAXTestSuite.h"
#include "AttributesImplTest.h"
#include "NamespaceSupportTest.h"
#include "SAXParserTest.h"
CppUnit::Test* SAXTestSuite::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SAXTestSuite");
pSuite->addTest(AttributesImplTest::suite());
pSuite->addTest(NamespaceSupportTest::suite());
pSuite->addTest(SAXParserTest::suite());
return pSuite;
}

View File

@ -0,0 +1,27 @@
//
// SAXTestSuite.h
//
// Definition of the SAXTestSuite class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef SAXTestSuite_INCLUDED
#define SAXTestSuite_INCLUDED
#include "CppUnit/TestSuite.h"
class SAXTestSuite
{
public:
static CppUnit::Test* suite();
};
#endif // SAXTestSuite_INCLUDED

View File

@ -0,0 +1,167 @@
//
// TextTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "TextTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/Text.h"
#include "Poco/DOM/CDATASection.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::Text;
using Poco::XML::CDATASection;
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
TextTest::TextTest(const std::string& name): CppUnit::TestCase(name)
{
}
TextTest::~TextTest()
{
}
void TextTest::testLength()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Text> pText1 = pDoc->createTextNode("");
assertTrue (pText1->length() == 0);
AutoPtr<Text> pText2 = pDoc->createTextNode("foo bar");
assertTrue (pText2->length() == 7);
}
void TextTest::testSubstring()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Text> pText1 = pDoc->createTextNode("foo bar");
XMLString str = pText1->substringData(0, 3);
assertTrue (str == "foo");
str = pText1->substringData(4, 3);
assertTrue (str == "bar");
str = pText1->substringData(3, 0);
assertTrue (str == "");
}
void TextTest::testAppend()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Text> pText1 = pDoc->createTextNode("foo");
pText1->appendData("bar");
assertTrue (pText1->data() == "foobar");
}
void TextTest::testInsert()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Text> pText1 = pDoc->createTextNode("bar");
pText1->insertData(0, "foo");
assertTrue (pText1->data() == "foobar");
pText1->insertData(pText1->length(), "!");
assertTrue (pText1->data() == "foobar!");
pText1->insertData(3, " ");
assertTrue (pText1->data() == "foo bar!");
}
void TextTest::testDelete()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Text> pText1 = pDoc->createTextNode("foo bar");
pText1->deleteData(3, 1);
assertTrue (pText1->data() == "foobar");
pText1->deleteData(0, 3);
assertTrue (pText1->data() == "bar");
pText1->deleteData(1, 0);
assertTrue (pText1->data() == "bar");
pText1->deleteData(0, pText1->length());
assertTrue (pText1->data() == "");
}
void TextTest::testReplace()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Text> pText1 = pDoc->createTextNode("foo bar");
pText1->replaceData(0, 3, "FOO");
assertTrue (pText1->data() == "FOO bar");
pText1->replaceData(4, 3, "BAR!!!");
assertTrue (pText1->data() == "FOO BAR!!!");
pText1->replaceData(3, 1, "-");
assertTrue (pText1->data() == "FOO-BAR!!!");
pText1->replaceData(3, 1, "---");
assertTrue (pText1->data() == "FOO---BAR!!!");
pText1->replaceData(3, 3, " ");
assertTrue (pText1->data() == "FOO BAR!!!");
pText1->replaceData(0, pText1->length(), "foo bar");
assertTrue (pText1->data() == "foo bar");
}
void TextTest::testSplit()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pElem = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createCDATASection("foobar");
pElem->appendChild(pText1);
pText1->splitText(3);
assertTrue (pElem->firstChild()->nodeValue() == "foo");
assertTrue (pElem->lastChild()->nodeValue() == "bar");
}
void TextTest::testSplitCDATA()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pElem = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("foobar");
pElem->appendChild(pText1);
pText1->splitText(3);
assertTrue (pElem->firstChild()->nodeValue() == "foo");
assertTrue (pElem->lastChild()->nodeValue() == "bar");
}
void TextTest::setUp()
{
}
void TextTest::tearDown()
{
}
CppUnit::Test* TextTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("TextTest");
CppUnit_addTest(pSuite, TextTest, testLength);
CppUnit_addTest(pSuite, TextTest, testSubstring);
CppUnit_addTest(pSuite, TextTest, testAppend);
CppUnit_addTest(pSuite, TextTest, testInsert);
CppUnit_addTest(pSuite, TextTest, testDelete);
CppUnit_addTest(pSuite, TextTest, testReplace);
CppUnit_addTest(pSuite, TextTest, testSplit);
CppUnit_addTest(pSuite, TextTest, testSplitCDATA);
return pSuite;
}

View File

@ -0,0 +1,45 @@
//
// TextTest.h
//
// Definition of the TextTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef TextTest_INCLUDED
#define TextTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class TextTest: public CppUnit::TestCase
{
public:
TextTest(const std::string& name);
~TextTest();
void testLength();
void testSubstring();
void testAppend();
void testInsert();
void testDelete();
void testReplace();
void testSplit();
void testSplitCDATA();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // TextTest_INCLUDED

View File

@ -0,0 +1,307 @@
//
// TreeWalkerTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "TreeWalkerTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/DOM/TreeWalker.h"
#include "Poco/DOM/NodeFilter.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/Element.h"
#include "Poco/DOM/Text.h"
#include "Poco/DOM/AutoPtr.h"
using Poco::XML::TreeWalker;
using Poco::XML::NodeFilter;
using Poco::XML::Element;
using Poco::XML::Document;
using Poco::XML::Text;
using Poco::XML::Node;
using Poco::XML::AutoPtr;
using Poco::XML::XMLString;
namespace
{
class RejectNodeFilter: public NodeFilter
{
short acceptNode(Node* node)
{
if (node->nodeType() != Node::ELEMENT_NODE || node->innerText() == "text1" || node->nodeName() == "root")
return NodeFilter::FILTER_ACCEPT;
else
return NodeFilter::FILTER_REJECT;
}
};
class SkipNodeFilter: public NodeFilter
{
short acceptNode(Node* node)
{
if (node->nodeType() != Node::ELEMENT_NODE || node->innerText() == "text1")
return NodeFilter::FILTER_ACCEPT;
else
return NodeFilter::FILTER_SKIP;
}
};
}
TreeWalkerTest::TreeWalkerTest(const std::string& name): CppUnit::TestCase(name)
{
}
TreeWalkerTest::~TreeWalkerTest()
{
}
void TreeWalkerTest::testShowAll()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
TreeWalker it(pRoot, NodeFilter::SHOW_ALL);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.nextNode() == pElem1);
assertTrue (it.nextNode() == pText1);
assertTrue (it.nextNode() == pElem2);
assertTrue (it.nextNode() == pText2);
assertTrue (it.nextNode() == 0);
assertTrue (it.currentNode() == pText2);
assertTrue (it.previousNode() == pElem2);
assertTrue (it.previousNode() == pText1);
assertTrue (it.previousNode() == pElem1);
assertTrue (it.previousNode() == pRoot);
assertTrue (it.previousNode() == 0);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.parentNode() == 0);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.firstChild() == pElem1);
assertTrue (it.parentNode() == pRoot);
assertTrue (it.lastChild() == pElem2);
assertTrue (it.previousSibling() == pElem1);
assertTrue (it.previousSibling() == 0);
assertTrue (it.currentNode() == pElem1);
assertTrue (it.nextSibling() == pElem2);
assertTrue (it.nextSibling() == 0);
assertTrue (it.currentNode() == pElem2);
assertTrue (it.firstChild() == pText2);
assertTrue (it.nextSibling() == 0);
assertTrue (it.previousSibling() == 0);
assertTrue (it.parentNode() == pElem2);
assertTrue (it.lastChild() == pText2);
}
void TreeWalkerTest::testShowElements()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
TreeWalker it(pRoot, NodeFilter::SHOW_ELEMENT);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.nextNode() == pElem1);
assertTrue (it.nextNode() == pElem2);
assertTrue (it.nextNode() == 0);
assertTrue (it.currentNode() == pElem2);
assertTrue (it.previousNode() == pElem1);
assertTrue (it.previousNode() == pRoot);
assertTrue (it.previousNode() == 0);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.parentNode() == 0);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.firstChild() == pElem1);
assertTrue (it.parentNode() == pRoot);
assertTrue (it.lastChild() == pElem2);
assertTrue (it.firstChild() == 0);
assertTrue (it.currentNode() == pElem2);
assertTrue (it.lastChild() == 0);
assertTrue (it.currentNode() == pElem2);
assertTrue (it.previousSibling() == pElem1);
assertTrue (it.firstChild() == 0);
assertTrue (it.lastChild() == 0);
assertTrue (it.parentNode() == pRoot);
}
void TreeWalkerTest::testFilter()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
SkipNodeFilter skipFilter;
TreeWalker it1(pRoot, NodeFilter::SHOW_ELEMENT, &skipFilter);
assertTrue (it1.nextNode() == pElem1);
assertTrue (it1.nextNode() == 0);
assertTrue (it1.currentNode() == pElem1);
assertTrue (it1.previousNode() == 0);
assertTrue (it1.parentNode() == 0);
assertTrue (it1.firstChild() == 0);
assertTrue (it1.lastChild() == 0);
assertTrue (it1.nextSibling() == 0);
assertTrue (it1.previousSibling() == 0);
TreeWalker it2(pRoot, NodeFilter::SHOW_ALL, &skipFilter);
assertTrue (it2.nextNode() == pElem1);
assertTrue (it2.nextNode() == pText1);
assertTrue (it2.nextNode() == pText2);
assertTrue (it2.nextNode() == 0);
assertTrue (it2.currentNode() == pText2);
assertTrue (it2.previousNode() == pText1);
assertTrue (it2.previousNode() == pElem1);
assertTrue (it2.previousNode() == 0);
assertTrue (it2.currentNode() == pElem1);
assertTrue (it2.parentNode() == 0);
assertTrue (it2.nextSibling() == 0);
assertTrue (it2.previousSibling() == 0);
assertTrue (it2.firstChild() == pText1);
assertTrue (it2.nextSibling() == 0);
assertTrue (it2.previousSibling() == 0);
assertTrue (it2.parentNode() == pElem1);
RejectNodeFilter rejectFilter;
TreeWalker it3(pRoot, NodeFilter::SHOW_ELEMENT, &rejectFilter);
assertTrue (it3.nextNode() == pElem1);
assertTrue (it3.nextNode() == 0);
assertTrue (it3.currentNode() == pElem1);
assertTrue (it3.previousNode() == pRoot);
assertTrue (it3.previousNode() == 0);
assertTrue (it3.currentNode() == pRoot);
assertTrue (it3.parentNode() == 0);
assertTrue (it3.firstChild() == pElem1);
assertTrue (it3.nextSibling() == 0);
assertTrue (it3.previousSibling() == 0);
assertTrue (it3.parentNode() == pRoot);
assertTrue (it3.lastChild() == pElem1);
TreeWalker it4(pRoot, NodeFilter::SHOW_ALL, &rejectFilter);
assertTrue (it4.nextNode() == pElem1);
assertTrue (it4.nextNode() == pText1);
assertTrue (it4.nextNode() == 0);
assertTrue (it4.currentNode() == pText1);
assertTrue (it4.previousNode() == pElem1);
assertTrue (it4.previousNode() == pRoot);
assertTrue (it4.previousNode() == 0);
assertTrue (it4.currentNode() == pRoot);
assertTrue (it4.parentNode() == 0);
assertTrue (it4.firstChild() == pElem1);
assertTrue (it4.firstChild() == pText1);
assertTrue (it4.nextSibling() == 0);
assertTrue (it4.previousSibling() == 0);
assertTrue (it4.parentNode() == pElem1);
assertTrue (it4.lastChild() == pText1);
assertTrue (it4.parentNode() == pElem1);
assertTrue (it4.nextSibling() == 0);
assertTrue (it4.previousSibling() == 0);
assertTrue (it4.parentNode() == pRoot);
}
void TreeWalkerTest::testShowNothing()
{
AutoPtr<Document> pDoc = new Document;
AutoPtr<Element> pRoot = pDoc->createElement("root");
AutoPtr<Element> pElem1 = pDoc->createElement("elem");
AutoPtr<Element> pElem2 = pDoc->createElement("elem");
AutoPtr<Text> pText1 = pDoc->createTextNode("text1");
AutoPtr<Text> pText2 = pDoc->createTextNode("text2");
pElem1->appendChild(pText1);
pElem2->appendChild(pText2);
pRoot->appendChild(pElem1);
pRoot->appendChild(pElem2);
pDoc->appendChild(pRoot);
TreeWalker it(pRoot, 0);
assertTrue (it.nextNode() == 0);
assertTrue (it.previousNode() == 0);
assertTrue (it.currentNode() == pRoot);
assertTrue (it.firstChild() == 0);
assertTrue (it.lastChild() == 0);
assertTrue (it.nextSibling() == 0);
assertTrue (it.previousSibling() == 0);
}
void TreeWalkerTest::setUp()
{
}
void TreeWalkerTest::tearDown()
{
}
CppUnit::Test* TreeWalkerTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("TreeWalkerTest");
CppUnit_addTest(pSuite, TreeWalkerTest, testShowAll);
CppUnit_addTest(pSuite, TreeWalkerTest, testShowElements);
CppUnit_addTest(pSuite, TreeWalkerTest, testFilter);
CppUnit_addTest(pSuite, TreeWalkerTest, testShowNothing);
return pSuite;
}

View File

@ -0,0 +1,41 @@
//
// TreeWalkerTest.h
//
// Definition of the TreeWalkerTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef TreeWalkerTest_INCLUDED
#define TreeWalkerTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class TreeWalkerTest: public CppUnit::TestCase
{
public:
TreeWalkerTest(const std::string& name);
~TreeWalkerTest();
void testShowAll();
void testShowElements();
void testFilter();
void testShowNothing();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // TreeWalkerTest_INCLUDED

View File

@ -0,0 +1,30 @@
//
// WinCEDriver.cpp
//
// Console-based test driver for Windows CE.
//
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "CppUnit/TestRunner.h"
#include "XMLTestSuite.h"
#include <cstdlib>
int wmain(int argc, wchar_t* argv[])
{
std::vector<std::string> args;
for (int i = 0; i < argc; ++i)
{
char buffer[1024];
std::wcstombs(buffer, argv[i], sizeof(buffer));
args.push_back(std::string(buffer));
}
CppUnit::TestRunner runner;
runner.addTest("XMLTestSuite", XMLTestSuite::suite());
return runner.run(args) ? 0 : 1;
}

View File

@ -0,0 +1,28 @@
//
// WinDriver.cpp
//
// Windows test driver for Poco XML.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "WinTestRunner/WinTestRunner.h"
#include "XMLTestSuite.h"
class TestDriver: public CppUnit::WinTestRunnerApp
{
void TestMain()
{
CppUnit::WinTestRunner runner;
runner.addTest(XMLTestSuite::suite());
runner.run();
}
};
TestDriver theDriver;

View File

@ -0,0 +1,503 @@
//
// XMLStreamParserTest.cpp
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "XMLStreamParserTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/XML/XMLStreamParser.h"
#include "Poco/Exception.h"
#include <sstream>
#include <string>
#include <vector>
#include <iostream>
using namespace Poco::XML;
XMLStreamParserTest::XMLStreamParserTest(const std::string& name):
CppUnit::TestCase(name)
{
}
XMLStreamParserTest::~XMLStreamParserTest()
{
}
void XMLStreamParserTest::testParser()
{
// Test error handling.
//
try
{
std::istringstream is("<root><nested>X</nasted></root>");
XMLStreamParser p(is, "test");
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == "X");
p.next();
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
try
{
std::istringstream is("<root/>");
is.exceptions(std::ios_base::badbit | std::ios_base::failbit);
XMLStreamParser p(is, "test");
is.setstate(std::ios_base::badbit);
p.next();
assertTrue (false);
}
catch (const std::ios_base::failure&)
{
}
// Test the nextExpect() functionality.
//
{
std::istringstream is("<root/>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
}
try
{
std::istringstream is("<root/>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
try
{
std::istringstream is("<root/>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root1");
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
// Test nextExpect() with content setting.
//
{
std::istringstream is("<root> </root>");
XMLStreamParser p(is, "empty");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root", Content::Empty);
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
p.nextExpect(XMLStreamParser::EV_EOF);
}
// Test namespace declarations.
//
{
// Followup end element event that should be precedeeded by end
// namespace declaration.
//
std::istringstream is("<root xmlns:a='a'/>");
XMLStreamParser p(is, "test", XMLStreamParser::RECEIVE_DEFAULT | XMLStreamParser::RECEIVE_NAMESPACE_DECLS);
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
p.nextExpect(XMLStreamParser::EV_START_NAMESPACE_DECL);
p.nextExpect(XMLStreamParser::EV_END_NAMESPACE_DECL);
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
}
// Test value extraction.
//
{
std::istringstream is("<root>123</root>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
p.nextExpect(XMLStreamParser::EV_CHARACTERS);
assertTrue (p.value<int>() == 123);
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
}
// Test attribute maps.
//
{
std::istringstream is("<root a='a' b='b' d='123' t='true'/>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
assertTrue (p.attribute("a") == "a");
assertTrue (p.attribute("b", "B") == "b");
assertTrue (p.attribute("c", "C") == "C");
assertTrue (p.attribute<int>("d") == 123);
assertTrue (p.attribute<bool>("t") == true);
assertTrue (p.attribute("f", false) == false);
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
}
{
std::istringstream is("<root a='a'><nested a='A'><inner/></nested></root>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
assertTrue (p.attribute("a") == "a");
assertTrue (p.peek() == XMLStreamParser::EV_START_ELEMENT && p.localName() == "nested");
assertTrue (p.attribute("a") == "a");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "nested");
assertTrue (p.attribute("a") == "A");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "inner");
assertTrue (p.attribute("a", "") == "");
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.attribute("a") == "A");
assertTrue (p.peek() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.attribute("a") == "A"); // Still valid.
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.attribute("a") == "a");
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.attribute("a", "") == "");
}
try
{
std::istringstream is("<root a='a' b='b'/>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
assertTrue (p.attribute("a") == "a");
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
try
{
std::istringstream is("<root a='abc'/>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
p.attribute<int>("a");
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
// Test peeking and getting the current event.
//
{
std::istringstream is("<root x='x'>x<nested/></root>");
XMLStreamParser p(is, "peek", XMLStreamParser::RECEIVE_DEFAULT | XMLStreamParser::RECEIVE_ATTRIBUTES_EVENT);
assertTrue (p.event() == XMLStreamParser::EV_EOF);
assertTrue (p.peek() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.event() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.peek() == XMLStreamParser::EV_START_ATTRIBUTE);
assertTrue (p.event() == XMLStreamParser::EV_START_ATTRIBUTE);
assertTrue (p.next() == XMLStreamParser::EV_START_ATTRIBUTE);
assertTrue (p.peek() == XMLStreamParser::EV_CHARACTERS && p.value() == "x");
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == "x");
assertTrue (p.event() == XMLStreamParser::EV_CHARACTERS && p.value() == "x");
assertTrue (p.peek() == XMLStreamParser::EV_END_ATTRIBUTE);
assertTrue (p.event() == XMLStreamParser::EV_END_ATTRIBUTE);
assertTrue (p.next() == XMLStreamParser::EV_END_ATTRIBUTE);
assertTrue (p.peek() == XMLStreamParser::EV_CHARACTERS && p.value() == "x");
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == "x");
assertTrue (p.event() == XMLStreamParser::EV_CHARACTERS && p.value() == "x");
assertTrue (p.peek() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.event() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.peek() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.event() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.peek() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.event() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.peek() == XMLStreamParser::EV_EOF);
assertTrue (p.next() == XMLStreamParser::EV_EOF);
assertTrue (p.event() == XMLStreamParser::EV_EOF);
}
// Test content processing.
//
// empty
//
{
std::istringstream is("<root x=' x '> \n\t </root>");
XMLStreamParser p(is, "empty", XMLStreamParser::RECEIVE_DEFAULT | XMLStreamParser::RECEIVE_ATTRIBUTES_EVENT);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.content(Content::Empty);
assertTrue (p.next() == XMLStreamParser::EV_START_ATTRIBUTE);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == " x ");
assertTrue (p.next() == XMLStreamParser::EV_END_ATTRIBUTE);
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_EOF);
}
try
{
std::istringstream is("<root> \n &amp; X \t </root>");
XMLStreamParser p(is, "empty");
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.content(Content::Empty);
p.next();
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
// simple
//
{
std::istringstream is("<root> X </root>");
XMLStreamParser p(is, "simple");
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.content(Content::Simple);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == " X ");
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_EOF);
}
try
{
std::istringstream is("<root> ? <nested/></root>");
XMLStreamParser p(is, "simple");
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.content(Content::Simple);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == " ? ");
p.next();
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
{
// Test content accumulation in simple content.
//
std::istringstream is("<root xmlns:a='a'>1&#x32;3</root>");
XMLStreamParser p(is, "simple", XMLStreamParser::RECEIVE_DEFAULT | XMLStreamParser::RECEIVE_NAMESPACE_DECLS);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.nextExpect(XMLStreamParser::EV_START_NAMESPACE_DECL);
p.content(Content::Simple);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == "123");
p.nextExpect(XMLStreamParser::EV_END_NAMESPACE_DECL);
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_EOF);
}
try
{
// Test error handling in accumulation in simple content.
//
std::istringstream is("<root xmlns:a='a'>1&#x32;<nested/>3</root>");
XMLStreamParser p(is, "simple", XMLStreamParser::RECEIVE_DEFAULT | XMLStreamParser::RECEIVE_NAMESPACE_DECLS);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.nextExpect(XMLStreamParser::EV_START_NAMESPACE_DECL);
p.content(Content::Simple);
p.next();
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
// complex
//
{
std::istringstream is("<root x=' x '>\n"
" <nested>\n"
" <inner/>\n"
" <inner> X </inner>\n"
" </nested>\n"
"</root>\n");
XMLStreamParser p(is, "complex", XMLStreamParser::RECEIVE_DEFAULT | XMLStreamParser::RECEIVE_ATTRIBUTES_EVENT);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT); // root
p.content(Content::Complex);
assertTrue (p.next() == XMLStreamParser::EV_START_ATTRIBUTE);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == " x ");
assertTrue (p.next() == XMLStreamParser::EV_END_ATTRIBUTE);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT); // nested
p.content(Content::Complex);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT); // inner
p.content(Content::Empty);
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT); // inner
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT); // inner
p.content(Content::Simple);
assertTrue (p.next() == XMLStreamParser::EV_CHARACTERS && p.value() == " X ");
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT); // inner
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT); // nested
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT); // root
assertTrue (p.next() == XMLStreamParser::EV_EOF);
}
try
{
std::istringstream is("<root> \n<n/> X <n> X </n> </root>");
XMLStreamParser p(is, "complex");
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
p.content(Content::Complex);
assertTrue (p.next() == XMLStreamParser::EV_START_ELEMENT);
assertTrue (p.next() == XMLStreamParser::EV_END_ELEMENT);
p.next();
assertTrue (false);
}
catch (const Poco::Exception&)
{
// cerr << e.what () << endl;
}
// Test element with simple content helpers.
//
{
std::istringstream is("<root>"
" <nested>X</nested>"
" <nested/>"
" <nested>123</nested>"
" <nested>Y</nested>"
" <t:nested xmlns:t='test'>Z</t:nested>"
" <nested>234</nested>"
" <t:nested xmlns:t='test'>345</t:nested>"
" <nested>A</nested>"
" <t:nested xmlns:t='test'>B</t:nested>"
" <nested1>A</nested1>"
" <t:nested1 xmlns:t='test'>B</t:nested1>"
" <nested>1</nested>"
" <t:nested xmlns:t='test'>2</t:nested>"
" <nested1>1</nested1>"
" <t:nested1 xmlns:t='test'>2</t:nested1>"
"</root>");
XMLStreamParser p(is, "element");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root", Content::Complex);
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "nested");
assertTrue (p.element() == "X");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "nested");
assertTrue (p.element() == "");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "nested");
assertTrue (p.element<unsigned int>() == 123);
assertTrue (p.element("nested") == "Y");
assertTrue (p.element(QName("test", "nested")) == "Z");
assertTrue (p.element<unsigned int>("nested") == 234);
assertTrue (p.element<unsigned int>(QName("test", "nested")) == 345);
assertTrue (p.element("nested", "a") == "A");
assertTrue (p.element(QName("test", "nested"), "b") == "B");
assertTrue (p.element("nested", "a") == "a" && p.element("nested1") == "A");
assertTrue (p.element(QName("test", "nested"), "b") == "b" && p.element(QName("test", "nested1")) == "B");
assertTrue (p.element<unsigned int>("nested", 10) == 1);
assertTrue (p.element<unsigned int>(QName("test", "nested"), 20) == 2);
assertTrue (p.element<unsigned int>("nested", 10) == 10 && p.element<unsigned int>("nested1") == 1);
assertTrue (p.element<unsigned int>(QName("test", "nested"), 20) == 20 && p.element<unsigned int>(QName("test", "nested1")) == 2);
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
}
// Test the iterator interface.
//
{
std::istringstream is("<root><nested>X</nested></root>");
XMLStreamParser p(is, "iterator");
std::vector<XMLStreamParser::EventType> v;
for (XMLStreamParser::Iterator i(p.begin()); i != p.end(); ++i)
v.push_back(*i);
//for (XMLStreamParser::EventType e: p)
// v.push_back (e);
assertTrue (v.size() == 5);
assertTrue (v[0] == XMLStreamParser::EV_START_ELEMENT);
assertTrue (v[1] == XMLStreamParser::EV_START_ELEMENT);
assertTrue (v[2] == XMLStreamParser::EV_CHARACTERS);
assertTrue (v[3] == XMLStreamParser::EV_END_ELEMENT);
assertTrue (v[4] == XMLStreamParser::EV_END_ELEMENT);
}
// Test space extraction into the std::string value.
//
{
std::istringstream is("<root a=' a '> b </root>");
XMLStreamParser p(is, "test");
p.nextExpect(XMLStreamParser::EV_START_ELEMENT, "root");
assertTrue (p.attribute<std::string>("a") == " a ");
p.nextExpect(XMLStreamParser::EV_CHARACTERS);
assertTrue (p.value<std::string>() == " b ");
p.nextExpect(XMLStreamParser::EV_END_ELEMENT);
}
}
void XMLStreamParserTest::setUp()
{
}
void XMLStreamParserTest::tearDown()
{
}
CppUnit::Test* XMLStreamParserTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("XMLStreamParserTest");
CppUnit_addTest(pSuite, XMLStreamParserTest, testParser);
return pSuite;
}

View File

@ -0,0 +1,38 @@
//
// XMLStreamParserTest.h
//
// Definition of the XMLStreamParserTest class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef XMLStreamParserTest_INCLUDED
#define XMLStreamParserTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class XMLStreamParserTest: public CppUnit::TestCase
{
public:
XMLStreamParserTest(const std::string& name);
~XMLStreamParserTest();
void testParser();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // XMLStreamParserTest_INCLUDED

View File

@ -0,0 +1,31 @@
//
// XMLTestSuite.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "XMLTestSuite.h"
#include "NameTest.h"
#include "NamePoolTest.h"
#include "XMLWriterTest.h"
#include "SAXTestSuite.h"
#include "DOMTestSuite.h"
#include "XMLStreamParserTest.h"
CppUnit::Test* XMLTestSuite::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("XMLTestSuite");
pSuite->addTest(NameTest::suite());
pSuite->addTest(NamePoolTest::suite());
pSuite->addTest(XMLWriterTest::suite());
pSuite->addTest(SAXTestSuite::suite());
pSuite->addTest(DOMTestSuite::suite());
pSuite->addTest(XMLStreamParserTest::suite());
return pSuite;
}

View File

@ -0,0 +1,27 @@
//
// XMLTestSuite.h
//
// Definition of the XMLTestSuite class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef XMLTestSuite_INCLUDED
#define XMLTestSuite_INCLUDED
#include "CppUnit/TestSuite.h"
class XMLTestSuite
{
public:
static CppUnit::Test* suite();
};
#endif // XMLTestSuite_INCLUDED

View File

@ -0,0 +1,703 @@
//
// XMLWriterTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "XMLWriterTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/XML/XMLWriter.h"
#include "Poco/SAX/AttributesImpl.h"
#include "Poco/Exception.h"
#include <sstream>
using Poco::XML::XMLWriter;
using Poco::XML::AttributesImpl;
XMLWriterTest::XMLWriterTest(const std::string& name): CppUnit::TestCase(name)
{
}
XMLWriterTest::~XMLWriterTest()
{
}
void XMLWriterTest::testTrivial()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<foo/>");
}
void XMLWriterTest::testTrivialCanonical()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::CANONICAL_XML);
writer.startDocument();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<foo></foo>");
}
void XMLWriterTest::testTrivialDecl()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION);
writer.startDocument();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo/>");
}
void XMLWriterTest::testTrivialDeclPretty()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION | XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<foo/>\n");
}
void XMLWriterTest::testTrivialFragment()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startFragment();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endFragment();
std::string xml = str.str();
assertTrue (xml == "<foo/>");
}
void XMLWriterTest::testTrivialFragmentPretty()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION | XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startFragment();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endFragment();
std::string xml = str.str();
assertTrue (xml == "<foo/>\n");
}
void XMLWriterTest::testDTDPretty()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION | XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.startDTD("test", "", "http://www.appinf.com/DTDs/test");
writer.endDTD();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE test SYSTEM \"http://www.appinf.com/DTDs/test\">\n"
"<foo/>\n");
}
void XMLWriterTest::testDTD()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION);
writer.setNewLine("\n");
writer.startDocument();
writer.startDTD("test", "", "http://www.appinf.com/DTDs/test");
writer.endDTD();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<!DOCTYPE test SYSTEM \"http://www.appinf.com/DTDs/test\">"
"<foo/>");
}
void XMLWriterTest::testDTDPublic()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION);
writer.setNewLine("\n");
writer.startDocument();
writer.startDTD("test", "test", "http://www.appinf.com/DTDs/test");
writer.endDTD();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<!DOCTYPE test PUBLIC \"test\" \"http://www.appinf.com/DTDs/test\">"
"<foo/>");
}
void XMLWriterTest::testDTDNotation()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION | XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.startDTD("test", "", "");
std::string systemId("quicktime");
writer.notationDecl("mov", 0, &systemId);
std::string publicId("-//W3C//NOTATION XML 1.0//EN");
writer.notationDecl("xml", &publicId, 0);
writer.endDTD();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE test [\n"
"\t<!NOTATION mov SYSTEM \"quicktime\">\n"
"\t<!NOTATION xml PUBLIC \"-//W3C//NOTATION XML 1.0//EN\">\n"
"]>\n"
"<foo/>\n");
}
void XMLWriterTest::testDTDEntity()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::WRITE_XML_DECLARATION | XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.startDTD("test", "", "");
std::string systemId("quicktime");
writer.notationDecl("mov", 0, &systemId);
std::string publicId("-//W3C//NOTATION XML 1.0//EN");
writer.unparsedEntityDecl("movie", 0, "movie.mov", "mov");
writer.endDTD();
writer.startElement("", "", "foo");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE test [\n"
"\t<!NOTATION mov SYSTEM \"quicktime\">\n"
"\t<!ENTITY movie SYSTEM \"movie.mov\" NDATA mov>\n"
"]>\n"
"<foo/>\n");
}
void XMLWriterTest::testAttributes()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
AttributesImpl attrs;
attrs.addAttribute("", "", "a1", "CDATA", "v1");
attrs.addAttribute("", "", "a2", "CDATA", "v2");
writer.startElement("", "", "el", attrs);
writer.endElement("", "", "el");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<el a1=\"v1\" a2=\"v2\"/>");
}
void XMLWriterTest::testAttributesPretty()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::PRETTY_PRINT | XMLWriter::PRETTY_PRINT_ATTRIBUTES);
writer.setNewLine(XMLWriter::NEWLINE_LF);
writer.startDocument();
AttributesImpl attrs;
attrs.addAttribute("", "", "a1", "CDATA", "v1");
attrs.addAttribute("", "", "a2", "CDATA", "v2");
writer.startElement("", "", "el", attrs);
writer.endElement("", "", "el");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<el\n\ta1=\"v1\"\n\ta2=\"v2\"/>\n");
}
void XMLWriterTest::testData()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.dataElement("", "", "d", "data", "a1", "v1", "a2", "v2", "a3", "v3");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<d a1=\"v1\" a2=\"v2\" a3=\"v3\">data</d>");
}
void XMLWriterTest::testEmptyData()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.dataElement("", "", "d", "", "a1", "v1", "a2", "v2", "a3", "v3");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<d a1=\"v1\" a2=\"v2\" a3=\"v3\"/>");
}
void XMLWriterTest::testDataPretty()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.startElement("", "", "r");
writer.dataElement("", "", "d", "data", "a1", "v1", "a2", "v2", "a3", "v3");
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r>\n\t<d a1=\"v1\" a2=\"v2\" a3=\"v3\">data</d>\n</r>\n");
}
void XMLWriterTest::testEmptyDataPretty()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.startElement("", "", "r");
writer.dataElement("", "", "d", "", "a1", "v1", "a2", "v2", "a3", "v3");
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r>\n\t<d a1=\"v1\" a2=\"v2\" a3=\"v3\"/>\n</r>\n");
}
void XMLWriterTest::testComment()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.comment("a comment", 0, 9);
writer.startElement("", "", "r");
writer.comment("<another comment>", 0, 17);
writer.dataElement("", "", "d", "data");
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<!--a comment-->\n<r>\n\t<!--<another comment>-->\n\t<d>data</d>\n</r>\n");
}
void XMLWriterTest::testPI()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::PRETTY_PRINT);
writer.setNewLine("\n");
writer.startDocument();
writer.processingInstruction("target", "a processing instruction");
writer.startElement("", "", "r");
writer.processingInstruction("target", "another processing instruction");
writer.dataElement("", "", "d", "data");
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<?target a processing instruction?>\n<r>\n\t<?target another processing instruction?>\n\t<d>data</d>\n</r>\n");
}
void XMLWriterTest::testCharacters()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "r");
writer.characters("some \"chars\" that <must> be & escaped");
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r>some &quot;chars&quot; that &lt;must&gt; be &amp; escaped</r>");
}
void XMLWriterTest::testEmptyCharacters()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "r");
writer.characters("");
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r/>");
}
void XMLWriterTest::testCDATA()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "r");
writer.startCDATA();
writer.characters("some \"chars\" that <must> be & escaped");
writer.endCDATA();
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r><![CDATA[some \"chars\" that <must> be & escaped]]></r>");
}
void XMLWriterTest::testRawCharacters()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "r");
writer.startCDATA();
writer.rawCharacters("some \"chars\" that <must> be & escaped");
writer.endCDATA();
writer.endElement("", "", "r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r><![CDATA[some \"chars\" that <must> be & escaped]]></r>");
}
void XMLWriterTest::testAttributeCharacters()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
AttributesImpl attrs;
attrs.addAttribute("", "", "a1", "CDATA", "a b c\n\td");
attrs.addAttribute("", "", "a2", "CDATA", "a b c\r\nd");
writer.startElement("", "", "el", attrs);
writer.endElement("", "", "el");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<el a1=\"a b c&#xA;&#x9;d\" a2=\"a b c&#xD;&#xA;d\"/>");
}
void XMLWriterTest::testDefaultNamespace()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startPrefixMapping("", "urn:ns");
writer.startElement("", "", "r");
writer.characters("data");
writer.endElement("", "", "r");
writer.endPrefixMapping("");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r xmlns=\"urn:ns\">data</r>");
}
void XMLWriterTest::testQNamespaces()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("urn:ns", "r", "p:r");
writer.characters("data");
writer.endElement("urn:ns", "r", "p:r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<p:r xmlns:p=\"urn:ns\">data</p:r>");
}
void XMLWriterTest::testQNamespacesNested()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("urn:ns", "r", "p:r");
writer.startElement("urn:ns", "e", "p:e");
writer.endElement("urn:ns", "e", "p:e");
writer.endElement("urn:ns", "r", "p:r");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<p:r xmlns:p=\"urn:ns\"><p:e/></p:r>");
}
void XMLWriterTest::testNamespaces()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("urn:ns", "r", "");
writer.characters("data");
writer.endElement("urn:ns", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<ns1:r xmlns:ns1=\"urn:ns\">data</ns1:r>");
}
void XMLWriterTest::testNamespacesCanonical()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::CANONICAL_XML);
writer.startDocument();
writer.startElement("urn:ns", "r", "");
writer.characters("data");
writer.endElement("urn:ns", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r xmlns=\"urn:ns\">data</r>");
}
void XMLWriterTest::testAttributeNamespaces()
{
std::ostringstream str;
XMLWriter writer(str, 0);
Poco::XML::AttributesImpl attrs;
attrs.addAttribute("urn:other", "myattr", "", "", "attrValue");
attrs.addAttribute("urn:ns", "myattr2", "", "", "attrValue2");
writer.startDocument();
writer.startElement("urn:ns", "r", "", attrs);
writer.characters("data");
writer.endElement("urn:ns", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<ns2:r ns1:myattr=\"attrValue\" ns2:myattr2=\"attrValue2\" xmlns:ns1=\"urn:other\" xmlns:ns2=\"urn:ns\">data</ns2:r>");
}
void XMLWriterTest::testAttributeNamespacesCanonical()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::CANONICAL_XML);
Poco::XML::AttributesImpl attrs;
attrs.addAttribute("urn:other", "myattr", "", "", "attrValue");
attrs.addAttribute("urn:ns", "myattr2", "", "", "attrValue2");
writer.startDocument();
writer.startElement("urn:ns", "r", "", attrs);
writer.characters("data");
writer.endElement("urn:ns", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r xmlns=\"urn:ns\" xmlns:ns1=\"urn:other\" myattr2=\"attrValue2\" ns1:myattr=\"attrValue\">data</r>");
}
void XMLWriterTest::testNamespacesNested()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("urn:ns1", "r", "");
writer.startElement("urn:ns1", "e", "");
writer.endElement("urn:ns1", "e", "");
writer.startElement("urn:ns2", "f", "");
writer.endElement("urn:ns2", "f", "");
writer.endElement("urn:ns1", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<ns1:r xmlns:ns1=\"urn:ns1\"><ns1:e/><ns2:f xmlns:ns2=\"urn:ns2\"/></ns1:r>");
}
void XMLWriterTest::testNamespacesNestedCanonical()
{
std::ostringstream str;
XMLWriter writer(str, XMLWriter::CANONICAL_XML);
writer.startDocument();
writer.startElement("urn:ns1", "r", "");
writer.startElement("urn:ns1", "e", "");
writer.endElement("urn:ns1", "e", "");
Poco::XML::AttributesImpl attrs;
attrs.addAttribute("urn:ns1", "myattr", "myattr", "", "attrValue");
writer.startElement("urn:ns2", "f", "", attrs);
writer.endElement("urn:ns2", "f", "");
writer.endElement("urn:ns1", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<r xmlns=\"urn:ns1\"><e></e><ns1:f xmlns:ns1=\"urn:ns2\" myattr=\"attrValue\"></ns1:f></r>");
}
void XMLWriterTest::testExplicitNamespaces()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startPrefixMapping("p1", "urn:ns1");
writer.startPrefixMapping("p2", "urn:ns2");
writer.startElement("urn:ns1", "r", "");
writer.startElement("urn:ns2", "e", "");
writer.endElement("urn:ns2", "e", "");
writer.startPrefixMapping("p3", "urn:ns3");
writer.startElement("urn:ns2", "e", "");
writer.startElement("urn:ns3", "f", "");
writer.endElement("urn:ns3", "f", "");
writer.endElement("urn:ns2", "e", "");
writer.endElement("urn:ns1", "r", "");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<p1:r xmlns:p1=\"urn:ns1\" xmlns:p2=\"urn:ns2\"><p2:e/><p2:e xmlns:p3=\"urn:ns3\"><p3:f/></p2:e></p1:r>");
}
void XMLWriterTest::testWellformed()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "foo");
try
{
writer.endElement("", "", "bar");
fail("not wellformed - must throw exception");
}
catch (Poco::Exception&)
{
}
}
void XMLWriterTest::testWellformedNested()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "foo");
writer.startElement("", "", "bar");
try
{
writer.endElement("", "", "foo");
fail("not wellformed - must throw exception");
}
catch (Poco::Exception&)
{
}
}
void XMLWriterTest::testWellformedNamespace()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("urn:ns1", "foo", "");
writer.startElement("urn:ns2", "bar", "");
try
{
writer.endElement("urn:ns1", "bar", "");
fail("not wellformed - must throw exception");
}
catch (Poco::Exception&)
{
}
}
void XMLWriterTest::testEmpty()
{
std::ostringstream str;
XMLWriter writer(str, 0);
writer.startDocument();
writer.startElement("", "", "foo");
writer.startElement("", "", "bar");
writer.emptyElement("", "", "empty");
writer.endElement("", "", "bar");
writer.endElement("", "", "foo");
writer.endDocument();
std::string xml = str.str();
assertTrue (xml == "<foo><bar><empty/></bar></foo>");
}
void XMLWriterTest::setUp()
{
}
void XMLWriterTest::tearDown()
{
}
CppUnit::Test* XMLWriterTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("XMLWriterTest");
CppUnit_addTest(pSuite, XMLWriterTest, testTrivial);
CppUnit_addTest(pSuite, XMLWriterTest, testTrivialCanonical);
CppUnit_addTest(pSuite, XMLWriterTest, testTrivialDecl);
CppUnit_addTest(pSuite, XMLWriterTest, testTrivialDeclPretty);
CppUnit_addTest(pSuite, XMLWriterTest, testTrivialFragment);
CppUnit_addTest(pSuite, XMLWriterTest, testTrivialFragmentPretty);
CppUnit_addTest(pSuite, XMLWriterTest, testDTDPretty);
CppUnit_addTest(pSuite, XMLWriterTest, testDTD);
CppUnit_addTest(pSuite, XMLWriterTest, testDTDPublic);
CppUnit_addTest(pSuite, XMLWriterTest, testDTDNotation);
CppUnit_addTest(pSuite, XMLWriterTest, testDTDEntity);
CppUnit_addTest(pSuite, XMLWriterTest, testAttributes);
CppUnit_addTest(pSuite, XMLWriterTest, testAttributesPretty);
CppUnit_addTest(pSuite, XMLWriterTest, testData);
CppUnit_addTest(pSuite, XMLWriterTest, testEmptyData);
CppUnit_addTest(pSuite, XMLWriterTest, testDataPretty);
CppUnit_addTest(pSuite, XMLWriterTest, testEmptyDataPretty);
CppUnit_addTest(pSuite, XMLWriterTest, testComment);
CppUnit_addTest(pSuite, XMLWriterTest, testPI);
CppUnit_addTest(pSuite, XMLWriterTest, testCharacters);
CppUnit_addTest(pSuite, XMLWriterTest, testEmptyCharacters);
CppUnit_addTest(pSuite, XMLWriterTest, testCDATA);
CppUnit_addTest(pSuite, XMLWriterTest, testRawCharacters);
CppUnit_addTest(pSuite, XMLWriterTest, testAttributeCharacters);
CppUnit_addTest(pSuite, XMLWriterTest, testDefaultNamespace);
CppUnit_addTest(pSuite, XMLWriterTest, testQNamespaces);
CppUnit_addTest(pSuite, XMLWriterTest, testQNamespacesNested);
CppUnit_addTest(pSuite, XMLWriterTest, testNamespaces);
CppUnit_addTest(pSuite, XMLWriterTest, testNamespacesCanonical);
CppUnit_addTest(pSuite, XMLWriterTest, testAttributeNamespaces);
CppUnit_addTest(pSuite, XMLWriterTest, testAttributeNamespacesCanonical);
CppUnit_addTest(pSuite, XMLWriterTest, testNamespacesNested);
CppUnit_addTest(pSuite, XMLWriterTest, testNamespacesNestedCanonical);
CppUnit_addTest(pSuite, XMLWriterTest, testExplicitNamespaces);
CppUnit_addTest(pSuite, XMLWriterTest, testWellformed);
CppUnit_addTest(pSuite, XMLWriterTest, testWellformedNested);
CppUnit_addTest(pSuite, XMLWriterTest, testWellformedNamespace);
CppUnit_addTest(pSuite, XMLWriterTest, testEmpty);
return pSuite;
}

View File

@ -0,0 +1,75 @@
//
// XMLWriterTest.h
//
// Definition of the XMLWriterTest class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef XMLWriterTest_INCLUDED
#define XMLWriterTest_INCLUDED
#include "Poco/XML/XML.h"
#include "CppUnit/TestCase.h"
class XMLWriterTest: public CppUnit::TestCase
{
public:
XMLWriterTest(const std::string& name);
~XMLWriterTest();
void testTrivial();
void testTrivialCanonical();
void testTrivialDecl();
void testTrivialDeclPretty();
void testTrivialFragment();
void testTrivialFragmentPretty();
void testDTDPretty();
void testDTD();
void testDTDPublic();
void testDTDNotation();
void testDTDEntity();
void testAttributes();
void testAttributesPretty();
void testData();
void testEmptyData();
void testDataPretty();
void testEmptyDataPretty();
void testComment();
void testPI();
void testCharacters();
void testEmptyCharacters();
void testCDATA();
void testRawCharacters();
void testAttributeCharacters();
void testDefaultNamespace();
void testQNamespaces();
void testQNamespacesNested();
void testNamespaces();
void testNamespacesCanonical();
void testAttributeNamespaces();
void testAttributeNamespacesCanonical();
void testNamespacesNested();
void testNamespacesNestedCanonical();
void testExplicitNamespaces();
void testWellformed();
void testWellformedNested();
void testWellformedNamespace();
void testEmpty();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // XMLWriterTest_INCLUDED