mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
Add UnitTest::anyTestsFailed()
This commit is contained in:
@@ -127,6 +127,17 @@ const UnitTests::TestResult* UnitTests::getResult (int index) const noexcept
|
|||||||
return results [index];
|
return results [index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool UnitTests::anyTestsFailed () const noexcept
|
||||||
|
{
|
||||||
|
for (int i = 0; i < results.size (); ++i)
|
||||||
|
{
|
||||||
|
if (results [i]->failures > 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void UnitTests::resultsUpdated()
|
void UnitTests::resultsUpdated()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,6 +279,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
const TestResult* getResult (int index) const noexcept;
|
const TestResult* getResult (int index) const noexcept;
|
||||||
|
|
||||||
|
/** Returns `true` if any test failed. */
|
||||||
|
bool anyTestsFailed () const noexcept;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Called when the list of results changes.
|
/** Called when the list of results changes.
|
||||||
You can override this to perform some sort of behaviour when results are added.
|
You can override this to perform some sort of behaviour when results are added.
|
||||||
|
|||||||
Reference in New Issue
Block a user