OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef skiatest_Test_DEFINED | 8 #ifndef skiatest_Test_DEFINED |
9 #define skiatest_Test_DEFINED | 9 #define skiatest_Test_DEFINED |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 #define REPORTER_ASSERT_MESSAGE(r, cond, message) \ | 101 #define REPORTER_ASSERT_MESSAGE(r, cond, message) \ |
102 do { \ | 102 do { \ |
103 if (!(cond)) { \ | 103 if (!(cond)) { \ |
104 SkString desc; \ | 104 SkString desc; \ |
105 desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \ | 105 desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \ |
106 r->reportFailed(desc); \ | 106 r->reportFailed(desc); \ |
107 } \ | 107 } \ |
108 } while(0) | 108 } while(0) |
109 | 109 |
| 110 #define REPORTF(REPORTER, PRINTF_ARGS) \ |
| 111 do { \ |
| 112 SkString message; \ |
| 113 message.printf PRINTF_ARGS ; \ |
| 114 message.appendf(" %s:%d", __FILE__, __LINE__); \ |
| 115 (REPORTER)->reportFailed(message); \ |
| 116 } while(0) |
110 | 117 |
111 #endif | 118 #endif |
OLD | NEW |