mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +01:00
more tests
This commit is contained in:
parent
e167ff4e05
commit
e3d73d26d8
5 changed files with 336 additions and 0 deletions
|
@ -48,6 +48,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xpath_silly", "test\XP
|
|||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xpath_wide", "test\XPath_wide\xpathic_wide.vcproj", "{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
|
@ -98,6 +102,10 @@ Global
|
|||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Debug.Build.0 = Debug|Win32
|
||||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Release.ActiveCfg = Release|Win32
|
||||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Release.Build.0 = Release|Win32
|
||||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Debug.ActiveCfg = Debug|Win32
|
||||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Debug.Build.0 = Debug|Win32
|
||||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Release.ActiveCfg = Release|Win32
|
||||
{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
|
|
6
test/XPath_wide/.cvsignore
Normal file
6
test/XPath_wide/.cvsignore
Normal file
|
@ -0,0 +1,6 @@
|
|||
Debug
|
||||
*.ncb
|
||||
*.suo
|
||||
xml_grammar.hpp
|
||||
Release
|
||||
xpath_test
|
49
test/XPath_wide/Makefile
Normal file
49
test/XPath_wide/Makefile
Normal file
|
@ -0,0 +1,49 @@
|
|||
-include ../../Makefile.header
|
||||
|
||||
######################################
|
||||
# ADDITIONAL BUILD FLAGS
|
||||
INCS_DIRS += -I../..
|
||||
LIBS_DIRS += -L../../bin
|
||||
|
||||
STATIC_LIBS +=
|
||||
DYNAMIC_LIBS += -lArabica
|
||||
|
||||
######################################
|
||||
# SOURCE FILES
|
||||
XPATH_SRCS = main.cpp arithmetic_test.cpp axis_enumerator_test.cpp execute_test.cpp logical_test.cpp node_test_test.cpp parse_test.cpp relational_test.cpp step_test.cpp value_test.cpp
|
||||
XPATH_HDRS = $(patsubst %.cpp,%.h,$(XPATH_SRCS))
|
||||
XPATH_OBJS = $(patsubst %.cpp,%.o,$(XPATH_SRCS))
|
||||
|
||||
CPPUNIT_DIR = ../CppUnit
|
||||
|
||||
CPPUNITFW_FILES = TestCase.cpp TestFailure.cpp TestResult.cpp TestSuite.cpp
|
||||
CPPUNITFW_SRCS = $(patsubst Test%,$(CPPUNIT_DIR)/framework/Test%,$(CPPUNITFW_FILES))
|
||||
CPPUNITFW_OBJS = $(patsubst %.cpp,%.o,$(CPPUNITFW_SRCS))
|
||||
|
||||
CPPUNITUI_FILES = TextTestResult.cpp
|
||||
CPPUNITUI_SRCS = $(patsubst Text%,$(CPPUNIT_DIR)/textui/Text%,$(CPPUNITUI_FILES))
|
||||
CPPUNITUI_OBJS = $(patsubst %.cpp,%.o,$(CPPUNITUI_SRCS))
|
||||
|
||||
######################################
|
||||
# High level rules
|
||||
all : xpath_test
|
||||
|
||||
xpath_test : $(XPATH_OBJS) $(CPPUNITFW_OBJS) $(CPPUNITUI_OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(XPATH_OBJS) $(CPPUNITFW_OBJS) $(CPPUNITUI_OBJS) $(LIBS_DIRS) $(STATIC_LIBS) $(DYNAMIC_LIBS)
|
||||
$(COPY) xpath_test$(EXESUFFIX) ../../bin
|
||||
|
||||
######################
|
||||
# Compile rules
|
||||
####
|
||||
-include ../../Makefile.rules
|
||||
|
||||
######################
|
||||
# Cleaning up
|
||||
clean :
|
||||
$(REMOVE) $(CPPUNITUI_OBJS) \
|
||||
$(CPPUNITFW_OBJS) \
|
||||
$(XPATH_OBJS) \
|
||||
xpath_test$(EXESUFFIX) \
|
||||
../../bin/xpath_test$(EXESUFFIX)
|
||||
|
||||
# End of File
|
42
test/XPath_wide/main.cpp
Normal file
42
test/XPath_wide/main.cpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4224 4267)
|
||||
#endif
|
||||
|
||||
#include "../CppUnit/TestRunner.hpp"
|
||||
#include "../CppUnit/textui/TextTestResult.h"
|
||||
#include "../CppUnit/framework/Test.h"
|
||||
#include "../CppUnit/framework/TestSuite.h"
|
||||
|
||||
#include "../XPath/value_test.hpp"
|
||||
#include "../XPath/arithmetic_test.hpp"
|
||||
#include "../XPath/relational_test.hpp"
|
||||
#include "../XPath/logical_test.hpp"
|
||||
#include "../XPath/axis_enumerator_test.hpp"
|
||||
#include "../XPath/node_test_test.hpp"
|
||||
#include "../XPath/step_test.hpp"
|
||||
#include "../XPath/parse_test.hpp"
|
||||
#include "../XPath/execute_test.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
/////////////////////////////////////////
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::cout << "Hello" << std::endl;
|
||||
|
||||
TestRunner runner;
|
||||
|
||||
runner.addTest("ValueTest", ValueTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("ArithmeticTest", ArithmeticTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("RelationalTest", RelationalTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("LogicalTest", LogicalTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("AxisEnumeratorTest", AxisEnumeratorTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("NodeTestTest", NodeTestTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("StepTest", StepTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("ParseTest", ParseTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
runner.addTest("ExecuteTest", ExecuteTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
|
||||
runner.run(argc, argv);
|
||||
} // main
|
||||
|
231
test/XPath_wide/xpathic_wide.vcproj
Normal file
231
test/XPath_wide/xpathic_wide.vcproj
Normal file
|
@ -0,0 +1,231 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="test_xpath_wide"
|
||||
ProjectGUID="{B3C75B3A-BB0A-4B23-87F9-FB9CD98FF8CE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\..\..\bin"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Zm1000 "
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="0"
|
||||
AdditionalIncludeDirectories="..\..\"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="FALSE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="5"
|
||||
DisableLanguageExtensions="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/xpath_test_wide.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/xpathic.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\..\..\Debug"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Zm1000 "
|
||||
AdditionalIncludeDirectories="..\..\"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/xpath_test_wide.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\main.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\silly_string\silly_string.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath="..\XPath\arithmetic_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\axis_enumerator_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\execute_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\logical_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\node_test_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\parse_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\relational_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\silly_string\silly_string.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\step_test.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\XPath\value_test.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="CppUnit"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\CppUnitException.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\estring.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\Guards.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\Test.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestCaller.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestCase.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestCase.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestFailure.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestFailure.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestResult.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestResult.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\TestRunner.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\TestRunner.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestSuite.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\framework\TestSuite.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\textui\TextTestResult.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\CppUnit\textui\TextTestResult.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\lib\Arabica.lib">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
Loading…
Add table
Reference in a new issue