diff --git a/src/lib/core/tests/TestTLV.cpp b/src/lib/core/tests/TestTLV.cpp index 58ee2548ce5093..4b391c4983f701 100644 --- a/src/lib/core/tests/TestTLV.cpp +++ b/src/lib/core/tests/TestTLV.cpp @@ -1715,8 +1715,7 @@ TEST_F(TestTLV, CheckOctetStringPrettyPrinter) chip::TLV::Debug::Dump(reader, StringDumpWriter); - EXPECT_EQ(strlen(expectedPrint), strlen(gStringDumpWriterBuf)); - EXPECT_EQ(strcmp(expectedPrint, gStringDumpWriterBuf), 0); + EXPECT_STREQ(expectedPrint, gStringDumpWriterBuf); } /**