summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/allocator.cpp7
-rw-r--r--tests/autotest-local.pl2
-rw-r--r--tests/autotest-report.pl11
-rw-r--r--tests/main.cpp9
-rw-r--r--tests/test_document.cpp6
5 files changed, 31 insertions, 4 deletions
diff --git a/tests/allocator.cpp b/tests/allocator.cpp
index 7075194..e0efeef 100644
--- a/tests/allocator.cpp
+++ b/tests/allocator.cpp
@@ -9,7 +9,12 @@
# pragma cpp_extensions on // enable some extensions to include windows.h
# endif
-# include <windows.h>
+# ifdef _XBOX_VER
+# define NOD3D
+# include <xtl.h>
+# else
+# include <windows.h>
+# endif
namespace
{
diff --git a/tests/autotest-local.pl b/tests/autotest-local.pl
index 4893e27..86e5114 100644
--- a/tests/autotest-local.pl
+++ b/tests/autotest-local.pl
@@ -26,7 +26,7 @@ sub gcctoolset
}
$fast = (shift eq 'fast');
-@toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, ic9, ic9_x64, ic10, ic10_x64, ic11, ic11_x64, mingw34, mingw44, mingw45, mingw45_0x, mingw46_x64, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64) : ($^O =~ /solaris/) ? (suncc, suncc_x64) : &gcctoolset();
+@toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, ic9, ic9_x64, ic10, ic10_x64, ic11, ic11_x64, mingw34, mingw44, mingw45, mingw45_0x, mingw46_x64, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64, xbox360, ps3_gcc, ps3_snc) : ($^O =~ /solaris/) ? (suncc, suncc_x64) : &gcctoolset();
@configurations = (debug, release);
@defines = (PUGIXML_NO_XPATH, PUGIXML_NO_EXCEPTIONS, PUGIXML_NO_STL, PUGIXML_WCHAR_MODE);
$stddefine = 'PUGIXML_STANDARD';
diff --git a/tests/autotest-report.pl b/tests/autotest-report.pl
index 3a70b15..a01a907 100644
--- a/tests/autotest-report.pl
+++ b/tests/autotest-report.pl
@@ -27,12 +27,16 @@ sub prettytoolset
return "Microsoft Visual C++ $1.0" . prettysuffix($2) if ($toolset =~ /^msvc(\d+)(.*)$/);
return "GNU C++ Compiler $1" . prettysuffix($2) if ($toolset =~ /^gcc([\d.]*)(.*)$/);
+ return "Microsoft Xbox360 Compiler" if ($toolset =~ /^xbox360/);
+ return "Sony PlayStation3 GCC" if ($toolset =~ /^ps3_gcc/);
+ return "Sony PlayStation3 SNC" if ($toolset =~ /^ps3_snc/);
+
$toolset;
}
sub prettyplatform
{
- my $platform = shift;
+ my ($platform, $toolset) = @_;
return "solaris" if ($platform =~ /solaris/);
@@ -44,6 +48,9 @@ sub prettyplatform
return "fbsd64" if ($platform =~ /64-freebsd/);
return "fbsd32" if ($platform =~ /86-freebsd/);
+ return "x360" if ($toolset =~ /^xbox360/);
+ return "ps3" if ($toolset =~ /^ps3/);
+
return "win64" if ($platform =~ /MSWin32-x64/);
return "win32" if ($platform =~ /MSWin32/);
@@ -70,7 +77,7 @@ while (<>)
{
my ($platform, $toolset, $configuration, $defineset, $info) = ($1, $2, $3, $4, $5);
- my $fulltool = &prettyplatform($platform) . ' ' . &prettytoolset($toolset);
+ my $fulltool = &prettyplatform($platform, $toolset) . ' ' . &prettytoolset($toolset);
my $fullconf = "$configuration $defineset";
if ($info =~ /^prepare/)
diff --git a/tests/main.cpp b/tests/main.cpp
index b8d4e53..4330009 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -110,6 +110,15 @@ static bool run_test(test_runner* test)
#endif
}
+#if defined(__CELLOS_LV2__) && defined(PUGIXML_NO_EXCEPTIONS) && !defined(__SNC__)
+#include <stdlib.h>
+
+void std::exception::_Raise() const
+{
+ abort();
+}
+#endif
+
int main()
{
#ifdef __BORLANDC__
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index c40c14a..9a83a6d 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -19,6 +19,10 @@
# include <io.h> // for unlink in C++0x mode
#endif
+#if defined(__CELLOS_LV2__)
+# include <unistd.h> // for unlink
+#endif
+
TEST(document_create_empty)
{
pugi::xml_document doc;
@@ -253,6 +257,8 @@ TEST_XML(document_save_file, "<node/>")
int fd = mkstemp(path);
CHECK(fd != -1);
+#elif defined(__CELLOS_LV2__)
+ const char* path = ""; // no temporary file support
#else
const char* path = tmpnam(0);
#endif