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

Side by Side Diff: dm/DMTestTask.cpp

Issue 741833002: Store DM failures in an array, not a single string. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMTestTask.h" 1 #include "DMTestTask.h"
2 #include "DMUtil.h" 2 #include "DMUtil.h"
3 #include "SkCommandLineFlags.h" 3 #include "SkCommandLineFlags.h"
4 #include "SkCommonFlags.h" 4 #include "SkCommonFlags.h"
5 5
6 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests."); 6 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
7 7
8 namespace DM { 8 namespace DM {
9 9
10 bool TestReporter::allowExtendedTest() const { return FLAGS_pathOpsExtended; } 10 bool TestReporter::allowExtendedTest() const { return FLAGS_pathOpsExtended; }
(...skipping 17 matching lines...) Expand all
28 skiatest::TestRegistry::Factory factory) 28 skiatest::TestRegistry::Factory factory)
29 : GpuTask(reporter, taskRunner) 29 : GpuTask(reporter, taskRunner)
30 , fTest(factory(NULL)) 30 , fTest(factory(NULL))
31 , fName(test_name(fTest->getName())) {} 31 , fName(test_name(fTest->getName())) {}
32 32
33 33
34 void CpuTestTask::draw() { 34 void CpuTestTask::draw() {
35 fTest->setReporter(&fTestReporter); 35 fTest->setReporter(&fTestReporter);
36 fTest->run(); 36 fTest->run();
37 if (!fTest->passed()) { 37 if (!fTest->passed()) {
38 this->fail(fTestReporter.failure()); 38 const SkTArray<SkString>& failures = fTestReporter.failures();
39 for (int i = 0; i < failures.count(); i++) {
40 this->fail(failures[i].c_str());
41 }
39 } 42 }
40 } 43 }
41 44
42 void GpuTestTask::draw(GrContextFactory* grFactory) { 45 void GpuTestTask::draw(GrContextFactory* grFactory) {
43 fTest->setGrContextFactory(grFactory); 46 fTest->setGrContextFactory(grFactory);
44 fTest->setReporter(&fTestReporter); 47 fTest->setReporter(&fTestReporter);
45 fTest->run(); 48 fTest->run();
46 if (!fTest->passed()) { 49 if (!fTest->passed()) {
47 this->fail(fTestReporter.failure()); 50 const SkTArray<SkString>& failures = fTestReporter.failures();
51 for (int i = 0; i < failures.count(); i++) {
52 this->fail(failures[i].c_str());
53 }
48 } 54 }
49 } 55 }
50 56
51 bool GpuTestTask::shouldSkip() const { 57 bool GpuTestTask::shouldSkip() const {
52 return kGPUDisabled; 58 return kGPUDisabled;
53 } 59 }
54 60
55 } // namespace DM 61 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMTestTask.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698