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

Side by Side Diff: tests/TopoSortTest.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « tests/TextureCompressionTest.cpp ('k') | tests/UtilsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "SkRandom.h" 8 #include "SkRandom.h"
9 #include "SkTTopoSort.h" 9 #include "SkTTopoSort.h"
10 #include "Test.h" 10 #include "Test.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } tests[] = { 114 } tests[] = {
115 { create_graph0, true }, 115 { create_graph0, true },
116 { create_graph1, true }, 116 { create_graph1, true },
117 { create_graph2, false }, 117 { create_graph2, false },
118 { create_graph3, true }, 118 { create_graph3, true },
119 { create_graph4, true }, 119 { create_graph4, true },
120 }; 120 };
121 121
122 for (size_t i = 0; i < SK_ARRAY_COUNT(tests); ++i) { 122 for (size_t i = 0; i < SK_ARRAY_COUNT(tests); ++i) {
123 SkTDArray<sk_tool_utils::TopoTestNode*> graph; 123 SkTDArray<sk_tool_utils::TopoTestNode*> graph;
124 124
125 (tests[i].fCreate)(&graph); 125 (tests[i].fCreate)(&graph);
126 126
127 sk_tool_utils::TopoTestNode::Shuffle(&graph, &rand); 127 sk_tool_utils::TopoTestNode::Shuffle(&graph, &rand);
128 128
129 bool actualResult = SkTTopoSort<sk_tool_utils::TopoTestNode>(&graph); 129 bool actualResult = SkTTopoSort<sk_tool_utils::TopoTestNode>(&graph);
130 REPORTER_ASSERT(reporter, actualResult == tests[i].fExpectedResult); 130 REPORTER_ASSERT(reporter, actualResult == tests[i].fExpectedResult);
131 131
132 if (tests[i].fExpectedResult) { 132 if (tests[i].fExpectedResult) {
133 for (int j = 0; j < graph.count(); ++j) { 133 for (int j = 0; j < graph.count(); ++j) {
134 REPORTER_ASSERT(reporter, graph[j]->check()); 134 REPORTER_ASSERT(reporter, graph[j]->check());
135 } 135 }
136 } 136 }
137 137
138 //SkDEBUGCODE(print(graph);) 138 //SkDEBUGCODE(print(graph);)
139 sk_tool_utils::TopoTestNode::DeallocNodes(&graph); 139 sk_tool_utils::TopoTestNode::DeallocNodes(&graph);
140 } 140 }
141 } 141 }
142
OLDNEW
« no previous file with comments | « tests/TextureCompressionTest.cpp ('k') | tests/UtilsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698