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

Side by Side Diff: dm/DMTestTask.cpp

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 | « dm/DMTestTask.h ('k') | gyp/dm.gyp » ('j') | tests/Test.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "DMTestTask.h"
2 #include "DMUtil.h"
3 #include "SkCommandLineFlags.h"
4
5 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
6 DEFINE_bool2(pathOpsSingleThread, z, false, "Disallow pathOps tests from using t hreads.");
7 DEFINE_bool2(pathOpsVerbose, V, false, "Tell pathOps tests to be verbose.") ;
8
9 namespace DM {
10
11 TestTask::TestTask(Reporter* reporter,
12 TaskRunner* tasks,
13 skiatest::TestRegistry::Factory factory)
14 : Task(reporter, tasks)
15 , fTest(factory(NULL))
16 , fName(UnderJoin("test", fTest->getName())) {}
17
18 void TestTask::draw() {
19 fTest->setReporter(&fTestReporter);
20 fTest->run();
21 if (!fTest->passed()) {
22 this->fail(fTestReporter.failure());
23 }
24 }
25
26 bool TestTask::TestReporter::allowExtendedTest() const { return FLAGS_pathOpsExt ended; }
27 bool TestTask::TestReporter::allowThreaded() const { return !FLAGS_pathOpsSi ngleThread; }
28 bool TestTask::TestReporter::verbose() const { return FLAGS_pathOpsVer bose; }
29
30 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMTestTask.h ('k') | gyp/dm.gyp » ('j') | tests/Test.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698