OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkCommandLineFlags.h" | 8 #include "SkCommandLineFlags.h" |
9 #include "SkGraphics.h" | 9 #include "SkGraphics.h" |
10 #include "SkOSFile.h" | 10 #include "SkOSFile.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual bool allowThreaded() const SK_OVERRIDE { | 77 virtual bool allowThreaded() const SK_OVERRIDE { |
78 return fAllowThreaded; | 78 return fAllowThreaded; |
79 } | 79 } |
80 | 80 |
81 virtual bool verbose() const SK_OVERRIDE { | 81 virtual bool verbose() const SK_OVERRIDE { |
82 return fVerbose; | 82 return fVerbose; |
83 } | 83 } |
84 | 84 |
85 protected: | 85 protected: |
86 virtual void onStart(Test* test) { | 86 virtual void onStart(Test* test) { |
87 const int index = sk_atomic_inc(&fNextIndex); | 87 const int index = sk_atomic_inc(&fNextIndex)+1; |
88 sk_atomic_inc(&fPending); | 88 const int pending = sk_atomic_inc(&fPending)+1; |
89 SkDebugf("[%3d/%3d] (%d) %s\n", index+1, fTotal, fPending, test->getName
()); | 89 SkDebugf("[%3d/%3d] (%d) %s\n", index, fTotal, pending, test->getName())
; |
90 } | 90 } |
91 virtual void onReportFailed(const SkString& desc) { | 91 virtual void onReportFailed(const SkString& desc) { |
92 SkDebugf("\tFAILED: %s\n", desc.c_str()); | 92 SkDebugf("\tFAILED: %s\n", desc.c_str()); |
93 } | 93 } |
94 | 94 |
95 virtual void onEnd(Test* test) { | 95 virtual void onEnd(Test* test) { |
96 if (!test->passed()) { | 96 if (!test->passed()) { |
97 SkDebugf("---- %s FAILED\n", test->getName()); | 97 SkDebugf("---- %s FAILED\n", test->getName()); |
98 } | 98 } |
99 | 99 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 GpuTest::DestroyContexts(); | 264 GpuTest::DestroyContexts(); |
265 | 265 |
266 return (failCount == 0) ? 0 : 1; | 266 return (failCount == 0) ? 0 : 1; |
267 } | 267 } |
268 | 268 |
269 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 269 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
270 int main(int argc, char * const argv[]) { | 270 int main(int argc, char * const argv[]) { |
271 return tool_main(argc, (char**) argv); | 271 return tool_main(argc, (char**) argv); |
272 } | 272 } |
273 #endif | 273 #endif |
OLD | NEW |