]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/itrbbi.cpp
ICU-62109.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / itrbbi.cpp
index b99a405beae2d82676b61013c6d1e9e8ece31c49..819f413427f1522faabaffe95ee4264e9d43e404 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 **********************************************************************
-* Copyright (C) 1998-2012, International Business Machines Corporation 
+* Copyright (C) 1998-2016, International Business Machines Corporation 
 * and others.  All Rights Reserved.
 **********************************************************************
 */
 
 #include "unicode/utypes.h"
 
-#if !UCONFIG_NO_BREAK_ITERATION
+#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_REGULAR_EXPRESSIONS
 
+#include "intltest.h"
 #include "itrbbi.h"
 #include "rbbiapts.h"
 #include "rbbitst.h"
-
-#define TESTCLASS(n,classname)        \
-    case n:                           \
-        name = #classname;            \
-        if (exec) {                   \
-            logln(#classname "---");  \
-            logln("");                \
-            classname t;              \
-            callTest(t, par);         \
-        }                             \
-        break
+#include "rbbimonkeytest.h"
 
 
 void IntlTestRBBI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
 {
-    if (exec) logln("TestSuite RuleBasedBreakIterator: ");
-    switch (index) {
-        TESTCLASS(0, RBBIAPITest);
-        TESTCLASS(1, RBBITest);
-        default: name=""; break;
+    if (exec) {
+        logln("TestSuite RuleBasedBreakIterator: ");
     }
+    TESTCASE_AUTO_BEGIN;
+    TESTCASE_AUTO_CLASS(RBBIAPITest);
+    TESTCASE_AUTO_CLASS(RBBITest);
+#if !UCONFIG_NO_FORMATTING
+    TESTCASE_AUTO_CLASS(RBBIMonkeyTest);
+#endif
+    TESTCASE_AUTO_END;
 }
 
-#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_REGULAR_EXPRESSIONS */