| OLD | NEW |
| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 REPORTER_ASSERT(reporter, configs.count() == 1); | 63 REPORTER_ASSERT(reporter, configs.count() == 1); |
| 64 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("8888")); | 64 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("8888")); |
| 65 } | 65 } |
| 66 | 66 |
| 67 DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { | 67 DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { |
| 68 // Parses all default configs and returns correct "tag". | 68 // Parses all default configs and returns correct "tag". |
| 69 | 69 |
| 70 SkCommandLineFlags::StringArray config1 = make_string_array({ | 70 SkCommandLineFlags::StringArray config1 = make_string_array({ |
| 71 "565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16"
, "msaa4", | 71 "565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16"
, "msaa4", |
| 72 "nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvpr
dit4", "pdf", | 72 "nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvpr
dit4", "pdf", |
| 73 "pdf_poppler", "skp", "svg", "xps", "angle", "angle-gl", "commandbuffer"
, "mesa", "hwui", | 73 "skp", "svg", "xps", "angle", "angle-gl", "commandbuffer", "mesa", "hwui
", |
| 74 "gpuf16", "gpusrgb" | 74 "gpuf16", "gpusrgb" |
| 75 }); | 75 }); |
| 76 | 76 |
| 77 SkCommandLineConfigArray configs; | 77 SkCommandLineConfigArray configs; |
| 78 ParseConfigs(config1, &configs); | 78 ParseConfigs(config1, &configs); |
| 79 | 79 |
| 80 REPORTER_ASSERT(reporter, configs.count() == config1.count()); | 80 REPORTER_ASSERT(reporter, configs.count() == config1.count()); |
| 81 for (int i = 0; i < config1.count(); ++i) { | 81 for (int i = 0; i < config1.count(); ++i) { |
| 82 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); | 82 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); |
| 83 REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == 0); | 83 REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == 0); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 REPORTER_ASSERT(reporter, | 327 REPORTER_ASSERT(reporter, |
| 328 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 328 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
| 329 } | 329 } |
| 330 } | 330 } |
| 331 #if SK_SUPPORT_GPU | 331 #if SK_SUPPORT_GPU |
| 332 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 332 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
| 333 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); | 333 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
| 334 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 334 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
| 335 #endif | 335 #endif |
| 336 } | 336 } |
| OLD | NEW |