TEST(Compare, istringEqual) { LOG_FREE(Info, "Compare", "Entering istringEqual") // make sure insensitive string compare works EXPECT_TRUE(istringEqual("lorem ipsum", "lorem ipsum")); EXPECT_TRUE(istringEqual("lorem ipsum", "LOREM IPSUM")); EXPECT_TRUE(istringEqual("lorem ipsum", "lOrEm IpsUm")); EXPECT_TRUE(istringEqual("lorem ipsum", "LoReM iPSuM")); EXPECT_FALSE(istringEqual("lorem ipsum", "dolor sit amet")); LOG_FREE(Info, "Compare", "Leaving istringEqual") }
TEST(Compare, istringEqualMixed) { LOG_FREE(Info, "Compare", "Entering istringEqualMixed") EXPECT_TRUE(istringEqual("Hello World \xd1\x88\xd0\xbd\xd1\x83\xd1\x80", "Hello World \xd1\x88\xd0\xbd\xd1\x83\xd1\x80")); EXPECT_TRUE(istringEqual("Hello World \xd1\x88\xd0\xbd\xd1\x83\xd1\x80", "HELLO WORLD \xd1\x88\xd0\xbd\xd1\x83\xd1\x80")); EXPECT_TRUE(istringEqual("Hello World \xd1\x88\xd0\xbd\xd1\x83\xd1\x80", "HeLLo wOrld \xd1\x88\xd0\xbd\xd1\x83\xd1\x80")); EXPECT_FALSE(istringEqual("Hello World \xd1\x88\xd0\xbd\xd1\x83\xd1\x80", "Hello World \xd1\x88\xd0\xbd\xd1\x83")); EXPECT_FALSE(istringEqual("Hello World \xd1\x88\xd0\xbd\xd1\x83\xd1\x80", "Hello World \xd1\x80\xd1\x88\xd0\xbd\xd1\x83")); LOG_FREE(Info, "Compare", "Leaving istringEqualMixed") }