68 {
69 std::vector<SkQP::SkSLErrorTest> skslErrorTests;
70 auto iterateFn = [&](const char* directory, const char* extension) {
71 std::vector<std::string> paths = assetManager->
iterateDir(directory, extension);
72 for (const std::string& path : paths) {
75 if (std::regex_match(
name.c_str(), exclusionEntry.first) &&
76 exclusionEntry.second.eval(enforcedAndroidAPILevel) ==
78 continue;
79 }
80 }
82 if (!shaderText) {
83 continue;
84 }
85 skslErrorTests.push_back({
87 std::string(static_cast<const char*>(shaderText->data()), shaderText->size())
88 });
89 }
90 };
91
92
93 iterateFn("sksl/errors/", ".rts");
94 iterateFn("sksl/runtime_errors/", ".rts");
95
97 return a.name <
b.name;
98 };
99 std::sort(skslErrorTests.begin(), skslErrorTests.end(), lt);
100 return skslErrorTests;
101}
sk_sp< SkData > GetResourceAsData(const char *resource)
static SkString Basename(const char *fullPath)
virtual std::vector< std::string > iterateDir(const char *directory, const char *extension)=0
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static const std::pair< std::regex, CtsEnforcement > sExclusionRulesForSkSLTests[]