[Impeller] Fix string search in CompilerTest.SkSLTextureLookUpOrderOfOperations (flutter/engine#51109)
This commit is contained in:
@@ -135,11 +135,13 @@ TEST_P(CompilerTest, SkSLTextureLookUpOrderOfOperations) {
|
||||
CanCompileAndReflect("texture_lookup.frag", SourceType::kFragmentShader));
|
||||
|
||||
auto shader = GetShaderFile("texture_lookup.frag", GetParam());
|
||||
auto string_mapping = reinterpret_cast<const char*>(shader->GetMapping());
|
||||
std::string_view shader_mapping(
|
||||
reinterpret_cast<const char*>(shader->GetMapping()), shader->GetSize());
|
||||
|
||||
EXPECT_TRUE(strcmp(string_mapping,
|
||||
"textureA.eval(textureA_size * ( vec2(1.0) + "
|
||||
"flutter_FragCoord.xy));") != -1);
|
||||
constexpr std::string_view expected =
|
||||
"textureA.eval(textureA_size * ( vec2(1.0) + flutter_FragCoord.xy));";
|
||||
|
||||
EXPECT_NE(shader_mapping.find(expected), std::string::npos);
|
||||
}
|
||||
|
||||
TEST_P(CompilerTest, CanCompileStructs) {
|
||||
|
||||
Reference in New Issue
Block a user