| 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> |
| 11 | 11 |
| 12 using sk_gpu_test::GrContextFactory; |
| 13 |
| 12 namespace { | 14 namespace { |
| 13 // The code | 15 // The code |
| 14 // SkCommandLineFlags::StringArray FLAGS_config1 = make_string_array({"a", "b"
}) | 16 // SkCommandLineFlags::StringArray FLAGS_config1 = make_string_array({"a", "b"
}) |
| 15 // can be used to construct string array that one gets with command line flags. | 17 // can be used to construct string array that one gets with command line flags. |
| 16 // For example, the call above is equivalent of | 18 // For example, the call above is equivalent of |
| 17 // DEFINE_string(config1, "a b", ""); | 19 // DEFINE_string(config1, "a b", ""); |
| 18 // in cases where the default command line flag value ("a b") is used. | 20 // in cases where the default command line flag value ("a b") is used. |
| 19 // make_string_array can be used to construct StringArray strings that have spac
es in | 21 // make_string_array can be used to construct StringArray strings that have spac
es in |
| 20 // them. | 22 // them. |
| 21 SkCommandLineFlags::StringArray make_string_array(std::initializer_list<const ch
ar*> strings) { | 23 SkCommandLineFlags::StringArray make_string_array(std::initializer_list<const ch
ar*> strings) { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 REPORTER_ASSERT(reporter, | 321 REPORTER_ASSERT(reporter, |
| 320 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 322 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
| 321 } | 323 } |
| 322 } | 324 } |
| 323 #if SK_SUPPORT_GPU | 325 #if SK_SUPPORT_GPU |
| 324 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 326 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
| 325 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); | 327 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
| 326 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 328 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
| 327 #endif | 329 #endif |
| 328 } | 330 } |
| OLD | NEW |