4 #define EstimatedStringSize 384 // test correct page passing (>256)
6 static char EstimatedString[EstimatedStringSize+1]; // +1 room for terminating null
7 static char* EmptyTestChars=""; // empty test case...
8 static char* TestChars="1234567890"; // we like to find numbers
14 for (i=0; i < EstimatedStringSize; ++i)
15 EstimatedString[i] = (i%10)+'0'; // put 0123... into the string to be estimated
17 ASSERT_AreEqual(strlen(EstimatedString), strspn(EstimatedString, TestChars), "%u", "Unxpected position returned for all participant case!");
19 EstimatedString[EstimatedStringSize/2] = 'X';
20 ASSERT_AreEqual(EstimatedStringSize/2, strspn(EstimatedString, TestChars), "%u", "Unxpected position returned for breaking case!");
22 ASSERT_AreEqual(0, strspn(EstimatedString, EmptyTestChars), "%u", "Unxpected position returned for empty test case!");