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

Side by Side Diff: tests/TestConfigParsing.cpp

Issue 1857923002: Fix ParseConfigs_OutParam tests (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 | « no previous file | 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 /* 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 "SkCommonFlagsConfig.h" 8 #include "SkCommonFlagsConfig.h"
9 #include "Test.h" 9 #include "Test.h"
10 #include <initializer_list> 10 #include <initializer_list>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 16); 104 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 16);
105 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseNVPR()); 105 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseNVPR());
106 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseDIText()); 106 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseDIText());
107 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getSamples() == 4); 107 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getSamples() == 4);
108 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); 108 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR());
109 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); 109 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText());
110 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); 110 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu());
111 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); 111 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu());
112 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); 112 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu());
113 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); 113 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu());
114 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu()); 114 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu());
115 REPORTER_ASSERT(reporter, !configs[25]->asConfigGpu()); 115 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType()
116 == kRGBA_F16_SkColorType);
117 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getProfileType()
118 == kLinear_SkColorProfileType);
116 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() 119 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType()
117 == kRGBA_F16_SkColorType); 120 == kN32_SkColorType);
118 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getProfileType() 121 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getProfileType()
119 == kLinear_SkColorProfileType);
120 REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getColorType()
121 == kN32_SkColorType);
122 REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getProfileType()
123 == kSRGB_SkColorProfileType); 122 == kSRGB_SkColorProfileType);
124 #if SK_ANGLE 123 #if SK_ANGLE
125 #ifdef SK_BUILD_FOR_WIN 124 #ifdef SK_BUILD_FOR_WIN
125 REPORTER_ASSERT(reporter, configs[20]->asConfigGpu());
126 #else
127 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu());
128 #endif
126 REPORTER_ASSERT(reporter, configs[21]->asConfigGpu()); 129 REPORTER_ASSERT(reporter, configs[21]->asConfigGpu());
127 #else 130 #else
131 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu());
128 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu()); 132 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu());
129 #endif 133 #endif
134 #if SK_COMMAND_BUFFER
130 REPORTER_ASSERT(reporter, configs[22]->asConfigGpu()); 135 REPORTER_ASSERT(reporter, configs[22]->asConfigGpu());
131 #else 136 #else
132 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu());
133 REPORTER_ASSERT(reporter, !configs[22]->asConfigGpu()); 137 REPORTER_ASSERT(reporter, !configs[22]->asConfigGpu());
134 #endif 138 #endif
135 #if SK_COMMAND_BUFFER 139 #if SK_MESA
136 REPORTER_ASSERT(reporter, configs[23]->asConfigGpu()); 140 REPORTER_ASSERT(reporter, configs[23]->asConfigGpu());
137 #else 141 #else
138 REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu()); 142 REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu());
139 #endif 143 #endif
140 #if SK_MESA
141 REPORTER_ASSERT(reporter, configs[24]->asConfigGpu());
142 #else
143 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu());
144 #endif
145 #endif 144 #endif
146 } 145 }
147 146
148 DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { 147 DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
149 SkCommandLineFlags::StringArray config1 = make_string_array({ 148 SkCommandLineFlags::StringArray config1 = make_string_array({
150 "gpu(nvpr=true,dit=false)", 149 "gpu(nvpr=true,dit=false)",
151 "gpu(api=angle)", 150 "gpu(api=angle)",
152 "gpu(api=angle-gl)", 151 "gpu(api=angle-gl)",
153 "gpu(api=mesa,samples=77)", 152 "gpu(api=mesa,samples=77)",
154 "gpu(dit=true,api=commandbuffer)", 153 "gpu(dit=true,api=commandbuffer)",
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 REPORTER_ASSERT(reporter, 326 REPORTER_ASSERT(reporter,
328 configs[i]->getViaParts()[j].equals(expectedConfigs[ i].vias[j])); 327 configs[i]->getViaParts()[j].equals(expectedConfigs[ i].vias[j]));
329 } 328 }
330 } 329 }
331 #if SK_SUPPORT_GPU 330 #if SK_SUPPORT_GPU
332 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); 331 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
333 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); 332 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
334 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); 333 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu());
335 #endif 334 #endif
336 } 335 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698