Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: tests/Test.h

Issue 132843002: Add REPORTF test macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tests/ImageDecodingTest.cpp ('K') | « tests/StreamTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.h
diff --git a/tests/Test.h b/tests/Test.h
index 1c89f98e09f437ada747dcbbbecd62cca0a114c2..f68684843e7f19be4718e7aab4e1ebac5fb25ad6 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -107,5 +107,12 @@ namespace skiatest {
} \
} while(0)
+#define REPORTF(REPORTER, PRINTF_ARGS) \
+ do { \
+ SkString message; \
+ message.printf PRINTF_ARGS ; \
+ message.appendf(" %s:%d", __FILE__, __LINE__); \
+ (REPORTER)->reportFailed(message); \
+ } while(0)
#endif
« tests/ImageDecodingTest.cpp ('K') | « tests/StreamTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698