ICU-986 add TESTCASE macro to IntlTest header for use by all subclasses

X-SVN-Rev: 4933
This commit is contained in:
Alan Liu 2001-06-11 17:21:58 +00:00
parent a451009ae6
commit 92e848829c

View File

@ -45,6 +45,28 @@ UnicodeString operator+(const UnicodeString& left, float num);
UnicodeString toString(const Formattable& f); // liu
//-----------------------------------------------------------------------------
// Use the TESTCASE macro in subclasses of IntlTest. Define the
// runIndexedTest method in this fashion:
//
//| void MyTest::runIndexedTest(int32_t index, UBool exec,
//| const char* &name, char* /*par*/) {
//| switch (index) {
//| TESTCASE(0,TestSomething);
//| TESTCASE(1,TestSomethingElse);
//| TESTCASE(2,TestAnotherThing);
//| default: name = ""; break;
//| }
//| }
#define TESTCASE(id,test) \
case id: \
name = #test; \
if (exec) { \
logln(#test "---"); \
logln((UnicodeString)""); \
test(); \
} \
break
class IntlTest {
public: