Index: tests/Test.h |
diff --git a/tests/Test.h b/tests/Test.h |
index 1c89f98e09f437ada747dcbbbecd62cca0a114c2..ff6b4ac82c2a30c32f8d5cbc7de97cdd49932284 100644 |
--- a/tests/Test.h |
+++ b/tests/Test.h |
@@ -89,23 +89,31 @@ namespace skiatest { |
typedef SkTRegistry<Test*(*)(void*)> TestRegistry; |
} |
-#define REPORTER_ASSERT(r, cond) \ |
- do { \ |
- if (!(cond)) { \ |
- SkString desc; \ |
- desc.printf("%s:%d: %s", __FILE__, __LINE__, #cond); \ |
- r->reportFailed(desc); \ |
- } \ |
+#define REPORTER_ASSERT(r, cond) \ |
+ do { \ |
+ if (!(cond)) { \ |
+ SkString desc; \ |
+ desc.printf("%s:%d\t%s", __FILE__, __LINE__, #cond); \ |
+ r->reportFailed(desc); \ |
+ } \ |
} while(0) |
-#define REPORTER_ASSERT_MESSAGE(r, cond, message) \ |
- do { \ |
- if (!(cond)) { \ |
- SkString desc; \ |
- desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \ |
- r->reportFailed(desc); \ |
- } \ |
+#define REPORTER_ASSERT_MESSAGE(r, cond, message) \ |
+ do { \ |
+ if (!(cond)) { \ |
+ SkString desc; \ |
+ desc.printf("%s:%d\t%s: %s", __FILE__, __LINE__, \ |
+ message, #cond); \ |
+ r->reportFailed(desc); \ |
+ } \ |
} while(0) |
+#define ERRORF(reporter, ...) \ |
+ do { \ |
+ SkString desc; \ |
+ desc.printf("%s:%d\t", __FILE__, __LINE__); \ |
+ desc.appendf(__VA_ARGS__) ; \ |
+ (reporter)->reportFailed(desc); \ |
+ } while(0) |
#endif |