-#define TEST_ASSERT(x) {if (!(x)) { \
- errln("Failure in file %s, line %d, test ID = \"%s\"", __FILE__, __LINE__, testId);}}
-
-#define TEST_ASSERT_M(x, m) {if (!(x)) { \
- dataerrln("Failure in file %s, line %d. \"%s\"", __FILE__, __LINE__, m);return;}}
-
-#define TEST_ASSERT_SUCCESS(errcode) {if (U_FAILURE(errcode)) { \
- dataerrln("Failure in file %s, line %d, test ID \"%s\", status = \"%s\"", \
- __FILE__, __LINE__, testId, u_errorName(errcode));}}
+#define TEST_ASSERT(x) UPRV_BLOCK_MACRO_BEGIN { \
+ if (!(x)) { \
+ errln("Failure in file %s, line %d, test ID = \"%s\"", __FILE__, __LINE__, testId); \
+ } \
+} UPRV_BLOCK_MACRO_END
+
+#define TEST_ASSERT_M(x, m) UPRV_BLOCK_MACRO_BEGIN { \
+ if (!(x)) { \
+ dataerrln("Failure in file %s, line %d. \"%s\"", __FILE__, __LINE__, m); \
+ return; \
+ } \
+} UPRV_BLOCK_MACRO_END
+
+#define TEST_ASSERT_SUCCESS(errcode) UPRV_BLOCK_MACRO_BEGIN { \
+ if (U_FAILURE(errcode)) { \
+ dataerrln("Failure in file %s, line %d, test ID \"%s\", status = \"%s\"", \
+ __FILE__, __LINE__, testId, u_errorName(errcode)); \
+ } \
+} UPRV_BLOCK_MACRO_END