71 {
72 std::vector<SkQP::SkSLErrorTest> skslErrorTests;
73 auto iterateFn = [&](const char* directory, const char* extension) {
74 std::vector<std::string> paths = assetManager->
iterateDir(directory, extension);
75 for (
const std::string&
path : paths) {
78 if (std::regex_match(
name.c_str(), exclusionEntry.first) &&
79 exclusionEntry.second.eval(enforcedAndroidAPILevel) ==
81 continue;
82 }
83 }
85 if (!shaderText) {
86 continue;
87 }
88 skslErrorTests.push_back({
90 std::string(
static_cast<const char*
>(shaderText->
data()), shaderText->
size())
91 });
92 }
93 };
94
95
96 iterateFn("sksl/errors/", ".rts");
97 iterateFn("sksl/runtime_errors/", ".rts");
98
100 return a.name <
b.name;
101 };
102 std::sort(skslErrorTests.begin(), skslErrorTests.end(), lt);
103 return skslErrorTests;
104}
sk_sp< SkData > GetResourceAsData(const char *resource)
static std::vector< SkPDFIndirectReference > sort(const THashSet< SkPDFIndirectReference > &src)
const void * data() const
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
DEF_SWITCHES_START aot vmservice shared library name
static const std::pair< std::regex, CtsEnforcement > sExclusionRulesForSkSLTests[]