[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/check.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/check.h |
Date: |
Mon, 18 Dec 2006 11:19:21 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/12/18 11:19:21
Modified files:
. : ChangeLog
testsuite : check.h
Log message:
* testsuite/check.h: added stubs for xpass/xfail and defined
xcheck/xcheck_equals/xcheck_equals_label (unfortunately
xfail/xpass are not in latest dejagnu release so we'll either
have to force dejagnu upgrade or always use the stubs
instead...
latter being not a bad idea IMHO).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1960&r2=1.1961
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/check.h?cvsroot=gnash&r1=1.5&r2=1.6
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1960
retrieving revision 1.1961
diff -u -b -r1.1960 -r1.1961
--- ChangeLog 18 Dec 2006 10:40:53 -0000 1.1960
+++ ChangeLog 18 Dec 2006 11:19:20 -0000 1.1961
@@ -1,5 +1,10 @@
2006-12-18 Sandro Santilli <address@hidden>
+ * testsuite/check.h: added stubs for xpass/xfail and defined
+ xcheck/xcheck_equals/xcheck_equals_label (unfortunately
+ xfail/xpass are not in latest dejagnu release so we'll either
+ have to force dejagnu upgrade or always use the stubs instead...
+ latter being not a bad idea IMHO).
* server/vm/ASHandlers.cpp (ActionPushData): cleanups, including
verbose actions output and symbolic names for push types.
* server/sprite_instance.cpp: use 1-based frame numbers in
Index: testsuite/check.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/check.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- testsuite/check.h 22 Nov 2006 11:42:21 -0000 1.5
+++ testsuite/check.h 18 Dec 2006 11:19:21 -0000 1.6
@@ -9,18 +9,21 @@
#include <iostream>
#include <string>
+// TODO: ensure dejagnu.h defines xpass/xfail too (seems a new feature :()
#ifdef HAVE_DEJAGNU_H
#include "dejagnu.h"
#define info(x) note x
#else
-#warning "You should install DejaGnu! Using stubs for pass/fail..."
+#warning "You should install DejaGnu! Using stubs for pass/fail/xpass/xfail..."
class TestState
{
public:
void pass(std::string s) { std::cout << "PASSED: " << s << std::endl; };
+ void xpass(std::string s) { std::cout << "XPASSED: " << s << std::endl; };
void fail(std::string s) { std::cout << "FAILED: " << s << std::endl; };
+ void xfail(std::string s) { std::cout << "XFAILED: " << s << std::endl; };
};
#define info(x) { printf("NOTE: "); printf x; putchar('\n'); }
@@ -28,6 +31,7 @@
#endif
TestState _runtest;
+
#define check_equals_label(label, expr, expected) \
{ \
std::stringstream ss; \
@@ -47,8 +51,29 @@
} \
}
+#define xcheck_equals_label(label, expr, expected) \
+ { \
+ std::stringstream ss; \
+ if ( label != "" ) ss << label << ": "; \
+ if ( expr == expected ) \
+ { \
+ ss << #expr << " == " << expected; \
+ ss << " [" << __FILE__ << ":" << __LINE__ << "]"; \
+ _runtest.xpass(ss.str().c_str()); \
+ } \
+ else \
+ { \
+ ss << #expr << " == '" << expr << "' (expected: " \
+ << expected << ")"; \
+ ss << " [" << __FILE__ << ":" << __LINE__ << "]"; \
+ _runtest.xfail(ss.str().c_str()); \
+ } \
+ }
+
#define check_equals(expr, expected) check_equals_label("", expr, expected)
+#define xcheck_equals(expr, expected) xcheck_equals_label("", expr, expected)
+
#define check(expr) \
{ \
std::stringstream ss; \
@@ -61,4 +86,16 @@
} \
}
+#define xcheck(expr) \
+ { \
+ std::stringstream ss; \
+ ss << #expr; \
+ ss << " [" << __FILE__ << ":" << __LINE__ << "]"; \
+ if ( expr ) { \
+ _runtest.xpass(ss.str().c_str()); \
+ } else { \
+ _runtest.xfail(ss.str().c_str()); \
+ } \
+ }
+
#endif // _CHECK_H_
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog testsuite/check.h,
Sandro Santilli <=