Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib-test: improve expected error handling
If we expect a specific error string, then when we see it, suppress it. We do not suppress errors expected by count, because if we get unexpected errors, then we do not want them suppressed, and we have no way of distinguishing between the expected and unexpected errors. This of course favours the use of the expected string version of the helper, but alas that's not always usable, as you can only expect one at a time. Additionally, if we failed to see an expected message, then when we no longer expect to see it, reset the expected message state to not cascade further test assertion failures. Signed-off-by: Phil Carmody <phil@dovecot.fi> Conflicts: src/lib-test/test-common.c
- Loading branch information
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters