mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Convert to bool in suite::expect
This commit is contained in:
committed by
Nik Bougalis
parent
0fcd3da046
commit
237b5e704f
@@ -346,11 +346,13 @@ bool
|
|||||||
suite::expect (Condition shouldBeTrue,
|
suite::expect (Condition shouldBeTrue,
|
||||||
String const& reason)
|
String const& reason)
|
||||||
{
|
{
|
||||||
if (shouldBeTrue)
|
bool const b =
|
||||||
|
static_cast<bool>(shouldBeTrue);
|
||||||
|
if (b)
|
||||||
pass();
|
pass();
|
||||||
else
|
else
|
||||||
fail (reason);
|
fail (reason);
|
||||||
return shouldBeTrue;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Condition, class String>
|
template <class Condition, class String>
|
||||||
@@ -359,11 +361,13 @@ bool
|
|||||||
suite::unexpected (Condition shouldBeFalse,
|
suite::unexpected (Condition shouldBeFalse,
|
||||||
String const& reason)
|
String const& reason)
|
||||||
{
|
{
|
||||||
if (! shouldBeFalse)
|
bool const b =
|
||||||
|
static_cast<bool>(shouldBeFalse);
|
||||||
|
if (! b)
|
||||||
pass();
|
pass();
|
||||||
else
|
else
|
||||||
fail (reason);
|
fail (reason);
|
||||||
return ! shouldBeFalse;
|
return ! b;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class>
|
template <class>
|
||||||
|
|||||||
Reference in New Issue
Block a user