mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 21:04:25 +08:00
tests: CodeWarrior and BCC supported
git-svn-id: http://pugixml.googlecode.com/svn/trunk@195 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
1fdd096c80
commit
a70f6b1a70
@ -27,7 +27,7 @@ defines -= "" ;
|
||||
# options
|
||||
if ( $(defines) )
|
||||
{
|
||||
BUILD = build/$(toolset)/$(defines:J=-)/$(configuration) ;
|
||||
BUILD = build/$(toolset)/$(defines:J=_)/$(configuration) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
78
Jamrules.jam
78
Jamrules.jam
@ -30,7 +30,7 @@ if ( $(toolset:I=^mingw) )
|
||||
|
||||
actions LinkAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\g++" $(>) -o $(<) $(LDFLAGS)
|
||||
"%$(toolset)_PATH%\bin\g++" $(>) -o $(<) -static-libgcc $(LDFLAGS)
|
||||
}
|
||||
|
||||
actions CoverageAction
|
||||
@ -110,7 +110,7 @@ else if ( $(toolset) = "ic8" )
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\icl.exe" /W4 /WX /Wport /Qwd981,444,280,383,909,304,167 /I"%$(msvc)_PATH%\include" /I"%$(toolset)_PATH%\include" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
|
||||
"%$(toolset)_PATH%\bin\icl.exe" /W4 /WX /Wport /Qwd981,444,280,383,909,304,167,177 /I"%$(msvc)_PATH%\include" /I"%$(toolset)_PATH%\include" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
|
||||
}
|
||||
|
||||
actions LibraryAction
|
||||
@ -164,6 +164,80 @@ else if ( $(toolset:I=^dmc) )
|
||||
{
|
||||
}
|
||||
}
|
||||
else if ( $(toolset:I=^cw) )
|
||||
{
|
||||
cw_bin = "%$(toolset)_PATH%\\Other Metrowerks Tools\\Command Line Tools" ;
|
||||
CCFLAGS += -D$(defines) ;
|
||||
|
||||
if ( $(configuration) = "debug" )
|
||||
{
|
||||
CCFLAGS += -D_DEBUG ;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCFLAGS += -DNDEBUG -O4 ;
|
||||
}
|
||||
|
||||
if ( PUGIXML_NO_EXCEPTIONS in $(defines) )
|
||||
{
|
||||
CCFLAGS += -Cpp_exceptions off ;
|
||||
}
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"$(cw_bin)\mwcc.exe" -c -cwd include -ansi strict -iso_templates on -msext off -w all,cmdline,iserror,nonotused,nonotinlined,noimplicitconv,nounwanted $(>) -o $(<) $(CCFLAGS)
|
||||
}
|
||||
|
||||
actions LibraryAction
|
||||
{
|
||||
"$(cw_bin)\mwld.exe" -library -o $(<) $(>)
|
||||
}
|
||||
|
||||
actions LinkAction
|
||||
{
|
||||
"$(cw_bin)\mwld.exe" -subsystem console -o $(<) $(>) $(LDFLAGS)
|
||||
}
|
||||
|
||||
actions CoverageAction
|
||||
{
|
||||
}
|
||||
}
|
||||
else if ( $(toolset:I=^bcc) )
|
||||
{
|
||||
CCFLAGS += -D$(defines) ;
|
||||
|
||||
if ( $(configuration) = "debug" )
|
||||
{
|
||||
CCFLAGS += -D_DEBUG ;
|
||||
}
|
||||
else
|
||||
{
|
||||
CCFLAGS += -DNDEBUG -Ox ;
|
||||
}
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\bcc32.exe" $(CCFLAGS) -c -q -Q -fp -w -w! -w-8026 -w-8027 -w-8091 -w-8004 -o $(<) $(>)
|
||||
}
|
||||
|
||||
actions LibraryAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\tlib.exe" /C $(<:\\) -+$(>:\\)
|
||||
}
|
||||
|
||||
actions LinkAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\ilink32.exe" -L"%$(toolset)_PATH%\lib" -Tpe -ap -Gn -x -c "%$(toolset)_PATH%\lib\c0x32.obj" $(>:\\) , $(<:\\) , , $(LDFLAGS:\\) cw32 import32
|
||||
}
|
||||
|
||||
actions CoverageAction
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
exit "Unknown toolset $(toolset)!" ;
|
||||
}
|
||||
|
||||
actions screenoutput RunAction
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <exception>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
|
||||
test_runner* test_runner::_tests = 0;
|
||||
@ -47,7 +48,7 @@ static void replace_memory_management()
|
||||
pugi::set_memory_management_functions(custom_allocate, custom_deallocate);
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1200 && _MSC_VER < 1400 && !defined(__INTEL_COMPILER)
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1200 && _MSC_VER < 1400 && !defined(__INTEL_COMPILER) && !defined(__DMC__)
|
||||
namespace std
|
||||
{
|
||||
_CRTIMP2 _Prhand _Raise_handler;
|
||||
@ -103,6 +104,10 @@ static bool run_test(test_runner* test)
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef __BORLANDC__
|
||||
_control87(MCW_EM | PC_53, MCW_EM | MCW_PC);
|
||||
#endif
|
||||
|
||||
replace_memory_management();
|
||||
|
||||
unsigned int total = 0;
|
||||
|
@ -12,6 +12,10 @@ typedef int intptr_t;
|
||||
#include <float.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#if defined(__MWERKS__) || defined(__BORLANDC__)
|
||||
#include <stdint.h> // intptr_t
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
inline bool test_string_equal(const char* lhs, const char* rhs)
|
||||
@ -70,7 +74,7 @@ inline bool test_xpath_number_nan(const pugi::xml_node& node, const char* query)
|
||||
|
||||
double r = q.evaluate_number(node);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
return _isnan(r) != 0;
|
||||
#else
|
||||
return r != r;
|
||||
@ -156,8 +160,8 @@ struct dummy_fixture {};
|
||||
#define CHECK_JOIN2(text, file, line) CHECK_JOIN(text, file, line)
|
||||
#define CHECK_TEXT(condition, text) if (condition) ; else longjmp(test_runner::_failure, (int)(intptr_t)(CHECK_JOIN2(text, " at "__FILE__ ":", __LINE__)))
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER == 1200
|
||||
# define STR(value) "??" // MSVC 6.0 has troubles stringizing stuff with strings w/escaping inside
|
||||
#if (defined(_MSC_VER) && _MSC_VER == 1200) || defined(__MWERKS__)
|
||||
# define STR(value) "??" // MSVC 6.0 and CodeWarrior have troubles stringizing stuff with strings w/escaping inside
|
||||
#else
|
||||
# define STR(value) #value
|
||||
#endif
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "common.hpp"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
|
@ -10,6 +10,10 @@
|
||||
# define MSVC6_NAN_BUG // IC8 seems to have the same bug as MSVC6 does
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
# define MSVC6_NAN_BUG // BCC seems to have the same bug as MSVC6 does
|
||||
#endif
|
||||
|
||||
TEST_XML(xpath_operators_arithmetic, "<node><foo-bar>10</foo-bar><foo>2</foo><bar>3</bar></node>")
|
||||
{
|
||||
xml_node c;
|
||||
|
Loading…
x
Reference in New Issue
Block a user