[Impeller] Fix string comparison in MockGLES.CanInitialize test (flutter/engine#51181)

This commit is contained in:
Jason Simmons
2024-03-04 15:52:55 -08:00
committed by GitHub
parent 879a9147d9
commit 3f0b5277a0

View File

@@ -16,8 +16,9 @@ namespace testing {
TEST(MockGLES, CanInitialize) {
auto mock_gles = MockGLES::Init();
EXPECT_EQ(mock_gles->GetProcTable().GetString(GL_VENDOR),
(unsigned char*)"MockGLES");
std::string_view vendor(reinterpret_cast<const char*>(
mock_gles->GetProcTable().GetString(GL_VENDOR)));
EXPECT_EQ(vendor, "MockGLES");
}
// Tests we can call two functions and capture the calls.