20#include <xrpl/beast/unit_test.h>
21#include <xrpl/protocol/Issue.h>
22#include <xrpl/protocol/STAmount.h>
23#include <xrpl/protocol/STNumber.h>
35 STNumber const before{sfNumber, number};
36 BEAST_EXPECT(number == before);
39 BEAST_EXPECT(s.
size() == 12);
42 BEAST_EXPECT(
after.isEquivalent(before));
43 BEAST_EXPECT(number ==
after);
49 static_assert(!std::is_convertible_v<STNumber*, Number*>);
53 BEAST_EXPECT(stnum.getSType() == STI_NUMBER);
54 BEAST_EXPECT(stnum.getText() ==
"0");
55 BEAST_EXPECT(stnum.isDefault() ==
true);
56 BEAST_EXPECT(stnum.value() ==
Number{0});
75 STNumber const factor{sfNumber, 100};
76 auto const iouValue = strikePrice.iou();
79 BEAST_EXPECT(totalAmount ==
Number{10'000});
Floating point representation of amounts with high dynamic range.
static constexpr int maxExponent
static constexpr int minExponent
Issue const & issue() const
std::size_t size() const noexcept
Slice slice() const noexcept
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void testCompile(std::ostream &out)
Issue const & noIssue()
Returns an asset specifier that represents no account and currency.
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
void testCombo(Number number)
void run() override
Runs the suite.