Lines Matching refs:StrNCmp
1089 // strncmp
1090 EXPECT_EQ(0, strncmp("a", "b", 0));
1091 EXPECT_EQ(0, strncmp("abcd", "abcd", 10));
1092 strncmp("abcd", "abcef", 3));
1093 EXPECT_GT(0, strncmp("abcde", "abcfa", 4));
1094 EXPECT_GT(0, strncmp("a", "b", 5));
1095 EXPECT_GT(0, strncmp("bc", "bcde", 4));
1096 EXPECT_LT(0, strncmp("xyz", "xyy", 10));
1097 EXPECT_LT(0, strncmp("baa", "aaa", 1));
1098 EXPECT_LT(0, strncmp("zyx", "", 2));
1165 void RunStrNCmpTest(PointerToStrNCmp StrNCmp) {
1171 // Normal StrNCmp calls
1172 Ident(StrNCmp(s1, s2, size + 2));
1175 Ident(StrNCmp(s1 + size - 2, s2 + size - 2, size));
1177 Ident(StrNCmp(s1 - 1, s2 - 1, 0));
1178 Ident(StrNCmp(s1 + size - 1, s2 + size - 1, 1));
1180 EXPECT_DEATH(Ident(StrNCmp)(s1 - 1, s2, 1), LeftOOBErrorMessage(1));
1181 EXPECT_DEATH(Ident(StrNCmp)(s1, s2 - 1, 1), LeftOOBErrorMessage(1));
1182 EXPECT_DEATH(Ident(StrNCmp)(s1 + size, s2, 1), RightOOBErrorMessage(0));
1183 EXPECT_DEATH(Ident(StrNCmp)(s1, s2 + size, 1), RightOOBErrorMessage(0));
1185 EXPECT_DEATH(Ident(StrNCmp)(s1 + 1, s2 + 1, size), RightOOBErrorMessage(0));
1186 EXPECT_DEATH(Ident(StrNCmp)(s1 + size - 1, s2, 2), RightOOBErrorMessage(0));
1192 RunStrNCmpTest(&strncmp);