TEST(MyString, CopyConstructor)
{
const MyString s1(kHelloString);
const MyString s2 = s1;
EXPECT_EQ(0, strcmp(s2.c_string(), kHelloString));
}
TEST(MyString, Set)
{
MyString s;
s.Set(kHelloString);
EXPECT_EQ(0, strcmp(s.c_string(), kHelloString));
s.Set(s.c_string());
EXPECT_EQ(0, strcmp(s.c_string(), kHelloString));
s.Set(nullptr);
EXPECT_STREQ(nullptr, s.c_string());
}
}