Create use-after-free detector for Metal textures (#7250)

This commit is contained in:
Ben Doherty
2023-10-20 14:15:42 -07:00
committed by GitHub
parent d4b9d1e023
commit 9d181a172a
24 changed files with 366 additions and 44 deletions

View File

@@ -93,3 +93,25 @@ TEST(CString, ReplacePastEndOfString) {
EXPECT_STREQ("foo bar bat", str.c_str());
}
}
TEST(FixedSizeString, EmptyString) {
{
FixedSizeString<32> str;
EXPECT_STREQ("", str.c_str());
}
{
FixedSizeString<32> str("");
EXPECT_STREQ("", str.c_str());
}
}
TEST(FixedSizeString, Constructors) {
{
FixedSizeString<32> str("short string");
EXPECT_STREQ("short string", str.c_str());
}
{
FixedSizeString<16> str("a long string abcdefghijklmnopqrst");
EXPECT_STREQ("a long string a", str.c_str());
}
}