Added test to check that layout can be created from serialized format (#16575)

This commit is contained in:
Ilya Churaev 2023-03-28 00:43:30 +04:00 committed by GitHub
parent 815d4abc03
commit 167bf7e16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,3 +195,11 @@ TEST(layout, attribute_adapter) {
at.set("NHCW");
EXPECT_EQ(l, l2);
}
TEST(layout, compare_string) {
Layout l = "HWC";
EXPECT_EQ("[H,W,C]", l.to_string());
Layout l2 = l.to_string().c_str();
EXPECT_EQ(l2, l);
EXPECT_EQ("[H,W,C]", l2.to_string());
}