xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::oracle Namespace Reference

Classes

struct  Oracle_test
struct  CreateArg
struct  UpdateArg
struct  RemoveArg
class  Oracle
 Oracle class facilitates unit-testing of the Price Oracle feature. More...
class  GetAggregatePrice_test

Typedefs

using AnyValue = std::variant<std::string, double, json::Int, json::UInt>
using OraclesData = std::vector<std::pair<std::optional<Account>, std::optional<AnyValue>>>
using DataSeries

Functions

 BEAST_DEFINE_TESTSUITE (Oracle, app, xrpl)
void toJson (json::Value &jv, AnyValue const &v)
void toJsonHex (json::Value &jv, AnyValue const &v)
std::uint32_t asUInt (AnyValue const &v)
bool validDocumentID (AnyValue const &v)
 BEAST_DEFINE_TESTSUITE (GetAggregatePrice, rpc, xrpl)

Variables

constexpr char const * kNoneTag = "%None%"
constexpr char const * kUnquotedNone = "None"
constexpr char const * kNonePattern = "\"%None%\""
static constexpr std::chrono::seconds kTestStartTime = kEpochOffset + std::chrono::seconds(10'000)

Typedef Documentation

◆ AnyValue

◆ OraclesData

◆ DataSeries

Initial value:
std::
tuple<std::string, std::string, std::optional<std::uint32_t>, std::optional<std::uint8_t>>>

Definition at line 31 of file src/test/jtx/Oracle.h.

Function Documentation

◆ BEAST_DEFINE_TESTSUITE() [1/2]

xrpl::test::jtx::oracle::BEAST_DEFINE_TESTSUITE ( Oracle ,
app ,
xrpl  )

◆ toJson()

void xrpl::test::jtx::oracle::toJson ( json::Value & jv,
AnyValue const & v )

Definition at line 368 of file Oracle.cpp.

◆ toJsonHex()

void xrpl::test::jtx::oracle::toJsonHex ( json::Value & jv,
AnyValue const & v )

Definition at line 374 of file Oracle.cpp.

◆ asUInt()

std::uint32_t xrpl::test::jtx::oracle::asUInt ( AnyValue const & v)

Definition at line 398 of file Oracle.cpp.

◆ validDocumentID()

bool xrpl::test::jtx::oracle::validDocumentID ( AnyValue const & v)

Definition at line 406 of file Oracle.cpp.

◆ BEAST_DEFINE_TESTSUITE() [2/2]

xrpl::test::jtx::oracle::BEAST_DEFINE_TESTSUITE ( GetAggregatePrice ,
rpc ,
xrpl  )

Variable Documentation

◆ kNoneTag

char const* xrpl::test::jtx::oracle::kNoneTag = "%None%"
constexpr

Definition at line 14 of file src/test/jtx/Oracle.h.

◆ kUnquotedNone

char const* xrpl::test::jtx::oracle::kUnquotedNone = "None"
constexpr

Definition at line 15 of file src/test/jtx/Oracle.h.

◆ kNonePattern

char const* xrpl::test::jtx::oracle::kNonePattern = "\"%None%\""
constexpr

Definition at line 16 of file src/test/jtx/Oracle.h.

◆ kTestStartTime

std::chrono::seconds xrpl::test::jtx::oracle::kTestStartTime = kEpochOffset + std::chrono::seconds(10'000)
staticconstexpr

Definition at line 86 of file src/test/jtx/Oracle.h.