rippled
Loading...
Searching...
No Matches
TestOutputSuite.h
1#ifndef XRPL_RPC_TESTOUTPUTSUITE_H_INCLUDED
2#define XRPL_RPC_TESTOUTPUTSUITE_H_INCLUDED
3
4#include <test/jtx/TestSuite.h>
5
6#include <xrpl/json/Output.h>
7#include <xrpl/json/Writer.h>
8
9namespace ripple {
10namespace test {
11
13{
14protected:
17
18 void
25
26 // Test the result and report values.
27 void
28 expectResult(std::string const& expected, std::string const& message = "")
29 {
30 writer_.reset();
31
32 expectEquals(output_, expected, message);
33 }
34};
35
36} // namespace test
37} // namespace ripple
38
39#endif
testcase_t testcase
Memberspace for declaring test cases.
Definition suite.h:152
bool expectEquals(S actual, T expected, std::string const &message="")
Definition TestSuite.h:15
void expectResult(std::string const &expected, std::string const &message="")
std::unique_ptr< Json::Writer > writer_
void setup(std::string const &testName)
T clear(T... args)
T is_same_v
Output stringOutput(std::string &s)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
T reset(T... args)