| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 public: | 81 public: |
| 82 Test(); | 82 Test(); |
| 83 virtual ~Test(); | 83 virtual ~Test(); |
| 84 | 84 |
| 85 Reporter* getReporter() const { return fReporter; } | 85 Reporter* getReporter() const { return fReporter; } |
| 86 void setReporter(Reporter*); | 86 void setReporter(Reporter*); |
| 87 | 87 |
| 88 const char* getName(); | 88 const char* getName(); |
| 89 bool run(); // returns true on success | 89 bool run(); // returns true on success |
| 90 | 90 |
| 91 static const char* GetTmpDir(); | 91 static const SkString& GetTmpDir(); |
| 92 |
| 93 static const SkString& GetResourcePath(); |
| 92 | 94 |
| 93 protected: | 95 protected: |
| 94 virtual void onGetName(SkString*) = 0; | 96 virtual void onGetName(SkString*) = 0; |
| 95 virtual void onRun(Reporter*) = 0; | 97 virtual void onRun(Reporter*) = 0; |
| 96 | 98 |
| 97 private: | 99 private: |
| 98 Reporter* fReporter; | 100 Reporter* fReporter; |
| 99 SkString fName; | 101 SkString fName; |
| 100 }; | 102 }; |
| 101 | 103 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 123 do { \ | 125 do { \ |
| 124 if (!(cond)) { \ | 126 if (!(cond)) { \ |
| 125 SkString desc; \ | 127 SkString desc; \ |
| 126 desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \ | 128 desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \ |
| 127 r->reportFailed(desc); \ | 129 r->reportFailed(desc); \ |
| 128 } \ | 130 } \ |
| 129 } while(0) | 131 } while(0) |
| 130 | 132 |
| 131 | 133 |
| 132 #endif | 134 #endif |
| OLD | NEW |