Invalid Input Test
[This is preliminary documentation and subject to change.]
The test suite reinitializes the IFilter with the same parameters and performs an invalid input test, which steps through the document one chunk at a time making incorrect function calls, such as GetValue() when the current chuck contains text. The test checks all return codes for compliance with the IFilter specification. The invalid input test verifies the following:
-
If the current chunk contains text, GetValue() returns FILTER_E_NO_VALUES. Then, a call to GetText() should succeed.
-
If the current chunk contains a value, GetText() should return FILTER_E_NO_TEXT. Then a call to GetValue() should succeed.
-
If the previous call to GetText() returned FILTER_E_NO_MORE_TEXT, successive calls to GetText() should return FILTER_E_NO_MORE_TEXT.
-
If the previous call to GetValue() returned FILTER_E_NO_MORE_VALUES, successive calls to GetValue() should return FILTER_E_NO_MORE_VALUES.
-
If the previous call to GetChunk() returned FILTER_E_END_OF_CHUNKS, successive calls to GetChunk() should return FILTER_E_END_OF_CHUNKS.
-
In addition, the test compares the current chunk structures to those returned in the validation test to make sure they are identical.