mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-04-28 04:13:52 +00:00
feat(error): add SErrIsDisplayingError
This commit is contained in:
parent
b292aabac0
commit
5472065b8b
5 changed files with 25 additions and 1 deletions
|
|
@ -11,3 +11,20 @@ TEST_CASE("SErrDisplayError", "[error]") {
|
|||
CHECK_FALSE(SErrDisplayError(errorcode, nullptr, 0, nullptr, recoverable, exitcode));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SErrDisplayErrorFmt", "[error]") {
|
||||
SECTION("does nothing if errors are suppressed") {
|
||||
uint32_t errorcode = GENERATE(0, STORM_ERROR_ASSERTION, ERROR_INVALID_PARAMETER);
|
||||
int32_t recoverable = GENERATE(0, 1);
|
||||
uint32_t exitcode = GENERATE(0, 1);
|
||||
|
||||
SErrSuppressErrors(1);
|
||||
CHECK_FALSE(SErrDisplayErrorFmt(errorcode, nullptr, 0, recoverable, exitcode, ""));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SErrIsDisplayingError", "[error]") {
|
||||
SECTION("returns false by default") {
|
||||
CHECK_FALSE(SErrIsDisplayingError());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue