Lines Matching refs:StrChr
182 // Users may have different definitions of "strchr" and "index", so provide
189 UNUSED static void RunStrChrTest(PointerToStrChr1 StrChr) {
194 EXPECT_EQ(str, StrChr(str, 'z'));
195 EXPECT_EQ(str + 10, StrChr(str, 'q'));
196 EXPECT_EQ(NULL, StrChr(str, 'a'));
197 // StrChr argument points to not allocated memory.
198 EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1));
199 EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0));
202 EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0));
205 UNUSED static void RunStrChrTest(PointerToStrChr2 StrChr) {
210 EXPECT_EQ(str, StrChr(str, 'z'));
211 EXPECT_EQ(str + 10, StrChr(str, 'q'));
212 EXPECT_EQ(NULL, StrChr(str, 'a'));
213 // StrChr argument points to not allocated memory.
214 EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1));
215 EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0));
218 EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0));
223 RunStrChrTest(&strchr);