1 // temporarily disable optimizations altogether until a fine grain control
2 // is implemented on Makefile level only disabling the compiler option -Os
8 #define EstimatedStringSize 384 // test correct page passing (>256)
10 static char EstimatedString[EstimatedStringSize+1]; // +1 room for terminating null
11 static char* EmptyTestChars=""; // strlen equivalent...
12 static char* TestChars="1234567890"; // we like to find numbers
18 for (i=0; i < EstimatedStringSize; ++i)
19 EstimatedString[i] = (i%26)+'A'; // put ABCD... into the string to be estimated
21 ASSERT_AreEqual(strlen(EstimatedString), strcspn(EstimatedString, TestChars), "%u", "Unxpected position returned for non-participant case!");
23 EstimatedString[EstimatedStringSize/2] = TestChars[strlen(TestChars-1)];
24 ASSERT_AreEqual(EstimatedStringSize/2, strcspn(EstimatedString, TestChars), "%u", "Unxpected position returned for participant case!");
26 ASSERT_AreEqual(strlen(EstimatedString), strcspn(EstimatedString, EmptyTestChars), "%u", "Unxpected position returned for empty test case!");