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) \ | |
mtklein
2014/01/10 14:03:58
Generally, arguments to macros don't need to be ca
mtklein
2014/01/10 14:03:58
If you write this as
#define REPORTF(REPORTER, ..
hal.canary
2014/01/10 14:50:31
Done.
hal.canary
2014/01/10 14:50:31
Done.
| |
111 do { \ | |
112 SkString message; \ | |
113 message.printf PRINTF_ARGS ; \ | |
114 message.appendf(" %s:%d", __FILE__, __LINE__); \ | |
mtklein
2014/01/10 14:03:58
I'd prefer file:line to come first. It's nice to
hal.canary
2014/01/10 14:50:31
Done.
| |
115 (REPORTER)->reportFailed(message); \ | |
mtklein
2014/01/10 14:03:58
We may want to follow up and make reportFailed mor
hal.canary
2014/01/10 14:50:31
Done.
| |
116 } while(0) | |
110 | 117 |
111 #endif | 118 #endif |
OLD | NEW |