[Wheat-cvs] r1/util test.h,1.15,1.16
Status: Pre-Alpha
Brought to you by:
mark_lentczner
From: Mark L. <mar...@us...> - 2005-06-23 06:43:08
|
Update of /cvsroot/wheat/r1/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22462/util Modified Files: test.h Log Message: Changes to appease gcc4.0 Index: test.h =================================================================== RCS file: /cvsroot/wheat/r1/util/test.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test.h 20 Apr 2005 00:28:35 -0000 1.15 +++ test.h 23 Jun 2005 06:42:58 -0000 1.16 @@ -115,7 +115,7 @@ const char* needleExpr, string needle, const char* haystackExpr, string haystack) { - if (pt::pos(needle, haystack) < 0) + if (::pt::pos(needle, haystack) < 0) fail_contains(loc, needle, haystack); else pass(loc); @@ -133,44 +133,44 @@ extern TestGroupList& registry(); #define TEST(group, name) \ - struct Test_##group##_##name : public pt::test { \ - Test_##group##_##name() : pt::test(pt::registry(), #group, #name) { } \ + struct Test_##group##_##name : public ::pt::test { \ + Test_##group##_##name() : ::pt::test(::pt::registry(), #group, #name) { } \ void run(); \ } test_##group##_##name; \ void Test_##group##_##name::run() -#define HERE pt::testlocation(__FILE__, __LINE__, _called_from) -#define WHERE const pt::testlocation& _called_from +#define HERE ::pt::testlocation(__FILE__, __LINE__, _called_from) +#define WHERE const ::pt::testlocation& _called_from #define THERE _called_from #define PASS() \ - pt::test::pass(HERE) + ::pt::test::pass(HERE) #define FAIL(message) \ - pt::test::fail(HERE, message) + ::pt::test::fail(HERE, message) #define SKIP() \ - pt::test::skip(HERE) + ::pt::test::skip(HERE) #define CHECK(cond) \ - pt::test::check(HERE, #cond, cond) + ::pt::test::check(HERE, #cond, cond) #define CHECK_MSG(cond, message) \ - pt::test::check(HERE, message, cond) + ::pt::test::check(HERE, message, cond) #define CHECK_SAME(v, e) \ - pt::test::check_same(HERE, #v, v, #e, e) + ::pt::test::check_same(HERE, #v, v, #e, e) #define CHECK_CONTAINS(needle, haystack) \ - pt::test::check_contains(HERE, #needle, needle, #haystack, haystack) + ::pt::test::check_contains(HERE, #needle, needle, #haystack, haystack) #define CHECK_VALID(ptr) \ CHECK((ptr) != 0) -extern bool pt::runAll( +extern bool runAll( outstm& out, TestGroupList& tests, bool reportPerGroup, bool stopOnFailingGroup); |