C++gtest EXPECT_STREQ字符串比较宏定义使用能够
TEST(StringTest, Equal)
{
char ch[10] = "ganquanfu";
//EXPECT_EQ("ganquanfu" ,ch);
//EXPECT_STREQ("ganquanfu" ,ch);//字符串比较
EXPECT_FLOAT_EQ(12.111, 12.1111);
EXPECT_EQ(12.111, 12.111);
}
TEST(StringTest, Equal)
{
char ch[10] = "ganquanfu";
//EXPECT_EQ("ganquanfu" ,ch);
//EXPECT_STREQ("ganquanfu" ,ch);//字符串比较
EXPECT_FLOAT_EQ(12.111, 12.1111);
EXPECT_EQ(12.111, 12.111);
}