summaryrefslogtreecommitdiff
path: root/test/cairo-test.c
diff options
context:
space:
mode:
authorVladimir Vukicevic <vladimir@pobox.com>2006-09-09 23:54:40 -0700
committerU-CYCLONE\Vladimir Vukicevic <vladimir@cyclone.(none)>2006-09-09 23:54:40 -0700
commite1a8a8b65a41691521d89fba7737c093dfdf7926 (patch)
treef56d871f5d05915dd7f024e840af6a30bb1568ec /test/cairo-test.c
parent00d5a2ed48d999a29708d4750c034bbf1b91de12 (diff)
[win32] Set win32 assertion failure handlers for tests to stderr
assert() will default to displaying a dialog box, which makes it hard to run tests automatically. Set the reporting mode to only report to stderr in cairo_test(), and in path-data, since that triggers an early assert.
Diffstat (limited to 'test/cairo-test.c')
-rwxr-xr-x[-rw-r--r--]test/cairo-test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c
index d95d1500..ea8f2acb 100644..100755
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -51,6 +51,7 @@
#include "xmalloc.h"
#ifdef _MSC_VER
+#include <crtdbg.h>
#define vsnprintf _vsnprintf
#define access _access
#define F_OK 0
@@ -572,6 +573,12 @@ cairo_test (cairo_test_t *test)
cairo_test_status_t expectation = CAIRO_TEST_SUCCESS;
const char *xfails;
+#ifdef _MSC_VER
+ /* We don't want an assert dialog, we want stderr */
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+#endif
+
if ((xfails = getenv ("CAIRO_XFAIL_TESTS")) != NULL) {
while (*xfails) {
const char *end = strpbrk (xfails, " \t\r\n;:,");