mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Convert to bool in suite::expect
This commit is contained in:
committed by
Nik Bougalis
parent
5c5b121b62
commit
e958f72ba9
@@ -346,11 +346,13 @@ bool
|
||||
suite::expect (Condition shouldBeTrue,
|
||||
String const& reason)
|
||||
{
|
||||
if (shouldBeTrue)
|
||||
bool const b =
|
||||
static_cast<bool>(shouldBeTrue);
|
||||
if (b)
|
||||
pass();
|
||||
else
|
||||
fail (reason);
|
||||
return shouldBeTrue;
|
||||
return b;
|
||||
}
|
||||
|
||||
template <class Condition, class String>
|
||||
@@ -359,11 +361,13 @@ bool
|
||||
suite::unexpected (Condition shouldBeFalse,
|
||||
String const& reason)
|
||||
{
|
||||
if (! shouldBeFalse)
|
||||
bool const b =
|
||||
static_cast<bool>(shouldBeFalse);
|
||||
if (! b)
|
||||
pass();
|
||||
else
|
||||
fail (reason);
|
||||
return ! shouldBeFalse;
|
||||
return ! b;
|
||||
}
|
||||
|
||||
template <class>
|
||||
|
||||
Reference in New Issue
Block a user