5 /* Test string. Must NOT have duplicate characters! */
6 static char S[] = "Helo wrd!\n";
8 static char Found[256];
18 /* Get the length of the string */
21 /* Search for all characters in the string, including the terminator */
22 for (I = 0; I < Len+1; ++I)
24 /* Search for this char */
27 /* Check if we found it */
28 ASSERT_IsFalse(P == 0 || (P - S) != I, "For code 0x%02X, offset %u!\nP = %04X offset = %04X\n" COMMA S[I] COMMA I COMMA P COMMA P-S);
29 /* Mark the char as checked */
33 /* Search for all other characters and make sure they aren't found */
34 for (I = 0; I < 256; ++I)
38 ASSERT_IsFalse(strchr (S, (char)I), "Failed for code 0x%02X\n" COMMA I);