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

Side by Side Diff: tests/Test.h

Issue 178273002: Let DM run unit tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add --leaks Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « gyp/tests.gypi ('k') | tests/Test.cpp » ('j') | tests/Test.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Reporter* fReporter; 74 Reporter* fReporter;
75 SkString fName; 75 SkString fName;
76 bool fPassed; 76 bool fPassed;
77 SkMSec fElapsed; 77 SkMSec fElapsed;
78 }; 78 };
79 79
80 class GpuTest : public Test{ 80 class GpuTest : public Test{
81 public: 81 public:
82 GpuTest() : Test() {} 82 GpuTest() : Test() {}
83 static GrContextFactory* GetGrContextFactory(); 83 static GrContextFactory* GetGrContextFactory();
84 static void DestroyContexts();
85 virtual bool isGPUTest() const { return true; } 84 virtual bool isGPUTest() const { return true; }
86 private: 85 private:
87 }; 86 };
88 87
89 typedef SkTRegistry<Test*(*)(void*)> TestRegistry; 88 typedef SkTRegistry<Test*(*)(void*)> TestRegistry;
90 } // namespace skiatest 89 } // namespace skiatest
91 90
92 /* 91 /*
93 Use the following macros to make use of the skiatest classes, e.g. 92 Use the following macros to make use of the skiatest classes, e.g.
94 93
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } \ 162 } \
164 virtual void onRun(Reporter* r) SK_OVERRIDE { \ 163 virtual void onRun(Reporter* r) SK_OVERRIDE { \
165 name(r, GetGrContextFactory()); \ 164 name(r, GetGrContextFactory()); \
166 } \ 165 } \
167 }; \ 166 }; \
168 static TestRegistry gReg_##name##Class(name##Class::Factory); \ 167 static TestRegistry gReg_##name##Class(name##Class::Factory); \
169 } \ 168 } \
170 static void name(skiatest::Reporter* reporter, GrContextFactory* factory) 169 static void name(skiatest::Reporter* reporter, GrContextFactory* factory)
171 170
172 #endif 171 #endif
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | tests/Test.cpp » ('j') | tests/Test.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698