7#include <xrpl/beast/unit_test/amount.h>
8#include <xrpl/beast/unit_test/recorder.h>
10#include <boost/lexical_cast.hpp>
11#include <boost/optional.hpp>
28template <
class =
void>
94 fmtdur(clock_type::duration
const& d);
120template <
class Unused>
129template <
class Unused>
144 [](
run_time const& t1, clock_type::duration
const& t2) { return t1.second > t2; });
145 if (iter !=
top.end())
148 top.resize(
top.size() - 1);
149 top.emplace(iter, r.
name, elapsed);
153 top.emplace_back(r.
name, elapsed);
160template <
class Unused>
165template <
class Unused>
170 os_ <<
"Longest suite times:\n";
180template <
class Unused>
187 return boost::lexical_cast<std::string>(ms.count()) +
"ms";
193template <
class Unused>
200template <
class Unused>
207template <
class Unused>
216template <
class Unused>
223template <
class Unused>
230template <
class Unused>
240template <
class Unused>
Utility for producing nicely composed output of amounts with units.
Associates a unit test type with metadata.
std::string fullName() const
Return the canonical suite name as a string.
A simple test runner that writes everything to a stream in real time.
void onSuiteBegin(SuiteInfo const &info) override
Called when a new suite starts.
void onFail(std::string const &reason) override
Called for each failing condition.
Reporter(Reporter const &)=delete
void onCaseEnd() override
Called when a new case ends.
SuiteResults suiteResults_
static std::string fmtdur(clock_type::duration const &d)
void onSuiteEnd() override
Called when a suite ends.
void onPass() override
Called for each passing condition.
Reporter & operator=(Reporter const &)=delete
void onCaseBegin(std::string const &name) override
Called when a new case starts.
std::chrono::steady_clock clock_type
void onLog(std::string const &s) override
Called when a test logs output.
T duration_cast(T... args)
detail::Reporter<> reporter
T setprecision(T... args)
CaseResults(std::string name="")
clock_type::time_point start
std::vector< run_time > top
void add(SuiteResults const &r)
std::pair< std::string, clock_type::duration > run_time
static constexpr auto kMaxTop
clock_type::time_point start
SuiteResults(std::string name="")
void add(CaseResults const &r)