diff --git a/DelegateSet_8cpp_source.html b/DelegateSet_8cpp_source.html index 2cf7f4e624..dea54073d4 100644 --- a/DelegateSet_8cpp_source.html +++ b/DelegateSet_8cpp_source.html @@ -284,7 +284,7 @@ $(document).ready(function() { init_codefold(0); });
ripple::DelegateSet::deleteDelegate
static TER deleteDelegate(ApplyView &view, std::shared_ptr< SLE > const &sle, AccountID const &account, beast::Journal j)
Definition DelegateSet.cpp:149
ripple::DelegateSet::doApply
TER doApply() override
Definition DelegateSet.cpp:96
ripple::Permission::getInstance
static Permission const & getInstance()
Definition Permissions.cpp:98
-
ripple::Permission::isDelegatable
bool isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) const
Definition Permissions.cpp:135
+
ripple::Permission::isDelegatable
bool isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) const
Definition Permissions.cpp:151
ripple::ReadView::fees
virtual Fees const & fees() const =0
Returns the fees for the base ledger.
ripple::ReadView::exists
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
ripple::ReadView::rules
virtual Rules const & rules() const =0
Returns the tx processing rules.
diff --git a/DelegateUtils_8cpp_source.html b/DelegateUtils_8cpp_source.html index 4f69929ab0..742ef6f072 100644 --- a/DelegateUtils_8cpp_source.html +++ b/DelegateUtils_8cpp_source.html @@ -151,7 +151,7 @@ $(document).ready(function() { init_codefold(0); });
65
66} // namespace ripple
-
ripple::Permission::getGranularTxType
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
Definition Permissions.cpp:125
+
ripple::Permission::getGranularTxType
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
Definition Permissions.cpp:141
ripple::Permission::getInstance
static Permission const & getInstance()
Definition Permissions.cpp:98
ripple::STTx
Definition STTx.h:48
ripple::STTx::getTxnType
TxType getTxnType() const
Definition STTx.h:207
diff --git a/Permissions_8cpp_source.html b/Permissions_8cpp_source.html index 3fce61c047..7d4f89ce16 100644 --- a/Permissions_8cpp_source.html +++ b/Permissions_8cpp_source.html @@ -188,116 +188,136 @@ $(document).ready(function() { init_codefold(0); });
102}
103
-
104std::optional<std::uint32_t>
+
104std::optional<std::string>
-
105Permission::getGranularValue(std::string const& name) const
+
105Permission::getPermissionName(std::uint32_t const value) const
106{
-
107 auto const it = granularPermissionMap_.find(name);
-
108 if (it != granularPermissionMap_.end())
-
109 return static_cast<uint32_t>(it->second);
+
107 auto const permissionValue = static_cast<GranularPermissionType>(value);
+
108 if (auto const granular = getGranularName(permissionValue))
+
109 return *granular;
110
-
111 return std::nullopt;
-
112}
+
111 // not a granular permission, check if it maps to a transaction type
+
112 auto const txType = permissionToTxType(value);
+
113 if (auto const* item = TxFormats::getInstance().findByType(txType);
+
114 item != nullptr)
+
115 return item->getName();
+
116
+
117 return std::nullopt;
+
118}
-
113
-
114std::optional<std::string>
-
-
115Permission::getGranularName(GranularPermissionType const& value) const
-
116{
-
117 auto const it = granularNameMap_.find(value);
-
118 if (it != granularNameMap_.end())
-
119 return it->second;
-
120
-
121 return std::nullopt;
-
122}
+
119
+
120std::optional<std::uint32_t>
+
+ +
122{
+
123 auto const it = granularPermissionMap_.find(name);
+
124 if (it != granularPermissionMap_.end())
+
125 return static_cast<uint32_t>(it->second);
+
126
+
127 return std::nullopt;
+
128}
-
123
-
124std::optional<TxType>
-
- -
126{
-
127 auto const it = granularTxTypeMap_.find(gpType);
-
128 if (it != granularTxTypeMap_.end())
-
129 return it->second;
-
130
-
131 return std::nullopt;
-
132}
+
129
+ +
+ +
132{
+
133 auto const it = granularNameMap_.find(value);
+
134 if (it != granularNameMap_.end())
+
135 return it->second;
+
136
+
137 return std::nullopt;
+
138}
-
133
-
134bool
-
- -
136 std::uint32_t const& permissionValue,
-
137 Rules const& rules) const
-
138{
-
139 auto const granularPermission =
-
140 getGranularName(static_cast<GranularPermissionType>(permissionValue));
-
141 if (granularPermission)
-
142 // granular permissions are always allowed to be delegated
-
143 return true;
-
144
-
145 auto const txType = permissionToTxType(permissionValue);
-
146 auto const it = delegatableTx_.find(txType);
-
147
-
148 if (rules.enabled(fixDelegateV1_1))
-
149 {
-
150 if (it == delegatableTx_.end())
-
151 return false;
-
152
-
153 auto const txFeaturesIt = txFeatureMap_.find(txType);
-
154 XRPL_ASSERT(
-
155 txFeaturesIt != txFeatureMap_.end(),
-
156 "ripple::Permissions::isDelegatable : tx exists in txFeatureMap_");
-
157
-
158 // fixDelegateV1_1: Delegation is only allowed if the required amendment
-
159 // for the transaction is enabled. For transactions that do not require
-
160 // an amendment, delegation is always allowed.
-
161 if (txFeaturesIt->second != uint256{} &&
-
162 !rules.enabled(txFeaturesIt->second))
-
163 return false;
-
164 }
-
165
-
166 if (it != delegatableTx_.end() && it->second == Delegation::notDelegatable)
-
167 return false;
+
139
+ +
+ +
142{
+
143 auto const it = granularTxTypeMap_.find(gpType);
+
144 if (it != granularTxTypeMap_.end())
+
145 return it->second;
+
146
+
147 return std::nullopt;
+
148}
+
+
149
+
150bool
+
+ +
152 std::uint32_t const& permissionValue,
+
153 Rules const& rules) const
+
154{
+
155 auto const granularPermission =
+
156 getGranularName(static_cast<GranularPermissionType>(permissionValue));
+
157 if (granularPermission)
+
158 // granular permissions are always allowed to be delegated
+
159 return true;
+
160
+
161 auto const txType = permissionToTxType(permissionValue);
+
162 auto const it = delegatableTx_.find(txType);
+
163
+
164 if (rules.enabled(fixDelegateV1_1))
+
165 {
+
166 if (it == delegatableTx_.end())
+
167 return false;
168
-
169 return true;
-
170}
+
169 auto const txFeaturesIt = txFeatureMap_.find(txType);
+
170 XRPL_ASSERT(
+
171 txFeaturesIt != txFeatureMap_.end(),
+
172 "ripple::Permissions::isDelegatable : tx exists in txFeatureMap_");
+
173
+
174 // fixDelegateV1_1: Delegation is only allowed if the required amendment
+
175 // for the transaction is enabled. For transactions that do not require
+
176 // an amendment, delegation is always allowed.
+
177 if (txFeaturesIt->second != uint256{} &&
+
178 !rules.enabled(txFeaturesIt->second))
+
179 return false;
+
180 }
+
181
+
182 if (it != delegatableTx_.end() && it->second == Delegation::notDelegatable)
+
183 return false;
+
184
+
185 return true;
+
186}
-
171
-
172uint32_t
-
- -
174{
-
175 return static_cast<uint32_t>(type) + 1;
-
176}
+
187
+
188uint32_t
+
+ +
190{
+
191 return static_cast<uint32_t>(type) + 1;
+
192}
-
177
-
178TxType
-
-
179Permission::permissionToTxType(uint32_t const& value) const
-
180{
-
181 return static_cast<TxType>(value - 1);
-
182}
+
193
+
194TxType
+
+
195Permission::permissionToTxType(uint32_t const& value) const
+
196{
+
197 return static_cast<TxType>(value - 1);
+
198}
-
183
-
184} // namespace ripple
+
199
+
200} // namespace ripple
std::unordered_map< std::uint16_t, Delegation > delegatableTx_
Definition Permissions.h:60
-
TxType permissionToTxType(uint32_t const &value) const
-
std::optional< std::string > getGranularName(GranularPermissionType const &value) const
+
TxType permissionToTxType(uint32_t const &value) const
+
std::optional< std::string > getGranularName(GranularPermissionType const &value) const
std::unordered_map< std::uint16_t, uint256 > txFeatureMap_
Definition Permissions.h:58
+
std::optional< std::string > getPermissionName(std::uint32_t const value) const
std::unordered_map< GranularPermissionType, std::string > granularNameMap_
Definition Permissions.h:65
std::unordered_map< std::string, GranularPermissionType > granularPermissionMap_
Definition Permissions.h:63
-
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
-
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
-
uint32_t txToPermissionType(TxType const &type) const
+
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
+
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
+
uint32_t txToPermissionType(TxType const &type) const
static Permission const & getInstance()
std::unordered_map< GranularPermissionType, TxType > granularTxTypeMap_
Definition Permissions.h:67
-
bool isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) const
+
bool isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) const
Rules controlling protocol behavior.
Definition Rules.h:38
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
Definition Rules.cpp:130
+
static TxFormats const & getInstance()
Definition TxFormats.cpp:71
T end(T... args)
T find(T... args)
diff --git a/Permissions_8h_source.html b/Permissions_8h_source.html index 6fdace5404..be2b8bb3e1 100644 --- a/Permissions_8h_source.html +++ b/Permissions_8h_source.html @@ -153,49 +153,53 @@ $(document).ready(function() { init_codefold(0); });
75 operator=(Permission const&) = delete;
76
- -
78 getGranularValue(std::string const& name) const;
+ +
78 getPermissionName(std::uint32_t const value) const;
79
- -
81 getGranularName(GranularPermissionType const& value) const;
+ +
81 getGranularValue(std::string const& name) const;
82
- -
84 getGranularTxType(GranularPermissionType const& gpType) const;
+ +
84 getGranularName(GranularPermissionType const& value) const;
85
-
86 bool
-
87 isDelegatable(std::uint32_t const& permissionValue, Rules const& rules)
-
88 const;
-
89
-
90 // for tx level permission, permission value is equal to tx type plus one
-
91 uint32_t
-
92 txToPermissionType(TxType const& type) const;
-
93
-
94 // tx type value is permission value minus one
-
95 TxType
-
96 permissionToTxType(uint32_t const& value) const;
-
97};
+ +
87 getGranularTxType(GranularPermissionType const& gpType) const;
+
88
+
89 bool
+
90 isDelegatable(std::uint32_t const& permissionValue, Rules const& rules)
+
91 const;
+
92
+
93 // for tx level permission, permission value is equal to tx type plus one
+
94 uint32_t
+
95 txToPermissionType(TxType const& type) const;
+
96
+
97 // tx type value is permission value minus one
+
98 TxType
+
99 permissionToTxType(uint32_t const& value) const;
+
100};
-
98
-
99} // namespace ripple
-
100
-
101#endif
+
101
+
102} // namespace ripple
+
103
+
104#endif
std::unordered_map< std::uint16_t, Delegation > delegatableTx_
Definition Permissions.h:60
-
TxType permissionToTxType(uint32_t const &value) const
-
std::optional< std::string > getGranularName(GranularPermissionType const &value) const
+
TxType permissionToTxType(uint32_t const &value) const
+
std::optional< std::string > getGranularName(GranularPermissionType const &value) const
Permission(Permission const &)=delete
std::unordered_map< std::uint16_t, uint256 > txFeatureMap_
Definition Permissions.h:58
+
std::optional< std::string > getPermissionName(std::uint32_t const value) const
std::unordered_map< GranularPermissionType, std::string > granularNameMap_
Definition Permissions.h:65
std::unordered_map< std::string, GranularPermissionType > granularPermissionMap_
Definition Permissions.h:63
-
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
-
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
-
uint32_t txToPermissionType(TxType const &type) const
+
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
+
std::optional< TxType > getGranularTxType(GranularPermissionType const &gpType) const
+
uint32_t txToPermissionType(TxType const &type) const
Permission & operator=(Permission const &)=delete
static Permission const & getInstance()
std::unordered_map< GranularPermissionType, TxType > granularTxTypeMap_
Definition Permissions.h:67
-
bool isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) const
+
bool isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) const
Rules controlling protocol behavior.
Definition Rules.h:38
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
diff --git a/STInteger_8cpp_source.html b/STInteger_8cpp_source.html index f8006082fb..c1c0e146a2 100644 --- a/STInteger_8cpp_source.html +++ b/STInteger_8cpp_source.html @@ -150,212 +150,209 @@ $(document).ready(function() { init_codefold(0); });
62 if (transResultInfo(TER::fromInt(value_), token, human))
63 return human;
64
-
65 JLOG(debugLog().error())
-
66 << "Unknown result code in metadata: " << value_;
-
67 }
-
68
-
69 return std::to_string(value_);
-
70}
+
65 // LCOV_EXCL_START
+
66 JLOG(debugLog().error())
+
67 << "Unknown result code in metadata: " << value_;
+
68 // LCOV_EXCL_STOP
+
69 }
+
70
+
71 return std::to_string(value_);
+
72}
-
71
-
72template <>
- -
- -
75{
-
76 if (getFName() == sfTransactionResult)
-
77 {
-
78 std::string token, human;
-
79
-
80 if (transResultInfo(TER::fromInt(value_), token, human))
-
81 return token;
-
82
-
83 JLOG(debugLog().error())
-
84 << "Unknown result code in metadata: " << value_;
-
85 }
-
86
-
87 return value_;
-
88}
+
73
+
74template <>
+ +
+ +
77{
+
78 if (getFName() == sfTransactionResult)
+
79 {
+
80 std::string token, human;
+
81
+
82 if (transResultInfo(TER::fromInt(value_), token, human))
+
83 return token;
+
84
+
85 // LCOV_EXCL_START
+
86 JLOG(debugLog().error())
+
87 << "Unknown result code in metadata: " << value_;
+
88 // LCOV_EXCL_STOP
+
89 }
+
90
+
91 return value_;
+
92}
-
89
-
90//------------------------------------------------------------------------------
-
91
-
92template <>
-
- -
94 : STInteger(name, sit.get16())
-
95{
-
96}
+
93
+
94//------------------------------------------------------------------------------
+
95
+
96template <>
+
+ +
98 : STInteger(name, sit.get16())
+
99{
+
100}
-
97
-
98template <>
- -
100STUInt16::getSType() const
-
101{
-
102 return STI_UINT16;
-
103}
-
104
-
105template <>
- -
107STUInt16::getText() const
-
108{
-
109 if (getFName() == sfLedgerEntryType)
-
110 {
- -
112 safe_cast<LedgerEntryType>(value_));
-
113
-
114 if (item != nullptr)
-
115 return item->getName();
-
116 }
+
101
+
102template <>
+ +
104STUInt16::getSType() const
+
105{
+
106 return STI_UINT16;
+
107}
+
108
+
109template <>
+ +
111STUInt16::getText() const
+
112{
+
113 if (getFName() == sfLedgerEntryType)
+
114 {
+ +
116 safe_cast<LedgerEntryType>(value_));
117
-
118 if (getFName() == sfTransactionType)
-
119 {
-
120 auto item =
-
121 TxFormats::getInstance().findByType(safe_cast<TxType>(value_));
-
122
-
123 if (item != nullptr)
-
124 return item->getName();
-
125 }
+
118 if (item != nullptr)
+
119 return item->getName();
+
120 }
+
121
+
122 if (getFName() == sfTransactionType)
+
123 {
+
124 auto item =
+
125 TxFormats::getInstance().findByType(safe_cast<TxType>(value_));
126
-
127 return std::to_string(value_);
-
128}
-
129
-
130template <>
- -
132STUInt16::getJson(JsonOptions) const
-
133{
-
134 if (getFName() == sfLedgerEntryType)
-
135 {
- -
137 safe_cast<LedgerEntryType>(value_));
-
138
-
139 if (item != nullptr)
-
140 return item->getName();
-
141 }
+
127 if (item != nullptr)
+
128 return item->getName();
+
129 }
+
130
+
131 return std::to_string(value_);
+
132}
+
133
+
134template <>
+ +
136STUInt16::getJson(JsonOptions) const
+
137{
+
138 if (getFName() == sfLedgerEntryType)
+
139 {
+ +
141 safe_cast<LedgerEntryType>(value_));
142
-
143 if (getFName() == sfTransactionType)
-
144 {
-
145 auto item =
-
146 TxFormats::getInstance().findByType(safe_cast<TxType>(value_));
-
147
-
148 if (item != nullptr)
-
149 return item->getName();
-
150 }
+
143 if (item != nullptr)
+
144 return item->getName();
+
145 }
+
146
+
147 if (getFName() == sfTransactionType)
+
148 {
+
149 auto item =
+
150 TxFormats::getInstance().findByType(safe_cast<TxType>(value_));
151
-
152 return value_;
-
153}
-
154
-
155//------------------------------------------------------------------------------
-
156
-
157template <>
-
- -
159 : STInteger(name, sit.get32())
-
160{
-
161}
+
152 if (item != nullptr)
+
153 return item->getName();
+
154 }
+
155
+
156 return value_;
+
157}
+
158
+
159//------------------------------------------------------------------------------
+
160
+
161template <>
+
+ +
163 : STInteger(name, sit.get32())
+
164{
+
165}
-
162
-
163template <>
- -
165STUInt32::getSType() const
-
166{
-
167 return STI_UINT32;
-
168}
-
169
-
170template <>
- -
172STUInt32::getText() const
-
173{
-
174 return std::to_string(value_);
-
175}
-
176
-
177template <>
- -
179STUInt32::getJson(JsonOptions) const
-
180{
-
181 if (getFName() == sfPermissionValue)
-
182 {
-
183 auto const permissionValue =
-
184 static_cast<GranularPermissionType>(value_);
-
185 auto const granular =
-
186 Permission::getInstance().getGranularName(permissionValue);
+
166
+
167template <>
+ +
169STUInt32::getSType() const
+
170{
+
171 return STI_UINT32;
+
172}
+
173
+
174template <>
+ +
176STUInt32::getText() const
+
177{
+
178 if (getFName() == sfPermissionValue)
+
179 {
+
180 auto const permissionName =
+ +
182 if (permissionName)
+
183 return *permissionName;
+
184 }
+
185 return std::to_string(value_);
+
186}
187
-
188 if (granular)
-
189 {
-
190 return *granular;
-
191 }
-
192 else
-
193 {
-
194 auto const txType =
- -
196 auto item = TxFormats::getInstance().findByType(txType);
-
197 if (item != nullptr)
-
198 return item->getName();
-
199 }
-
200 }
-
201
-
202 return value_;
-
203}
+
188template <>
+ +
190STUInt32::getJson(JsonOptions) const
+
191{
+
192 if (getFName() == sfPermissionValue)
+
193 {
+
194 auto const permissionName =
+ +
196 if (permissionName)
+
197 return *permissionName;
+
198 }
+
199
+
200 return value_;
+
201}
+
202
+
203//------------------------------------------------------------------------------
204
-
205//------------------------------------------------------------------------------
-
206
-
207template <>
-
- -
209 : STInteger(name, sit.get64())
-
210{
-
211}
+
205template <>
+
+ +
207 : STInteger(name, sit.get64())
+
208{
+
209}
-
212
-
213template <>
- -
215STUInt64::getSType() const
-
216{
-
217 return STI_UINT64;
-
218}
-
219
-
220template <>
- -
222STUInt64::getText() const
-
223{
-
224 return std::to_string(value_);
-
225}
-
226
-
227template <>
- -
229STUInt64::getJson(JsonOptions) const
-
230{
-
231 auto convertToString = [](uint64_t const value, int const base) {
-
232 XRPL_ASSERT(
-
233 base == 10 || base == 16,
-
234 "ripple::STUInt64::getJson : base 10 or 16");
-
235 std::string str(
-
236 base == 10 ? 20 : 16, 0); // Allocate space depending on base
-
237 auto ret =
-
238 std::to_chars(str.data(), str.data() + str.size(), value, base);
-
239 XRPL_ASSERT(
-
240 ret.ec == std::errc(),
-
241 "ripple::STUInt64::getJson : to_chars succeeded");
-
242 str.resize(std::distance(str.data(), ret.ptr));
-
243 return str;
-
244 };
-
245
-
246 if (auto const& fName = getFName(); fName.shouldMeta(SField::sMD_BaseTen))
-
247 {
-
248 return convertToString(value_, 10); // Convert to base 10
-
249 }
-
250
-
251 return convertToString(value_, 16); // Convert to base 16
-
252}
-
253
-
254} // namespace ripple
+
210
+
211template <>
+ +
213STUInt64::getSType() const
+
214{
+
215 return STI_UINT64;
+
216}
+
217
+
218template <>
+ +
220STUInt64::getText() const
+
221{
+
222 return std::to_string(value_);
+
223}
+
224
+
225template <>
+ +
227STUInt64::getJson(JsonOptions) const
+
228{
+
229 auto convertToString = [](uint64_t const value, int const base) {
+
230 XRPL_ASSERT(
+
231 base == 10 || base == 16,
+
232 "ripple::STUInt64::getJson : base 10 or 16");
+
233 std::string str(
+
234 base == 10 ? 20 : 16, 0); // Allocate space depending on base
+
235 auto ret =
+
236 std::to_chars(str.data(), str.data() + str.size(), value, base);
+
237 XRPL_ASSERT(
+
238 ret.ec == std::errc(),
+
239 "ripple::STUInt64::getJson : to_chars succeeded");
+
240 str.resize(std::distance(str.data(), ret.ptr));
+
241 return str;
+
242 };
+
243
+
244 if (auto const& fName = getFName(); fName.shouldMeta(SField::sMD_BaseTen))
+
245 {
+
246 return convertToString(value_, 10); // Convert to base 10
+
247 }
+
248
+
249 return convertToString(value_, 16); // Convert to base 16
+
250}
+
251
+
252} // namespace ripple
Represents a JSON value.
Definition json_value.h:149
Item const * findByType(KeyType type) const
Retrieve a format based on its type.
static LedgerFormats const & getInstance()
-
TxType permissionToTxType(uint32_t const &value) const
-
std::optional< std::string > getGranularName(GranularPermissionType const &value) const
+
std::optional< std::string > getPermissionName(std::uint32_t const value) const
static Permission const & getInstance()
Identifies fields.
Definition SField.h:144
bool shouldMeta(int c) const
Definition SField.h:276
@@ -364,7 +361,7 @@ $(document).ready(function() { init_codefold(0); });
SField const * fName
Definition STBase.h:136
STInteger(Integer v)
Definition STInteger.h:85
-
Json::Value getJson(JsonOptions) const override
Definition STInteger.cpp:74
+
Json::Value getJson(JsonOptions) const override
Definition STInteger.cpp:76
std::string getText() const override
Definition STInteger.cpp:56
value_type value() const noexcept
Definition STInteger.h:146
@@ -380,7 +377,6 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
SerializedTypeID
Definition SField.h:108
beast::Journal debugLog()
Returns a debug journal.
Definition Log.cpp:468
-
GranularPermissionType
We have both transaction type permissions and granular type permissions.
Definition Permissions.h:39
bool transResultInfo(TER code, std::string &token, std::string &text)
Definition TER.cpp:249
T resize(T... args)
T size(T... args)
diff --git a/STInteger_8h_source.html b/STInteger_8h_source.html index 97214cf962..31252cd9be 100644 --- a/STInteger_8h_source.html +++ b/STInteger_8h_source.html @@ -278,7 +278,7 @@ $(document).ready(function() { init_codefold(0); });
A type which can be exported to a well known binary format.
Definition STBase.h:135
STInteger(Integer v)
Definition STInteger.h:85
-
Json::Value getJson(JsonOptions) const override
Definition STInteger.cpp:74
+
Json::Value getJson(JsonOptions) const override
Definition STInteger.cpp:76
void add(Serializer &s) const override
Definition STInteger.h:111
STInteger & operator=(value_type const &v)
Definition STInteger.h:138
STBase * move(std::size_t n, void *buf) override
Definition STInteger.h:104
diff --git a/STInteger__test_8cpp_source.html b/STInteger__test_8cpp_source.html new file mode 100644 index 0000000000..5cf010f2b5 --- /dev/null +++ b/STInteger__test_8cpp_source.html @@ -0,0 +1,252 @@ + + + + + + + +rippled: STInteger_test.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
rippled +
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
STInteger_test.cpp
+
+
+
1//------------------------------------------------------------------------------
+
2/*
+
3 This file is part of rippled: https://github.com/ripple/rippled
+
4 Copyright (c) 2025 Ripple Labs Inc.
+
5
+
6 Permission to use, copy, modify, and/or distribute this software for any
+
7 purpose with or without fee is hereby granted, provided that the above
+
8 copyright notice and this permission notice appear in all copies.
+
9
+
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
17*/
+
18//==============================================================================
+
19
+
20#include <xrpl/beast/unit_test.h>
+
21#include <xrpl/protocol/LedgerFormats.h>
+
22#include <xrpl/protocol/Permissions.h>
+
23#include <xrpl/protocol/STInteger.h>
+
24#include <xrpl/protocol/TxFormats.h>
+
25
+
26namespace ripple {
+
27
+
+ +
29{
+
30 void
+
+ +
32 {
+
33 STUInt8 u8(255);
+
34 BEAST_EXPECT(u8.value() == 255);
+
35 BEAST_EXPECT(u8.getText() == "255");
+
36 BEAST_EXPECT(u8.getSType() == STI_UINT8);
+
37 BEAST_EXPECT(u8.getJson(JsonOptions::none) == 255);
+
38
+
39 // there is some special handling for sfTransactionResult
+
40 STUInt8 tr(sfTransactionResult, 0);
+
41 BEAST_EXPECT(tr.value() == 0);
+
42 BEAST_EXPECT(
+
43 tr.getText() ==
+
44 "The transaction was applied. Only final in a validated ledger.");
+
45 BEAST_EXPECT(tr.getSType() == STI_UINT8);
+
46 BEAST_EXPECT(tr.getJson(JsonOptions::none) == "tesSUCCESS");
+
47
+
48 // invalid transaction result
+
49 STUInt8 tr2(sfTransactionResult, 255);
+
50 BEAST_EXPECT(tr2.value() == 255);
+
51 BEAST_EXPECT(tr2.getText() == "255");
+
52 BEAST_EXPECT(tr2.getSType() == STI_UINT8);
+
53 BEAST_EXPECT(tr2.getJson(JsonOptions::none) == 255);
+
54 }
+
+
55
+
56 void
+
+ +
58 {
+
59 STUInt16 u16(65535);
+
60 BEAST_EXPECT(u16.value() == 65535);
+
61 BEAST_EXPECT(u16.getText() == "65535");
+
62 BEAST_EXPECT(u16.getSType() == STI_UINT16);
+
63 BEAST_EXPECT(u16.getJson(JsonOptions::none) == 65535);
+
64
+
65 // there is some special handling for sfLedgerEntryType
+
66 STUInt16 let(sfLedgerEntryType, ltACCOUNT_ROOT);
+
67 BEAST_EXPECT(let.value() == ltACCOUNT_ROOT);
+
68 BEAST_EXPECT(let.getText() == "AccountRoot");
+
69 BEAST_EXPECT(let.getSType() == STI_UINT16);
+
70 BEAST_EXPECT(let.getJson(JsonOptions::none) == "AccountRoot");
+
71
+
72 // there is some special handling for sfTransactionType
+
73 STUInt16 tlt(sfTransactionType, ttPAYMENT);
+
74 BEAST_EXPECT(tlt.value() == ttPAYMENT);
+
75 BEAST_EXPECT(tlt.getText() == "Payment");
+
76 BEAST_EXPECT(tlt.getSType() == STI_UINT16);
+
77 BEAST_EXPECT(tlt.getJson(JsonOptions::none) == "Payment");
+
78 }
+
+
79
+
80 void
+
+ +
82 {
+
83 STUInt32 u32(4'294'967'295u);
+
84 BEAST_EXPECT(u32.value() == 4'294'967'295u);
+
85 BEAST_EXPECT(u32.getText() == "4294967295");
+
86 BEAST_EXPECT(u32.getSType() == STI_UINT32);
+
87 BEAST_EXPECT(u32.getJson(JsonOptions::none) == 4'294'967'295u);
+
88
+
89 // there is some special handling for sfPermissionValue
+
90 STUInt32 pv(sfPermissionValue, ttPAYMENT + 1);
+
91 BEAST_EXPECT(pv.value() == ttPAYMENT + 1);
+
92 BEAST_EXPECT(pv.getText() == "Payment");
+
93 BEAST_EXPECT(pv.getSType() == STI_UINT32);
+
94 BEAST_EXPECT(pv.getJson(JsonOptions::none) == "Payment");
+
95 STUInt32 pv2(sfPermissionValue, PaymentMint);
+
96 BEAST_EXPECT(pv2.value() == PaymentMint);
+
97 BEAST_EXPECT(pv2.getText() == "PaymentMint");
+
98 BEAST_EXPECT(pv2.getSType() == STI_UINT32);
+
99 BEAST_EXPECT(pv2.getJson(JsonOptions::none) == "PaymentMint");
+
100 }
+
+
101
+
102 void
+
+ +
104 {
+
105 STUInt64 u64(0xFFFFFFFFFFFFFFFFull);
+
106 BEAST_EXPECT(u64.value() == 0xFFFFFFFFFFFFFFFFull);
+
107 BEAST_EXPECT(u64.getText() == "18446744073709551615");
+
108 BEAST_EXPECT(u64.getSType() == STI_UINT64);
+
109
+
110 // By default, getJson returns hex string
+
111 auto jsonVal = u64.getJson(JsonOptions::none);
+
112 BEAST_EXPECT(jsonVal.isString());
+
113 BEAST_EXPECT(jsonVal.asString() == "ffffffffffffffff");
+
114
+
115 STUInt64 u64_2(sfMaximumAmount, 0xFFFFFFFFFFFFFFFFull);
+
116 BEAST_EXPECT(u64_2.value() == 0xFFFFFFFFFFFFFFFFull);
+
117 BEAST_EXPECT(u64_2.getText() == "18446744073709551615");
+
118 BEAST_EXPECT(u64_2.getSType() == STI_UINT64);
+
119 BEAST_EXPECT(
+
120 u64_2.getJson(JsonOptions::none) == "18446744073709551615");
+
121 }
+
+
122
+
123 void
+
+
124 run() override
+
125 {
+
126 testUInt8();
+
127 testUInt16();
+
128 testUInt32();
+
129 testUInt64();
+
130 }
+
+
131};
+
+
132
+
133BEAST_DEFINE_TESTSUITE(STInteger, protocol, ripple);
+
134
+
135} // namespace ripple
+
A testsuite class.
Definition suite.h:55
+ +
Json::Value getJson(JsonOptions) const override
Definition STInteger.cpp:76
+
std::string getText() const override
Definition STInteger.cpp:56
+
value_type value() const noexcept
Definition STInteger.h:146
+
SerializedTypeID getSType() const override
Definition STInteger.cpp:49
+ +
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
+ + +
void run() override
Runs the suite.
+ + + + +
+ + + + diff --git a/STParsedJSON_8cpp_source.html b/STParsedJSON_8cpp_source.html index b4d0bfd945..e20c03e08b 100644 --- a/STParsedJSON_8cpp_source.html +++ b/STParsedJSON_8cpp_source.html @@ -171,1144 +171,1133 @@ $(document).ready(function() { init_codefold(0); });
84}
85
-
86static std::string
-
-
87make_name(std::string const& object, std::string const& field)
-
88{
-
89 if (field.empty())
-
90 return object;
-
91
-
92 return object + "." + field;
-
93}
+
86// LCOV_EXCL_START
+
87static inline std::string
+
+
88make_name(std::string const& object, std::string const& field)
+
89{
+
90 if (field.empty())
+
91 return object;
+
92
+
93 return object + "." + field;
+
94}
-
94
-
95static Json::Value
-
-
96not_an_object(std::string const& object, std::string const& field)
-
97{
-
98 return RPC::make_error(
- -
100 "Field '" + make_name(object, field) + "' is not a JSON object.");
-
101}
+
95
+
96static inline Json::Value
+
+
97not_an_object(std::string const& object, std::string const& field)
+
98{
+
99 return RPC::make_error(
+ +
101 "Field '" + make_name(object, field) + "' is not a JSON object.");
+
102}
-
102
-
103static Json::Value
-
- -
105{
-
106 return not_an_object(object, "");
-
107}
+
103
+
104static inline Json::Value
+
+ +
106{
+
107 return not_an_object(object, "");
+
108}
-
108
-
109static Json::Value
-
- -
111{
-
112 return RPC::make_error(
-
113 rpcINVALID_PARAMS, "Field '" + object + "' is not a JSON array.");
-
114}
+
109
+
110static inline Json::Value
+
+ +
112{
+
113 return RPC::make_error(
+
114 rpcINVALID_PARAMS, "Field '" + object + "' is not a JSON array.");
+
115}
-
115
-
116static Json::Value
-
-
117unknown_field(std::string const& object, std::string const& field)
-
118{
-
119 return RPC::make_error(
- -
121 "Field '" + make_name(object, field) + "' is unknown.");
-
122}
+
116
+
117static inline Json::Value
+
+
118unknown_field(std::string const& object, std::string const& field)
+
119{
+
120 return RPC::make_error(
+ +
122 "Field '" + make_name(object, field) + "' is unknown.");
+
123}
-
123
-
124static Json::Value
-
-
125out_of_range(std::string const& object, std::string const& field)
-
126{
-
127 return RPC::make_error(
- -
129 "Field '" + make_name(object, field) + "' is out of range.");
-
130}
+
124
+
125static inline Json::Value
+
+
126out_of_range(std::string const& object, std::string const& field)
+
127{
+
128 return RPC::make_error(
+ +
130 "Field '" + make_name(object, field) + "' is out of range.");
+
131}
-
131
-
132static Json::Value
-
-
133bad_type(std::string const& object, std::string const& field)
-
134{
-
135 return RPC::make_error(
- -
137 "Field '" + make_name(object, field) + "' has bad type.");
-
138}
+
132
+
133static inline Json::Value
+
+
134bad_type(std::string const& object, std::string const& field)
+
135{
+
136 return RPC::make_error(
+ +
138 "Field '" + make_name(object, field) + "' has bad type.");
+
139}
-
139
-
140static Json::Value
-
-
141invalid_data(std::string const& object, std::string const& field)
-
142{
-
143 return RPC::make_error(
- -
145 "Field '" + make_name(object, field) + "' has invalid data.");
-
146}
+
140
+
141static inline Json::Value
+
+
142invalid_data(std::string const& object, std::string const& field)
+
143{
+
144 return RPC::make_error(
+ +
146 "Field '" + make_name(object, field) + "' has invalid data.");
+
147}
-
147
-
148static Json::Value
-
- -
150{
-
151 return invalid_data(object, "");
-
152}
+
148
+
149static inline Json::Value
+
+ +
151{
+
152 return invalid_data(object, "");
+
153}
-
153
-
154static Json::Value
-
-
155array_expected(std::string const& object, std::string const& field)
-
156{
-
157 return RPC::make_error(
- -
159 "Field '" + make_name(object, field) + "' must be a JSON array.");
-
160}
+
154
+
155static inline Json::Value
+
+
156array_expected(std::string const& object, std::string const& field)
+
157{
+
158 return RPC::make_error(
+ +
160 "Field '" + make_name(object, field) + "' must be a JSON array.");
+
161}
-
161
-
162static Json::Value
-
-
163string_expected(std::string const& object, std::string const& field)
-
164{
-
165 return RPC::make_error(
- -
167 "Field '" + make_name(object, field) + "' must be a string.");
-
168}
+
162
+
163static inline Json::Value
+
+
164string_expected(std::string const& object, std::string const& field)
+
165{
+
166 return RPC::make_error(
+ +
168 "Field '" + make_name(object, field) + "' must be a string.");
+
169}
-
169
-
170static Json::Value
-
-
171too_deep(std::string const& object)
-
172{
-
173 return RPC::make_error(
- -
175 "Field '" + object + "' exceeds nesting depth limit.");
-
176}
+
170
+
171static inline Json::Value
+
+
172too_deep(std::string const& object)
+
173{
+
174 return RPC::make_error(
+ +
176 "Field '" + object + "' exceeds nesting depth limit.");
+
177}
-
177
-
178static Json::Value
-
-
179singleton_expected(std::string const& object, unsigned int index)
-
180{
-
181 return RPC::make_error(
- -
183 "Field '" + object + "[" + std::to_string(index) +
-
184 "]' must be an object with a single key/object value.");
-
185}
+
178
+
179static inline Json::Value
+
+
180singleton_expected(std::string const& object, unsigned int index)
+
181{
+
182 return RPC::make_error(
+ +
184 "Field '" + object + "[" + std::to_string(index) +
+
185 "]' must be an object with a single key/object value.");
+
186}
-
186
-
187static Json::Value
-
- -
189{
-
190 return RPC::make_error(
- -
192 "Object '" + sField.getName() +
-
193 "' contents did not meet requirements for that type.");
-
194}
+
187
+
188static inline Json::Value
+
+ +
190{
+
191 return RPC::make_error(
+ +
193 "Object '" + sField.getName() +
+
194 "' contents did not meet requirements for that type.");
+
195}
-
195
-
196static Json::Value
-
- -
198{
-
199 return RPC::make_error(
- -
201 "Item '" + item + "' at index " + std::to_string(index) +
-
202 " is not an object. Arrays may only contain objects.");
-
203}
+
196
+
197static inline Json::Value
+
+ +
199{
+
200 return RPC::make_error(
+ +
202 "Item '" + item + "' at index " + std::to_string(index) +
+
203 " is not an object. Arrays may only contain objects.");
+
204}
-
204
-
205template <class STResult, class Integer>
- -
- -
208 SField const& field,
-
209 std::string const& json_name,
-
210 std::string const& fieldName,
-
211 SField const* name,
-
212 Json::Value const& value,
-
213 Json::Value& error)
-
214{
- -
216
-
217 try
-
218 {
-
219 if (value.isString())
-
220 {
-
221 ret = detail::make_stvar<STResult>(
-
222 field,
-
223 safe_cast<typename STResult::value_type>(
-
224 beast::lexicalCastThrow<Integer>(value.asString())));
-
225 }
-
226 else if (value.isInt())
-
227 {
-
228 ret = detail::make_stvar<STResult>(
-
229 field,
-
230 to_unsigned<typename STResult::value_type>(value.asInt()));
-
231 }
-
232 else if (value.isUInt())
-
233 {
-
234 ret = detail::make_stvar<STResult>(
-
235 field,
-
236 to_unsigned<typename STResult::value_type>(value.asUInt()));
-
237 }
-
238 else
-
239 {
-
240 error = bad_type(json_name, fieldName);
-
241 return ret;
-
242 }
-
243 }
-
244 catch (std::exception const&)
-
245 {
-
246 error = invalid_data(json_name, fieldName);
-
247 return ret;
-
248 }
-
249
-
250 return ret;
-
251}
+
205// LCOV_EXCL_STOP
+
206
+
207template <class STResult, class Integer>
+ +
+ +
210 SField const& field,
+
211 std::string const& json_name,
+
212 std::string const& fieldName,
+
213 SField const* name,
+
214 Json::Value const& value,
+
215 Json::Value& error)
+
216{
+ +
218
+
219 try
+
220 {
+
221 if (value.isString())
+
222 {
+
223 ret = detail::make_stvar<STResult>(
+
224 field,
+
225 safe_cast<typename STResult::value_type>(
+
226 beast::lexicalCastThrow<Integer>(value.asString())));
+
227 }
+
228 else if (value.isInt())
+
229 {
+
230 ret = detail::make_stvar<STResult>(
+
231 field,
+
232 to_unsigned<typename STResult::value_type>(value.asInt()));
+
233 }
+
234 else if (value.isUInt())
+
235 {
+
236 ret = detail::make_stvar<STResult>(
+
237 field,
+
238 to_unsigned<typename STResult::value_type>(value.asUInt()));
+
239 }
+
240 else
+
241 {
+
242 error = bad_type(json_name, fieldName);
+
243 return ret;
+
244 }
+
245 }
+
246 catch (std::exception const&)
+
247 {
+
248 error = invalid_data(json_name, fieldName);
+
249 return ret;
+
250 }
+
251
+
252 return ret;
+
253}
-
252
-
253template <class STResult, class Integer = std::uint16_t>
- -
- -
256 SField const& field,
-
257 std::string const& json_name,
-
258 std::string const& fieldName,
-
259 SField const* name,
-
260 Json::Value const& value,
-
261 Json::Value& error)
-
262{
- -
264
-
265 try
-
266 {
-
267 if (value.isString())
-
268 {
-
269 std::string const strValue = value.asString();
-
270
-
271 if (!strValue.empty() &&
-
272 ((strValue[0] < '0') || (strValue[0] > '9')))
-
273 {
-
274 if (field == sfTransactionType)
-
275 {
-
276 ret = detail::make_stvar<STResult>(
-
277 field,
-
278 safe_cast<typename STResult::value_type>(
-
279 static_cast<Integer>(
-
280 TxFormats::getInstance().findTypeByName(
-
281 strValue))));
-
282
-
283 if (*name == sfGeneric)
-
284 name = &sfTransaction;
-
285 }
-
286 else if (field == sfLedgerEntryType)
-
287 {
-
288 ret = detail::make_stvar<STResult>(
-
289 field,
-
290 safe_cast<typename STResult::value_type>(
-
291 static_cast<Integer>(
-
292 LedgerFormats::getInstance().findTypeByName(
-
293 strValue))));
-
294
-
295 if (*name == sfGeneric)
-
296 name = &sfLedgerEntry;
-
297 }
-
298 else
-
299 {
-
300 error = invalid_data(json_name, fieldName);
-
301 return ret;
-
302 }
-
303 }
-
304 }
-
305 if (!ret)
-
306 return parseUnsigned<STResult, Integer>(
-
307 field, json_name, fieldName, name, value, error);
-
308 }
-
309 catch (std::exception const&)
-
310 {
-
311 error = invalid_data(json_name, fieldName);
-
312 return ret;
-
313 }
-
314
-
315 return ret;
-
316}
+
254
+
255template <class STResult, class Integer = std::uint16_t>
+ +
+ +
258 SField const& field,
+
259 std::string const& json_name,
+
260 std::string const& fieldName,
+
261 SField const* name,
+
262 Json::Value const& value,
+
263 Json::Value& error)
+
264{
+ +
266
+
267 try
+
268 {
+
269 if (value.isString())
+
270 {
+
271 std::string const strValue = value.asString();
+
272
+
273 if (!strValue.empty() &&
+
274 ((strValue[0] < '0') || (strValue[0] > '9')))
+
275 {
+
276 if (field == sfTransactionType)
+
277 {
+
278 ret = detail::make_stvar<STResult>(
+
279 field,
+
280 safe_cast<typename STResult::value_type>(
+
281 static_cast<Integer>(
+
282 TxFormats::getInstance().findTypeByName(
+
283 strValue))));
+
284
+
285 if (*name == sfGeneric)
+
286 name = &sfTransaction;
+
287 }
+
288 else if (field == sfLedgerEntryType)
+
289 {
+
290 ret = detail::make_stvar<STResult>(
+
291 field,
+
292 safe_cast<typename STResult::value_type>(
+
293 static_cast<Integer>(
+
294 LedgerFormats::getInstance().findTypeByName(
+
295 strValue))));
+
296
+
297 if (*name == sfGeneric)
+
298 name = &sfLedgerEntry;
+
299 }
+
300 else
+
301 {
+
302 error = invalid_data(json_name, fieldName);
+
303 return ret;
+
304 }
+
305 }
+
306 }
+
307 if (!ret)
+
308 return parseUnsigned<STResult, Integer>(
+
309 field, json_name, fieldName, name, value, error);
+
310 }
+
311 catch (std::exception const&)
+
312 {
+
313 error = invalid_data(json_name, fieldName);
+
314 return ret;
+
315 }
+
316
+
317 return ret;
+
318}
-
317
-
318template <class STResult, class Integer = std::uint32_t>
- -
- -
321 SField const& field,
-
322 std::string const& json_name,
-
323 std::string const& fieldName,
-
324 SField const* name,
-
325 Json::Value const& value,
-
326 Json::Value& error)
-
327{
- -
329
-
330 try
-
331 {
-
332 if (value.isString())
-
333 {
-
334 if (field == sfPermissionValue)
-
335 {
-
336 std::string const strValue = value.asString();
-
337 auto const granularPermission =
- -
339 if (granularPermission)
-
340 {
-
341 ret = detail::make_stvar<STResult>(
-
342 field, *granularPermission);
-
343 }
-
344 else
-
345 {
-
346 auto const& txType =
- -
348 ret = detail::make_stvar<STResult>(
-
349 field,
-
350 Permission::getInstance().txToPermissionType(txType));
-
351 }
-
352 }
-
353 else
-
354 {
-
355 ret = detail::make_stvar<STResult>(
-
356 field,
-
357 safe_cast<typename STResult::value_type>(
-
358 beast::lexicalCastThrow<Integer>(value.asString())));
-
359 }
-
360 }
-
361 if (!ret)
-
362 return parseUnsigned<STResult, Integer>(
-
363 field, json_name, fieldName, name, value, error);
-
364 }
-
365 catch (std::exception const&)
-
366 {
-
367 error = invalid_data(json_name, fieldName);
-
368 return ret;
-
369 }
-
370
-
371 return ret;
-
372}
+
319
+
320template <class STResult, class Integer = std::uint32_t>
+ +
+ +
323 SField const& field,
+
324 std::string const& json_name,
+
325 std::string const& fieldName,
+
326 SField const* name,
+
327 Json::Value const& value,
+
328 Json::Value& error)
+
329{
+ +
331
+
332 try
+
333 {
+
334 if (value.isString())
+
335 {
+
336 if (field == sfPermissionValue)
+
337 {
+
338 std::string const strValue = value.asString();
+
339 auto const granularPermission =
+ +
341 if (granularPermission)
+
342 {
+
343 ret = detail::make_stvar<STResult>(
+
344 field, *granularPermission);
+
345 }
+
346 else
+
347 {
+
348 auto const& txType =
+ +
350 ret = detail::make_stvar<STResult>(
+
351 field,
+
352 Permission::getInstance().txToPermissionType(txType));
+
353 }
+
354 }
+
355 else
+
356 {
+
357 ret = detail::make_stvar<STResult>(
+
358 field,
+
359 safe_cast<typename STResult::value_type>(
+
360 beast::lexicalCastThrow<Integer>(value.asString())));
+
361 }
+
362 }
+
363 if (!ret)
+
364 return parseUnsigned<STResult, Integer>(
+
365 field, json_name, fieldName, name, value, error);
+
366 }
+
367 catch (std::exception const&)
+
368 {
+
369 error = invalid_data(json_name, fieldName);
+
370 return ret;
+
371 }
+
372
+
373 return ret;
+
374}
-
373
-
374// This function is used by parseObject to parse any JSON type that doesn't
-
375// recurse. Everything represented here is a leaf-type.
- -
- -
378 std::string const& json_name,
-
379 std::string const& fieldName,
-
380 SField const* name,
-
381 Json::Value const& value,
-
382 Json::Value& error)
-
383{
- -
385
-
386 auto const& field = SField::getField(fieldName);
+
375
+
376// This function is used by parseObject to parse any JSON type that doesn't
+
377// recurse. Everything represented here is a leaf-type.
+ +
+ +
380 std::string const& json_name,
+
381 std::string const& fieldName,
+
382 SField const* name,
+
383 Json::Value const& value,
+
384 Json::Value& error)
+
385{
+
387
-
388 if (field == sfInvalid)
-
389 {
-
390 error = unknown_field(json_name, fieldName);
-
391 return ret;
-
392 }
-
393
-
394 switch (field.fieldType)
-
395 {
-
396 case STI_UINT8:
-
397 try
-
398 {
-
399 constexpr auto minValue =
- -
401 constexpr auto maxValue =
- -
403 if (value.isString())
-
404 {
-
405 std::string const strValue = value.asString();
-
406
-
407 if (!strValue.empty() &&
-
408 ((strValue[0] < '0') || (strValue[0] > '9')))
-
409 {
-
410 if (field == sfTransactionResult)
-
411 {
-
412 auto ter = transCode(strValue);
-
413
-
414 if (!ter || TERtoInt(*ter) < minValue ||
-
415 TERtoInt(*ter) > maxValue)
-
416 {
-
417 error = out_of_range(json_name, fieldName);
-
418 return ret;
-
419 }
-
420
-
421 ret = detail::make_stvar<STUInt8>(
-
422 field,
-
423 static_cast<std::uint8_t>(TERtoInt(*ter)));
-
424 }
-
425 else
-
426 {
-
427 error = bad_type(json_name, fieldName);
-
428 return ret;
+
388 auto const& field = SField::getField(fieldName);
+
389
+
390 // checked in parseObject
+
391 if (field == sfInvalid)
+
392 {
+
393 // LCOV_EXCL_START
+
394 error = unknown_field(json_name, fieldName);
+
395 return ret;
+
396 // LCOV_EXCL_STOP
+
397 }
+
398
+
399 switch (field.fieldType)
+
400 {
+
401 case STI_UINT8:
+
402 try
+
403 {
+
404 constexpr auto minValue =
+ +
406 constexpr auto maxValue =
+ +
408 if (value.isString())
+
409 {
+
410 std::string const strValue = value.asString();
+
411
+
412 if (!strValue.empty() &&
+
413 ((strValue[0] < '0') || (strValue[0] > '9')))
+
414 {
+
415 if (field == sfTransactionResult)
+
416 {
+
417 auto ter = transCode(strValue);
+
418
+
419 if (!ter || TERtoInt(*ter) < minValue ||
+
420 TERtoInt(*ter) > maxValue)
+
421 {
+
422 error = out_of_range(json_name, fieldName);
+
423 return ret;
+
424 }
+
425
+
426 ret = detail::make_stvar<STUInt8>(
+
427 field,
+
428 static_cast<std::uint8_t>(TERtoInt(*ter)));
429 }
-
430 }
-
431 else
-
432 {
-
433 ret = detail::make_stvar<STUInt8>(
-
434 field,
-
435 beast::lexicalCastThrow<std::uint8_t>(strValue));
-
436 }
-
437 }
-
438 else if (value.isInt())
-
439 {
-
440 if (value.asInt() < minValue || value.asInt() > maxValue)
-
441 {
-
442 error = out_of_range(json_name, fieldName);
-
443 return ret;
-
444 }
-
445
-
446 ret = detail::make_stvar<STUInt8>(
-
447 field, static_cast<std::uint8_t>(value.asInt()));
-
448 }
-
449 else if (value.isUInt())
-
450 {
-
451 if (value.asUInt() > maxValue)
-
452 {
-
453 error = out_of_range(json_name, fieldName);
-
454 return ret;
-
455 }
-
456
-
457 ret = detail::make_stvar<STUInt8>(
-
458 field, static_cast<std::uint8_t>(value.asUInt()));
-
459 }
-
460 else
-
461 {
-
462 error = bad_type(json_name, fieldName);
-
463 return ret;
+
430 else
+
431 {
+
432 error = bad_type(json_name, fieldName);
+
433 return ret;
+
434 }
+
435 }
+
436 else
+
437 {
+
438 ret = detail::make_stvar<STUInt8>(
+
439 field,
+
440 beast::lexicalCastThrow<std::uint8_t>(strValue));
+
441 }
+
442 }
+
443 else if (value.isInt())
+
444 {
+
445 if (value.asInt() < minValue || value.asInt() > maxValue)
+
446 {
+
447 error = out_of_range(json_name, fieldName);
+
448 return ret;
+
449 }
+
450
+
451 ret = detail::make_stvar<STUInt8>(
+
452 field, static_cast<std::uint8_t>(value.asInt()));
+
453 }
+
454 else if (value.isUInt())
+
455 {
+
456 if (value.asUInt() > maxValue)
+
457 {
+
458 error = out_of_range(json_name, fieldName);
+
459 return ret;
+
460 }
+
461
+
462 ret = detail::make_stvar<STUInt8>(
+
463 field, static_cast<std::uint8_t>(value.asUInt()));
464 }
-
465 }
-
466 catch (std::exception const&)
-
467 {
-
468 error = invalid_data(json_name, fieldName);
-
469 return ret;
+
465 else
+
466 {
+
467 error = bad_type(json_name, fieldName);
+
468 return ret;
+
469 }
470 }
-
471 break;
-
472
-
473 case STI_UINT16:
-
474 ret = parseUint16<STUInt16>(
-
475 field, json_name, fieldName, name, value, error);
-
476 if (!ret)
-
477 return ret;
-
478
-
479 break;
-
480
-
481 case STI_UINT32:
-
482 ret = parseUint32<STUInt32>(
-
483 field, json_name, fieldName, name, value, error);
-
484 if (!ret)
-
485 return ret;
-
486
-
487 break;
-
488
-
489 case STI_UINT64:
-
490 try
-
491 {
-
492 if (value.isString())
-
493 {
-
494 auto const str = value.asString();
-
495
-
496 std::uint64_t val;
-
497
-
498 bool const useBase10 =
-
499 field.shouldMeta(SField::sMD_BaseTen);
+
471 catch (std::exception const&)
+
472 {
+
473 error = invalid_data(json_name, fieldName);
+
474 return ret;
+
475 }
+
476 break;
+
477
+
478 case STI_UINT16:
+
479 ret = parseUint16<STUInt16>(
+
480 field, json_name, fieldName, name, value, error);
+
481 if (!ret)
+
482 return ret;
+
483
+
484 break;
+
485
+
486 case STI_UINT32:
+
487 ret = parseUint32<STUInt32>(
+
488 field, json_name, fieldName, name, value, error);
+
489 if (!ret)
+
490 return ret;
+
491
+
492 break;
+
493
+
494 case STI_UINT64:
+
495 try
+
496 {
+
497 if (value.isString())
+
498 {
+
499 auto const str = value.asString();
500
-
501 // if the field is amount, serialize as base 10
-
502 auto [p, ec] = std::from_chars(
-
503 str.data(),
-
504 str.data() + str.size(),
-
505 val,
-
506 useBase10 ? 10 : 16);
-
507
-
508 if (ec != std::errc() || (p != str.data() + str.size()))
-
509 Throw<std::invalid_argument>("invalid data");
-
510
-
511 ret = detail::make_stvar<STUInt64>(field, val);
-
512 }
-
513 else if (value.isInt())
-
514 {
-
515 ret = detail::make_stvar<STUInt64>(
-
516 field, to_unsigned<std::uint64_t>(value.asInt()));
+
501 std::uint64_t val;
+
502
+
503 bool const useBase10 =
+
504 field.shouldMeta(SField::sMD_BaseTen);
+
505
+
506 // if the field is amount, serialize as base 10
+
507 auto [p, ec] = std::from_chars(
+
508 str.data(),
+
509 str.data() + str.size(),
+
510 val,
+
511 useBase10 ? 10 : 16);
+
512
+
513 if (ec != std::errc() || (p != str.data() + str.size()))
+
514 Throw<std::invalid_argument>("invalid data");
+
515
+
516 ret = detail::make_stvar<STUInt64>(field, val);
517 }
-
518 else if (value.isUInt())
+
518 else if (value.isInt())
519 {
520 ret = detail::make_stvar<STUInt64>(
-
521 field, safe_cast<std::uint64_t>(value.asUInt()));
+
521 field, to_unsigned<std::uint64_t>(value.asInt()));
522 }
-
523 else
+
523 else if (value.isUInt())
524 {
-
525 error = bad_type(json_name, fieldName);
-
526 return ret;
+
525 ret = detail::make_stvar<STUInt64>(
+
526 field, safe_cast<std::uint64_t>(value.asUInt()));
527 }
-
528 }
-
529 catch (std::exception const&)
-
530 {
-
531 error = invalid_data(json_name, fieldName);
-
532 return ret;
+
528 else
+
529 {
+
530 error = bad_type(json_name, fieldName);
+
531 return ret;
+
532 }
533 }
-
534
-
535 break;
-
536
-
537 case STI_UINT128: {
-
538 if (!value.isString())
-
539 {
-
540 error = bad_type(json_name, fieldName);
-
541 return ret;
-
542 }
-
543
-
544 uint128 num;
-
545
-
546 if (auto const s = value.asString(); !num.parseHex(s))
-
547 {
-
548 if (!s.empty())
-
549 {
-
550 error = invalid_data(json_name, fieldName);
-
551 return ret;
-
552 }
-
553
-
554 num.zero();
-
555 }
-
556
-
557 ret = detail::make_stvar<STUInt128>(field, num);
-
558 break;
-
559 }
-
560
-
561 case STI_UINT192: {
-
562 if (!value.isString())
-
563 {
-
564 error = bad_type(json_name, fieldName);
-
565 return ret;
-
566 }
-
567
-
568 uint192 num;
-
569
-
570 if (auto const s = value.asString(); !num.parseHex(s))
-
571 {
-
572 if (!s.empty())
-
573 {
-
574 error = invalid_data(json_name, fieldName);
-
575 return ret;
-
576 }
-
577
-
578 num.zero();
-
579 }
-
580
-
581 ret = detail::make_stvar<STUInt192>(field, num);
-
582 break;
-
583 }
-
584
-
585 case STI_UINT160: {
-
586 if (!value.isString())
-
587 {
-
588 error = bad_type(json_name, fieldName);
-
589 return ret;
-
590 }
-
591
-
592 uint160 num;
-
593
-
594 if (auto const s = value.asString(); !num.parseHex(s))
-
595 {
-
596 if (!s.empty())
-
597 {
-
598 error = invalid_data(json_name, fieldName);
-
599 return ret;
-
600 }
-
601
-
602 num.zero();
-
603 }
-
604
-
605 ret = detail::make_stvar<STUInt160>(field, num);
-
606 break;
-
607 }
-
608
-
609 case STI_UINT256: {
-
610 if (!value.isString())
-
611 {
-
612 error = bad_type(json_name, fieldName);
-
613 return ret;
-
614 }
-
615
-
616 uint256 num;
-
617
-
618 if (auto const s = value.asString(); !num.parseHex(s))
-
619 {
-
620 if (!s.empty())
-
621 {
-
622 error = invalid_data(json_name, fieldName);
-
623 return ret;
-
624 }
-
625
-
626 num.zero();
-
627 }
-
628
-
629 ret = detail::make_stvar<STUInt256>(field, num);
-
630 break;
-
631 }
-
632
-
633 case STI_VL:
-
634 if (!value.isString())
-
635 {
-
636 error = bad_type(json_name, fieldName);
-
637 return ret;
-
638 }
-
639
-
640 try
-
641 {
-
642 if (auto vBlob = strUnHex(value.asString()))
-
643 {
-
644 ret = detail::make_stvar<STBlob>(
-
645 field, vBlob->data(), vBlob->size());
-
646 }
-
647 else
+
534 catch (std::exception const&)
+
535 {
+
536 error = invalid_data(json_name, fieldName);
+
537 return ret;
+
538 }
+
539
+
540 break;
+
541
+
542 case STI_UINT128: {
+
543 if (!value.isString())
+
544 {
+
545 error = bad_type(json_name, fieldName);
+
546 return ret;
+
547 }
+
548
+
549 uint128 num;
+
550
+
551 if (auto const s = value.asString(); !num.parseHex(s))
+
552 {
+
553 if (!s.empty())
+
554 {
+
555 error = invalid_data(json_name, fieldName);
+
556 return ret;
+
557 }
+
558
+
559 num.zero();
+
560 }
+
561
+
562 ret = detail::make_stvar<STUInt128>(field, num);
+
563 break;
+
564 }
+
565
+
566 case STI_UINT192: {
+
567 if (!value.isString())
+
568 {
+
569 error = bad_type(json_name, fieldName);
+
570 return ret;
+
571 }
+
572
+
573 uint192 num;
+
574
+
575 if (auto const s = value.asString(); !num.parseHex(s))
+
576 {
+
577 if (!s.empty())
+
578 {
+
579 error = invalid_data(json_name, fieldName);
+
580 return ret;
+
581 }
+
582
+
583 num.zero();
+
584 }
+
585
+
586 ret = detail::make_stvar<STUInt192>(field, num);
+
587 break;
+
588 }
+
589
+
590 case STI_UINT160: {
+
591 if (!value.isString())
+
592 {
+
593 error = bad_type(json_name, fieldName);
+
594 return ret;
+
595 }
+
596
+
597 uint160 num;
+
598
+
599 if (auto const s = value.asString(); !num.parseHex(s))
+
600 {
+
601 if (!s.empty())
+
602 {
+
603 error = invalid_data(json_name, fieldName);
+
604 return ret;
+
605 }
+
606
+
607 num.zero();
+
608 }
+
609
+
610 ret = detail::make_stvar<STUInt160>(field, num);
+
611 break;
+
612 }
+
613
+
614 case STI_UINT256: {
+
615 if (!value.isString())
+
616 {
+
617 error = bad_type(json_name, fieldName);
+
618 return ret;
+
619 }
+
620
+
621 uint256 num;
+
622
+
623 if (auto const s = value.asString(); !num.parseHex(s))
+
624 {
+
625 if (!s.empty())
+
626 {
+
627 error = invalid_data(json_name, fieldName);
+
628 return ret;
+
629 }
+
630
+
631 num.zero();
+
632 }
+
633
+
634 ret = detail::make_stvar<STUInt256>(field, num);
+
635 break;
+
636 }
+
637
+
638 case STI_VL:
+
639 if (!value.isString())
+
640 {
+
641 error = bad_type(json_name, fieldName);
+
642 return ret;
+
643 }
+
644
+
645 try
+
646 {
+
647 if (auto vBlob = strUnHex(value.asString()))
648 {
-
649 Throw<std::invalid_argument>("invalid data");
-
650 }
-
651 }
-
652 catch (std::exception const&)
-
653 {
-
654 error = invalid_data(json_name, fieldName);
-
655 return ret;
+
649 ret = detail::make_stvar<STBlob>(
+
650 field, vBlob->data(), vBlob->size());
+
651 }
+
652 else
+
653 {
+
654 Throw<std::invalid_argument>("invalid data");
+
655 }
656 }
-
657
-
658 break;
-
659
-
660 case STI_AMOUNT:
-
661 try
-
662 {
-
663 ret =
-
664 detail::make_stvar<STAmount>(amountFromJson(field, value));
-
665 }
-
666 catch (std::exception const&)
+
657 catch (std::exception const&)
+
658 {
+
659 error = invalid_data(json_name, fieldName);
+
660 return ret;
+
661 }
+
662
+
663 break;
+
664
+
665 case STI_AMOUNT:
+
666 try
667 {
-
668 error = invalid_data(json_name, fieldName);
-
669 return ret;
+
668 ret =
+
669 detail::make_stvar<STAmount>(amountFromJson(field, value));
670 }
-
671
-
672 break;
-
673
-
674 case STI_NUMBER:
-
675 try
-
676 {
-
677 ret =
-
678 detail::make_stvar<STNumber>(numberFromJson(field, value));
-
679 }
-
680 catch (std::exception const&)
+
671 catch (std::exception const&)
+
672 {
+
673 error = invalid_data(json_name, fieldName);
+
674 return ret;
+
675 }
+
676
+
677 break;
+
678
+
679 case STI_NUMBER:
+
680 try
681 {
-
682 error = invalid_data(json_name, fieldName);
-
683 return ret;
+
682 ret =
+
683 detail::make_stvar<STNumber>(numberFromJson(field, value));
684 }
-
685
-
686 break;
-
687
-
688 case STI_VECTOR256:
-
689 if (!value.isArrayOrNull())
-
690 {
-
691 error = array_expected(json_name, fieldName);
-
692 return ret;
-
693 }
-
694
-
695 try
-
696 {
-
697 STVector256 tail(field);
-
698 for (Json::UInt i = 0; value.isValidIndex(i); ++i)
-
699 {
-
700 uint256 s;
-
701 if (!s.parseHex(value[i].asString()))
-
702 Throw<std::invalid_argument>("invalid data");
-
703 tail.push_back(s);
-
704 }
-
705 ret = detail::make_stvar<STVector256>(std::move(tail));
-
706 }
-
707 catch (std::exception const&)
-
708 {
-
709 error = invalid_data(json_name, fieldName);
-
710 return ret;
+
685 catch (std::exception const&)
+
686 {
+
687 error = invalid_data(json_name, fieldName);
+
688 return ret;
+
689 }
+
690
+
691 break;
+
692
+
693 case STI_VECTOR256:
+
694 if (!value.isArrayOrNull())
+
695 {
+
696 error = array_expected(json_name, fieldName);
+
697 return ret;
+
698 }
+
699
+
700 try
+
701 {
+
702 STVector256 tail(field);
+
703 for (Json::UInt i = 0; value.isValidIndex(i); ++i)
+
704 {
+
705 uint256 s;
+
706 if (!s.parseHex(value[i].asString()))
+
707 Throw<std::invalid_argument>("invalid data");
+
708 tail.push_back(s);
+
709 }
+
710 ret = detail::make_stvar<STVector256>(std::move(tail));
711 }
-
712
-
713 break;
-
714
-
715 case STI_PATHSET:
-
716 if (!value.isArrayOrNull())
-
717 {
-
718 error = array_expected(json_name, fieldName);
-
719 return ret;
-
720 }
-
721
-
722 try
-
723 {
-
724 STPathSet tail(field);
-
725
-
726 for (Json::UInt i = 0; value.isValidIndex(i); ++i)
-
727 {
-
728 STPath p;
-
729
-
730 if (!value[i].isArrayOrNull())
-
731 {
- -
733 ss << fieldName << "[" << i << "]";
-
734 error = array_expected(json_name, ss.str());
-
735 return ret;
-
736 }
-
737
-
738 for (Json::UInt j = 0; value[i].isValidIndex(j); ++j)
-
739 {
- -
741 ss << fieldName << "[" << i << "][" << j << "]";
-
742 std::string const element_name(
-
743 json_name + "." + ss.str());
-
744
-
745 // each element in this path has some combination of
-
746 // account, currency, or issuer
-
747
-
748 Json::Value pathEl = value[i][j];
+
712 catch (std::exception const&)
+
713 {
+
714 error = invalid_data(json_name, fieldName);
+
715 return ret;
+
716 }
+
717
+
718 break;
+
719
+
720 case STI_PATHSET:
+
721 if (!value.isArrayOrNull())
+
722 {
+
723 error = array_expected(json_name, fieldName);
+
724 return ret;
+
725 }
+
726
+
727 try
+
728 {
+
729 STPathSet tail(field);
+
730
+
731 for (Json::UInt i = 0; value.isValidIndex(i); ++i)
+
732 {
+
733 STPath p;
+
734
+
735 if (!value[i].isArrayOrNull())
+
736 {
+ +
738 ss << fieldName << "[" << i << "]";
+
739 error = array_expected(json_name, ss.str());
+
740 return ret;
+
741 }
+
742
+
743 for (Json::UInt j = 0; value[i].isValidIndex(j); ++j)
+
744 {
+ +
746 ss << fieldName << "[" << i << "][" << j << "]";
+
747 std::string const element_name(
+
748 json_name + "." + ss.str());
749
-
750 if (!pathEl.isObject())
-
751 {
-
752 error = not_an_object(element_name);
-
753 return ret;
-
754 }
-
755
-
756 Json::Value const& account = pathEl["account"];
-
757 Json::Value const& currency = pathEl["currency"];
-
758 Json::Value const& issuer = pathEl["issuer"];
-
759 bool hasCurrency = false;
-
760 AccountID uAccount, uIssuer;
-
761 Currency uCurrency;
-
762
-
763 if (account)
-
764 {
-
765 // human account id
-
766 if (!account.isString())
-
767 {
-
768 error =
-
769 string_expected(element_name, "account");
-
770 return ret;
-
771 }
-
772
-
773 // If we have what looks like a 160-bit hex value,
-
774 // we set it, otherwise, we assume it's an AccountID
-
775 if (!uAccount.parseHex(account.asString()))
-
776 {
-
777 auto const a =
-
778 parseBase58<AccountID>(account.asString());
-
779 if (!a)
-
780 {
-
781 error =
-
782 invalid_data(element_name, "account");
-
783 return ret;
-
784 }
-
785 uAccount = *a;
-
786 }
-
787 }
-
788
-
789 if (currency)
-
790 {
-
791 // human currency
-
792 if (!currency.isString())
-
793 {
-
794 error =
-
795 string_expected(element_name, "currency");
-
796 return ret;
+
750 // each element in this path has some combination of
+
751 // account, currency, or issuer
+
752
+
753 Json::Value pathEl = value[i][j];
+
754
+
755 if (!pathEl.isObject())
+
756 {
+
757 error = not_an_object(element_name);
+
758 return ret;
+
759 }
+
760
+
761 Json::Value const& account = pathEl["account"];
+
762 Json::Value const& currency = pathEl["currency"];
+
763 Json::Value const& issuer = pathEl["issuer"];
+
764 bool hasCurrency = false;
+
765 AccountID uAccount, uIssuer;
+
766 Currency uCurrency;
+
767
+
768 if (!account && !currency && !issuer)
+
769 {
+
770 error = invalid_data(element_name);
+
771 return ret;
+
772 }
+
773
+
774 if (account)
+
775 {
+
776 // human account id
+
777 if (!account.isString())
+
778 {
+
779 error =
+
780 string_expected(element_name, "account");
+
781 return ret;
+
782 }
+
783
+
784 // If we have what looks like a 160-bit hex value,
+
785 // we set it, otherwise, we assume it's an AccountID
+
786 if (!uAccount.parseHex(account.asString()))
+
787 {
+
788 auto const a =
+
789 parseBase58<AccountID>(account.asString());
+
790 if (!a)
+
791 {
+
792 error =
+
793 invalid_data(element_name, "account");
+
794 return ret;
+
795 }
+
796 uAccount = *a;
797 }
-
798
-
799 hasCurrency = true;
-
800
-
801 if (!uCurrency.parseHex(currency.asString()))
-
802 {
-
803 if (!to_currency(
-
804 uCurrency, currency.asString()))
-
805 {
-
806 error =
-
807 invalid_data(element_name, "currency");
-
808 return ret;
-
809 }
-
810 }
-
811 }
-
812
-
813 if (issuer)
-
814 {
-
815 // human account id
-
816 if (!issuer.isString())
-
817 {
-
818 error = string_expected(element_name, "issuer");
-
819 return ret;
-
820 }
-
821
-
822 if (!uIssuer.parseHex(issuer.asString()))
-
823 {
-
824 auto const a =
-
825 parseBase58<AccountID>(issuer.asString());
-
826 if (!a)
-
827 {
-
828 error =
-
829 invalid_data(element_name, "issuer");
-
830 return ret;
-
831 }
-
832 uIssuer = *a;
-
833 }
-
834 }
-
835
-
836 p.emplace_back(
-
837 uAccount, uCurrency, uIssuer, hasCurrency);
-
838 }
-
839
-
840 tail.push_back(p);
-
841 }
-
842 ret = detail::make_stvar<STPathSet>(std::move(tail));
-
843 }
-
844 catch (std::exception const&)
-
845 {
-
846 error = invalid_data(json_name, fieldName);
-
847 return ret;
-
848 }
-
849
-
850 break;
-
851
-
852 case STI_ACCOUNT: {
-
853 if (!value.isString())
-
854 {
-
855 error = bad_type(json_name, fieldName);
-
856 return ret;
-
857 }
-
858
-
859 std::string const strValue = value.asString();
+
798 }
+
799
+
800 if (currency)
+
801 {
+
802 // human currency
+
803 if (!currency.isString())
+
804 {
+
805 error =
+
806 string_expected(element_name, "currency");
+
807 return ret;
+
808 }
+
809
+
810 hasCurrency = true;
+
811
+
812 if (!uCurrency.parseHex(currency.asString()))
+
813 {
+
814 if (!to_currency(
+
815 uCurrency, currency.asString()))
+
816 {
+
817 error =
+
818 invalid_data(element_name, "currency");
+
819 return ret;
+
820 }
+
821 }
+
822 }
+
823
+
824 if (issuer)
+
825 {
+
826 // human account id
+
827 if (!issuer.isString())
+
828 {
+
829 error = string_expected(element_name, "issuer");
+
830 return ret;
+
831 }
+
832
+
833 if (!uIssuer.parseHex(issuer.asString()))
+
834 {
+
835 auto const a =
+
836 parseBase58<AccountID>(issuer.asString());
+
837 if (!a)
+
838 {
+
839 error =
+
840 invalid_data(element_name, "issuer");
+
841 return ret;
+
842 }
+
843 uIssuer = *a;
+
844 }
+
845 }
+
846
+
847 p.emplace_back(
+
848 uAccount, uCurrency, uIssuer, hasCurrency);
+
849 }
+
850
+
851 tail.push_back(p);
+
852 }
+
853 ret = detail::make_stvar<STPathSet>(std::move(tail));
+
854 }
+
855 catch (std::exception const&)
+
856 {
+
857 error = invalid_data(json_name, fieldName);
+
858 return ret;
+
859 }
860
-
861 try
-
862 {
-
863 if (AccountID account; account.parseHex(strValue))
-
864 return detail::make_stvar<STAccount>(field, account);
-
865
-
866 if (auto result = parseBase58<AccountID>(strValue))
-
867 return detail::make_stvar<STAccount>(field, *result);
-
868
-
869 error = invalid_data(json_name, fieldName);
-
870 return ret;
-
871 }
-
872 catch (std::exception const&)
+
861 break;
+
862
+
863 case STI_ACCOUNT: {
+
864 if (!value.isString())
+
865 {
+
866 error = bad_type(json_name, fieldName);
+
867 return ret;
+
868 }
+
869
+
870 std::string const strValue = value.asString();
+
871
+
872 try
873 {
-
874 error = invalid_data(json_name, fieldName);
-
875 return ret;
-
876 }
-
877 }
-
878 break;
+
874 if (AccountID account; account.parseHex(strValue))
+
875 return detail::make_stvar<STAccount>(field, account);
+
876
+
877 if (auto result = parseBase58<AccountID>(strValue))
+
878 return detail::make_stvar<STAccount>(field, *result);
879
-
880 case STI_ISSUE:
-
881 try
-
882 {
-
883 ret = detail::make_stvar<STIssue>(issueFromJson(field, value));
-
884 }
-
885 catch (std::exception const&)
-
886 {
-
887 error = invalid_data(json_name, fieldName);
-
888 return ret;
-
889 }
-
890 break;
-
891
-
892 case STI_XCHAIN_BRIDGE:
-
893 try
-
894 {
-
895 ret = detail::make_stvar<STXChainBridge>(
-
896 STXChainBridge(field, value));
-
897 }
-
898 catch (std::exception const&)
-
899 {
-
900 error = invalid_data(json_name, fieldName);
-
901 return ret;
-
902 }
-
903 break;
-
904
-
905 case STI_CURRENCY:
-
906 try
-
907 {
-
908 ret = detail::make_stvar<STCurrency>(
-
909 currencyFromJson(field, value));
-
910 }
-
911 catch (std::exception const&)
-
912 {
-
913 error = invalid_data(json_name, fieldName);
-
914 return ret;
-
915 }
-
916 break;
-
917
-
918 default:
-
919 error = bad_type(json_name, fieldName);
-
920 return ret;
-
921 }
-
922
-
923 return ret;
-
924}
+
880 error = invalid_data(json_name, fieldName);
+
881 return ret;
+
882 }
+
883 catch (std::exception const&)
+
884 {
+
885 error = invalid_data(json_name, fieldName);
+
886 return ret;
+
887 }
+
888 }
+
889 break;
+
890
+
891 case STI_ISSUE:
+
892 try
+
893 {
+
894 ret = detail::make_stvar<STIssue>(issueFromJson(field, value));
+
895 }
+
896 catch (std::exception const&)
+
897 {
+
898 error = invalid_data(json_name, fieldName);
+
899 return ret;
+
900 }
+
901 break;
+
902
+
903 case STI_XCHAIN_BRIDGE:
+
904 try
+
905 {
+
906 ret = detail::make_stvar<STXChainBridge>(
+
907 STXChainBridge(field, value));
+
908 }
+
909 catch (std::exception const&)
+
910 {
+
911 error = invalid_data(json_name, fieldName);
+
912 return ret;
+
913 }
+
914 break;
+
915
+
916 case STI_CURRENCY:
+
917 try
+
918 {
+
919 ret = detail::make_stvar<STCurrency>(
+
920 currencyFromJson(field, value));
+
921 }
+
922 catch (std::exception const&)
+
923 {
+
924 error = invalid_data(json_name, fieldName);
+
925 return ret;
+
926 }
+
927 break;
+
928
+
929 default:
+
930 error = bad_type(json_name, fieldName);
+
931 return ret;
+
932 }
+
933
+
934 return ret;
+
935}
-
925
-
926static int const maxDepth = 64;
-
927
-
928// Forward declaration since parseObject() and parseArray() call each other.
- - -
931 std::string const& json_name,
-
932 Json::Value const& json,
-
933 SField const& inName,
-
934 int depth,
-
935 Json::Value& error);
936
- -
- -
939 std::string const& json_name,
-
940 Json::Value const& json,
-
941 SField const& inName,
-
942 int depth,
-
943 Json::Value& error)
-
944{
-
945 if (!json.isObjectOrNull())
-
946 {
-
947 error = not_an_object(json_name);
-
948 return std::nullopt;
-
949 }
-
950
-
951 if (depth > maxDepth)
-
952 {
-
953 error = too_deep(json_name);
-
954 return std::nullopt;
-
955 }
-
956
-
957 try
-
958 {
-
959 STObject data(inName);
-
960
-
961 for (auto const& fieldName : json.getMemberNames())
-
962 {
-
963 Json::Value const& value = json[fieldName];
-
964
-
965 auto const& field = SField::getField(fieldName);
-
966
-
967 if (field == sfInvalid)
-
968 {
-
969 error = unknown_field(json_name, fieldName);
-
970 return std::nullopt;
-
971 }
-
972
-
973 switch (field.fieldType)
-
974 {
-
975 // Object-style containers (which recurse).
-
976 case STI_OBJECT:
-
977 case STI_TRANSACTION:
-
978 case STI_LEDGERENTRY:
-
979 case STI_VALIDATION:
-
980 if (!value.isObject())
-
981 {
-
982 error = not_an_object(json_name, fieldName);
-
983 return std::nullopt;
-
984 }
-
985
-
986 try
-
987 {
-
988 auto ret = parseObject(
-
989 json_name + "." + fieldName,
-
990 value,
-
991 field,
-
992 depth + 1,
-
993 error);
-
994 if (!ret)
-
995 return std::nullopt;
-
996 data.emplace_back(std::move(*ret));
-
997 }
-
998 catch (std::exception const&)
-
999 {
-
1000 error = invalid_data(json_name, fieldName);
-
1001 return std::nullopt;
-
1002 }
-
1003
-
1004 break;
-
1005
-
1006 // Array-style containers (which recurse).
-
1007 case STI_ARRAY:
-
1008 try
-
1009 {
-
1010 auto array = parseArray(
-
1011 json_name + "." + fieldName,
-
1012 value,
-
1013 field,
-
1014 depth + 1,
-
1015 error);
-
1016 if (!array.has_value())
-
1017 return std::nullopt;
-
1018 data.emplace_back(std::move(*array));
-
1019 }
-
1020 catch (std::exception const&)
-
1021 {
-
1022 error = invalid_data(json_name, fieldName);
-
1023 return std::nullopt;
-
1024 }
-
1025
-
1026 break;
-
1027
-
1028 // Everything else (types that don't recurse).
-
1029 default: {
-
1030 auto leaf =
-
1031 parseLeaf(json_name, fieldName, &inName, value, error);
-
1032
-
1033 if (!leaf)
+
937static int const maxDepth = 64;
+
938
+
939// Forward declaration since parseObject() and parseArray() call each other.
+ + +
942 std::string const& json_name,
+
943 Json::Value const& json,
+
944 SField const& inName,
+
945 int depth,
+
946 Json::Value& error);
+
947
+ +
+ +
950 std::string const& json_name,
+
951 Json::Value const& json,
+
952 SField const& inName,
+
953 int depth,
+
954 Json::Value& error)
+
955{
+
956 if (!json.isObjectOrNull())
+
957 {
+
958 error = not_an_object(json_name);
+
959 return std::nullopt;
+
960 }
+
961
+
962 if (depth > maxDepth)
+
963 {
+
964 error = too_deep(json_name);
+
965 return std::nullopt;
+
966 }
+
967
+
968 try
+
969 {
+
970 STObject data(inName);
+
971
+
972 for (auto const& fieldName : json.getMemberNames())
+
973 {
+
974 Json::Value const& value = json[fieldName];
+
975
+
976 auto const& field = SField::getField(fieldName);
+
977
+
978 if (field == sfInvalid)
+
979 {
+
980 error = unknown_field(json_name, fieldName);
+
981 return std::nullopt;
+
982 }
+
983
+
984 switch (field.fieldType)
+
985 {
+
986 // Object-style containers (which recurse).
+
987 case STI_OBJECT:
+
988 case STI_TRANSACTION:
+
989 case STI_LEDGERENTRY:
+
990 case STI_VALIDATION:
+
991 if (!value.isObject())
+
992 {
+
993 error = not_an_object(json_name, fieldName);
+
994 return std::nullopt;
+
995 }
+
996
+
997 try
+
998 {
+
999 auto ret = parseObject(
+
1000 json_name + "." + fieldName,
+
1001 value,
+
1002 field,
+
1003 depth + 1,
+
1004 error);
+
1005 if (!ret)
+
1006 return std::nullopt;
+
1007 data.emplace_back(std::move(*ret));
+
1008 }
+
1009 catch (std::exception const&)
+
1010 {
+
1011 error = invalid_data(json_name, fieldName);
+
1012 return std::nullopt;
+
1013 }
+
1014
+
1015 break;
+
1016
+
1017 // Array-style containers (which recurse).
+
1018 case STI_ARRAY:
+
1019 try
+
1020 {
+
1021 auto array = parseArray(
+
1022 json_name + "." + fieldName,
+
1023 value,
+
1024 field,
+
1025 depth + 1,
+
1026 error);
+
1027 if (!array.has_value())
+
1028 return std::nullopt;
+
1029 data.emplace_back(std::move(*array));
+
1030 }
+
1031 catch (std::exception const&)
+
1032 {
+
1033 error = invalid_data(json_name, fieldName);
1034 return std::nullopt;
-
1035
-
1036 data.emplace_back(std::move(*leaf));
-
1037 }
+
1035 }
+
1036
+
1037 break;
1038
-
1039 break;
-
1040 }
-
1041 }
-
1042
-
1043 // Some inner object types have templates. Attempt to apply that.
-
1044 data.applyTemplateFromSField(inName); // May throw
-
1045
-
1046 return data;
-
1047 }
-
1048 catch (STObject::FieldErr const& e)
-
1049 {
-
1050 std::cerr << "template_mismatch: " << e.what() << "\n";
-
1051 error = template_mismatch(inName);
-
1052 }
-
1053 catch (std::exception const&)
-
1054 {
-
1055 error = invalid_data(json_name);
-
1056 }
-
1057 return std::nullopt;
-
1058}
-
-
1059
- -
- -
1062 std::string const& json_name,
-
1063 Json::Value const& json,
-
1064 SField const& inName,
-
1065 int depth,
-
1066 Json::Value& error)
-
1067{
-
1068 if (!json.isArrayOrNull())
-
1069 {
-
1070 error = not_an_array(json_name);
-
1071 return std::nullopt;
-
1072 }
-
1073
-
1074 if (depth > maxDepth)
-
1075 {
-
1076 error = too_deep(json_name);
-
1077 return std::nullopt;
-
1078 }
-
1079
-
1080 try
-
1081 {
-
1082 STArray tail(inName);
-
1083
-
1084 for (Json::UInt i = 0; json.isValidIndex(i); ++i)
-
1085 {
-
1086 bool const isObjectOrNull(json[i].isObjectOrNull());
-
1087 bool const singleKey(isObjectOrNull ? json[i].size() == 1 : true);
-
1088
-
1089 if (!isObjectOrNull || !singleKey)
-
1090 {
-
1091 // null values are !singleKey
-
1092 error = singleton_expected(json_name, i);
-
1093 return std::nullopt;
-
1094 }
-
1095
-
1096 // TODO: There doesn't seem to be a nice way to get just the
-
1097 // first/only key in an object without copying all keys into
-
1098 // a vector
-
1099 std::string const objectName(json[i].getMemberNames()[0]);
-
1100 ;
-
1101 auto const& nameField(SField::getField(objectName));
-
1102
-
1103 if (nameField == sfInvalid)
-
1104 {
-
1105 error = unknown_field(json_name, objectName);
-
1106 return std::nullopt;
-
1107 }
-
1108
-
1109 Json::Value const objectFields(json[i][objectName]);
-
1110
- -
1112 ss << json_name << "."
-
1113 << "[" << i << "]." << objectName;
-
1114
-
1115 auto ret = parseObject(
-
1116 ss.str(), objectFields, nameField, depth + 1, error);
-
1117 if (!ret)
-
1118 {
-
1119 std::string errMsg = error["error_message"].asString();
-
1120 error["error_message"] =
-
1121 "Error at '" + ss.str() + "'. " + errMsg;
-
1122 return std::nullopt;
-
1123 }
-
1124
-
1125 if (ret->getFName().fieldType != STI_OBJECT)
-
1126 {
-
1127 ss << "Field type: " << ret->getFName().fieldType << " ";
-
1128 error = non_object_in_array(ss.str(), i);
-
1129 return std::nullopt;
-
1130 }
-
1131
-
1132 tail.push_back(std::move(*ret));
-
1133 }
-
1134
-
1135 return detail::make_stvar<STArray>(std::move(tail));
-
1136 }
-
1137 catch (std::exception const&)
-
1138 {
-
1139 error = invalid_data(json_name);
-
1140 return std::nullopt;
-
1141 }
-
1142}
-
-
1143
-
1144} // namespace STParsedJSONDetail
+
1039 // Everything else (types that don't recurse).
+
1040 default: {
+
1041 auto leaf =
+
1042 parseLeaf(json_name, fieldName, &inName, value, error);
+
1043
+
1044 if (!leaf)
+
1045 return std::nullopt;
+
1046
+
1047 data.emplace_back(std::move(*leaf));
+
1048 }
+
1049
+
1050 break;
+
1051 }
+
1052 }
+
1053
+
1054 // Some inner object types have templates. Attempt to apply that.
+
1055 data.applyTemplateFromSField(inName); // May throw
+
1056
+
1057 return data;
+
1058 }
+
1059 catch (STObject::FieldErr const& e)
+
1060 {
+
1061 std::cerr << "template_mismatch: " << e.what() << "\n";
+
1062 error = template_mismatch(inName);
+
1063 }
+
1064 catch (std::exception const&)
+
1065 {
+
1066 error = invalid_data(json_name);
+
1067 }
+
1068 return std::nullopt;
+
1069}
+
1070
+ +
+ +
1073 std::string const& json_name,
+
1074 Json::Value const& json,
+
1075 SField const& inName,
+
1076 int depth,
+
1077 Json::Value& error)
+
1078{
+
1079 if (!json.isArrayOrNull())
+
1080 {
+
1081 error = not_an_array(json_name);
+
1082 return std::nullopt;
+
1083 }
+
1084
+
1085 if (depth > maxDepth)
+
1086 {
+
1087 error = too_deep(json_name);
+
1088 return std::nullopt;
+
1089 }
+
1090
+
1091 try
+
1092 {
+
1093 STArray tail(inName);
+
1094
+
1095 for (Json::UInt i = 0; json.isValidIndex(i); ++i)
+
1096 {
+
1097 bool const isObjectOrNull(json[i].isObjectOrNull());
+
1098 bool const singleKey(isObjectOrNull ? json[i].size() == 1 : true);
+
1099
+
1100 if (!isObjectOrNull || !singleKey)
+
1101 {
+
1102 // null values are !singleKey
+
1103 error = singleton_expected(json_name, i);
+
1104 return std::nullopt;
+
1105 }
+
1106
+
1107 // TODO: There doesn't seem to be a nice way to get just the
+
1108 // first/only key in an object without copying all keys into
+
1109 // a vector
+
1110 std::string const objectName(json[i].getMemberNames()[0]);
+
1111 ;
+
1112 auto const& nameField(SField::getField(objectName));
+
1113
+
1114 if (nameField == sfInvalid)
+
1115 {
+
1116 error = unknown_field(json_name, objectName);
+
1117 return std::nullopt;
+
1118 }
+
1119
+
1120 Json::Value const objectFields(json[i][objectName]);
+
1121
+ +
1123 ss << json_name << "."
+
1124 << "[" << i << "]." << objectName;
+
1125
+
1126 auto ret = parseObject(
+
1127 ss.str(), objectFields, nameField, depth + 1, error);
+
1128 if (!ret)
+
1129 {
+
1130 std::string errMsg = error["error_message"].asString();
+
1131 error["error_message"] =
+
1132 "Error at '" + ss.str() + "'. " + errMsg;
+
1133 return std::nullopt;
+
1134 }
+
1135
+
1136 if (ret->getFName().fieldType != STI_OBJECT)
+
1137 {
+
1138 ss << "Field type: " << ret->getFName().fieldType << " ";
+
1139 error = non_object_in_array(ss.str(), i);
+
1140 return std::nullopt;
+
1141 }
+
1142
+
1143 tail.push_back(std::move(*ret));
+
1144 }
1145
-
1146//------------------------------------------------------------------------------
-
1147
-
- -
1149 std::string const& name,
-
1150 Json::Value const& json)
-
1151{
-
1152 using namespace STParsedJSONDetail;
-
1153 object = parseObject(name, json, sfGeneric, 0, error);
-
1154}
+
1146 return detail::make_stvar<STArray>(std::move(tail));
+
1147 }
+
1148 catch (std::exception const&)
+
1149 {
+
1150 error = invalid_data(json_name);
+
1151 return std::nullopt;
+
1152 }
+
1153}
-
1155
-
1156//------------------------------------------------------------------------------
-
1157
-
- -
1159 std::string const& name,
-
1160 Json::Value const& json)
-
1161{
-
1162 using namespace STParsedJSONDetail;
-
1163 auto arr = parseArray(name, json, sfGeneric, 0, error);
-
1164 if (!arr)
-
1165 array.reset();
-
1166 else
-
1167 {
-
1168 auto p = dynamic_cast<STArray*>(&arr->get());
-
1169 if (p == nullptr)
-
1170 array.reset();
-
1171 else
-
1172 array = std::move(*p);
-
1173 }
-
1174}
+
1154
+
1155} // namespace STParsedJSONDetail
-
1175
-
1176} // namespace ripple
+
1156
+
1157//------------------------------------------------------------------------------
+
1158
+
+ +
1160 std::string const& name,
+
1161 Json::Value const& json)
+
1162{
+
1163 using namespace STParsedJSONDetail;
+
1164 object = parseObject(name, json, sfGeneric, 0, error);
+
1165}
+
+
1166
+
1167} // namespace ripple
@@ -1327,7 +1316,7 @@ $(document).ready(function() { init_codefold(0); });
bool isInt() const
KeyType findTypeByName(std::string const &name) const
Retrieve the type for a format specified by name.
static LedgerFormats const & getInstance()
-
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
+
std::optional< std::uint32_t > getGranularValue(std::string const &name) const
static Permission const & getInstance()
Identifies fields.
Definition SField.h:144
std::string const & getName() const
Definition SField.h:209
@@ -1337,9 +1326,6 @@ $(document).ready(function() { init_codefold(0); });
void push_back(STObject const &object)
Definition STArray.h:212
-
std::optional< STArray > array
The STArray if the parse was successful.
-
Json::Value error
On failure, an appropriate set of error values.
-
Json::Value error
On failure, an appropriate set of error values.
@@ -1368,27 +1354,27 @@ $(document).ready(function() { init_codefold(0); });
T min(T... args)
unsigned int UInt
Json::Value make_error(error_code_i code)
Returns a new json object that reflects the error code.
-
static std::optional< detail::STVar > parseUint16(SField const &field, std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
-
static std::optional< detail::STVar > parseLeaf(std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
-
static Json::Value not_an_object(std::string const &object, std::string const &field)
-
static std::optional< detail::STVar > parseUnsigned(SField const &field, std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
-
static Json::Value bad_type(std::string const &object, std::string const &field)
+
static std::optional< detail::STVar > parseUint16(SField const &field, std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
+
static std::optional< detail::STVar > parseLeaf(std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
+
static Json::Value not_an_object(std::string const &object, std::string const &field)
+
static std::optional< detail::STVar > parseUnsigned(SField const &field, std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
+
static Json::Value bad_type(std::string const &object, std::string const &field)
constexpr std::enable_if_t< std::is_unsigned< U >::value &&std::is_signed< S >::value, U > to_unsigned(S value)
-
static std::optional< detail::STVar > parseArray(std::string const &json_name, Json::Value const &json, SField const &inName, int depth, Json::Value &error)
-
static Json::Value array_expected(std::string const &object, std::string const &field)
-
static Json::Value singleton_expected(std::string const &object, unsigned int index)
-
static Json::Value not_an_array(std::string const &object)
-
static std::optional< detail::STVar > parseUint32(SField const &field, std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
-
static Json::Value invalid_data(std::string const &object, std::string const &field)
-
static Json::Value non_object_in_array(std::string const &item, Json::UInt index)
-
static std::optional< STObject > parseObject(std::string const &json_name, Json::Value const &json, SField const &inName, int depth, Json::Value &error)
-
static Json::Value too_deep(std::string const &object)
-
static Json::Value unknown_field(std::string const &object, std::string const &field)
-
static Json::Value template_mismatch(SField const &sField)
-
static Json::Value out_of_range(std::string const &object, std::string const &field)
-
static Json::Value string_expected(std::string const &object, std::string const &field)
- -
static std::string make_name(std::string const &object, std::string const &field)
+
static std::optional< detail::STVar > parseArray(std::string const &json_name, Json::Value const &json, SField const &inName, int depth, Json::Value &error)
+
static Json::Value array_expected(std::string const &object, std::string const &field)
+
static Json::Value singleton_expected(std::string const &object, unsigned int index)
+
static Json::Value not_an_array(std::string const &object)
+
static std::optional< detail::STVar > parseUint32(SField const &field, std::string const &json_name, std::string const &fieldName, SField const *name, Json::Value const &value, Json::Value &error)
+
static Json::Value invalid_data(std::string const &object, std::string const &field)
+
static Json::Value non_object_in_array(std::string const &item, Json::UInt index)
+
static std::optional< STObject > parseObject(std::string const &json_name, Json::Value const &json, SField const &inName, int depth, Json::Value &error)
+
static Json::Value too_deep(std::string const &object)
+
static Json::Value unknown_field(std::string const &object, std::string const &field)
+
static Json::Value template_mismatch(SField const &sField)
+
static Json::Value out_of_range(std::string const &object, std::string const &field)
+
static Json::Value string_expected(std::string const &object, std::string const &field)
+ +
static std::string make_name(std::string const &object, std::string const &field)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
std::optional< Blob > strUnHex(std::size_t strSize, Iterator begin, Iterator end)
STCurrency currencyFromJson(SField const &name, Json::Value const &v)
diff --git a/STParsedJSON_8h_source.html b/STParsedJSON_8h_source.html index 6c6db5add8..da4def9bff 100644 --- a/STParsedJSON_8h_source.html +++ b/STParsedJSON_8h_source.html @@ -127,36 +127,11 @@ $(document).ready(function() { init_codefold(0); });
55};
56
-
- -
61{
-
62public:
-
70 STParsedJSONArray(std::string const& name, Json::Value const& json);
-
71
- - - -
75 operator=(STParsedJSONArray const&) = delete;
-
76 ~STParsedJSONArray() = default;
-
77
- -
80
- -
83};
-
-
84
-
85} // namespace ripple
-
86
-
87#endif
+
57} // namespace ripple
+
58
+
59#endif
Represents a JSON value.
Definition json_value.h:149
-
Holds the serialized result of parsing an input JSON array.
-
std::optional< STArray > array
The STArray if the parse was successful.
-
STParsedJSONArray & operator=(STParsedJSONArray const &)=delete
-
Json::Value error
On failure, an appropriate set of error values.
- -
STParsedJSONArray(STParsedJSONArray const &)=delete
-
Holds the serialized result of parsing an input JSON object.
std::optional< STObject > object
The STObject if the parse was successful.
Json::Value error
On failure, an appropriate set of error values.
diff --git a/STParsedJSON__test_8cpp_source.html b/STParsedJSON__test_8cpp_source.html index 0b4e85e5df..0190e22910 100644 --- a/STParsedJSON__test_8cpp_source.html +++ b/STParsedJSON__test_8cpp_source.html @@ -84,7 +84,7 @@ $(document).ready(function() { init_codefold(0); });
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
-
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
+
4 Copyright (c) 2025 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
@@ -102,360 +102,2341 @@ $(document).ready(function() { init_codefold(0); });
19
20#include <test/jtx.h>
21
-
22#include <xrpl/json/json_reader.h>
-
23#include <xrpl/protocol/st.h>
-
24
-
25namespace ripple {
-
26
-
- -
28{
-
29public:
-
30 bool
-
- -
32 {
-
33 Json::Reader reader;
-
34 return reader.parse(json, to) && to.isObject();
-
35 }
+
22#include <xrpl/beast/unit_test.h>
+
23#include <xrpl/json/json_reader.h>
+
24#include <xrpl/protocol/STNumber.h>
+
25#include <xrpl/protocol/STParsedJSON.h>
+
26#include <xrpl/protocol/STXChainBridge.h>
+
27#include <xrpl/protocol/st.h>
+
28
+
29namespace ripple {
+
30
+
+ +
32{
+
33 bool
+
+ +
35 {
+
36 Json::Reader reader;
+
37 return reader.parse(json, to) && to.isObject();
+
38 }
-
36
-
37 void
-
- -
39 {
-
40 testcase("parse json array invalid children");
-
41 try
-
42 {
-
43 /*
-
44
-
45 STArray/STObject constructs don't really map perfectly to json
-
46 arrays/objects.
-
47
-
48 STObject is an associative container, mapping fields to value, but
-
49 an STObject may also have a Field as its name, stored outside the
-
50 associative structure. The name is important, so to maintain
-
51 fidelity, it will take TWO json objects to represent them.
-
52
-
53 */
-
54 std::string faulty(
-
55 "{\"Template\":[{"
-
56 "\"ModifiedNode\":{\"Sequence\":1}, "
-
57 "\"DeletedNode\":{\"Sequence\":1}"
-
58 "}]}");
-
59
- -
61 Json::Value faultyJson;
-
62 bool parsedOK(parseJSONString(faulty, faultyJson));
-
63 unexpected(!parsedOK, "failed to parse");
-
64 STParsedJSONObject parsed("test", faultyJson);
-
65 BEAST_EXPECT(!parsed.object);
-
66 }
-
67 catch (std::runtime_error& e)
-
68 {
-
69 std::string what(e.what());
-
70 unexpected(what.find("First level children of `Template`") != 0);
+
39
+
40 void
+
+ +
42 {
+
43 testcase("UInt8");
+
44 {
+ +
46 j[sfCloseResolution] = 255;
+
47 STParsedJSONObject obj("Test", j);
+
48 BEAST_EXPECT(obj.object.has_value());
+
49 BEAST_EXPECT(obj.object->isFieldPresent(sfCloseResolution));
+
50 BEAST_EXPECT(obj.object->getFieldU8(sfCloseResolution) == 255);
+
51 }
+
52
+
53 // test with uint value
+
54 {
+ +
56 j[sfCloseResolution] = 255u;
+
57 STParsedJSONObject obj("Test", j);
+
58 BEAST_EXPECT(obj.object.has_value());
+
59 BEAST_EXPECT(obj.object->isFieldPresent(sfCloseResolution));
+
60 BEAST_EXPECT(obj.object->getFieldU8(sfCloseResolution) == 255);
+
61 }
+
62
+
63 // Test with string value
+
64 {
+ +
66 j[sfCloseResolution] = "255";
+
67 STParsedJSONObject obj("Test", j);
+
68 BEAST_EXPECT(obj.object.has_value());
+
69 BEAST_EXPECT(obj.object->isFieldPresent(sfCloseResolution));
+
70 BEAST_EXPECT(obj.object->getFieldU8(sfCloseResolution) == 255);
71 }
-
72 }
+
72
+
73 // Test min value for uint8
+
74 {
+ +
76 j[sfCloseResolution] = 0;
+
77 STParsedJSONObject obj("Test", j);
+
78 BEAST_EXPECT(obj.object.has_value());
+
79 BEAST_EXPECT(obj.object->getFieldU8(sfCloseResolution) == 0);
+
80 }
+
81
+
82 // Test out of range value for UInt8 (negative)
+
83 {
+ +
85 j[sfCloseResolution] = -1;
+
86 STParsedJSONObject obj("Test", j);
+
87 BEAST_EXPECT(!obj.object.has_value());
+
88 }
+
89
+
90 // Test out of range value for UInt8 (too large)
+
91 {
+ +
93 j[sfCloseResolution] = 256;
+
94 STParsedJSONObject obj("Test", j);
+
95 BEAST_EXPECT(!obj.object.has_value());
+
96 }
+
97
+
98 // Test bad_type (not a string/int/uint)
+
99 {
+
100 Json::Value j;
+
101 j[sfCloseResolution] = Json::Value(Json::arrayValue);
+
102 STParsedJSONObject obj("Test", j);
+
103 BEAST_EXPECT(!obj.object.has_value());
+
104 }
+
105
+
106 // Test bad_type (not a string/int/uint)
+
107 {
+
108 Json::Value j;
+
109 j[sfCloseResolution] = Json::Value(Json::objectValue);
+
110 STParsedJSONObject obj("Test", j);
+
111 BEAST_EXPECT(!obj.object.has_value());
+
112 }
+
113 }
-
73
-
74 void
-
- -
76 {
-
77 testcase("parse json array");
-
78 std::string const json(
-
79 "{\"Template\":[{\"ModifiedNode\":{\"Sequence\":1}}]}");
-
80
-
81 Json::Value jsonObject;
-
82 bool parsedOK(parseJSONString(json, jsonObject));
-
83 if (parsedOK)
-
84 {
-
85 STParsedJSONObject parsed("test", jsonObject);
-
86 BEAST_EXPECT(parsed.object);
-
87 std::string const& serialized(
-
88 to_string(parsed.object->getJson(JsonOptions::none)));
-
89 BEAST_EXPECT(serialized == json);
-
90 }
-
91 else
-
92 {
-
93 fail("Couldn't parse json: " + json);
-
94 }
-
95 }
-
-
96
-
97 void
-
- -
99 {
-
100 testcase("parse json object");
-
101
-
102 {
-
103 std::string const goodJson(R"({"CloseResolution":19,"Method":250,)"
-
104 R"("TransactionResult":"tecFROZEN"})");
-
105
-
106 Json::Value jv;
-
107 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
-
108 {
-
109 STParsedJSONObject parsed("test", jv);
-
110 if (BEAST_EXPECT(parsed.object))
-
111 {
-
112 std::string const& serialized(
-
113 to_string(parsed.object->getJson(JsonOptions::none)));
-
114 BEAST_EXPECT(serialized == goodJson);
-
115 }
-
116 }
-
117 }
-
118
-
119 {
-
120 std::string const goodJson(
-
121 R"({"CloseResolution":19,"Method":"250",)"
-
122 R"("TransactionResult":"tecFROZEN"})");
-
123 std::string const expectedJson(
-
124 R"({"CloseResolution":19,"Method":250,)"
-
125 R"("TransactionResult":"tecFROZEN"})");
-
126
-
127 Json::Value jv;
-
128 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
-
129 {
-
130 // Integer values are always parsed as int,
-
131 // unless they're too big. We want a small uint.
-
132 jv["CloseResolution"] = Json::UInt(19);
-
133 STParsedJSONObject parsed("test", jv);
-
134 if (BEAST_EXPECT(parsed.object))
-
135 {
-
136 std::string const& serialized(
-
137 to_string(parsed.object->getJson(JsonOptions::none)));
-
138 BEAST_EXPECT(serialized == expectedJson);
-
139 }
-
140 }
-
141 }
-
142
-
143 {
-
144 std::string const goodJson(
-
145 R"({"CloseResolution":"19","Method":"250",)"
-
146 R"("TransactionResult":"tecFROZEN"})");
-
147 std::string const expectedJson(
-
148 R"({"CloseResolution":19,"Method":250,)"
-
149 R"("TransactionResult":"tecFROZEN"})");
-
150
-
151 Json::Value jv;
-
152 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
-
153 {
-
154 // Integer values are always parsed as int,
-
155 // unless they're too big. We want a small uint.
-
156 jv["CloseResolution"] = Json::UInt(19);
-
157 STParsedJSONObject parsed("test", jv);
-
158 if (BEAST_EXPECT(parsed.object))
-
159 {
-
160 std::string const& serialized(
-
161 to_string(parsed.object->getJson(JsonOptions::none)));
-
162 BEAST_EXPECT(serialized == expectedJson);
-
163 }
-
164 }
-
165 }
-
166
+
114
+
115 void
+
+ +
117 {
+
118 testcase("UInt16");
+
119 // Test with int value
+
120 {
+
121 Json::Value j;
+
122 j[sfLedgerEntryType] = 65535;
+
123 STParsedJSONObject obj("Test", j);
+
124 BEAST_EXPECT(obj.object.has_value());
+
125 BEAST_EXPECT(obj.object->isFieldPresent(sfLedgerEntryType));
+
126 BEAST_EXPECT(obj.object->getFieldU16(sfLedgerEntryType) == 65535);
+
127 }
+
128
+
129 // Test with uint value
+
130 {
+
131 Json::Value j;
+
132 j[sfLedgerEntryType] = 65535u;
+
133 STParsedJSONObject obj("Test", j);
+
134 BEAST_EXPECT(obj.object.has_value());
+
135 BEAST_EXPECT(obj.object->isFieldPresent(sfLedgerEntryType));
+
136 BEAST_EXPECT(obj.object->getFieldU16(sfLedgerEntryType) == 65535);
+
137 }
+
138
+
139 // Test with string value
+
140 {
+
141 Json::Value j;
+
142 j[sfLedgerEntryType] = "65535";
+
143 STParsedJSONObject obj("Test", j);
+
144 BEAST_EXPECT(obj.object.has_value());
+
145 BEAST_EXPECT(obj.object->isFieldPresent(sfLedgerEntryType));
+
146 BEAST_EXPECT(obj.object->getFieldU16(sfLedgerEntryType) == 65535);
+
147 }
+
148
+
149 // Test min value for uint16
+
150 {
+
151 Json::Value j;
+
152 j[sfLedgerEntryType] = 0;
+
153 STParsedJSONObject obj("Test", j);
+
154 BEAST_EXPECT(obj.object.has_value());
+
155 BEAST_EXPECT(obj.object->getFieldU16(sfLedgerEntryType) == 0);
+
156 }
+
157
+
158 // Test out of range value for UInt16 (negative)
+
159 {
+
160 Json::Value j;
+
161 j[sfLedgerEntryType] = -1;
+
162 STParsedJSONObject obj("Test", j);
+
163 BEAST_EXPECT(!obj.object.has_value());
+
164 }
+
165
+
166 // Test out of range value for UInt16 (too large)
167 {
-
168 std::string const json(R"({"CloseResolution":19,"Method":250,)"
-
169 R"("TransactionResult":"terQUEUED"})");
-
170
-
171 Json::Value jv;
-
172 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
173 {
-
174 STParsedJSONObject parsed("test", jv);
-
175 BEAST_EXPECT(!parsed.object);
-
176 BEAST_EXPECT(parsed.error);
-
177 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
178 BEAST_EXPECT(
-
179 parsed.error[jss::error_message] ==
-
180 "Field 'test.TransactionResult' is out of range.");
-
181 }
-
182 }
-
183
-
184 {
-
185 std::string const json(R"({"CloseResolution":19,"Method":"pony",)"
-
186 R"("TransactionResult":"tesSUCCESS"})");
-
187
-
188 Json::Value jv;
-
189 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
190 {
-
191 STParsedJSONObject parsed("test", jv);
-
192 BEAST_EXPECT(!parsed.object);
-
193 BEAST_EXPECT(parsed.error);
-
194 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
195 BEAST_EXPECT(
-
196 parsed.error[jss::error_message] ==
-
197 "Field 'test.Method' has bad type.");
-
198 }
-
199 }
-
200
-
201 {
-
202 std::string const json(
-
203 R"({"CloseResolution":19,"Method":3294967296,)"
-
204 R"("TransactionResult":"tesSUCCESS"})");
-
205
-
206 Json::Value jv;
-
207 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
208 {
-
209 STParsedJSONObject parsed("test", jv);
-
210 BEAST_EXPECT(!parsed.object);
-
211 BEAST_EXPECT(parsed.error);
-
212 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
213 BEAST_EXPECT(
-
214 parsed.error[jss::error_message] ==
-
215 "Field 'test.Method' is out of range.");
-
216 }
-
217 }
-
218
-
219 {
-
220 std::string const json(R"({"CloseResolution":-10,"Method":42,)"
-
221 R"("TransactionResult":"tesSUCCESS"})");
-
222
-
223 Json::Value jv;
-
224 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
225 {
-
226 STParsedJSONObject parsed("test", jv);
-
227 BEAST_EXPECT(!parsed.object);
-
228 BEAST_EXPECT(parsed.error);
-
229 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
230 BEAST_EXPECT(
-
231 parsed.error[jss::error_message] ==
-
232 "Field 'test.CloseResolution' is out of range.");
-
233 }
-
234 }
-
235
-
236 {
-
237 std::string const json(
-
238 R"({"CloseResolution":19,"Method":3.141592653,)"
-
239 R"("TransactionResult":"tesSUCCESS"})");
-
240
-
241 Json::Value jv;
-
242 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
243 {
-
244 STParsedJSONObject parsed("test", jv);
-
245 BEAST_EXPECT(!parsed.object);
-
246 BEAST_EXPECT(parsed.error);
-
247 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
248 BEAST_EXPECT(
-
249 parsed.error[jss::error_message] ==
-
250 "Field 'test.Method' has bad type.");
-
251 }
-
252 }
-
253
-
254 {
-
255 std::string const goodJson(R"({"CloseResolution":19,"Method":250,)"
-
256 R"("TransferFee":"65535"})");
-
257 std::string const expectedJson(
-
258 R"({"CloseResolution":19,"Method":250,)"
-
259 R"("TransferFee":65535})");
-
260
-
261 Json::Value jv;
-
262 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
-
263 {
-
264 STParsedJSONObject parsed("test", jv);
-
265 if (BEAST_EXPECT(parsed.object))
-
266 {
-
267 std::string const& serialized(
-
268 to_string(parsed.object->getJson(JsonOptions::none)));
-
269 BEAST_EXPECT(serialized == expectedJson);
-
270 }
-
271 }
-
272 }
-
273
-
274 {
-
275 std::string const json(R"({"CloseResolution":19,"Method":250,)"
-
276 R"("TransferFee":"65536"})");
-
277
-
278 Json::Value jv;
-
279 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
280 {
-
281 STParsedJSONObject parsed("test", jv);
-
282 BEAST_EXPECT(!parsed.object);
-
283 BEAST_EXPECT(parsed.error);
-
284 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
285 BEAST_EXPECT(
-
286 parsed.error[jss::error_message] ==
-
287 "Field 'test.TransferFee' has invalid data.");
-
288 }
-
289 }
-
290
-
291 {
-
292 std::string const json(R"({"CloseResolution":19,"Method":250,)"
-
293 R"("TransferFee":"Payment"})");
-
294
-
295 Json::Value jv;
-
296 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
297 {
-
298 STParsedJSONObject parsed("test", jv);
-
299 BEAST_EXPECT(!parsed.object);
-
300 BEAST_EXPECT(parsed.error);
-
301 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
302 BEAST_EXPECT(
-
303 parsed.error[jss::error_message] ==
-
304 "Field 'test.TransferFee' has invalid data.");
-
305 }
-
306 }
-
307
+
168 Json::Value j;
+
169 j[sfLedgerEntryType] = 65536;
+
170 STParsedJSONObject obj("Test", j);
+
171 BEAST_EXPECT(!obj.object.has_value());
+
172 }
+
173
+
174 // Test string value out of range
+
175 {
+
176 Json::Value j;
+
177 j[sfLedgerEntryType] = "65536";
+
178 STParsedJSONObject obj("Test", j);
+
179 BEAST_EXPECT(!obj.object.has_value());
+
180 }
+
181
+
182 // Test bad_type (not a string/int/uint)
+
183 {
+
184 Json::Value j;
+
185 j[sfLedgerEntryType] = Json::Value(Json::arrayValue);
+
186 STParsedJSONObject obj("Test", j);
+
187 BEAST_EXPECT(!obj.object.has_value());
+
188 }
+
189
+
190 // Test bad_type (not a string/int/uint)
+
191 {
+
192 Json::Value j;
+
193 j[sfLedgerEntryType] = Json::Value(Json::objectValue);
+
194 STParsedJSONObject obj("Test", j);
+
195 BEAST_EXPECT(!obj.object.has_value());
+
196 }
+
197
+
198 // Invalid input for other field
+
199 {
+
200 Json::Value j;
+
201 j[sfTransferFee] = "Payment";
+
202 STParsedJSONObject obj("Test", j);
+
203 BEAST_EXPECT(!obj.object.has_value());
+
204 }
+
205 }
+
+
206
+
207 void
+
+ +
209 {
+
210 testcase("UInt32");
+
211 {
+
212 Json::Value j;
+
213 j[sfNetworkID] = 4294967295u;
+
214 STParsedJSONObject obj("Test", j);
+
215 BEAST_EXPECT(obj.object.has_value());
+
216 BEAST_EXPECT(obj.object->isFieldPresent(sfNetworkID));
+
217 BEAST_EXPECT(obj.object->getFieldU32(sfNetworkID) == 4294967295u);
+
218 }
+
219
+
220 // Test with string value
+
221 {
+
222 Json::Value j;
+
223 j[sfNetworkID] = "4294967295";
+
224 STParsedJSONObject obj("Test", j);
+
225 BEAST_EXPECT(obj.object.has_value());
+
226 BEAST_EXPECT(obj.object->isFieldPresent(sfNetworkID));
+
227 BEAST_EXPECT(obj.object->getFieldU32(sfNetworkID) == 4294967295u);
+
228 }
+
229
+
230 // Test min value for uint32
+
231 {
+
232 Json::Value j;
+
233 j[sfNetworkID] = 0;
+
234 STParsedJSONObject obj("Test", j);
+
235 BEAST_EXPECT(obj.object.has_value());
+
236 BEAST_EXPECT(obj.object->getFieldU32(sfNetworkID) == 0);
+
237 }
+
238
+
239 // Test out of range value for uint32 (negative)
+
240 {
+
241 Json::Value j;
+
242 j[sfNetworkID] = -1;
+
243 STParsedJSONObject obj("Test", j);
+
244 BEAST_EXPECT(!obj.object.has_value());
+
245 }
+
246
+
247 // Test string value out of range
+
248 {
+
249 Json::Value j;
+
250 j[sfNetworkID] = "4294967296";
+
251 STParsedJSONObject obj("Test", j);
+
252 BEAST_EXPECT(!obj.object.has_value());
+
253 }
+
254
+
255 // Test bad_type (arrayValue)
+
256 {
+
257 Json::Value j;
+
258 j[sfNetworkID] = Json::Value(Json::arrayValue);
+
259 STParsedJSONObject obj("Test", j);
+
260 BEAST_EXPECT(!obj.object.has_value());
+
261 }
+
262
+
263 // Test bad_type (objectValue)
+
264 {
+
265 Json::Value j;
+
266 j[sfNetworkID] = Json::Value(Json::objectValue);
+
267 STParsedJSONObject obj("Test", j);
+
268 BEAST_EXPECT(!obj.object.has_value());
+
269 }
+
270 }
+
+
271
+
272 void
+
+ +
274 {
+
275 testcase("UInt64");
+
276 {
+
277 Json::Value j;
+
278 j[sfIndexNext] = "ffffffffffffffff";
+
279 STParsedJSONObject obj("Test", j);
+
280 BEAST_EXPECT(obj.object.has_value());
+
281 BEAST_EXPECT(obj.object->isFieldPresent(sfIndexNext));
+
282 BEAST_EXPECT(
+
283 obj.object->getFieldU64(sfIndexNext) ==
+
284 18446744073709551615ull);
+
285 }
+
286
+
287 // Test min value for uint64
+
288 {
+
289 Json::Value j;
+
290 j[sfIndexNext] = 0;
+
291 STParsedJSONObject obj("Test", j);
+
292 BEAST_EXPECT(obj.object.has_value());
+
293 BEAST_EXPECT(obj.object->getFieldU64(sfIndexNext) == 0ull);
+
294 }
+
295
+
296 // Test out of range value for uint64 (negative)
+
297 {
+
298 Json::Value j;
+
299 j[sfIndexNext] = -1;
+
300 STParsedJSONObject obj("Test", j);
+
301 BEAST_EXPECT(!obj.object.has_value());
+
302 }
+
303
+
304 // NOTE: the JSON parser doesn't support > UInt32, so those values must
+
305 // be in hex
+
306 // Test string value out of range
+
307 // string is interpreted as hex
308 {
-
309 std::string const json(R"({"CloseResolution":19,"Method":250,)"
-
310 R"("TransferFee":true})");
-
311
-
312 Json::Value jv;
-
313 if (BEAST_EXPECT(parseJSONString(json, jv)))
-
314 {
-
315 STParsedJSONObject parsed("test", jv);
-
316 BEAST_EXPECT(!parsed.object);
-
317 BEAST_EXPECT(parsed.error);
-
318 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
-
319 BEAST_EXPECT(
-
320 parsed.error[jss::error_message] ==
-
321 "Field 'test.TransferFee' has bad type.");
-
322 }
-
323 }
-
324 }
-
-
325
-
326 void
-
-
327 run() override
-
328 {
-
329 // Instantiate a jtx::Env so debugLog writes are exercised.
-
330 test::jtx::Env env(*this);
- - - -
334 }
-
-
335};
-
-
336
-
337BEAST_DEFINE_TESTSUITE(STParsedJSON, protocol, ripple);
+
309 Json::Value j;
+
310 j[sfIndexNext] = "10000000000000000"; // uint64 max + 1 (in hex)
+
311 STParsedJSONObject obj("Test", j);
+
312 BEAST_EXPECT(!obj.object.has_value());
+
313 }
+
314
+
315 // Test hex string value with 0x prefix (should fail)
+
316 {
+
317 Json::Value j;
+
318 j[sfIndexNext] = "0xabcdefabcdef";
+
319 STParsedJSONObject obj("Test", j);
+
320 BEAST_EXPECT(!obj.object.has_value());
+
321 }
+
322
+
323 // Test hex string value with invalid characters
+
324 {
+
325 Json::Value j;
+
326 j[sfIndexNext] = "abcdefga";
+
327 STParsedJSONObject obj("Test", j);
+
328 BEAST_EXPECT(!obj.object.has_value());
+
329 }
+
330
+
331 // test arrayValue
+
332 {
+
333 Json::Value j;
+
334 j[sfIndexNext] = Json::Value(Json::arrayValue);
+
335 STParsedJSONObject obj("Test", j);
+
336 BEAST_EXPECT(!obj.object.has_value());
+
337 }
338
-
339} // namespace ripple
+
339 // test objectValue
+
340 {
+
341 Json::Value j;
+
342 j[sfIndexNext] = Json::Value(Json::objectValue);
+
343 STParsedJSONObject obj("Test", j);
+
344 BEAST_EXPECT(!obj.object.has_value());
+
345 }
+
346 }
+
+
347
+
348 void
+
+ +
350 {
+
351 testcase("UInt128");
+
352 {
+
353 Json::Value j;
+
354 j[sfEmailHash] = "0123456789ABCDEF0123456789ABCDEF";
+
355 STParsedJSONObject obj("Test", j);
+
356 BEAST_EXPECT(obj.object.has_value());
+
357 BEAST_EXPECT(obj.object->isFieldPresent(sfEmailHash));
+
358 BEAST_EXPECT(obj.object->getFieldH128(sfEmailHash).size() == 16);
+
359 std::array<uint8_t, 16> expected = {
+
360 0x01,
+
361 0x23,
+
362 0x45,
+
363 0x67,
+
364 0x89,
+
365 0xAB,
+
366 0xCD,
+
367 0xEF,
+
368 0x01,
+
369 0x23,
+
370 0x45,
+
371 0x67,
+
372 0x89,
+
373 0xAB,
+
374 0xCD,
+
375 0xEF};
+
376 BEAST_EXPECT(
+
377 obj.object->getFieldH128(sfEmailHash) == uint128{expected});
+
378 }
+
379
+
380 // Valid lowercase hex string for UInt128
+
381 {
+
382 Json::Value j;
+
383 j[sfEmailHash] = "0123456789abcdef0123456789abcdef";
+
384 STParsedJSONObject obj("Test", j);
+
385 BEAST_EXPECT(obj.object.has_value());
+
386 BEAST_EXPECT(obj.object->isFieldPresent(sfEmailHash));
+
387 BEAST_EXPECT(obj.object->getFieldH128(sfEmailHash).size() == 16);
+
388 }
+
389
+
390 // Empty string for UInt128 (should be valid, all zero)
+
391 {
+
392 Json::Value j;
+
393 j[sfEmailHash] = "";
+
394 STParsedJSONObject obj("Test", j);
+
395 BEAST_EXPECT(obj.object.has_value());
+
396 BEAST_EXPECT(obj.object->isFieldPresent(sfEmailHash));
+
397 auto const& h128 = obj.object->getFieldH128(sfEmailHash);
+
398 BEAST_EXPECT(h128.size() == 16);
+
399 bool allZero = std::all_of(
+
400 h128.begin(), h128.end(), [](auto b) { return b == 0; });
+
401 BEAST_EXPECT(allZero);
+
402 }
+
403
+
404 // Odd-length hex string for UInt128 (should fail)
+
405 {
+
406 Json::Value j;
+
407 j[sfEmailHash] = "0123456789ABCDEF0123456789ABCDE";
+
408 STParsedJSONObject obj("Test", j);
+
409 BEAST_EXPECT(!obj.object.has_value());
+
410 }
+
411
+
412 // Non-hex string for UInt128 (should fail)
+
413 {
+
414 Json::Value j;
+
415 j[sfEmailHash] = "nothexstring";
+
416 STParsedJSONObject obj("Test", j);
+
417 BEAST_EXPECT(!obj.object.has_value());
+
418 }
+
419
+
420 // Hex string too short for UInt128 (should fail)
+
421 {
+
422 Json::Value j;
+
423 j[sfEmailHash] = "01234567";
+
424 STParsedJSONObject obj("Test", j);
+
425 BEAST_EXPECT(!obj.object.has_value());
+
426 }
+
427
+
428 // Hex string too long for UInt128 (should fail)
+
429 {
+
430 Json::Value j;
+
431 j[sfEmailHash] = "0123456789ABCDEF0123456789ABCDEF00";
+
432 STParsedJSONObject obj("Test", j);
+
433 BEAST_EXPECT(!obj.object.has_value());
+
434 }
+
435
+
436 // Array value for UInt128 (should fail)
+
437 {
+
438 Json::Value j;
+
439 j[sfEmailHash] = Json::Value(Json::arrayValue);
+
440 STParsedJSONObject obj("Test", j);
+
441 BEAST_EXPECT(!obj.object.has_value());
+
442 }
+
443
+
444 // Object value for UInt128 (should fail)
+
445 {
+
446 Json::Value j;
+
447 j[sfEmailHash] = Json::Value(Json::objectValue);
+
448 STParsedJSONObject obj("Test", j);
+
449 BEAST_EXPECT(!obj.object.has_value());
+
450 }
+
451 }
+
+
452
+
453 void
+
+ +
455 {
+
456 testcase("UInt160");
+
457 {
+
458 Json::Value j;
+
459 j[sfTakerPaysCurrency] = "0123456789ABCDEF0123456789ABCDEF01234567";
+
460 STParsedJSONObject obj("Test", j);
+
461 BEAST_EXPECT(obj.object.has_value());
+
462 BEAST_EXPECT(obj.object->isFieldPresent(sfTakerPaysCurrency));
+
463 BEAST_EXPECT(
+
464 obj.object->getFieldH160(sfTakerPaysCurrency).size() == 20);
+
465 std::array<uint8_t, 20> expected = {
+
466 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23,
+
467 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67};
+
468 BEAST_EXPECT(
+
469 obj.object->getFieldH160(sfTakerPaysCurrency) ==
+
470 uint160{expected});
+
471 }
+
472 // Valid lowercase hex string for UInt160
+
473 {
+
474 Json::Value j;
+
475 j[sfTakerPaysCurrency] = "0123456789abcdef0123456789abcdef01234567";
+
476 STParsedJSONObject obj("Test", j);
+
477 BEAST_EXPECT(obj.object.has_value());
+
478 BEAST_EXPECT(obj.object->isFieldPresent(sfTakerPaysCurrency));
+
479 BEAST_EXPECT(
+
480 obj.object->getFieldH160(sfTakerPaysCurrency).size() == 20);
+
481 }
+
482
+
483 // Empty string for UInt160 (should be valid, all zero)
+
484 {
+
485 Json::Value j;
+
486 j[sfTakerPaysCurrency] = "";
+
487 STParsedJSONObject obj("Test", j);
+
488 BEAST_EXPECT(obj.object.has_value());
+
489 BEAST_EXPECT(obj.object->isFieldPresent(sfTakerPaysCurrency));
+
490 auto const& h160 = obj.object->getFieldH160(sfTakerPaysCurrency);
+
491 BEAST_EXPECT(h160.size() == 20);
+
492 bool allZero = std::all_of(
+
493 h160.begin(), h160.end(), [](auto b) { return b == 0; });
+
494 BEAST_EXPECT(allZero);
+
495 }
+
496
+
497 // Non-hex string for UInt160 (should fail)
+
498 {
+
499 Json::Value j;
+
500 j[sfTakerPaysCurrency] = "nothexstring";
+
501 STParsedJSONObject obj("Test", j);
+
502 BEAST_EXPECT(!obj.object.has_value());
+
503 }
+
504
+
505 // Hex string too short for UInt160 (should fail)
+
506 {
+
507 Json::Value j;
+
508 j[sfTakerPaysCurrency] = "01234567";
+
509 STParsedJSONObject obj("Test", j);
+
510 BEAST_EXPECT(!obj.object.has_value());
+
511 }
+
512
+
513 // Hex string too long for UInt160 (should fail)
+
514 {
+
515 Json::Value j;
+
516 j[sfTakerPaysCurrency] =
+
517 "0123456789ABCDEF0123456789ABCDEF0123456789";
+
518 STParsedJSONObject obj("Test", j);
+
519 BEAST_EXPECT(!obj.object.has_value());
+
520 }
+
521
+
522 // Array value for UInt160 (should fail)
+
523 {
+
524 Json::Value j;
+
525 j[sfTakerPaysCurrency] = Json::Value(Json::arrayValue);
+
526 STParsedJSONObject obj("Test", j);
+
527 BEAST_EXPECT(!obj.object.has_value());
+
528 }
+
529
+
530 // Object value for UInt160 (should fail)
+
531 {
+
532 Json::Value j;
+
533 j[sfTakerPaysCurrency] = Json::Value(Json::objectValue);
+
534 STParsedJSONObject obj("Test", j);
+
535 BEAST_EXPECT(!obj.object.has_value());
+
536 }
+
537 }
+
+
538
+
539 void
+
+ +
541 {
+
542 testcase("UInt192");
+
543 {
+
544 Json::Value j;
+
545 j[sfMPTokenIssuanceID] =
+
546 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
+
547 STParsedJSONObject obj("Test", j);
+
548 BEAST_EXPECT(obj.object.has_value());
+
549 BEAST_EXPECT(obj.object->isFieldPresent(sfMPTokenIssuanceID));
+
550 BEAST_EXPECT(
+
551 obj.object->getFieldH192(sfMPTokenIssuanceID).size() == 24);
+
552 std::array<uint8_t, 24> expected = {
+
553 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+
554 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+
555 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+
556 BEAST_EXPECT(
+
557 obj.object->getFieldH192(sfMPTokenIssuanceID) ==
+
558 uint192{expected});
+
559 }
+
560
+
561 // Valid lowercase hex string for UInt192
+
562 {
+
563 Json::Value j;
+
564 j[sfMPTokenIssuanceID] =
+
565 "ffffffffffffffffffffffffffffffffffffffffffffffff";
+
566 STParsedJSONObject obj("Test", j);
+
567 BEAST_EXPECT(obj.object.has_value());
+
568 BEAST_EXPECT(obj.object->isFieldPresent(sfMPTokenIssuanceID));
+
569 BEAST_EXPECT(
+
570 obj.object->getFieldH192(sfMPTokenIssuanceID).size() == 24);
+
571 }
+
572
+
573 // Empty string for UInt192 (should be valid, all zero)
+
574 {
+
575 Json::Value j;
+
576 j[sfMPTokenIssuanceID] = "";
+
577 STParsedJSONObject obj("Test", j);
+
578 BEAST_EXPECT(obj.object.has_value());
+
579 BEAST_EXPECT(obj.object->isFieldPresent(sfMPTokenIssuanceID));
+
580 auto const& h192 = obj.object->getFieldH192(sfMPTokenIssuanceID);
+
581 BEAST_EXPECT(h192.size() == 24);
+
582 bool allZero = std::all_of(
+
583 h192.begin(), h192.end(), [](auto b) { return b == 0; });
+
584 BEAST_EXPECT(allZero);
+
585 }
+
586
+
587 // Odd-length hex string for UInt192 (should fail)
+
588 {
+
589 Json::Value j;
+
590 j[sfMPTokenIssuanceID] =
+
591 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDE";
+
592 STParsedJSONObject obj("Test", j);
+
593 BEAST_EXPECT(!obj.object.has_value());
+
594 }
+
595
+
596 // Non-hex string for UInt192 (should fail)
+
597 {
+
598 Json::Value j;
+
599 j[sfMPTokenIssuanceID] = "nothexstring";
+
600 STParsedJSONObject obj("Test", j);
+
601 BEAST_EXPECT(!obj.object.has_value());
+
602 }
+
603
+
604 // Hex string too short for UInt192 (should fail)
+
605 {
+
606 Json::Value j;
+
607 j[sfMPTokenIssuanceID] = "01234567";
+
608 STParsedJSONObject obj("Test", j);
+
609 BEAST_EXPECT(!obj.object.has_value());
+
610 }
+
611
+
612 // Hex string too long for UInt192 (should fail)
+
613 {
+
614 Json::Value j;
+
615 j[sfMPTokenIssuanceID] =
+
616 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF00";
+
617 STParsedJSONObject obj("Test", j);
+
618 BEAST_EXPECT(!obj.object.has_value());
+
619 }
+
620
+
621 // Array value for UInt192 (should fail)
+
622 {
+
623 Json::Value j;
+
624 j[sfMPTokenIssuanceID] = Json::Value(Json::arrayValue);
+
625 STParsedJSONObject obj("Test", j);
+
626 BEAST_EXPECT(!obj.object.has_value());
+
627 }
+
628
+
629 // Object value for UInt192 (should fail)
+
630 {
+
631 Json::Value j;
+
632 j[sfMPTokenIssuanceID] = Json::Value(Json::objectValue);
+
633 STParsedJSONObject obj("Test", j);
+
634 BEAST_EXPECT(!obj.object.has_value());
+
635 }
+
636 }
+
+
637
+
638 void
+
+ +
640 {
+
641 testcase("UInt256");
+
642 // Test with valid hex string for UInt256
+
643 {
+
644 Json::Value j;
+
645 j[sfLedgerHash] =
+
646 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCD"
+
647 "EF";
+
648 STParsedJSONObject obj("Test", j);
+
649 BEAST_EXPECT(obj.object.has_value());
+
650 BEAST_EXPECT(obj.object->isFieldPresent(sfLedgerHash));
+
651 BEAST_EXPECT(obj.object->getFieldH256(sfLedgerHash).size() == 32);
+
652 std::array<uint8_t, 32> expected = {
+
653 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+
654 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+
655 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+
656 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
+
657 BEAST_EXPECT(
+
658 obj.object->getFieldH256(sfLedgerHash) == uint256{expected});
+
659 }
+
660 // Valid lowercase hex string for UInt256
+
661 {
+
662 Json::Value j;
+
663 j[sfLedgerHash] =
+
664 "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd"
+
665 "ef";
+
666 STParsedJSONObject obj("Test", j);
+
667 BEAST_EXPECT(obj.object.has_value());
+
668 BEAST_EXPECT(obj.object->isFieldPresent(sfLedgerHash));
+
669 BEAST_EXPECT(obj.object->getFieldH256(sfLedgerHash).size() == 32);
+
670 }
+
671
+
672 // Empty string for UInt256 (should be valid, all zero)
+
673 {
+
674 Json::Value j;
+
675 j[sfLedgerHash] = "";
+
676 STParsedJSONObject obj("Test", j);
+
677 BEAST_EXPECT(obj.object.has_value());
+
678 BEAST_EXPECT(obj.object->isFieldPresent(sfLedgerHash));
+
679 auto const& h256 = obj.object->getFieldH256(sfLedgerHash);
+
680 BEAST_EXPECT(h256.size() == 32);
+
681 bool allZero = std::all_of(
+
682 h256.begin(), h256.end(), [](auto b) { return b == 0; });
+
683 BEAST_EXPECT(allZero);
+
684 }
+
685
+
686 // Odd-length hex string for UInt256 (should fail)
+
687 {
+
688 Json::Value j;
+
689 j[sfLedgerHash] =
+
690 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCD"
+
691 "E";
+
692 STParsedJSONObject obj("Test", j);
+
693 BEAST_EXPECT(!obj.object.has_value());
+
694 }
+
695
+
696 // Non-hex string for UInt256 (should fail)
+
697 {
+
698 Json::Value j;
+
699 j[sfLedgerHash] = "nothexstring";
+
700 STParsedJSONObject obj("Test", j);
+
701 BEAST_EXPECT(!obj.object.has_value());
+
702 }
+
703
+
704 // Hex string too short for UInt256 (should fail)
+
705 {
+
706 Json::Value j;
+
707 j[sfLedgerHash] = "01234567";
+
708 STParsedJSONObject obj("Test", j);
+
709 BEAST_EXPECT(!obj.object.has_value());
+
710 }
+
711
+
712 // Hex string too long for UInt256 (should fail)
+
713 {
+
714 Json::Value j;
+
715 j[sfLedgerHash] =
+
716 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCD"
+
717 "EF00";
+
718 STParsedJSONObject obj("Test", j);
+
719 BEAST_EXPECT(!obj.object.has_value());
+
720 }
+
721
+
722 // Array value for UInt256 (should fail)
+
723 {
+
724 Json::Value j;
+
725 j[sfLedgerHash] = Json::Value(Json::arrayValue);
+
726 STParsedJSONObject obj("Test", j);
+
727 BEAST_EXPECT(!obj.object.has_value());
+
728 }
+
729
+
730 // Object value for UInt256 (should fail)
+
731 {
+
732 Json::Value j;
+
733 j[sfLedgerHash] = Json::Value(Json::objectValue);
+
734 STParsedJSONObject obj("Test", j);
+
735 BEAST_EXPECT(!obj.object.has_value());
+
736 }
+
737 }
+
+
738
+
739 void
+
+ +
741 {
+
742 testcase("Blob");
+
743 // Test with valid hex string for blob
+
744 {
+
745 Json::Value j;
+
746 j[sfPublicKey] = "DEADBEEF";
+
747 STParsedJSONObject obj("Test", j);
+
748 BEAST_EXPECT(obj.object.has_value());
+
749 BEAST_EXPECT(obj.object->isFieldPresent(sfPublicKey));
+
750 auto const& blob = obj.object->getFieldVL(sfPublicKey);
+
751 BEAST_EXPECT(blob.size() == 4);
+
752 BEAST_EXPECT(blob[0] == 0xDE);
+
753 BEAST_EXPECT(blob[1] == 0xAD);
+
754 BEAST_EXPECT(blob[2] == 0xBE);
+
755 BEAST_EXPECT(blob[3] == 0xEF);
+
756 }
+
757
+
758 // Test empty string for blob (should be valid, size 0)
+
759 {
+
760 Json::Value j;
+
761 j[sfPublicKey] = "";
+
762 STParsedJSONObject obj("Test", j);
+
763 BEAST_EXPECT(obj.object.has_value());
+
764 BEAST_EXPECT(obj.object->isFieldPresent(sfPublicKey));
+
765 auto const& blob = obj.object->getFieldVL(sfPublicKey);
+
766 BEAST_EXPECT(blob.size() == 0);
+
767 }
+
768
+
769 // Test lowercase hex string for blob
+
770 {
+
771 Json::Value j;
+
772 j[sfPublicKey] = "deadbeef";
+
773 STParsedJSONObject obj("Test", j);
+
774 BEAST_EXPECT(obj.object.has_value());
+
775 BEAST_EXPECT(obj.object->isFieldPresent(sfPublicKey));
+
776 auto const& blob = obj.object->getFieldVL(sfPublicKey);
+
777 BEAST_EXPECT(blob.size() == 4);
+
778 BEAST_EXPECT(blob[0] == 0xDE);
+
779 BEAST_EXPECT(blob[1] == 0xAD);
+
780 BEAST_EXPECT(blob[2] == 0xBE);
+
781 BEAST_EXPECT(blob[3] == 0xEF);
+
782 }
+
783
+
784 // Test non-hex string for blob (should fail)
+
785 {
+
786 Json::Value j;
+
787 j[sfPublicKey] = "XYZ123";
+
788 STParsedJSONObject obj("Test", j);
+
789 BEAST_EXPECT(!obj.object.has_value());
+
790 }
+
791
+
792 // Test array value for blob (should fail)
+
793 {
+
794 Json::Value j;
+
795 j[sfPublicKey] = Json::Value(Json::arrayValue);
+
796 STParsedJSONObject obj("Test", j);
+
797 BEAST_EXPECT(!obj.object.has_value());
+
798 }
+
799
+
800 // Test object value for blob (should fail)
+
801 {
+
802 Json::Value j;
+
803 j[sfPublicKey] = Json::Value(Json::objectValue);
+
804 STParsedJSONObject obj("Test", j);
+
805 BEAST_EXPECT(!obj.object.has_value());
+
806 }
+
807 }
+
+
808
+
809 void
+
+ +
811 {
+
812 testcase("Vector256");
+
813 // Test with valid array of hex strings for Vector256
+
814 {
+
815 Json::Value j;
+ +
817 arr.append(
+
818 "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCD"
+
819 "EF");
+
820 arr.append(
+
821 "FEDCBA9876543210FEDCBA9876543210FEDCBA9876543210FEDCBA98765432"
+
822 "10");
+
823 j[sfHashes] = arr;
+
824 STParsedJSONObject obj("Test", j);
+
825 BEAST_EXPECT(obj.object.has_value());
+
826 BEAST_EXPECT(obj.object->isFieldPresent(sfHashes));
+
827 auto const& vec = obj.object->getFieldV256(sfHashes);
+
828 BEAST_EXPECT(vec.size() == 2);
+
829 BEAST_EXPECT(to_string(vec[0]) == arr[0u].asString());
+
830 BEAST_EXPECT(to_string(vec[1]) == arr[1u].asString());
+
831 }
+
832 // Test empty array for Vector256 (should be valid, size 0)
+
833 {
+
834 Json::Value j;
+ +
836 j[sfHashes] = arr;
+
837 STParsedJSONObject obj("Test", j);
+
838 BEAST_EXPECT(obj.object.has_value());
+
839 BEAST_EXPECT(obj.object->isFieldPresent(sfHashes));
+
840 auto const& vec = obj.object->getFieldV256(sfHashes);
+
841 BEAST_EXPECT(vec.size() == 0);
+
842 }
+
843
+
844 // Test array with invalid hex string (should fail)
+
845 {
+
846 Json::Value j;
+ +
848 arr.append("nothexstring");
+
849 j[sfHashes] = arr;
+
850 STParsedJSONObject obj("Test", j);
+
851 BEAST_EXPECT(!obj.object.has_value());
+
852 }
+
853
+
854 // Test array with string of wrong length (should fail)
+
855 {
+
856 Json::Value j;
+ +
858 arr.append("0123456789ABCDEF"); // too short for uint256
+
859 j[sfHashes] = arr;
+
860 STParsedJSONObject obj("Test", j);
+
861 BEAST_EXPECT(!obj.object.has_value());
+
862 }
+
863
+
864 // Test array with non-string element (should fail)
+
865 {
+
866 Json::Value j;
+ +
868 arr.append(12345);
+
869 j[sfHashes] = arr;
+
870 STParsedJSONObject obj("Test", j);
+
871 BEAST_EXPECT(!obj.object.has_value());
+
872 }
+
873
+
874 // Test non-array value for Vector256 (should fail)
+
875 {
+
876 Json::Value j;
+
877 j[sfHashes] = "notanarray";
+
878 STParsedJSONObject obj("Test", j);
+
879 BEAST_EXPECT(!obj.object.has_value());
+
880 }
+
881
+
882 // Test array with object element (should fail)
+
883 {
+
884 Json::Value j;
+ + +
887 objElem["foo"] = "bar";
+
888 arr.append(objElem);
+
889 j[sfHashes] = arr;
+
890 STParsedJSONObject obj("Test", j);
+
891 BEAST_EXPECT(!obj.object.has_value());
+
892 }
+
893 }
+
+
894
+
895 void
+
+ +
897 {
+
898 testcase("Account");
+
899 // Test with valid base58 string for AccountID
+
900 {
+
901 Json::Value j;
+
902 j[sfAccount] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
903 STParsedJSONObject obj("Test", j);
+
904 BEAST_EXPECT(obj.object.has_value());
+
905 BEAST_EXPECT(obj.object->isFieldPresent(sfAccount));
+
906 auto const& acct = obj.object->getAccountID(sfAccount);
+
907 BEAST_EXPECT(acct.size() == 20);
+
908 BEAST_EXPECT(
+
909 toBase58(acct) == "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh");
+
910 }
+
911
+
912 // Valid hex string for AccountID
+
913 {
+
914 Json::Value j;
+
915 j[sfAccount] = "000102030405060708090A0B0C0D0E0F10111213";
+
916 STParsedJSONObject obj("Test", j);
+
917 BEAST_EXPECT(obj.object.has_value());
+
918 BEAST_EXPECT(obj.object->isFieldPresent(sfAccount));
+
919 auto const& acct = obj.object->getAccountID(sfAccount);
+
920 BEAST_EXPECT(acct.size() == 20);
+
921 }
+
922
+
923 // Invalid base58 string for AccountID
+
924 {
+
925 Json::Value j;
+
926 j[sfAccount] = "notAValidBase58Account";
+
927 STParsedJSONObject obj("Test", j);
+
928 BEAST_EXPECT(!obj.object.has_value());
+
929 }
+
930
+
931 // Invalid hex string for AccountID (too short)
+
932 {
+
933 Json::Value j;
+
934 j[sfAccount] = "001122334455";
+
935 STParsedJSONObject obj("Test", j);
+
936 BEAST_EXPECT(!obj.object.has_value());
+
937 }
+
938
+
939 // Invalid hex string for AccountID (too long)
+
940 {
+
941 Json::Value j;
+
942 j[sfAccount] = "000102030405060708090A0B0C0D0E0F101112131415";
+
943 STParsedJSONObject obj("Test", j);
+
944 BEAST_EXPECT(!obj.object.has_value());
+
945 }
+
946
+
947 // Invalid hex string for AccountID (bad chars)
+
948 {
+
949 Json::Value j;
+
950 j[sfAccount] = "000102030405060708090A0B0C0D0E0F1011121G";
+
951 STParsedJSONObject obj("Test", j);
+
952 BEAST_EXPECT(!obj.object.has_value());
+
953 }
+
954
+
955 // Empty string for AccountID (should fail)
+
956 {
+
957 Json::Value j;
+
958 j[sfAccount] = "";
+
959 STParsedJSONObject obj("Test", j);
+
960 BEAST_EXPECT(!obj.object.has_value());
+
961 }
+
962
+
963 // Array value for AccountID (should fail)
+
964 {
+
965 Json::Value j;
+
966 j[sfAccount] = Json::Value(Json::arrayValue);
+
967 STParsedJSONObject obj("Test", j);
+
968 BEAST_EXPECT(!obj.object.has_value());
+
969 }
+
970
+
971 // Object value for AccountID (should fail)
+
972 {
+
973 Json::Value j;
+
974 j[sfAccount] = Json::Value(Json::objectValue);
+
975 STParsedJSONObject obj("Test", j);
+
976 BEAST_EXPECT(!obj.object.has_value());
+
977 }
+
978 }
+
+
979
+
980 void
+
+ +
982 {
+
983 testcase("Currency");
+
984 // Test with valid ISO code for currency
+
985 {
+
986 Json::Value j;
+
987 j[sfBaseAsset] = "USD";
+
988 STParsedJSONObject obj("Test", j);
+
989 BEAST_EXPECT(obj.object.has_value());
+
990 BEAST_EXPECT(obj.object->isFieldPresent(sfBaseAsset));
+
991 auto const& curr = obj.object->getFieldCurrency(sfBaseAsset);
+
992 BEAST_EXPECT(curr.currency().size() == 20);
+
993 }
+
994
+
995 // Valid ISO code
+
996 {
+
997 Json::Value j;
+
998 j[sfBaseAsset] = "EUR";
+
999 STParsedJSONObject obj("Test", j);
+
1000 BEAST_EXPECT(obj.object.has_value());
+
1001 BEAST_EXPECT(obj.object->isFieldPresent(sfBaseAsset));
+
1002 auto const& curr = obj.object->getFieldCurrency(sfBaseAsset);
+
1003 BEAST_EXPECT(curr.currency().size() == 20);
+
1004 }
+
1005
+
1006 // Valid hex string for currency
+
1007 {
+
1008 Json::Value j;
+
1009 j[sfBaseAsset] = "0123456789ABCDEF01230123456789ABCDEF0123";
+
1010 STParsedJSONObject obj("Test", j);
+
1011 if (BEAST_EXPECT(obj.object.has_value()))
+
1012 {
+
1013 BEAST_EXPECT(obj.object->isFieldPresent(sfBaseAsset));
+
1014 auto const& curr = obj.object->getFieldCurrency(sfBaseAsset);
+
1015 BEAST_EXPECT(curr.currency().size() == 20);
+
1016 }
+
1017 }
+
1018
+
1019 // Invalid ISO code (too long)
+
1020 {
+
1021 Json::Value j;
+
1022 j[sfBaseAsset] = "USDD";
+
1023 STParsedJSONObject obj("Test", j);
+
1024 BEAST_EXPECT(!obj.object.has_value());
+
1025 }
+
1026
+
1027 // lowercase ISO code
+
1028 {
+
1029 Json::Value j;
+
1030 j[sfBaseAsset] = "usd";
+
1031 STParsedJSONObject obj("Test", j);
+
1032 BEAST_EXPECT(obj.object.has_value());
+
1033 BEAST_EXPECT(obj.object->isFieldPresent(sfBaseAsset));
+
1034 auto const& curr = obj.object->getFieldCurrency(sfBaseAsset);
+
1035 BEAST_EXPECT(curr.currency().size() == 20);
+
1036 }
+
1037
+
1038 // Invalid hex string (too short)
+
1039 {
+
1040 Json::Value j;
+
1041 j[sfBaseAsset] = "0123456789AB";
+
1042 STParsedJSONObject obj("Test", j);
+
1043 BEAST_EXPECT(!obj.object.has_value());
+
1044 }
+
1045
+
1046 // Invalid hex string (too long)
+
1047 {
+
1048 Json::Value j;
+
1049 j[sfBaseAsset] = "0123456789ABCDEF0123456789";
+
1050 STParsedJSONObject obj("Test", j);
+
1051 BEAST_EXPECT(!obj.object.has_value());
+
1052 }
+
1053
+
1054 // Empty string for currency (should fail)
+
1055 {
+
1056 Json::Value j;
+
1057 j[sfBaseAsset] = "";
+
1058 STParsedJSONObject obj("Test", j);
+
1059 BEAST_EXPECT(obj.object.has_value());
+
1060 BEAST_EXPECT(obj.object->isFieldPresent(sfBaseAsset));
+
1061 auto const& curr = obj.object->getFieldCurrency(sfBaseAsset);
+
1062 BEAST_EXPECT(curr.currency().size() == 20);
+
1063 }
+
1064
+
1065 // Array value for currency (should fail)
+
1066 {
+
1067 Json::Value j;
+
1068 j[sfBaseAsset] = Json::Value(Json::arrayValue);
+
1069 STParsedJSONObject obj("Test", j);
+
1070 BEAST_EXPECT(!obj.object.has_value());
+
1071 }
+
1072
+
1073 // Object value for currency (should fail)
+
1074 {
+
1075 Json::Value j;
+
1076 j[sfBaseAsset] = Json::Value(Json::objectValue);
+
1077 STParsedJSONObject obj("Test", j);
+
1078 BEAST_EXPECT(!obj.object.has_value());
+
1079 }
+
1080 }
+
+
1081
+
1082 void
+
+ +
1084 {
+
1085 testcase("Amount");
+
1086 // Test with string value for Amount
+
1087 {
+
1088 Json::Value j;
+
1089 j[sfAmount] = "100000000000000000";
+
1090 STParsedJSONObject obj("Test", j);
+
1091 BEAST_EXPECT(obj.object.has_value());
+
1092 BEAST_EXPECT(obj.object->isFieldPresent(sfAmount));
+
1093 BEAST_EXPECT(
+
1094 obj.object->getFieldAmount(sfAmount) ==
+
1095 STAmount(100000000000000000ull));
+
1096 }
+
1097
+
1098 // Test with int value for Amount
+
1099 {
+
1100 Json::Value j;
+
1101 j[sfAmount] = 4294967295u;
+
1102 STParsedJSONObject obj("Test", j);
+
1103 BEAST_EXPECT(obj.object.has_value());
+
1104 BEAST_EXPECT(obj.object->isFieldPresent(sfAmount));
+
1105 BEAST_EXPECT(
+
1106 obj.object->getFieldAmount(sfAmount) == STAmount(4294967295u));
+
1107 }
+
1108
+
1109 // Test with decimal string for Amount (should fail)
+
1110 {
+
1111 Json::Value j;
+
1112 j[sfAmount] = "123.45";
+
1113 STParsedJSONObject obj("Test", j);
+
1114 BEAST_EXPECT(!obj.object.has_value());
+
1115 }
+
1116
+
1117 // Test with empty string for Amount (should fail)
+
1118 {
+
1119 Json::Value j;
+
1120 j[sfAmount] = "";
+
1121 STParsedJSONObject obj("Test", j);
+
1122 BEAST_EXPECT(!obj.object.has_value());
+
1123 }
+
1124
+
1125 // Test with non-numeric string for Amount (should fail)
+
1126 {
+
1127 Json::Value j;
+
1128 j[sfAmount] = "notanumber";
+
1129 STParsedJSONObject obj("Test", j);
+
1130 BEAST_EXPECT(!obj.object.has_value());
+
1131 }
+
1132
+
1133 // Test with object value for Amount (should fail)
+
1134 {
+
1135 Json::Value j;
+
1136 j[sfAmount] = Json::Value(Json::objectValue);
+
1137 STParsedJSONObject obj("Test", j);
+
1138 BEAST_EXPECT(!obj.object.has_value());
+
1139 }
+
1140 }
+
+
1141
+
1142 void
+
+ +
1144 {
+
1145 testcase("PathSet");
+
1146 // Valid test: single path with single element
+
1147 {
+
1148 Json::Value j;
+ + +
1151 elem["account"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1152 elem["currency"] = "USD";
+
1153 elem["issuer"] = "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe";
+
1154 path.append(elem);
+ +
1156 pathset.append(path);
+
1157 j[sfPaths] = pathset;
+
1158 STParsedJSONObject obj("Test", j);
+
1159 if (BEAST_EXPECT(obj.object.has_value()))
+
1160 {
+
1161 BEAST_EXPECT(obj.object->isFieldPresent(sfPaths));
+
1162 auto const& ps = obj.object->getFieldPathSet(sfPaths);
+
1163 BEAST_EXPECT(!ps.empty());
+
1164 BEAST_EXPECT(ps.size() == 1);
+
1165 BEAST_EXPECT(ps[0].size() == 1);
+
1166 BEAST_EXPECT(
+
1167 ps[0][0].getAccountID() ==
+
1168 parseBase58<AccountID>(
+
1169 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"));
+
1170 BEAST_EXPECT(to_string(ps[0][0].getCurrency()) == "USD");
+
1171 BEAST_EXPECT(
+
1172 ps[0][0].getIssuerID() ==
+
1173 parseBase58<AccountID>(
+
1174 "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"));
+
1175 }
+
1176 }
+
1177
+
1178 // Valid test: non-standard currency code
+
1179 {
+
1180 Json::Value j;
+ + +
1183 elem["account"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1184 elem["currency"] = "0123456789ABCDEF01230123456789ABCDEF0123";
+
1185 elem["issuer"] = "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe";
+
1186 path.append(elem);
+ +
1188 pathset.append(path);
+
1189 j[sfPaths] = pathset;
+
1190 STParsedJSONObject obj("Test", j);
+
1191 BEAST_EXPECT(obj.object.has_value());
+
1192 BEAST_EXPECT(obj.object->isFieldPresent(sfPaths));
+
1193 auto const& ps = obj.object->getFieldPathSet(sfPaths);
+
1194 BEAST_EXPECT(!ps.empty());
+
1195 }
+
1196
+
1197 // Test with non-array value for PathSet (should fail)
+
1198 {
+
1199 Json::Value j;
+
1200 j[sfPaths] = "notanarray";
+
1201 STParsedJSONObject obj("Test", j);
+
1202 BEAST_EXPECT(!obj.object.has_value());
+
1203 }
+
1204
+
1205 // Test with array containing non-array element (should fail)
+
1206 {
+
1207 Json::Value j;
+ +
1209 pathset.append("notanarray");
+
1210 j[sfPaths] = pathset;
+
1211 STParsedJSONObject obj("Test", j);
+
1212 BEAST_EXPECT(!obj.object.has_value());
+
1213 }
+
1214
+
1215 // Test with array containing array with non-object element (should
+
1216 // fail)
+
1217 {
+
1218 Json::Value j;
+ +
1220 path.append("notanobject");
+ +
1222 pathset.append(path);
+
1223 j[sfPaths] = pathset;
+
1224 STParsedJSONObject obj("Test", j);
+
1225 BEAST_EXPECT(!obj.object.has_value());
+
1226 }
+
1227
+
1228 // Test with array containing array with object missing required keys
+
1229 // (should fail)
+
1230 {
+
1231 Json::Value j;
+ + +
1234 elem["foo"] = "bar"; // not a valid path element key
+
1235 path.append(elem);
+ +
1237 pathset.append(path);
+
1238 j[sfPaths] = pathset;
+
1239 STParsedJSONObject obj("Test", j);
+
1240 BEAST_EXPECT(!obj.object.has_value());
+
1241 }
+
1242
+
1243 // Test with array containing array with object with invalid account
+
1244 // value (should fail)
+
1245 {
+
1246 Json::Value j;
+ + +
1249 elem["account"] = "notAValidBase58Account";
+
1250 path.append(elem);
+ +
1252 pathset.append(path);
+
1253 j[sfPaths] = pathset;
+
1254 STParsedJSONObject obj("Test", j);
+
1255 BEAST_EXPECT(!obj.object.has_value());
+
1256 }
+
1257
+
1258 // Test with account not string (should fail)
+
1259 {
+
1260 Json::Value j;
+ + +
1263 elem["account"] = 12345;
+
1264 path.append(elem);
+ +
1266 pathset.append(path);
+
1267 j[sfPaths] = pathset;
+
1268 STParsedJSONObject obj("Test", j);
+
1269 BEAST_EXPECT(!obj.object.has_value());
+
1270 }
+
1271
+
1272 // Test with currency not string (should fail)
+
1273 {
+
1274 Json::Value j;
+ + +
1277 elem["currency"] = 12345;
+
1278 path.append(elem);
+ +
1280 pathset.append(path);
+
1281 j[sfPaths] = pathset;
+
1282 STParsedJSONObject obj("Test", j);
+
1283 BEAST_EXPECT(!obj.object.has_value());
+
1284 }
+
1285
+
1286 // Test with non-standard currency not hex (should fail)
+
1287 {
+
1288 Json::Value j;
+ + +
1291 elem["currency"] = "notAValidCurrency";
+
1292 path.append(elem);
+ +
1294 pathset.append(path);
+
1295 j[sfPaths] = pathset;
+
1296 STParsedJSONObject obj("Test", j);
+
1297 BEAST_EXPECT(!obj.object.has_value());
+
1298 }
+
1299
+
1300 // Test with issuer not string (should fail)
+
1301 {
+
1302 Json::Value j;
+ + +
1305 elem["issuer"] = 12345;
+
1306 path.append(elem);
+ +
1308 pathset.append(path);
+
1309 j[sfPaths] = pathset;
+
1310 STParsedJSONObject obj("Test", j);
+
1311 BEAST_EXPECT(!obj.object.has_value());
+
1312 }
+
1313
+
1314 // Test with issuer not base58 (should fail)
+
1315 {
+
1316 Json::Value j;
+ + +
1319 elem["issuer"] = "notAValidBase58Account";
+
1320 path.append(elem);
+ +
1322 pathset.append(path);
+
1323 j[sfPaths] = pathset;
+
1324 STParsedJSONObject obj("Test", j);
+
1325 BEAST_EXPECT(!obj.object.has_value());
+
1326 }
+
1327 }
+
+
1328
+
1329 void
+
+ +
1331 {
+
1332 testcase("Issue");
+
1333 // Valid Issue: currency and issuer as base58
+
1334 {
+
1335 Json::Value j;
+
1336 Json::Value issueJson(Json::objectValue);
+
1337 issueJson["currency"] = "USD";
+
1338 issueJson["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1339 j[sfAsset] = issueJson;
+
1340 STParsedJSONObject obj("Test", j);
+
1341 if (BEAST_EXPECTS(
+
1342 obj.object.has_value(), obj.error.toStyledString()))
+
1343 {
+
1344 BEAST_EXPECT(obj.object->isFieldPresent(sfAsset));
+
1345 auto const& issueField = (*obj.object)[sfAsset];
+
1346 auto const issue = issueField.value().get<Issue>();
+
1347 BEAST_EXPECT(issue.currency.size() == 20);
+
1348 BEAST_EXPECT(to_string(issue.currency) == "USD");
+
1349 BEAST_EXPECT(issue.account.size() == 20);
+
1350 BEAST_EXPECT(
+
1351 issue.account ==
+
1352 parseBase58<AccountID>(
+
1353 "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"));
+
1354 }
+
1355 }
+
1356
+
1357 // Valid Issue: currency as hex
+
1358 {
+
1359 Json::Value j;
+
1360 Json::Value issueJson(Json::objectValue);
+
1361 issueJson["currency"] = "0123456789ABCDEF01230123456789ABCDEF0123";
+
1362 issueJson["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1363 j[sfAsset] = issueJson;
+
1364 STParsedJSONObject obj("Test", j);
+
1365 if (BEAST_EXPECT(obj.object.has_value()))
+
1366 {
+
1367 BEAST_EXPECT(obj.object->isFieldPresent(sfAsset));
+
1368 auto const& issueField = (*obj.object)[sfAsset];
+
1369 auto const issue = issueField.value().get<Issue>();
+
1370 BEAST_EXPECT(issue.currency.size() == 20);
+
1371 BEAST_EXPECT(issue.account.size() == 20);
+
1372 }
+
1373 }
+
1374
+
1375 // Valid Issue: MPTID
+
1376 {
+
1377 Json::Value j;
+
1378 Json::Value issueJson(Json::objectValue);
+
1379 issueJson["mpt_issuance_id"] =
+
1380 "0000000000000000000000004D5054494431323334234234";
+
1381 j[sfAsset] = issueJson;
+
1382 STParsedJSONObject obj("Test", j);
+
1383 if (BEAST_EXPECT(obj.object.has_value()))
+
1384 {
+
1385 BEAST_EXPECT(obj.object->isFieldPresent(sfAsset));
+
1386 auto const& issueField = (*obj.object)[sfAsset];
+
1387 auto const issue = issueField.value().get<MPTIssue>();
+
1388 BEAST_EXPECT(issue.getMptID().size() == 24);
+
1389 }
+
1390 }
+
1391
+
1392 // Invalid Issue: missing currency
+
1393 {
+
1394 Json::Value j;
+ +
1396 issue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1397 j[sfAsset] = issue;
+
1398 STParsedJSONObject obj("Test", j);
+
1399 BEAST_EXPECT(!obj.object.has_value());
+
1400 }
+
1401
+
1402 // Invalid Issue: missing issuer
+
1403 {
+
1404 Json::Value j;
+ +
1406 issue["currency"] = "USD";
+
1407 j[sfAsset] = issue;
+
1408 STParsedJSONObject obj("Test", j);
+
1409 BEAST_EXPECT(!obj.object.has_value());
+
1410 }
+
1411
+
1412 // Invalid Issue: currency too long
+
1413 {
+
1414 Json::Value j;
+ +
1416 issue["currency"] = "USDD";
+
1417 issue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1418 j[sfAsset] = issue;
+
1419 STParsedJSONObject obj("Test", j);
+
1420 BEAST_EXPECT(!obj.object.has_value());
+
1421 }
+
1422
+
1423 // Invalid Issue: issuer not base58 or hex
+
1424 {
+
1425 Json::Value j;
+ +
1427 issue["currency"] = "USD";
+
1428 issue["issuer"] = "notAValidIssuer";
+
1429 j[sfAsset] = issue;
+
1430 STParsedJSONObject obj("Test", j);
+
1431 BEAST_EXPECT(!obj.object.has_value());
+
1432 }
+
1433
+
1434 // Invalid Issue: currency not string
+
1435 {
+
1436 Json::Value j;
+ +
1438 issue["currency"] = Json::Value(Json::arrayValue);
+
1439 issue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1440 j[sfAsset] = issue;
+
1441 STParsedJSONObject obj("Test", j);
+
1442 BEAST_EXPECT(!obj.object.has_value());
+
1443 }
+
1444
+
1445 // Invalid Issue: issuer not string
+
1446 {
+
1447 Json::Value j;
+ +
1449 issue["currency"] = "USD";
+
1450 issue["issuer"] = Json::Value(Json::objectValue);
+
1451 j[sfAsset] = issue;
+
1452 STParsedJSONObject obj("Test", j);
+
1453 BEAST_EXPECT(!obj.object.has_value());
+
1454 }
+
1455
+
1456 // Invalid Issue: not an object
+
1457 {
+
1458 Json::Value j;
+
1459 j[sfAsset] = "notanobject";
+
1460 STParsedJSONObject obj("Test", j);
+
1461 BEAST_EXPECT(!obj.object.has_value());
+
1462 }
+
1463 }
+
+
1464
+
1465 void
+
+ +
1467 {
+
1468 testcase("XChainBridge");
+
1469 // Valid XChainBridge
+
1470 {
+
1471 Json::Value j;
+ +
1473 Json::Value issuingChainIssue(Json::objectValue);
+
1474 issuingChainIssue["currency"] = "USD";
+
1475 issuingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1476 Json::Value lockingChainIssue(Json::objectValue);
+
1477 lockingChainIssue["currency"] = "EUR";
+
1478 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1479 bridge["LockingChainIssue"] = lockingChainIssue;
+
1480 bridge["IssuingChainIssue"] = issuingChainIssue;
+
1481 bridge["LockingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1482 bridge["IssuingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1483 j[sfXChainBridge] = bridge;
+
1484 STParsedJSONObject obj("Test", j);
+
1485 if (BEAST_EXPECT(obj.object.has_value()))
+
1486 {
+
1487 BEAST_EXPECT(obj.object->isFieldPresent(sfXChainBridge));
+
1488 auto const& bridgeField = (*obj.object)[sfXChainBridge];
+
1489 BEAST_EXPECT(
+
1490 bridgeField->lockingChainIssue().currency.size() == 20);
+
1491 BEAST_EXPECT(
+
1492 bridgeField->issuingChainIssue().currency.size() == 20);
+
1493 }
+
1494 }
+
1495
+
1496 // Valid XChainBridge: issues as hex currency
+
1497 {
+
1498 Json::Value j;
+ +
1500 Json::Value issuingChainIssue(Json::objectValue);
+
1501 issuingChainIssue["currency"] =
+
1502 "0123456789ABCDEF01230123456789ABCDEF0123";
+
1503 issuingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1504 Json::Value lockingChainIssue(Json::objectValue);
+
1505 lockingChainIssue["currency"] =
+
1506 "0123456789ABCDEF01230123456789ABCDEF0123";
+
1507 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1508 bridge["LockingChainIssue"] = lockingChainIssue;
+
1509 bridge["IssuingChainIssue"] = issuingChainIssue;
+
1510 bridge["LockingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1511 bridge["IssuingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1512 j[sfXChainBridge] = bridge;
+
1513 STParsedJSONObject obj("Test", j);
+
1514 if (BEAST_EXPECT(obj.object.has_value()))
+
1515 {
+
1516 BEAST_EXPECT(obj.object->isFieldPresent(sfXChainBridge));
+
1517 auto const& bridgeField = (*obj.object)[sfXChainBridge];
+
1518 BEAST_EXPECT(
+
1519 bridgeField->lockingChainIssue().currency.size() == 20);
+
1520 BEAST_EXPECT(
+
1521 bridgeField->issuingChainIssue().currency.size() == 20);
+
1522 }
+
1523 }
+
1524
+
1525 // Invalid XChainBridge: missing LockingChainIssue
+
1526 {
+
1527 Json::Value j;
+ +
1529 Json::Value issuingChainIssue(Json::objectValue);
+
1530 issuingChainIssue["currency"] = "USD";
+
1531 issuingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1532 bridge["IssuingChainIssue"] = issuingChainIssue;
+
1533 bridge["LockingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1534 bridge["IssuingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1535 j[sfXChainBridge] = bridge;
+
1536 STParsedJSONObject obj("Test", j);
+
1537 BEAST_EXPECT(!obj.object.has_value());
+
1538 }
+
1539
+
1540 // Invalid XChainBridge: missing IssuingChainIssue
+
1541 {
+
1542 Json::Value j;
+ +
1544 Json::Value lockingChainIssue(Json::objectValue);
+
1545 lockingChainIssue["currency"] = "EUR";
+
1546 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1547 bridge["LockingChainIssue"] = lockingChainIssue;
+
1548 bridge["LockingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1549 bridge["IssuingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1550 j[sfXChainBridge] = bridge;
+
1551 STParsedJSONObject obj("Test", j);
+
1552 BEAST_EXPECT(!obj.object.has_value());
+
1553 }
+
1554
+
1555 // Invalid XChainBridge: missing LockingChainDoor
+
1556 {
+
1557 Json::Value j;
+ +
1559 Json::Value issuingChainIssue(Json::objectValue);
+
1560 issuingChainIssue["currency"] = "USD";
+
1561 issuingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1562 bridge["IssuingChainIssue"] = issuingChainIssue;
+
1563 Json::Value lockingChainIssue(Json::objectValue);
+
1564 lockingChainIssue["currency"] = "EUR";
+
1565 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1566 bridge["LockingChainIssue"] = lockingChainIssue;
+
1567 bridge["IssuingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1568 j[sfXChainBridge] = bridge;
+
1569 STParsedJSONObject obj("Test", j);
+
1570 BEAST_EXPECT(!obj.object.has_value());
+
1571 }
+
1572
+
1573 // Invalid XChainBridge: missing IssuingChainDoor
+
1574 {
+
1575 Json::Value j;
+ +
1577 Json::Value issuingChainIssue(Json::objectValue);
+
1578 issuingChainIssue["currency"] = "USD";
+
1579 issuingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1580 bridge["IssuingChainIssue"] = issuingChainIssue;
+
1581 Json::Value lockingChainIssue(Json::objectValue);
+
1582 lockingChainIssue["currency"] = "EUR";
+
1583 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1584 bridge["LockingChainIssue"] = lockingChainIssue;
+
1585 bridge["LockingChainDoor"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1586 j[sfXChainBridge] = bridge;
+
1587 STParsedJSONObject obj("Test", j);
+
1588 BEAST_EXPECT(!obj.object.has_value());
+
1589 }
+
1590
+
1591 // Invalid XChainBridge: IssuingChainIssue not an object
+
1592 {
+
1593 Json::Value j;
+ +
1595 bridge["LockingChainIssue"] = "notanobject";
+
1596 bridge["IssuingChainIssue"] = "notanobject";
+
1597 j[sfXChainBridge] = bridge;
+
1598 STParsedJSONObject obj("Test", j);
+
1599 BEAST_EXPECT(!obj.object.has_value());
+
1600 }
+
1601
+
1602 // Invalid XChainBridge: IssuingChainIssue missing currency
+
1603 {
+
1604 Json::Value j;
+ + +
1607 asset["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1608 Json::Value lockingChainIssue(Json::objectValue);
+
1609 lockingChainIssue["currency"] = "EUR";
+
1610 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1611 bridge["LockingChainIssue"] = lockingChainIssue;
+
1612 bridge["IssuingChainIssue"] = asset;
+
1613 j[sfXChainBridge] = bridge;
+
1614 STParsedJSONObject obj("Test", j);
+
1615 BEAST_EXPECT(!obj.object.has_value());
+
1616 }
+
1617
+
1618 // Invalid XChainBridge: asset missing issuer
+
1619 {
+
1620 Json::Value j;
+ + +
1623 asset["currency"] = "USD";
+
1624 Json::Value lockingChainIssue(Json::objectValue);
+
1625 lockingChainIssue["currency"] = "EUR";
+
1626 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1627 bridge["LockingChainIssue"] = lockingChainIssue;
+
1628 bridge["IssuingChainIssue"] = asset;
+
1629 j[sfXChainBridge] = bridge;
+
1630 STParsedJSONObject obj("Test", j);
+
1631 BEAST_EXPECT(!obj.object.has_value());
+
1632 }
+
1633
+
1634 // Invalid XChainBridge: asset issuer not base58
+
1635 {
+
1636 Json::Value j;
+ + +
1639 asset["currency"] = "USD";
+
1640 asset["issuer"] = "notAValidBase58Account";
+
1641 Json::Value lockingChainIssue(Json::objectValue);
+
1642 lockingChainIssue["currency"] = "EUR";
+
1643 lockingChainIssue["issuer"] = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
+
1644 bridge["LockingChainIssue"] = lockingChainIssue;
+
1645 bridge["IssuingChainIssue"] = asset;
+
1646 j[sfXChainBridge] = bridge;
+
1647 STParsedJSONObject obj("Test", j);
+
1648 BEAST_EXPECT(!obj.object.has_value());
+
1649 }
+
1650
+
1651 // Invalid XChainBridge: not an object
+
1652 {
+
1653 Json::Value j;
+
1654 j[sfXChainBridge] = "notanobject";
+
1655 STParsedJSONObject obj("Test", j);
+
1656 BEAST_EXPECT(!obj.object.has_value());
+
1657 }
+
1658 }
+
+
1659
+
1660 void
+
+ +
1662 {
+
1663 testcase("Number");
+
1664 // Valid integer value for STNumber
+
1665 {
+
1666 Json::Value j;
+
1667 j[sfNumber] = 12345;
+
1668 STParsedJSONObject obj("Test", j);
+
1669 BEAST_EXPECT(obj.object.has_value());
+
1670 BEAST_EXPECT(obj.object->isFieldPresent(sfNumber));
+
1671 BEAST_EXPECT(
+
1672 obj.object->getFieldNumber(sfNumber).value() ==
+
1673 Number(12345, 0));
+
1674 }
+
1675
+
1676 // Valid uint value for STNumber
+
1677 {
+
1678 Json::Value j;
+
1679 j[sfNumber] = 12345u;
+
1680 STParsedJSONObject obj("Test", j);
+
1681 BEAST_EXPECT(obj.object.has_value());
+
1682 BEAST_EXPECT(obj.object->isFieldPresent(sfNumber));
+
1683 BEAST_EXPECT(
+
1684 obj.object->getFieldNumber(sfNumber).value() ==
+
1685 Number(12345, 0));
+
1686 }
+
1687
+
1688 // Valid string integer value for STNumber
+
1689 {
+
1690 Json::Value j;
+
1691 j[sfNumber] = "67890";
+
1692 STParsedJSONObject obj("Test", j);
+
1693 BEAST_EXPECT(obj.object.has_value());
+
1694 BEAST_EXPECT(obj.object->isFieldPresent(sfNumber));
+
1695 BEAST_EXPECT(
+
1696 obj.object->getFieldNumber(sfNumber).value() ==
+
1697 Number(67890, 0));
+
1698 }
+
1699
+
1700 // Valid negative integer value for STNumber
+
1701 {
+
1702 Json::Value j;
+
1703 j[sfNumber] = -42;
+
1704 STParsedJSONObject obj("Test", j);
+
1705 BEAST_EXPECT(obj.object.has_value());
+
1706 BEAST_EXPECT(obj.object->isFieldPresent(sfNumber));
+
1707 BEAST_EXPECT(
+
1708 obj.object->getFieldNumber(sfNumber).value() == Number(-42, 0));
+
1709 }
+
1710
+
1711 // Valid string negative integer value for STNumber
+
1712 {
+
1713 Json::Value j;
+
1714 j[sfNumber] = "-123";
+
1715 STParsedJSONObject obj("Test", j);
+
1716 BEAST_EXPECT(obj.object.has_value());
+
1717 BEAST_EXPECT(obj.object->isFieldPresent(sfNumber));
+
1718 BEAST_EXPECT(
+
1719 obj.object->getFieldNumber(sfNumber).value() ==
+
1720 Number(-123, 0));
+
1721 }
+
1722
+
1723 // Valid floating point value for STNumber
+
1724 {
+
1725 Json::Value j;
+
1726 j[sfNumber] = "3.14159";
+
1727 STParsedJSONObject obj("Test", j);
+
1728 if (BEAST_EXPECT(obj.object.has_value()))
+
1729 {
+
1730 BEAST_EXPECT(obj.object->isFieldPresent(sfNumber));
+
1731 BEAST_EXPECT(
+
1732 obj.object->getFieldNumber(sfNumber).value() ==
+
1733 Number(314159, -5));
+
1734 }
+
1735 }
+
1736
+
1737 // Invalid string value for STNumber (not a number)
+
1738 {
+
1739 Json::Value j;
+
1740 j[sfNumber] = "notanumber";
+
1741 STParsedJSONObject obj("Test", j);
+
1742 BEAST_EXPECT(!obj.object.has_value());
+
1743 }
+
1744
+
1745 // Invalid array value for STNumber
+
1746 {
+
1747 Json::Value j;
+
1748 j[sfNumber] = Json::Value(Json::arrayValue);
+
1749 STParsedJSONObject obj("Test", j);
+
1750 BEAST_EXPECT(!obj.object.has_value());
+
1751 }
+
1752
+
1753 // Invalid object value for STNumber
+
1754 {
+
1755 Json::Value j;
+
1756 j[sfNumber] = Json::Value(Json::objectValue);
+
1757 STParsedJSONObject obj("Test", j);
+
1758 BEAST_EXPECT(!obj.object.has_value());
+
1759 }
+
1760
+
1761 // Empty string for STNumber (should fail)
+
1762 {
+
1763 Json::Value j;
+
1764 j[sfNumber] = "";
+
1765 STParsedJSONObject obj("Test", j);
+
1766 BEAST_EXPECT(!obj.object.has_value());
+
1767 }
+
1768 }
+
+
1769
+
1770 void
+
+ +
1772 {
+
1773 testcase("Object");
+
1774 // Test with valid object for Object
+
1775 {
+
1776 Json::Value j;
+ +
1778 objVal[sfTransactionResult] = 1;
+
1779 j[sfTransactionMetaData] = objVal;
+
1780 STParsedJSONObject obj("Test", j);
+
1781 BEAST_EXPECT(obj.object.has_value());
+
1782 BEAST_EXPECT(obj.object->isFieldPresent(sfTransactionMetaData));
+
1783 auto const& result =
+
1784 obj.object->peekFieldObject(sfTransactionMetaData);
+
1785 BEAST_EXPECT(result.getFieldU8(sfTransactionResult) == 1);
+
1786 }
+
1787
+
1788 // Test with non-object value for Object (should fail)
+
1789 {
+
1790 Json::Value j;
+
1791 j[sfTransactionMetaData] = "notanobject";
+
1792 STParsedJSONObject obj("Test", j);
+
1793 BEAST_EXPECT(!obj.object.has_value());
+
1794 }
+
1795
+
1796 // Test with array value for Object (should fail)
+
1797 {
+
1798 Json::Value j;
+ +
1800 arr.append(1);
+
1801 j[sfTransactionMetaData] = arr;
+
1802 STParsedJSONObject obj("Test", j);
+
1803 BEAST_EXPECT(!obj.object.has_value());
+
1804 }
+
1805
+
1806 // Test with null value for Object (should fail)
+
1807 {
+
1808 Json::Value j;
+
1809 j[sfTransactionMetaData] = Json::Value(Json::nullValue);
+
1810 STParsedJSONObject obj("Test", j);
+
1811 BEAST_EXPECT(!obj.object.has_value());
+
1812 }
+
1813
+
1814 // Test with max depth (should succeed)
+
1815 // max depth is 64
+
1816 {
+
1817 Json::Value j;
+ +
1819 Json::Value* current = &obj;
+
1820 for (int i = 0; i < 63; ++i)
+
1821 {
+ +
1823 (*current)[sfTransactionMetaData] = next;
+
1824 current = &((*current)[sfTransactionMetaData]);
+
1825 }
+
1826 (*current)[sfTransactionResult.getJsonName()] = 1;
+
1827 j[sfTransactionMetaData] = obj;
+
1828 STParsedJSONObject parsed("Test", j);
+
1829 BEAST_EXPECT(parsed.object.has_value());
+
1830 BEAST_EXPECT(parsed.object->isFieldPresent(sfTransactionMetaData));
+
1831 }
+
1832
+
1833 // Test with depth exceeding maxDepth (should fail)
+
1834 {
+
1835 Json::Value j;
+ +
1837 Json::Value* current = &obj;
+
1838 for (int i = 0; i < 64; ++i)
+
1839 {
+ +
1841 (*current)[sfTransactionMetaData] = next;
+
1842 current = &((*current)[sfTransactionMetaData]);
+
1843 }
+
1844 (*current)[sfTransactionResult.getJsonName()] = 1;
+
1845 j[sfTransactionMetaData] = obj;
+
1846 STParsedJSONObject parsed("Test", j);
+
1847 BEAST_EXPECT(!parsed.object.has_value());
+
1848 }
+
1849 }
+
+
1850
+
1851 void
+
+ +
1853 {
+
1854 testcase("Array");
+
1855 // Test with valid array for Array
+
1856 {
+
1857 Json::Value j;
+ + +
1860 elem[sfTransactionResult] = 2;
+ +
1862 elem2[sfTransactionMetaData] = elem;
+
1863 arr.append(elem2);
+
1864 j[sfSignerEntries] = arr;
+
1865 STParsedJSONObject obj("Test", j);
+
1866 BEAST_EXPECT(obj.object.has_value());
+
1867 BEAST_EXPECT(obj.object->isFieldPresent(sfSignerEntries));
+
1868 auto const& result = obj.object->getFieldArray(sfSignerEntries);
+
1869 if (BEAST_EXPECT(result.size() == 1))
+
1870 {
+
1871 BEAST_EXPECT(result[0].getFName() == sfTransactionMetaData);
+
1872 BEAST_EXPECT(result[0].getJson(0) == elem);
+
1873 }
+
1874 }
+
1875
+
1876 // Test with array containing non-object element (should fail)
+
1877 {
+
1878 Json::Value j;
+ +
1880 arr.append("notanobject");
+
1881 j[sfSignerEntries] = arr;
+
1882 STParsedJSONObject obj("Test", j);
+
1883 BEAST_EXPECT(!obj.object.has_value());
+
1884 }
+
1885
+
1886 // Test with array containing object with invalid field (should fail)
+
1887 {
+
1888 Json::Value j;
+ + +
1891 elem["invalidField"] = 1;
+
1892 arr.append(elem);
+
1893 j[sfSignerEntries] = arr;
+
1894 STParsedJSONObject obj("Test", j);
+
1895 BEAST_EXPECT(!obj.object.has_value());
+
1896 }
+
1897
+
1898 // Test with array containing object with multiple keys (should fail)
+
1899 {
+
1900 Json::Value j;
+ + +
1903 elem[sfTransactionResult] = 2;
+
1904 elem[sfNetworkID] = 3;
+
1905 arr.append(elem);
+
1906 j[sfSignerEntries] = arr;
+
1907 STParsedJSONObject obj("Test", j);
+
1908 BEAST_EXPECT(!obj.object.has_value());
+
1909 }
+
1910
+
1911 // Test with non-array value for Array (should fail)
+
1912 {
+
1913 Json::Value j;
+
1914 j[sfSignerEntries] = "notanarray";
+
1915 STParsedJSONObject obj("Test", j);
+
1916 BEAST_EXPECT(!obj.object.has_value());
+
1917 }
+
1918
+
1919 // Test with array containing object with valid field but invalid value
+
1920 // (should fail)
+
1921 {
+
1922 Json::Value j;
+ + +
1925 elem[sfTransactionResult] = "notanint";
+
1926 arr.append(elem);
+
1927 j[sfSignerEntries] = arr;
+
1928 STParsedJSONObject obj("Test", j);
+
1929 BEAST_EXPECT(!obj.object.has_value());
+
1930 }
+
1931
+
1932 // Test with empty array for Array (should be valid)
+
1933 {
+
1934 Json::Value j;
+ +
1936 j[sfSignerEntries] = arr;
+
1937 STParsedJSONObject obj("Test", j);
+
1938 BEAST_EXPECT(obj.object.has_value());
+
1939 BEAST_EXPECT(obj.object->isFieldPresent(sfSignerEntries));
+
1940 }
+
1941
+
1942 // Test with object provided but not object SField
+
1943 {
+
1944 Json::Value j;
+ + +
1947 obj[0u][sfTransactionResult] = 1;
+
1948 j[sfSignerEntries] = obj;
+
1949 STParsedJSONObject parsed("Test", j);
+
1950 BEAST_EXPECT(!parsed.object.has_value());
+
1951 }
+
1952
+
1953 // Test invalid children
+
1954 {
+
1955 try
+
1956 {
+
1957 /*
+
1958
+
1959 STArray/STObject constructs don't really map perfectly to json
+
1960 arrays/objects.
+
1961
+
1962 STObject is an associative container, mapping fields to value,
+
1963 but an STObject may also have a Field as its name, stored
+
1964 outside the associative structure. The name is important, so to
+
1965 maintain fidelity, it will take TWO json objects to represent
+
1966 them.
+
1967
+
1968 */
+
1969 std::string faulty(
+
1970 "{\"Template\":[{"
+
1971 "\"ModifiedNode\":{\"Sequence\":1}, "
+
1972 "\"DeletedNode\":{\"Sequence\":1}"
+
1973 "}]}");
+
1974
+ +
1976 Json::Value faultyJson;
+
1977 bool parsedOK(parseJSONString(faulty, faultyJson));
+
1978 unexpected(!parsedOK, "failed to parse");
+
1979 STParsedJSONObject parsed("test", faultyJson);
+
1980 BEAST_EXPECT(!parsed.object);
+
1981 }
+
1982 catch (std::runtime_error& e)
+
1983 {
+
1984 std::string what(e.what());
+
1985 unexpected(
+
1986 what.find("First level children of `Template`") != 0);
+
1987 }
+
1988 }
+
1989 }
+
+
1990
+
1991 void
+
+ +
1993 {
+
1994 testcase("General Invalid Cases");
+
1995
+
1996 {
+
1997 Json::Value j;
+
1998 j[sfLedgerEntry] = 1; // not a valid SField for STParsedJSON
+
1999 }
+
2000
+
2001 {
+
2002 std::string const goodJson(R"({"CloseResolution":19,"Method":250,)"
+
2003 R"("TransactionResult":"tecFROZEN"})");
+
2004
+
2005 Json::Value jv;
+
2006 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
+
2007 {
+
2008 STParsedJSONObject parsed("test", jv);
+
2009 if (BEAST_EXPECT(parsed.object))
+
2010 {
+
2011 std::string const& serialized(
+
2012 to_string(parsed.object->getJson(JsonOptions::none)));
+
2013 BEAST_EXPECT(serialized == goodJson);
+
2014 }
+
2015 }
+
2016 }
+
2017
+
2018 {
+
2019 std::string const goodJson(
+
2020 R"({"CloseResolution":19,"Method":"250",)"
+
2021 R"("TransactionResult":"tecFROZEN"})");
+
2022 std::string const expectedJson(
+
2023 R"({"CloseResolution":19,"Method":250,)"
+
2024 R"("TransactionResult":"tecFROZEN"})");
+
2025
+
2026 Json::Value jv;
+
2027 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
+
2028 {
+
2029 // Integer values are always parsed as int,
+
2030 // unless they're too big. We want a small uint.
+
2031 jv["CloseResolution"] = Json::UInt(19);
+
2032 STParsedJSONObject parsed("test", jv);
+
2033 if (BEAST_EXPECT(parsed.object))
+
2034 {
+
2035 std::string const& serialized(
+
2036 to_string(parsed.object->getJson(JsonOptions::none)));
+
2037 BEAST_EXPECT(serialized == expectedJson);
+
2038 }
+
2039 }
+
2040 }
+
2041
+
2042 {
+
2043 std::string const goodJson(
+
2044 R"({"CloseResolution":"19","Method":"250",)"
+
2045 R"("TransactionResult":"tecFROZEN"})");
+
2046 std::string const expectedJson(
+
2047 R"({"CloseResolution":19,"Method":250,)"
+
2048 R"("TransactionResult":"tecFROZEN"})");
+
2049
+
2050 Json::Value jv;
+
2051 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
+
2052 {
+
2053 // Integer values are always parsed as int,
+
2054 // unless they're too big. We want a small uint.
+
2055 jv["CloseResolution"] = Json::UInt(19);
+
2056 STParsedJSONObject parsed("test", jv);
+
2057 if (BEAST_EXPECT(parsed.object))
+
2058 {
+
2059 std::string const& serialized(
+
2060 to_string(parsed.object->getJson(JsonOptions::none)));
+
2061 BEAST_EXPECT(serialized == expectedJson);
+
2062 }
+
2063 }
+
2064 }
+
2065
+
2066 {
+
2067 std::string const json(R"({"CloseResolution":19,"Method":250,)"
+
2068 R"("TransactionResult":"terQUEUED"})");
+
2069
+
2070 Json::Value jv;
+
2071 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2072 {
+
2073 STParsedJSONObject parsed("test", jv);
+
2074 BEAST_EXPECT(!parsed.object);
+
2075 BEAST_EXPECT(parsed.error);
+
2076 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2077 BEAST_EXPECT(
+
2078 parsed.error[jss::error_message] ==
+
2079 "Field 'test.TransactionResult' is out of range.");
+
2080 }
+
2081 }
+
2082
+
2083 {
+
2084 std::string const json(R"({"CloseResolution":19,"Method":"pony",)"
+
2085 R"("TransactionResult":"tesSUCCESS"})");
+
2086
+
2087 Json::Value jv;
+
2088 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2089 {
+
2090 STParsedJSONObject parsed("test", jv);
+
2091 BEAST_EXPECT(!parsed.object);
+
2092 BEAST_EXPECT(parsed.error);
+
2093 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2094 BEAST_EXPECT(
+
2095 parsed.error[jss::error_message] ==
+
2096 "Field 'test.Method' has bad type.");
+
2097 }
+
2098 }
+
2099
+
2100 {
+
2101 std::string const json(
+
2102 R"({"CloseResolution":19,"Method":3294967296,)"
+
2103 R"("TransactionResult":"tesSUCCESS"})");
+
2104
+
2105 Json::Value jv;
+
2106 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2107 {
+
2108 STParsedJSONObject parsed("test", jv);
+
2109 BEAST_EXPECT(!parsed.object);
+
2110 BEAST_EXPECT(parsed.error);
+
2111 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2112 BEAST_EXPECT(
+
2113 parsed.error[jss::error_message] ==
+
2114 "Field 'test.Method' is out of range.");
+
2115 }
+
2116 }
+
2117
+
2118 {
+
2119 std::string const json(R"({"CloseResolution":-10,"Method":42,)"
+
2120 R"("TransactionResult":"tesSUCCESS"})");
+
2121
+
2122 Json::Value jv;
+
2123 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2124 {
+
2125 STParsedJSONObject parsed("test", jv);
+
2126 BEAST_EXPECT(!parsed.object);
+
2127 BEAST_EXPECT(parsed.error);
+
2128 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2129 BEAST_EXPECT(
+
2130 parsed.error[jss::error_message] ==
+
2131 "Field 'test.CloseResolution' is out of range.");
+
2132 }
+
2133 }
+
2134
+
2135 {
+
2136 std::string const json(
+
2137 R"({"CloseResolution":19,"Method":3.141592653,)"
+
2138 R"("TransactionResult":"tesSUCCESS"})");
+
2139
+
2140 Json::Value jv;
+
2141 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2142 {
+
2143 STParsedJSONObject parsed("test", jv);
+
2144 BEAST_EXPECT(!parsed.object);
+
2145 BEAST_EXPECT(parsed.error);
+
2146 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2147 BEAST_EXPECT(
+
2148 parsed.error[jss::error_message] ==
+
2149 "Field 'test.Method' has bad type.");
+
2150 }
+
2151 }
+
2152
+
2153 {
+
2154 std::string const goodJson(R"({"CloseResolution":19,"Method":250,)"
+
2155 R"("TransferFee":"65535"})");
+
2156 std::string const expectedJson(
+
2157 R"({"CloseResolution":19,"Method":250,)"
+
2158 R"("TransferFee":65535})");
+
2159
+
2160 Json::Value jv;
+
2161 if (BEAST_EXPECT(parseJSONString(goodJson, jv)))
+
2162 {
+
2163 STParsedJSONObject parsed("test", jv);
+
2164 if (BEAST_EXPECT(parsed.object))
+
2165 {
+
2166 std::string const& serialized(
+
2167 to_string(parsed.object->getJson(JsonOptions::none)));
+
2168 BEAST_EXPECT(serialized == expectedJson);
+
2169 }
+
2170 }
+
2171 }
+
2172
+
2173 {
+
2174 std::string const json(R"({"CloseResolution":19,"Method":250,)"
+
2175 R"("TransferFee":"65536"})");
+
2176
+
2177 Json::Value jv;
+
2178 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2179 {
+
2180 STParsedJSONObject parsed("test", jv);
+
2181 BEAST_EXPECT(!parsed.object);
+
2182 BEAST_EXPECT(parsed.error);
+
2183 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2184 BEAST_EXPECT(
+
2185 parsed.error[jss::error_message] ==
+
2186 "Field 'test.TransferFee' has invalid data.");
+
2187 }
+
2188 }
+
2189
+
2190 {
+
2191 std::string const json(R"({"CloseResolution":19,"Method":250,)"
+
2192 R"("TransferFee":"Payment"})");
+
2193
+
2194 Json::Value jv;
+
2195 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2196 {
+
2197 STParsedJSONObject parsed("test", jv);
+
2198 BEAST_EXPECT(!parsed.object);
+
2199 BEAST_EXPECT(parsed.error);
+
2200 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2201 BEAST_EXPECT(
+
2202 parsed.error[jss::error_message] ==
+
2203 "Field 'test.TransferFee' has invalid data.");
+
2204 }
+
2205 }
+
2206
+
2207 {
+
2208 std::string const json(R"({"CloseResolution":19,"Method":250,)"
+
2209 R"("TransferFee":true})");
+
2210
+
2211 Json::Value jv;
+
2212 if (BEAST_EXPECT(parseJSONString(json, jv)))
+
2213 {
+
2214 STParsedJSONObject parsed("test", jv);
+
2215 BEAST_EXPECT(!parsed.object);
+
2216 BEAST_EXPECT(parsed.error);
+
2217 BEAST_EXPECT(parsed.error[jss::error] == "invalidParams");
+
2218 BEAST_EXPECT(
+
2219 parsed.error[jss::error_message] ==
+
2220 "Field 'test.TransferFee' has bad type.");
+
2221 }
+
2222 }
+
2223 }
+
+
2224
+
2225 void
+
+
2226 run() override
+
2227 {
+
2228 // Instantiate a jtx::Env so debugLog writes are exercised.
+
2229 test::jtx::Env env(*this);
+
2230 testUInt8();
+
2231 testUInt16();
+
2232 testUInt32();
+
2233 testUInt64();
+
2234 testUInt128();
+
2235 testUInt160();
+
2236 testUInt192();
+
2237 testUInt256();
+
2238 testBlob();
+
2239 testVector256();
+
2240 testAccount();
+
2241 testCurrency();
+
2242 testAmount();
+
2243 testPathSet();
+
2244 testIssue();
+ +
2246 testNumber();
+
2247 testObject();
+
2248 testArray();
+
2249 testEdgeCases();
+
2250 }
+
+
2251};
+
+
2252
+
2253BEAST_DEFINE_TESTSUITE(STParsedJSON, protocol, ripple);
+
2254
+
2255} // namespace ripple
+
T all_of(T... args)
+
Unserialize a JSON document into a Value.
Definition json_reader.h:39
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
Represents a JSON value.
Definition json_value.h:149
+
Value & append(Value const &value)
Append value to array at the end.
+
std::string toStyledString() const
bool isObject() const
A testsuite class.
Definition suite.h:55
bool unexpected(Condition shouldBeFalse, String const &reason)
Definition suite.h:499
testcase_t testcase
Memberspace for declaring test cases.
Definition suite.h:155
-
void fail(String const &reason, char const *file, int line)
Record a failure.
Definition suite.h:533
+
A currency issued by an account.
Definition Issue.h:33
+ + +
Holds the serialized result of parsing an input JSON object.
std::optional< STObject > object
The STObject if the parse was successful.
Json::Value error
On failure, an appropriate set of error values.
- - - -
bool parseJSONString(std::string const &json, Json::Value &to)
-
void run() override
Runs the suite.
- + + + + + + + + + + +
bool parseJSONString(std::string const &json, Json::Value &to)
+ + + + +
void run() override
Runs the suite.
+ + + + + + + +
Integers of any length that is a multiple of 32-bits.
Definition base_uint.h:86
A transaction testing environment.
Definition Env.h:121
T find(T... args)
+
@ nullValue
'null' value
Definition json_value.h:38
+
@ arrayValue
array value (ordered list)
Definition json_value.h:44
+
@ objectValue
object value (collection of name/value pairs).
Definition json_value.h:45
unsigned int UInt
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
+
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
+
@ current
This was a new validation and was added.
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:630
+
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
diff --git a/annotated.html b/annotated.html index 767f97415f..fcdc2e3dab 100644 --- a/annotated.html +++ b/annotated.html @@ -1559,19 +1559,19 @@ $(function() {  CSTExchange< STBlob, Slice >  CSTExchange< STInteger< U >, T >  CSTInteger - CSTIssue - CSTLedgerEntry - CSTNumberA serializable number - CSTNumber_test - CSTObject - CFieldErr - COptionalProxy - CProxy - CTransform - CValueProxy - CSTObject_test - CSTParsedJSON_test - CSTParsedJSONArrayHolds the serialized result of parsing an input JSON array + CSTInteger_test + CSTIssue + CSTLedgerEntry + CSTNumberA serializable number + CSTNumber_test + CSTObject + CFieldErr + COptionalProxy + CProxy + CTransform + CValueProxy + CSTObject_test + CSTParsedJSON_test  CSTParsedJSONObjectHolds the serialized result of parsing an input JSON object  CSTPath  CSTPathElement diff --git a/classbeast_1_1aged__associative__container__test__base.html b/classbeast_1_1aged__associative__container__test__base.html index 1f80c603da..235c92b0d4 100644 --- a/classbeast_1_1aged__associative__container__test__base.html +++ b/classbeast_1_1aged__associative__container__test__base.html @@ -2216,7 +2216,7 @@ template<class Condition >

Runs the suite.

-

Implemented in ripple::test::AccountDelete_test, ripple::AccountTxPaging_test, ripple::AmendmentTable_test, ripple::test::AMM_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AMMExtended_test, ripple::test::Batch_test, ripple::Check_test, ripple::Clawback_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DepositAuth_test, ripple::test::DepositPreauth_test, ripple::test::DID_test, ripple::Discrepancy_test, ripple::test::DNS_test, ripple::test::Escrow_test, ripple::test::EscrowToken_test, ripple::test::FeeVote_test, ripple::FixNFTokenPageLinks_test, ripple::test::Flow_test, ripple::test::Flow_manual_test, ripple::Freeze_test, ripple::test::HashRouter_test, ripple::test::Invariants_test, ripple::test::LedgerHistory_test, ripple::LedgerLoad_test, ripple::test::LedgerMaster_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayerLong_test, ripple::LoadFeeTrack_test, ripple::test::LPTokenTransfer_test, ripple::test::Manifest_test, ripple::test::MPToken_test, ripple::test::MultiSign_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenDisallowIncoming_test, ripple::NFTokenWOfixV1_test, ripple::NFTokenWOTokenRemint_test, ripple::NFTokenWOTokenReserve_test, ripple::NFTokenWOMintOffer_test, ripple::NFTokenWOModify_test, ripple::NFTokenAllFeatures_test, ripple::NFTokenAuth_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenBurnWOfixFungTokens_test, ripple::NFTokenBurnWOFixTokenRemint_test, ripple::NFTokenBurnWOFixNFTPageLinks_test, ripple::NFTokenBurnAllFeatures_test, ripple::NFTokenDir_test, ripple::test::OfferBaseUtil_test, ripple::test::OfferWTakerDryOffer_test, ripple::test::OfferWOSmallQOffers_test, ripple::test::OfferWOFillOrKill_test, ripple::test::OfferWOPermDEX_test, ripple::test::OfferAllFeatures_test, ripple::test::Offer_manual_test, ripple::OfferStream_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::PlumpBook_test, ripple::test::ThinBook_test, ripple::test::OversizeMeta_test, ripple::test::FindOversizeCross_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PseudoTx_test, ripple::test::RCLValidations_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::SetAuth_test, ripple::SetRegularKey_test, ripple::test::SetTrust_test, ripple::test::SHAMapStore_test, ripple::test::TheoreticalQuality_test, ripple::Ticket_test, ripple::test::Transaction_ordering_test, ripple::TrustAndBalance_test, ripple::Apply_test, ripple::test::TxQPosNegFlows_test, ripple::test::TxQMetaInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorSite_test, ripple::Vault_test, ripple::test::XChain_test, ripple::test::XChainSim_test, ripple::test::base_uint_test, ripple::test::Buffer_test, ripple::test::DetectCrash_test, ripple::test::Expected_test, ripple::FileUtilities_test, ripple::hardened_hash_test, ripple::tests::IntrusiveShared_test, ripple::IOUAmount_test, ripple::test::join_test, ripple::KeyCache_test, ripple::Number_test, ripple::PerfLog_test, ripple::StringUtilities_test, ripple::TaggedCache_test, ripple::test::units_test, ripple::XRPAmount_test, beast::aged_set_test, beast::aged_map_test, beast::aged_multiset_test, beast::aged_multimap_test, beast::aged_unordered_set_test, beast::aged_unordered_map_test, beast::aged_unordered_multiset_test, beast::aged_unordered_multimap_test, beast::abstract_clock_test, beast::basic_seconds_clock_test, ripple::test::CurrentThreadName_test, io_latency_probe_test, beast::Journal_test, beast::PropertyStream_test, beast::Zero_test, beast::unit_test::print_test, beast::IP::IPEndpoint_test, beast::LexicalCast_test, beast::SemanticVersion_test, beast::XXHasher_test, ripple::cryptoconditions::PreimageSha256_test, ripple::test::ByzantineFailureSim_test, ripple::test::Consensus_test, ripple::test::DistributedValidators_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::NegativeUNL_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::RCLCensorshipDetector_test, ripple::test::ScaleFreeSim_test, ripple::test::csf::Validations_test, ripple::test::ClosureCounter_test, ripple::Config_test, ripple::test::Coroutine_test, ripple::test::JobQueue_test, ripple::SociDB_test, ripple::Workers_test, ripple::test::BasicNetwork_test, ripple::test::Digraph_test, ripple::test::Histogram_test, ripple::test::Scheduler_test, ripple::json_value_test, Json::JsonObject_test, Json::Output_test, Json::JsonWriter_test, ripple::test::Env_test, ripple::test::WSClient_test, ripple::test::BookDirs_test, ripple::test::Directory_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::SkipList_test, ripple::test::View_test, ripple::test::GetAmendments_test, ripple::NodeStore::Backend_test, ripple::NodeStore::NodeStoreBasic_test, ripple::NodeStore::Database_test, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::tests::cluster_test, ripple::test::compression_test, ripple::test::handshake_test, ripple::ProtocolVersion_test, ripple::test::reduce_relay_test, ripple::test::reduce_relay_simulate_test, ripple::short_read_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::test::ApiVersion_test, ripple::BuildInfo_test, ripple::Hooks_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::Issue_test, ripple::Memo_test, ripple::test::MultiApiJson_test, ripple::PublicKey_test, ripple::Quality_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::STAccount_test, ripple::STAmount_test, ripple::test::STIssue_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::InnerObjectFormatsSerializer_test, ripple::STValidation_test, ripple::TER_test, ripple::types_test, ripple::Resource::ResourceManager_test, ripple::AccountCurrencies_test, ripple::RPC::AccountLines_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::AccountSet_test, ripple::test::AccountTx_test, ripple::AmendmentBlocked_test, ripple::test::AMMInfo_test, ripple::test::Book_test, ripple::test::BookChanges_test, ripple::Connect_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuthorized_test, ripple::Feature_test, ripple::test::GatewayBalances_test, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::GetCounts_test, ripple::test::Handler_test, ripple::RPC::JSONRPC_test, ripple::RPC::WalletPropose_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::test::LedgerEntry_test, ripple::test::LedgerEntry_XChain_test, ripple::LedgerHeader_test, ripple::RPC::LedgerRequestRPC_test, ripple::test::LedgerRPC_test, ripple::test::ManifestRPC_test, ripple::test::NoRipple_test, ripple::NoRippleCheck_test, ripple::NoRippleCheckLimits_test, ripple::OwnerInfo_test, ripple::Peers_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ServerInfo_test, ripple::test::Simulate_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::test::Subscribe_test, ripple::Transaction_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorRPC_test, ripple::Version_test, ripple::test::Server_test, ripple::test::ServerStatus_test, ripple::tests::FetchPack_test, ripple::tests::SHAMap_test, ripple::tests::SHAMapPathProof_test, and ripple::tests::SHAMapSync_test.

+

Implemented in ripple::test::AccountDelete_test, ripple::AccountTxPaging_test, ripple::AmendmentTable_test, ripple::test::AMM_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AMMExtended_test, ripple::test::Batch_test, ripple::Check_test, ripple::Clawback_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DepositAuth_test, ripple::test::DepositPreauth_test, ripple::test::DID_test, ripple::Discrepancy_test, ripple::test::DNS_test, ripple::test::Escrow_test, ripple::test::EscrowToken_test, ripple::test::FeeVote_test, ripple::FixNFTokenPageLinks_test, ripple::test::Flow_test, ripple::test::Flow_manual_test, ripple::Freeze_test, ripple::test::HashRouter_test, ripple::test::Invariants_test, ripple::test::LedgerHistory_test, ripple::LedgerLoad_test, ripple::test::LedgerMaster_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayerLong_test, ripple::LoadFeeTrack_test, ripple::test::LPTokenTransfer_test, ripple::test::Manifest_test, ripple::test::MPToken_test, ripple::test::MultiSign_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenDisallowIncoming_test, ripple::NFTokenWOfixV1_test, ripple::NFTokenWOTokenRemint_test, ripple::NFTokenWOTokenReserve_test, ripple::NFTokenWOMintOffer_test, ripple::NFTokenWOModify_test, ripple::NFTokenAllFeatures_test, ripple::NFTokenAuth_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenBurnWOfixFungTokens_test, ripple::NFTokenBurnWOFixTokenRemint_test, ripple::NFTokenBurnWOFixNFTPageLinks_test, ripple::NFTokenBurnAllFeatures_test, ripple::NFTokenDir_test, ripple::test::OfferBaseUtil_test, ripple::test::OfferWTakerDryOffer_test, ripple::test::OfferWOSmallQOffers_test, ripple::test::OfferWOFillOrKill_test, ripple::test::OfferWOPermDEX_test, ripple::test::OfferAllFeatures_test, ripple::test::Offer_manual_test, ripple::OfferStream_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::PlumpBook_test, ripple::test::ThinBook_test, ripple::test::OversizeMeta_test, ripple::test::FindOversizeCross_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PseudoTx_test, ripple::test::RCLValidations_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::SetAuth_test, ripple::SetRegularKey_test, ripple::test::SetTrust_test, ripple::test::SHAMapStore_test, ripple::test::TheoreticalQuality_test, ripple::Ticket_test, ripple::test::Transaction_ordering_test, ripple::TrustAndBalance_test, ripple::Apply_test, ripple::test::TxQPosNegFlows_test, ripple::test::TxQMetaInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorSite_test, ripple::Vault_test, ripple::test::XChain_test, ripple::test::XChainSim_test, ripple::test::base_uint_test, ripple::test::Buffer_test, ripple::test::DetectCrash_test, ripple::test::Expected_test, ripple::FileUtilities_test, ripple::hardened_hash_test, ripple::tests::IntrusiveShared_test, ripple::IOUAmount_test, ripple::test::join_test, ripple::KeyCache_test, ripple::Number_test, ripple::PerfLog_test, ripple::StringUtilities_test, ripple::TaggedCache_test, ripple::test::units_test, ripple::XRPAmount_test, beast::aged_set_test, beast::aged_map_test, beast::aged_multiset_test, beast::aged_multimap_test, beast::aged_unordered_set_test, beast::aged_unordered_map_test, beast::aged_unordered_multiset_test, beast::aged_unordered_multimap_test, beast::abstract_clock_test, beast::basic_seconds_clock_test, ripple::test::CurrentThreadName_test, io_latency_probe_test, beast::Journal_test, beast::PropertyStream_test, beast::Zero_test, beast::unit_test::print_test, beast::IP::IPEndpoint_test, beast::LexicalCast_test, beast::SemanticVersion_test, beast::XXHasher_test, ripple::cryptoconditions::PreimageSha256_test, ripple::test::ByzantineFailureSim_test, ripple::test::Consensus_test, ripple::test::DistributedValidators_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::NegativeUNL_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::RCLCensorshipDetector_test, ripple::test::ScaleFreeSim_test, ripple::test::csf::Validations_test, ripple::test::ClosureCounter_test, ripple::Config_test, ripple::test::Coroutine_test, ripple::test::JobQueue_test, ripple::SociDB_test, ripple::Workers_test, ripple::test::BasicNetwork_test, ripple::test::Digraph_test, ripple::test::Histogram_test, ripple::test::Scheduler_test, ripple::json_value_test, Json::JsonObject_test, Json::Output_test, Json::JsonWriter_test, ripple::test::Env_test, ripple::test::WSClient_test, ripple::test::BookDirs_test, ripple::test::Directory_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::SkipList_test, ripple::test::View_test, ripple::test::GetAmendments_test, ripple::NodeStore::Backend_test, ripple::NodeStore::NodeStoreBasic_test, ripple::NodeStore::Database_test, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::tests::cluster_test, ripple::test::compression_test, ripple::test::handshake_test, ripple::ProtocolVersion_test, ripple::test::reduce_relay_test, ripple::test::reduce_relay_simulate_test, ripple::short_read_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::test::ApiVersion_test, ripple::BuildInfo_test, ripple::Hooks_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::Issue_test, ripple::Memo_test, ripple::test::MultiApiJson_test, ripple::PublicKey_test, ripple::Quality_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::STAccount_test, ripple::STAmount_test, ripple::STInteger_test, ripple::test::STIssue_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::InnerObjectFormatsSerializer_test, ripple::STValidation_test, ripple::TER_test, ripple::types_test, ripple::Resource::ResourceManager_test, ripple::AccountCurrencies_test, ripple::RPC::AccountLines_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::AccountSet_test, ripple::test::AccountTx_test, ripple::AmendmentBlocked_test, ripple::test::AMMInfo_test, ripple::test::Book_test, ripple::test::BookChanges_test, ripple::Connect_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuthorized_test, ripple::Feature_test, ripple::test::GatewayBalances_test, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::GetCounts_test, ripple::test::Handler_test, ripple::RPC::JSONRPC_test, ripple::RPC::WalletPropose_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::test::LedgerEntry_test, ripple::test::LedgerEntry_XChain_test, ripple::LedgerHeader_test, ripple::RPC::LedgerRequestRPC_test, ripple::test::LedgerRPC_test, ripple::test::ManifestRPC_test, ripple::test::NoRipple_test, ripple::NoRippleCheck_test, ripple::NoRippleCheckLimits_test, ripple::OwnerInfo_test, ripple::Peers_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ServerInfo_test, ripple::test::Simulate_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::test::Subscribe_test, ripple::Transaction_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorRPC_test, ripple::Version_test, ripple::test::Server_test, ripple::test::ServerStatus_test, ripple::tests::FetchPack_test, ripple::tests::SHAMap_test, ripple::tests::SHAMapPathProof_test, and ripple::tests::SHAMapSync_test.

diff --git a/classbeast_1_1unit__test_1_1suite.html b/classbeast_1_1unit__test_1_1suite.html index cbed7d7f90..389ea6bb1a 100644 --- a/classbeast_1_1unit__test_1_1suite.html +++ b/classbeast_1_1unit__test_1_1suite.html @@ -92,7 +92,7 @@ $(function() {

#include <suite.h>

-

Inherited by beast::IP::IPEndpoint_test, beast::Journal_test, beast::LexicalCast_test, beast::PropertyStream_test, beast::SemanticVersion_test, beast::XXHasher_test, beast::Zero_test, beast::abstract_clock_test, beast::aged_associative_container_test_base, beast::basic_seconds_clock_test, beast::unit_test::print_test, io_latency_probe_test, ripple::AccountCurrencies_test, ripple::AccountSet_test, ripple::AccountTxPaging_test, ripple::AmendmentBlocked_test, ripple::AmendmentTable_test, ripple::Apply_test, ripple::BuildInfo_test, ripple::Check_test, ripple::Clawback_test, ripple::Connect_test, ripple::Discrepancy_test, ripple::Feature_test, ripple::FileUtilities_test, ripple::FixNFTokenPageLinks_test, ripple::Freeze_test, ripple::GetCounts_test, ripple::Hooks_test, ripple::IOUAmount_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::InnerObjectFormatsSerializer_test, ripple::Issue_test, ripple::KeyCache_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::LedgerHeader_test, ripple::LedgerLoad_test, ripple::LoadFeeTrack_test, ripple::Memo_test, ripple::NFTokenAuth_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenDir_test, ripple::NoRippleCheckLimits_test, ripple::NoRippleCheck_test, ripple::NodeStore::TestBase, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::Number_test, ripple::OfferStream_test, ripple::OwnerInfo_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::Peers_test, ripple::PerfLog_test, ripple::ProtocolVersion_test, ripple::PublicKey_test, ripple::Quality_test, ripple::RPC::AccountLines_test, ripple::RPC::JSONRPC_test, ripple::RPC::LedgerRequestRPC_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::Resource::ResourceManager_test, ripple::STAccount_test, ripple::STAmount_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::STValidation_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::SetRegularKey_test, ripple::StringUtilities_test, ripple::TER_test, ripple::TaggedCache_test, ripple::TestSuite, ripple::Ticket_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::Transaction_test, ripple::TrustAndBalance_test, ripple::Vault_test, ripple::Version_test, ripple::Workers_test, ripple::XRPAmount_test, ripple::cryptoconditions::PreimageSha256_test, ripple::hardened_hash_test, ripple::json_value_test, ripple::short_read_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AccountDelete_test, ripple::test::AccountInfo_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::test::AccountTx_test, ripple::test::ApiVersion_test, ripple::test::BasicNetwork_test, ripple::test::Batch_test, ripple::test::BookChanges_test, ripple::test::BookDirs_test, ripple::test::Book_test, ripple::test::Buffer_test, ripple::test::ByzantineFailureSim_test, ripple::test::ClosureCounter_test, ripple::test::Consensus_test, ripple::test::Coroutine_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::CurrentThreadName_test, ripple::test::DID_test, ripple::test::DNS_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuth_test, ripple::test::DepositAuthorized_test, ripple::test::DepositPreauth_test, ripple::test::DetectCrash_test, ripple::test::Digraph_test, ripple::test::Directory_test, ripple::test::DistributedValidators_test, ripple::test::Env_test, ripple::test::EscrowToken_test, ripple::test::Escrow_test, ripple::test::Expected_test, ripple::test::FeeVote_test, ripple::test::FindOversizeCross_test, ripple::test::Flow_test, ripple::test::GatewayBalances_test, ripple::test::GetAmendments_test, ripple::test::Handler_test, ripple::test::HashRouter_test, ripple::test::Histogram_test, ripple::test::Invariants_test, ripple::test::JobQueue_test, ripple::test::LedgerEntry_XChain_test, ripple::test::LedgerEntry_test, ripple::test::LedgerHistory_test, ripple::test::LedgerMaster_test, ripple::test::LedgerRPC_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayerLong_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::MPToken_test, ripple::test::ManifestRPC_test, ripple::test::Manifest_test, ripple::test::MultiApiJson_test, ripple::test::MultiSign_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNL_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::test::NoRipple_test, ripple::test::OfferBaseUtil_test, ripple::test::OversizeMeta_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PlumpBook_test, ripple::test::PseudoTx_test, ripple::test::RCLCensorshipDetector_test, ripple::test::RCLValidations_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::SHAMapStore_test, ripple::test::STIssue_test, ripple::test::ScaleFreeSim_test, ripple::test::Scheduler_test, ripple::test::ServerInfo_test, ripple::test::ServerStatus_test, ripple::test::Server_test, ripple::test::SetAuth_test, ripple::test::SetTrust_test, ripple::test::Simulate_test, ripple::test::SkipList_test, ripple::test::Subscribe_test, ripple::test::TheoreticalQuality_test, ripple::test::Transaction_ordering_test, ripple::test::TxQPosNegFlows_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorRPC_test, ripple::test::ValidatorSite_test, ripple::test::View_test, ripple::test::WSClient_test, ripple::test::XChainSim_test, ripple::test::XChain_test, ripple::test::base_uint_test, ripple::test::compression_test, ripple::test::csf::Validations_test, ripple::test::handshake_test, ripple::test::join_test, ripple::test::jtx::AMMTestBase, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::reduce_relay_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::test::units_test, ripple::tests::FetchPack_test, ripple::tests::IntrusiveShared_test, ripple::tests::SHAMapPathProof_test, ripple::tests::SHAMapSync_test, ripple::tests::SHAMap_test, and ripple::types_test.

+

Inherited by beast::IP::IPEndpoint_test, beast::Journal_test, beast::LexicalCast_test, beast::PropertyStream_test, beast::SemanticVersion_test, beast::XXHasher_test, beast::Zero_test, beast::abstract_clock_test, beast::aged_associative_container_test_base, beast::basic_seconds_clock_test, beast::unit_test::print_test, io_latency_probe_test, ripple::AccountCurrencies_test, ripple::AccountSet_test, ripple::AccountTxPaging_test, ripple::AmendmentBlocked_test, ripple::AmendmentTable_test, ripple::Apply_test, ripple::BuildInfo_test, ripple::Check_test, ripple::Clawback_test, ripple::Connect_test, ripple::Discrepancy_test, ripple::Feature_test, ripple::FileUtilities_test, ripple::FixNFTokenPageLinks_test, ripple::Freeze_test, ripple::GetCounts_test, ripple::Hooks_test, ripple::IOUAmount_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::InnerObjectFormatsSerializer_test, ripple::Issue_test, ripple::KeyCache_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::LedgerHeader_test, ripple::LedgerLoad_test, ripple::LoadFeeTrack_test, ripple::Memo_test, ripple::NFTokenAuth_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenDir_test, ripple::NoRippleCheckLimits_test, ripple::NoRippleCheck_test, ripple::NodeStore::TestBase, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::Number_test, ripple::OfferStream_test, ripple::OwnerInfo_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::Peers_test, ripple::PerfLog_test, ripple::ProtocolVersion_test, ripple::PublicKey_test, ripple::Quality_test, ripple::RPC::AccountLines_test, ripple::RPC::JSONRPC_test, ripple::RPC::LedgerRequestRPC_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::Resource::ResourceManager_test, ripple::STAccount_test, ripple::STAmount_test, ripple::STInteger_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::STValidation_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::SetRegularKey_test, ripple::StringUtilities_test, ripple::TER_test, ripple::TaggedCache_test, ripple::TestSuite, ripple::Ticket_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::Transaction_test, ripple::TrustAndBalance_test, ripple::Vault_test, ripple::Version_test, ripple::Workers_test, ripple::XRPAmount_test, ripple::cryptoconditions::PreimageSha256_test, ripple::hardened_hash_test, ripple::json_value_test, ripple::short_read_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AccountDelete_test, ripple::test::AccountInfo_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::test::AccountTx_test, ripple::test::ApiVersion_test, ripple::test::BasicNetwork_test, ripple::test::Batch_test, ripple::test::BookChanges_test, ripple::test::BookDirs_test, ripple::test::Book_test, ripple::test::Buffer_test, ripple::test::ByzantineFailureSim_test, ripple::test::ClosureCounter_test, ripple::test::Consensus_test, ripple::test::Coroutine_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::CurrentThreadName_test, ripple::test::DID_test, ripple::test::DNS_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuth_test, ripple::test::DepositAuthorized_test, ripple::test::DepositPreauth_test, ripple::test::DetectCrash_test, ripple::test::Digraph_test, ripple::test::Directory_test, ripple::test::DistributedValidators_test, ripple::test::Env_test, ripple::test::EscrowToken_test, ripple::test::Escrow_test, ripple::test::Expected_test, ripple::test::FeeVote_test, ripple::test::FindOversizeCross_test, ripple::test::Flow_test, ripple::test::GatewayBalances_test, ripple::test::GetAmendments_test, ripple::test::Handler_test, ripple::test::HashRouter_test, ripple::test::Histogram_test, ripple::test::Invariants_test, ripple::test::JobQueue_test, ripple::test::LedgerEntry_XChain_test, ripple::test::LedgerEntry_test, ripple::test::LedgerHistory_test, ripple::test::LedgerMaster_test, ripple::test::LedgerRPC_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayerLong_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::MPToken_test, ripple::test::ManifestRPC_test, ripple::test::Manifest_test, ripple::test::MultiApiJson_test, ripple::test::MultiSign_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNL_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::test::NoRipple_test, ripple::test::OfferBaseUtil_test, ripple::test::OversizeMeta_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PlumpBook_test, ripple::test::PseudoTx_test, ripple::test::RCLCensorshipDetector_test, ripple::test::RCLValidations_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::SHAMapStore_test, ripple::test::STIssue_test, ripple::test::ScaleFreeSim_test, ripple::test::Scheduler_test, ripple::test::ServerInfo_test, ripple::test::ServerStatus_test, ripple::test::Server_test, ripple::test::SetAuth_test, ripple::test::SetTrust_test, ripple::test::Simulate_test, ripple::test::SkipList_test, ripple::test::Subscribe_test, ripple::test::TheoreticalQuality_test, ripple::test::Transaction_ordering_test, ripple::test::TxQPosNegFlows_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorRPC_test, ripple::test::ValidatorSite_test, ripple::test::View_test, ripple::test::WSClient_test, ripple::test::XChainSim_test, ripple::test::XChain_test, ripple::test::base_uint_test, ripple::test::compression_test, ripple::test::csf::Validations_test, ripple::test::handshake_test, ripple::test::join_test, ripple::test::jtx::AMMTestBase, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::reduce_relay_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::test::units_test, ripple::tests::FetchPack_test, ripple::tests::IntrusiveShared_test, ripple::tests::SHAMapPathProof_test, ripple::tests::SHAMapSync_test, ripple::tests::SHAMap_test, and ripple::types_test.

Collaboration diagram for beast::unit_test::suite:
@@ -953,7 +953,7 @@ template<class Condition >

Runs the suite.

-

Implemented in ripple::test::AccountDelete_test, ripple::AccountTxPaging_test, ripple::AmendmentTable_test, ripple::test::AMM_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AMMExtended_test, ripple::test::Batch_test, ripple::Check_test, ripple::Clawback_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DepositAuth_test, ripple::test::DepositPreauth_test, ripple::test::DID_test, ripple::Discrepancy_test, ripple::test::DNS_test, ripple::test::Escrow_test, ripple::test::EscrowToken_test, ripple::test::FeeVote_test, ripple::FixNFTokenPageLinks_test, ripple::test::Flow_test, ripple::test::Flow_manual_test, ripple::Freeze_test, ripple::test::HashRouter_test, ripple::test::Invariants_test, ripple::test::LedgerHistory_test, ripple::LedgerLoad_test, ripple::test::LedgerMaster_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayerLong_test, ripple::LoadFeeTrack_test, ripple::test::LPTokenTransfer_test, ripple::test::Manifest_test, ripple::test::MPToken_test, ripple::test::MultiSign_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenDisallowIncoming_test, ripple::NFTokenWOfixV1_test, ripple::NFTokenWOTokenRemint_test, ripple::NFTokenWOTokenReserve_test, ripple::NFTokenWOMintOffer_test, ripple::NFTokenWOModify_test, ripple::NFTokenAllFeatures_test, ripple::NFTokenAuth_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenBurnWOfixFungTokens_test, ripple::NFTokenBurnWOFixTokenRemint_test, ripple::NFTokenBurnWOFixNFTPageLinks_test, ripple::NFTokenBurnAllFeatures_test, ripple::NFTokenDir_test, ripple::test::OfferBaseUtil_test, ripple::test::OfferWTakerDryOffer_test, ripple::test::OfferWOSmallQOffers_test, ripple::test::OfferWOFillOrKill_test, ripple::test::OfferWOPermDEX_test, ripple::test::OfferAllFeatures_test, ripple::test::Offer_manual_test, ripple::OfferStream_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::PlumpBook_test, ripple::test::ThinBook_test, ripple::test::OversizeMeta_test, ripple::test::FindOversizeCross_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PseudoTx_test, ripple::test::RCLValidations_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::SetAuth_test, ripple::SetRegularKey_test, ripple::test::SetTrust_test, ripple::test::SHAMapStore_test, ripple::test::TheoreticalQuality_test, ripple::Ticket_test, ripple::test::Transaction_ordering_test, ripple::TrustAndBalance_test, ripple::Apply_test, ripple::test::TxQPosNegFlows_test, ripple::test::TxQMetaInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorSite_test, ripple::Vault_test, ripple::test::XChain_test, ripple::test::XChainSim_test, ripple::test::base_uint_test, ripple::test::Buffer_test, ripple::test::DetectCrash_test, ripple::test::Expected_test, ripple::FileUtilities_test, ripple::hardened_hash_test, ripple::tests::IntrusiveShared_test, ripple::IOUAmount_test, ripple::test::join_test, ripple::KeyCache_test, ripple::Number_test, ripple::PerfLog_test, ripple::StringUtilities_test, ripple::TaggedCache_test, ripple::test::units_test, ripple::XRPAmount_test, beast::aged_set_test, beast::aged_map_test, beast::aged_multiset_test, beast::aged_multimap_test, beast::aged_unordered_set_test, beast::aged_unordered_map_test, beast::aged_unordered_multiset_test, beast::aged_unordered_multimap_test, beast::abstract_clock_test, beast::basic_seconds_clock_test, ripple::test::CurrentThreadName_test, io_latency_probe_test, beast::Journal_test, beast::PropertyStream_test, beast::Zero_test, beast::unit_test::print_test, beast::IP::IPEndpoint_test, beast::LexicalCast_test, beast::SemanticVersion_test, beast::XXHasher_test, ripple::cryptoconditions::PreimageSha256_test, ripple::test::ByzantineFailureSim_test, ripple::test::Consensus_test, ripple::test::DistributedValidators_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::NegativeUNL_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::RCLCensorshipDetector_test, ripple::test::ScaleFreeSim_test, ripple::test::csf::Validations_test, ripple::test::ClosureCounter_test, ripple::Config_test, ripple::test::Coroutine_test, ripple::test::JobQueue_test, ripple::SociDB_test, ripple::Workers_test, ripple::test::BasicNetwork_test, ripple::test::Digraph_test, ripple::test::Histogram_test, ripple::test::Scheduler_test, ripple::json_value_test, Json::JsonObject_test, Json::Output_test, Json::JsonWriter_test, ripple::test::Env_test, ripple::test::WSClient_test, ripple::test::BookDirs_test, ripple::test::Directory_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::SkipList_test, ripple::test::View_test, ripple::test::GetAmendments_test, ripple::NodeStore::Backend_test, ripple::NodeStore::NodeStoreBasic_test, ripple::NodeStore::Database_test, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::tests::cluster_test, ripple::test::compression_test, ripple::test::handshake_test, ripple::ProtocolVersion_test, ripple::test::reduce_relay_test, ripple::test::reduce_relay_simulate_test, ripple::short_read_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::test::ApiVersion_test, ripple::BuildInfo_test, ripple::Hooks_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::Issue_test, ripple::Memo_test, ripple::test::MultiApiJson_test, ripple::PublicKey_test, ripple::Quality_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::STAccount_test, ripple::STAmount_test, ripple::test::STIssue_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::InnerObjectFormatsSerializer_test, ripple::STValidation_test, ripple::TER_test, ripple::types_test, ripple::Resource::ResourceManager_test, ripple::AccountCurrencies_test, ripple::RPC::AccountLines_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::AccountSet_test, ripple::test::AccountTx_test, ripple::AmendmentBlocked_test, ripple::test::AMMInfo_test, ripple::test::Book_test, ripple::test::BookChanges_test, ripple::Connect_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuthorized_test, ripple::Feature_test, ripple::test::GatewayBalances_test, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::GetCounts_test, ripple::test::Handler_test, ripple::RPC::JSONRPC_test, ripple::RPC::WalletPropose_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::test::LedgerEntry_test, ripple::test::LedgerEntry_XChain_test, ripple::LedgerHeader_test, ripple::RPC::LedgerRequestRPC_test, ripple::test::LedgerRPC_test, ripple::test::ManifestRPC_test, ripple::test::NoRipple_test, ripple::NoRippleCheck_test, ripple::NoRippleCheckLimits_test, ripple::OwnerInfo_test, ripple::Peers_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ServerInfo_test, ripple::test::Simulate_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::test::Subscribe_test, ripple::Transaction_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorRPC_test, ripple::Version_test, ripple::test::Server_test, ripple::test::ServerStatus_test, ripple::tests::FetchPack_test, ripple::tests::SHAMap_test, ripple::tests::SHAMapPathProof_test, and ripple::tests::SHAMapSync_test.

+

Implemented in ripple::test::AccountDelete_test, ripple::AccountTxPaging_test, ripple::AmendmentTable_test, ripple::test::AMM_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AMMExtended_test, ripple::test::Batch_test, ripple::Check_test, ripple::Clawback_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DepositAuth_test, ripple::test::DepositPreauth_test, ripple::test::DID_test, ripple::Discrepancy_test, ripple::test::DNS_test, ripple::test::Escrow_test, ripple::test::EscrowToken_test, ripple::test::FeeVote_test, ripple::FixNFTokenPageLinks_test, ripple::test::Flow_test, ripple::test::Flow_manual_test, ripple::Freeze_test, ripple::test::HashRouter_test, ripple::test::Invariants_test, ripple::test::LedgerHistory_test, ripple::LedgerLoad_test, ripple::test::LedgerMaster_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayerLong_test, ripple::LoadFeeTrack_test, ripple::test::LPTokenTransfer_test, ripple::test::Manifest_test, ripple::test::MPToken_test, ripple::test::MultiSign_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenDisallowIncoming_test, ripple::NFTokenWOfixV1_test, ripple::NFTokenWOTokenRemint_test, ripple::NFTokenWOTokenReserve_test, ripple::NFTokenWOMintOffer_test, ripple::NFTokenWOModify_test, ripple::NFTokenAllFeatures_test, ripple::NFTokenAuth_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenBurnWOfixFungTokens_test, ripple::NFTokenBurnWOFixTokenRemint_test, ripple::NFTokenBurnWOFixNFTPageLinks_test, ripple::NFTokenBurnAllFeatures_test, ripple::NFTokenDir_test, ripple::test::OfferBaseUtil_test, ripple::test::OfferWTakerDryOffer_test, ripple::test::OfferWOSmallQOffers_test, ripple::test::OfferWOFillOrKill_test, ripple::test::OfferWOPermDEX_test, ripple::test::OfferAllFeatures_test, ripple::test::Offer_manual_test, ripple::OfferStream_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::PlumpBook_test, ripple::test::ThinBook_test, ripple::test::OversizeMeta_test, ripple::test::FindOversizeCross_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PseudoTx_test, ripple::test::RCLValidations_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::SetAuth_test, ripple::SetRegularKey_test, ripple::test::SetTrust_test, ripple::test::SHAMapStore_test, ripple::test::TheoreticalQuality_test, ripple::Ticket_test, ripple::test::Transaction_ordering_test, ripple::TrustAndBalance_test, ripple::Apply_test, ripple::test::TxQPosNegFlows_test, ripple::test::TxQMetaInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorSite_test, ripple::Vault_test, ripple::test::XChain_test, ripple::test::XChainSim_test, ripple::test::base_uint_test, ripple::test::Buffer_test, ripple::test::DetectCrash_test, ripple::test::Expected_test, ripple::FileUtilities_test, ripple::hardened_hash_test, ripple::tests::IntrusiveShared_test, ripple::IOUAmount_test, ripple::test::join_test, ripple::KeyCache_test, ripple::Number_test, ripple::PerfLog_test, ripple::StringUtilities_test, ripple::TaggedCache_test, ripple::test::units_test, ripple::XRPAmount_test, beast::aged_set_test, beast::aged_map_test, beast::aged_multiset_test, beast::aged_multimap_test, beast::aged_unordered_set_test, beast::aged_unordered_map_test, beast::aged_unordered_multiset_test, beast::aged_unordered_multimap_test, beast::abstract_clock_test, beast::basic_seconds_clock_test, ripple::test::CurrentThreadName_test, io_latency_probe_test, beast::Journal_test, beast::PropertyStream_test, beast::Zero_test, beast::unit_test::print_test, beast::IP::IPEndpoint_test, beast::LexicalCast_test, beast::SemanticVersion_test, beast::XXHasher_test, ripple::cryptoconditions::PreimageSha256_test, ripple::test::ByzantineFailureSim_test, ripple::test::Consensus_test, ripple::test::DistributedValidators_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::NegativeUNL_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::RCLCensorshipDetector_test, ripple::test::ScaleFreeSim_test, ripple::test::csf::Validations_test, ripple::test::ClosureCounter_test, ripple::Config_test, ripple::test::Coroutine_test, ripple::test::JobQueue_test, ripple::SociDB_test, ripple::Workers_test, ripple::test::BasicNetwork_test, ripple::test::Digraph_test, ripple::test::Histogram_test, ripple::test::Scheduler_test, ripple::json_value_test, Json::JsonObject_test, Json::Output_test, Json::JsonWriter_test, ripple::test::Env_test, ripple::test::WSClient_test, ripple::test::BookDirs_test, ripple::test::Directory_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::SkipList_test, ripple::test::View_test, ripple::test::GetAmendments_test, ripple::NodeStore::Backend_test, ripple::NodeStore::NodeStoreBasic_test, ripple::NodeStore::Database_test, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::tests::cluster_test, ripple::test::compression_test, ripple::test::handshake_test, ripple::ProtocolVersion_test, ripple::test::reduce_relay_test, ripple::test::reduce_relay_simulate_test, ripple::short_read_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::test::ApiVersion_test, ripple::BuildInfo_test, ripple::Hooks_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::Issue_test, ripple::Memo_test, ripple::test::MultiApiJson_test, ripple::PublicKey_test, ripple::Quality_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::STAccount_test, ripple::STAmount_test, ripple::STInteger_test, ripple::test::STIssue_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::InnerObjectFormatsSerializer_test, ripple::STValidation_test, ripple::TER_test, ripple::types_test, ripple::Resource::ResourceManager_test, ripple::AccountCurrencies_test, ripple::RPC::AccountLines_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::AccountSet_test, ripple::test::AccountTx_test, ripple::AmendmentBlocked_test, ripple::test::AMMInfo_test, ripple::test::Book_test, ripple::test::BookChanges_test, ripple::Connect_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuthorized_test, ripple::Feature_test, ripple::test::GatewayBalances_test, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::GetCounts_test, ripple::test::Handler_test, ripple::RPC::JSONRPC_test, ripple::RPC::WalletPropose_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::test::LedgerEntry_test, ripple::test::LedgerEntry_XChain_test, ripple::LedgerHeader_test, ripple::RPC::LedgerRequestRPC_test, ripple::test::LedgerRPC_test, ripple::test::ManifestRPC_test, ripple::test::NoRipple_test, ripple::NoRippleCheck_test, ripple::NoRippleCheckLimits_test, ripple::OwnerInfo_test, ripple::Peers_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ServerInfo_test, ripple::test::Simulate_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::test::Subscribe_test, ripple::Transaction_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorRPC_test, ripple::Version_test, ripple::test::Server_test, ripple::test::ServerStatus_test, ripple::tests::FetchPack_test, ripple::tests::SHAMap_test, ripple::tests::SHAMapPathProof_test, and ripple::tests::SHAMapSync_test.

diff --git a/classes.html b/classes.html index 4e283a10d1..5f65fb2fed 100644 --- a/classes.html +++ b/classes.html @@ -130,7 +130,7 @@ $(function() {
RandomAccountParams (ripple::test)
Rate (ripple)
Rate (ripple::test::csf)
TaggedPointer::RawAllocateTag (ripple)
RawStateTable (ripple::detail)
RawView (ripple)
RCLCensorshipDetector (ripple)
RCLCensorshipDetector_test (ripple::test)
RCLConsensus (ripple)
RclConsensusLogger (ripple)
RCLCxLedger (ripple)
RCLCxPeerPos (ripple)
RCLCxTx (ripple)
RCLTxSet (ripple)
RCLValidatedLedger (ripple)
RCLValidation (ripple)
RCLValidations_test (ripple::test)
RCLValidationsAdaptor (ripple)
Reader (Json)
json_body::reader (ripple)
ReadView (ripple)
ReadViewFwdIter (ripple::detail)
ReadViewFwdRange (ripple::detail)
aged_associative_container_test_base::AllocT::rebind (beast)
Receive (ripple::test::csf)
SlotImp::recent_t (ripple::PeerFinder)
recorder (beast::unit_test)
RedirectHandouts (ripple::PeerFinder)
reduce_relay_simulate_test (ripple::test)
reduce_relay_test (ripple::test)
ReducedOffer_test (ripple::test)
IntrusiveRefCounts::RefCountPair (ripple)
Reg (ripple::test::jtx)
Regression_test (ripple::test)
RelationalDatabase (ripple)
Relay (ripple::test::csf)
RemoveArg (ripple::test::jtx::oracle)
reporter (beast::unit_test::detail)
Request (ripple::RPC)
require (ripple::test::jtx)
requireAny (ripple::test::jtx)
Resolver (ripple)
ResolverAsio (ripple)
ResolverAsioImpl (ripple)
ValidatorSite::Site::Resource (ripple)
ResourceManager_test (ripple::Resource)
results (ripple::detail)
Source::Results (ripple::PeerFinder)
results (beast::unit_test)
reporter::results (beast::unit_test::detail)
RFC1751 (ripple)
ripesha_hasher (ripple)
RippleCalc (ripple::path)
RippleCalcTestParams (ripple::test)
RippledCfgGuard (ripple::detail)
RippleLineCache (ripple)
RobustTransaction_test (ripple::test)
Roles_test (ripple::test)
Object::Root (Json)
rootIndex (ripple::test::jtx::token)
Peer::Router (ripple::test::csf)
PerfLogImp::Counters::Rpc (ripple::perf)
rpc (ripple::test::jtx)
RPCCall_test (ripple::test)
RPCCallImp (ripple)
RPCCallTestData (ripple::test)
RPCHelpers_test (ripple::test)
RPCOverload_test (ripple::test)
RPCParser (ripple)
RPCSub (ripple)
RPCSubImp (ripple)
RPCTrustLine (ripple)
Rules (ripple)
runner (beast::unit_test)
S
-
io_latency_probe::sample_op (beast)
Sandbox (ripple)
save_stream_state (ripple::detail)
SavedState (ripple)
SHAMapStoreImp::SavedStateDB (ripple)
saveNumberRoundMode (ripple)
ScaleFreeSim_test (ripple::test)
Scheduler (ripple::NodeStore)
Scheduler (ripple::test::csf)
Scheduler_test (ripple::test)
scope_exit (ripple)
scope_fail (ripple)
scope_success (ripple)
scope_unlock (ripple)
suite::scoped_testcase (beast::unit_test)
Journal::ScopedStream (beast)
SecretKey (ripple)
SecretKey_test (ripple)
Section (ripple)
Seed (ripple)
Seed_test (ripple)
selector (beast::unit_test)
Selector (ripple::test::csf)
SemanticVersion (beast)
SemanticVersion_test (beast)
send_always (ripple)
send_if_not_pred (ripple)
send_if_pred (ripple)
sendmax (ripple::test::jtx)
SEnv (ripple::test)
seq (ripple::test::jtx)
SeqEnforcer (ripple)
SeqProxy (ripple)
SeqProxy_test (ripple)
Sequence (ripple::NodeStore)
SerialIter (ripple)
Serializer (ripple)
Serializer_test (ripple)
Server (ripple)
short_read_test::Server (ripple)
Server_test (ripple::test)
ServerDefinitions (ripple::detail)
NetworkOPsImp::ServerFeeSummary (ripple)
ServerHandler (ripple)
ServerHandler::ServerHandlerCreator (ripple)
ServerImpl (ripple)
ServerInfo_test (ripple::test)
ServerStatus_test (ripple::test)
Session (ripple)
PropertyStream::Set (beast)
SetAccount (ripple)
Vault::SetArgs (ripple::test::jtx)
SetAuth_test (ripple::test)
SetOracle (ripple)
SetRegularKey (ripple)
SetRegularKey_test (ripple)
SetSignerList (ripple)
SetTrust (ripple)
SetTrust_test (ripple::test)
TxQ::Setup (ripple)
ServerHandler::Setup (ripple)
Overlay::Setup (ripple)
HashRouter::Setup (ripple)
PerfLog::Setup (ripple::perf)
DatabaseCon::Setup (ripple)
LedgerLoad_test::SetupData (ripple)
SField (ripple)
SHAMap (ripple)
SHAMap_test (ripple::tests)
SHAMapAccountStateLeafNode (ripple)
SHAMapAddNode (ripple)
SHAMapHash (ripple)
SHAMapInnerNode (ripple)
SHAMapItem (ripple)
SHAMapLeafNode (ripple)
SHAMapMissingNode (ripple)
SHAMapNodeID (ripple)
SHAMapPathProof_test (ripple::tests)
SHAMapStore (ripple)
SHAMapStore_test (ripple::test)
SHAMapStoreImp (ripple)
SHAMapSync_test (ripple::tests)
SHAMapSyncFilter (ripple)
SHAMapTreeNode (ripple)
SHAMapTxLeafNode (ripple)
SHAMapTxPlusMetaLeafNode (ripple)
Share (ripple::test::csf)
SharedIntrusive (ripple)
SharedIntrusiveAdoptIncrementStrongTag (ripple)
SharedIntrusiveAdoptNoIncrementTag (ripple)
SharedWeakCachePointer (ripple)
SharedWeakUnion (ripple)
short_read_test (ripple)
sig (ripple::test::jtx::batch)
sig (ripple::test::jtx)
signer (ripple::test::jtx)
SignerEntries (ripple)
SignerEntries::SignerEntry (ripple)
SigningForParams (ripple::RPC::detail)
Env_ss::SignSubmitRunner (ripple::test::jtx)
Sim (ripple::test::csf)
SimDurationCollector (ripple::test::csf)
SimpleWriter (ripple)
Simulate_test (ripple::test)
SingleMetrics (ripple::metrics)
Logs::Sink (ripple)
Journal::Sink (beast)
ValidatorSite::Site (ripple)
SkipList_test (ripple::test)
SkipListAcquire (ripple)
SkipListAcquire::SkipListData (ripple)
SlabAllocator (ripple)
SlabAllocatorSet (ripple)
SlabAllocator::SlabBlock (ripple)
SlabAllocatorSet::SlabConfig (ripple)
RawStateTable::sleAction (ripple::detail)
RawStateTable::sles_iter_impl (ripple::detail)
Ledger::sles_iter_impl (ripple)
ReadView::sles_type (ripple)
ValidPermissionedDomain::SleStatus (ripple)
Slice (ripple)
Slot (ripple::reduce_relay)
Slot (ripple::PeerFinder)
SlotHandouts (ripple::PeerFinder)
SlotImp (ripple::PeerFinder)
Slots (ripple::reduce_relay)
XChainSim_test::SmBase (ripple::test)
XChainSim_test::SmCreateAccount (ripple::test)
XChainSim_test::SmTransfer (ripple::test)
TxQ::FeeMetrics::Snapshot (ripple)
SociDB_test (ripple)
SOElement (ripple)
SOTemplate (ripple)
PropertyStream::Source (beast)
InfoSub::Source (ripple)
Source (ripple::PeerFinder)
source_tag (ripple::test::jtx)
SourceStrings (ripple::PeerFinder)
SourceStringsImp (ripple::PeerFinder)
Span (ripple::ledger_trie_detail)
SpanTip (ripple)
spinlock (ripple)
SQLiteDatabase (ripple)
SQLiteDatabaseImp (ripple)
Squelch (ripple::reduce_relay)
SquelchHandler (ripple::reduce_relay)
SSLHTTPPeer (ripple)
SSLWSPeer (ripple)
STAccount (ripple)
STAccount_test (ripple)
stag (ripple::test::jtx)
STAmount (ripple)
STAmount_test (ripple)
STAmountSO (ripple)
STArray (ripple)
StartRound (ripple::test::csf)
aged_ordered_container::element::stashed (beast::detail)
aged_unordered_container::element::stashed (beast::detail)
NetworkOPsImp::StateAccounting (ripple)
ExistingElementPool::StateGuard (ripple::test)
StaticCastTagSharedIntrusive (ripple)
StaticString (Json)
Logic::Stats (ripple::Resource)
TaggedCache::Stats (ripple)
ManagerImp::Stats (ripple::PeerFinder)
NetworkOPsImp::Stats (ripple)
LoadMonitor::Stats (ripple)
LedgerMaster::Stats (ripple)
OverlayImpl::Stats (ripple)
StatsDCollector (beast::insight)
StatsDCollectorImp (beast::insight::detail)
StatsDCounterImpl (beast::insight::detail)
StatsDEventImpl (beast::insight::detail)
StatsDGaugeImpl (beast::insight::detail)
StatsDHookImpl (beast::insight::detail)
StatsDMeterImpl (beast::insight::detail)
StatsDMetricBase (beast::insight::detail)
Status (ripple::RPC)
ValidatorSite::Site::Status (ripple)
STBase (ripple)
STBitString (ripple)
STBlob (ripple)
STCurrency (ripple)
Step (ripple)
TOfferStreamBase::StepCounter (ripple)
ConnectAttempt::StepTimeouts (ripple)
STExchange (ripple)
STExchange< STBlob, Buffer > (ripple)
STExchange< STBlob, PublicKey > (ripple)
STExchange< STBlob, Slice > (ripple)
STExchange< STInteger< U >, T > (ripple)
STInteger (ripple)
STIssue (ripple)
STIssue_test (ripple::test)
STLedgerEntry (ripple)
STNumber (ripple)
STNumber_test (ripple)
STObject (ripple)
STObject_test (ripple)
Store (ripple::PeerFinder)
StoreSqdb (ripple::PeerFinder)
STParsedJSON_test (ripple)
STParsedJSONArray (ripple)
STParsedJSONObject (ripple)
STPath (ripple)
STPathElement (ripple)
STPathSet (ripple)
StrandContext (ripple)
StrandResult (ripple)
Journal::Stream (beast)
StreambufWSMsg (ripple)
StreamCollector (ripple::test::csf)
StreamSink (ripple::test)
StringUtilities_test (ripple)
STTx (ripple)
STTx_test (ripple)
STValidation (ripple)
STValidation_test (ripple)
STVar (ripple::detail)
STVector256 (ripple)
STXChainBridge (ripple)
StyledStreamWriter (Json)
StyledWriter (Json)
NetworkOPsImp::SubAccountHistoryIndex (ripple)
NetworkOPsImp::SubAccountHistoryInfo (ripple)
NetworkOPsImp::SubAccountHistoryInfoWeak (ripple)
LedgerEntry_test::Subfield (ripple::test)
Transaction::SubmitResult (ripple)
Submitter (ripple::test::csf)
SubmitTx (ripple::test::csf)
Subscribe_test (ripple::test)
ClosureCounter::Substitute (ripple)
suite (beast::unit_test)
suite_info (beast::unit_test)
suite_list (beast::unit_test)
reporter::suite_results (beast::unit_test::detail)
suite_results (beast::unit_test)
suite_results (ripple::detail)
SuiteJournal (ripple::test)
SuiteJournalSink (ripple::test)
SuiteLogs (ripple::test::jtx)
+
io_latency_probe::sample_op (beast)
Sandbox (ripple)
save_stream_state (ripple::detail)
SavedState (ripple)
SHAMapStoreImp::SavedStateDB (ripple)
saveNumberRoundMode (ripple)
ScaleFreeSim_test (ripple::test)
Scheduler (ripple::NodeStore)
Scheduler (ripple::test::csf)
Scheduler_test (ripple::test)
scope_exit (ripple)
scope_fail (ripple)
scope_success (ripple)
scope_unlock (ripple)
suite::scoped_testcase (beast::unit_test)
Journal::ScopedStream (beast)
SecretKey (ripple)
SecretKey_test (ripple)
Section (ripple)
Seed (ripple)
Seed_test (ripple)
selector (beast::unit_test)
Selector (ripple::test::csf)
SemanticVersion (beast)
SemanticVersion_test (beast)
send_always (ripple)
send_if_not_pred (ripple)
send_if_pred (ripple)
sendmax (ripple::test::jtx)
SEnv (ripple::test)
seq (ripple::test::jtx)
SeqEnforcer (ripple)
SeqProxy (ripple)
SeqProxy_test (ripple)
Sequence (ripple::NodeStore)
SerialIter (ripple)
Serializer (ripple)
Serializer_test (ripple)
Server (ripple)
short_read_test::Server (ripple)
Server_test (ripple::test)
ServerDefinitions (ripple::detail)
NetworkOPsImp::ServerFeeSummary (ripple)
ServerHandler (ripple)
ServerHandler::ServerHandlerCreator (ripple)
ServerImpl (ripple)
ServerInfo_test (ripple::test)
ServerStatus_test (ripple::test)
Session (ripple)
PropertyStream::Set (beast)
SetAccount (ripple)
Vault::SetArgs (ripple::test::jtx)
SetAuth_test (ripple::test)
SetOracle (ripple)
SetRegularKey (ripple)
SetRegularKey_test (ripple)
SetSignerList (ripple)
SetTrust (ripple)
SetTrust_test (ripple::test)
TxQ::Setup (ripple)
ServerHandler::Setup (ripple)
Overlay::Setup (ripple)
HashRouter::Setup (ripple)
PerfLog::Setup (ripple::perf)
DatabaseCon::Setup (ripple)
LedgerLoad_test::SetupData (ripple)
SField (ripple)
SHAMap (ripple)
SHAMap_test (ripple::tests)
SHAMapAccountStateLeafNode (ripple)
SHAMapAddNode (ripple)
SHAMapHash (ripple)
SHAMapInnerNode (ripple)
SHAMapItem (ripple)
SHAMapLeafNode (ripple)
SHAMapMissingNode (ripple)
SHAMapNodeID (ripple)
SHAMapPathProof_test (ripple::tests)
SHAMapStore (ripple)
SHAMapStore_test (ripple::test)
SHAMapStoreImp (ripple)
SHAMapSync_test (ripple::tests)
SHAMapSyncFilter (ripple)
SHAMapTreeNode (ripple)
SHAMapTxLeafNode (ripple)
SHAMapTxPlusMetaLeafNode (ripple)
Share (ripple::test::csf)
SharedIntrusive (ripple)
SharedIntrusiveAdoptIncrementStrongTag (ripple)
SharedIntrusiveAdoptNoIncrementTag (ripple)
SharedWeakCachePointer (ripple)
SharedWeakUnion (ripple)
short_read_test (ripple)
sig (ripple::test::jtx::batch)
sig (ripple::test::jtx)
signer (ripple::test::jtx)
SignerEntries (ripple)
SignerEntries::SignerEntry (ripple)
SigningForParams (ripple::RPC::detail)
Env_ss::SignSubmitRunner (ripple::test::jtx)
Sim (ripple::test::csf)
SimDurationCollector (ripple::test::csf)
SimpleWriter (ripple)
Simulate_test (ripple::test)
SingleMetrics (ripple::metrics)
Logs::Sink (ripple)
Journal::Sink (beast)
ValidatorSite::Site (ripple)
SkipList_test (ripple::test)
SkipListAcquire (ripple)
SkipListAcquire::SkipListData (ripple)
SlabAllocator (ripple)
SlabAllocatorSet (ripple)
SlabAllocator::SlabBlock (ripple)
SlabAllocatorSet::SlabConfig (ripple)
RawStateTable::sleAction (ripple::detail)
RawStateTable::sles_iter_impl (ripple::detail)
Ledger::sles_iter_impl (ripple)
ReadView::sles_type (ripple)
ValidPermissionedDomain::SleStatus (ripple)
Slice (ripple)
Slot (ripple::reduce_relay)
Slot (ripple::PeerFinder)
SlotHandouts (ripple::PeerFinder)
SlotImp (ripple::PeerFinder)
Slots (ripple::reduce_relay)
XChainSim_test::SmBase (ripple::test)
XChainSim_test::SmCreateAccount (ripple::test)
XChainSim_test::SmTransfer (ripple::test)
TxQ::FeeMetrics::Snapshot (ripple)
SociDB_test (ripple)
SOElement (ripple)
SOTemplate (ripple)
PropertyStream::Source (beast)
InfoSub::Source (ripple)
Source (ripple::PeerFinder)
source_tag (ripple::test::jtx)
SourceStrings (ripple::PeerFinder)
SourceStringsImp (ripple::PeerFinder)
Span (ripple::ledger_trie_detail)
SpanTip (ripple)
spinlock (ripple)
SQLiteDatabase (ripple)
SQLiteDatabaseImp (ripple)
Squelch (ripple::reduce_relay)
SquelchHandler (ripple::reduce_relay)
SSLHTTPPeer (ripple)
SSLWSPeer (ripple)
STAccount (ripple)
STAccount_test (ripple)
stag (ripple::test::jtx)
STAmount (ripple)
STAmount_test (ripple)
STAmountSO (ripple)
STArray (ripple)
StartRound (ripple::test::csf)
aged_ordered_container::element::stashed (beast::detail)
aged_unordered_container::element::stashed (beast::detail)
NetworkOPsImp::StateAccounting (ripple)
ExistingElementPool::StateGuard (ripple::test)
StaticCastTagSharedIntrusive (ripple)
StaticString (Json)
Logic::Stats (ripple::Resource)
TaggedCache::Stats (ripple)
ManagerImp::Stats (ripple::PeerFinder)
NetworkOPsImp::Stats (ripple)
LoadMonitor::Stats (ripple)
LedgerMaster::Stats (ripple)
OverlayImpl::Stats (ripple)
StatsDCollector (beast::insight)
StatsDCollectorImp (beast::insight::detail)
StatsDCounterImpl (beast::insight::detail)
StatsDEventImpl (beast::insight::detail)
StatsDGaugeImpl (beast::insight::detail)
StatsDHookImpl (beast::insight::detail)
StatsDMeterImpl (beast::insight::detail)
StatsDMetricBase (beast::insight::detail)
Status (ripple::RPC)
ValidatorSite::Site::Status (ripple)
STBase (ripple)
STBitString (ripple)
STBlob (ripple)
STCurrency (ripple)
Step (ripple)
TOfferStreamBase::StepCounter (ripple)
ConnectAttempt::StepTimeouts (ripple)
STExchange (ripple)
STExchange< STBlob, Buffer > (ripple)
STExchange< STBlob, PublicKey > (ripple)
STExchange< STBlob, Slice > (ripple)
STExchange< STInteger< U >, T > (ripple)
STInteger (ripple)
STInteger_test (ripple)
STIssue (ripple)
STIssue_test (ripple::test)
STLedgerEntry (ripple)
STNumber (ripple)
STNumber_test (ripple)
STObject (ripple)
STObject_test (ripple)
Store (ripple::PeerFinder)
StoreSqdb (ripple::PeerFinder)
STParsedJSON_test (ripple)
STParsedJSONObject (ripple)
STPath (ripple)
STPathElement (ripple)
STPathSet (ripple)
StrandContext (ripple)
StrandResult (ripple)
Journal::Stream (beast)
StreambufWSMsg (ripple)
StreamCollector (ripple::test::csf)
StreamSink (ripple::test)
StringUtilities_test (ripple)
STTx (ripple)
STTx_test (ripple)
STValidation (ripple)
STValidation_test (ripple)
STVar (ripple::detail)
STVector256 (ripple)
STXChainBridge (ripple)
StyledStreamWriter (Json)
StyledWriter (Json)
NetworkOPsImp::SubAccountHistoryIndex (ripple)
NetworkOPsImp::SubAccountHistoryInfo (ripple)
NetworkOPsImp::SubAccountHistoryInfoWeak (ripple)
LedgerEntry_test::Subfield (ripple::test)
Transaction::SubmitResult (ripple)
Submitter (ripple::test::csf)
SubmitTx (ripple::test::csf)
Subscribe_test (ripple::test)
ClosureCounter::Substitute (ripple)
suite (beast::unit_test)
suite_info (beast::unit_test)
suite_list (beast::unit_test)
reporter::suite_results (beast::unit_test::detail)
suite_results (beast::unit_test)
suite_results (ripple::detail)
SuiteJournal (ripple::test)
SuiteJournalSink (ripple::test)
SuiteLogs (ripple::test::jtx)
T
Tag1
Tag2
tagged_integer (ripple)
TaggedCache (ripple)
TaggedCache_test (ripple)
TaggedPointer (ripple)
Task (ripple::NodeStore)
LedgerReplayTask::TaskParameter (ripple)
TaxonTag (ripple::nft)
temp_dir (beast)
ter (ripple::test::jtx)
TER_test (ripple)
TERSubset (ripple)
case_results::test (beast::unit_test)
io_latency_probe_test::test_sampler
test_user_type_free (ripple::detail)
test_user_type_member (ripple::detail)
TestAMMArg (ripple::test::jtx)
TestBase (ripple::NodeStore)
Batch_test::TestBatchData (ripple::test)
Workers_test::TestCallback (ripple)
traffic_count_test::TestCase (ripple::test)
suite::testcase_t (beast::unit_test)
PeerFinder_test::TestChecker (ripple::PeerFinder)
Peer::TestConsensusLogger (ripple::test::csf)
FetchPack_test::TestFilter (ripple::tests)
Server_test::TestHandler (ripple::test)
Validations_test::TestHarness (ripple::test::csf)
TestJSONTxt (ripple::InnerObjectFormatsUnitTestDetail)
SecretKey_test::TestKeyData (ripple)
Batch_test::TestLedgerData (ripple::test)
ResourceManager_test::TestLogic (ripple::Resource)
TestNodeFamily (ripple::tests)
TestOutputSuite (ripple::test)
TestPeer (ripple::test)
TestPeerSet (ripple::test)
TestPeerSetBuilder (ripple::test)
case_results::tests_t (beast::unit_test)
Journal_test::TestSink (beast)
Server_test::TestSink (ripple::test)
PeerFinder_test::TestStore (ripple::PeerFinder)
TestSuite (ripple)
Server_test::TestThread (ripple::test)
aged_associative_container_test_base::TestTraits (beast)
aged_associative_container_test_base::TestTraitsBase (beast)
aged_associative_container_test_base::TestTraitsHelper (beast)
TheoreticalQuality_test (ripple::test)
ThinBook_test (ripple::test)
thread (beast::unit_test)
throw_policy (ripple::detail)
ticket_t (ripple::keylet)
Ticket_test (ripple)
TimeKeeper (ripple)
TimeoutCounter (ripple)
timePointField (ripple::test::jtx)
OverlayImpl::Timer (ripple)
Timing_test (ripple::NodeStore)
TOffer (ripple)
TOfferBase (ripple)
TOfferBase< STAmount, STAmount > (ripple)
TOfferStreamBase (ripple)
Reader::Token (Json)
TokenAndPage (ripple::nft)
TokenCodecErrcCategory (ripple::detail)
ClosureCounter_test::TrackedString (ripple::test)
LedgerCollector::Tracker (ripple::test::csf)
TxCollector::Tracker (ripple::test::csf)
traffic_count_test (ripple::test)
TrafficCount (ripple)
OverlayImpl::TrafficGauges (ripple)
TrafficCount::TrafficStats (ripple)
Transaction (ripple)
Transaction_ordering_test (ripple::test)
Transaction_test (ripple)
TransactionAcquire (ripple)
TransactionEntry_test (ripple)
TransactionFeeCheck (ripple)
TransactionHistory_test (ripple)
TransactionMaster (ripple)
transactionPreProcessResult (ripple::RPC::detail)
TransactionStateSF (ripple)
NetworkOPsImp::TransactionStatus (ripple)
Transactor (ripple)
XChainSim_test::Transfer (ripple::test)
TransfersNotFrozen (ripple)
Bootcache::Transform (ripple::PeerFinder)
LivecacheBase::Hop::Transform (ripple::PeerFinder::detail)
Livecache::hops_t::Transform (ripple::PeerFinder)
STObject::Transform (ripple)
TrustAndBalance_test (ripple)
TrustChanges (ripple)
TrustedPublisherServer (ripple::test)
TrustedVotes (ripple)
TrustGraph (ripple::test::csf)
TrustLineBase (ripple)
Tx (ripple::test::csf)
tx_reduce_relay_test (ripple::test)
TxArgs (ripple)
TxCollector (ripple::test::csf)
TxConsequences (ripple)
OpenView::txData (ripple)
TxQ::TxDetails (ripple)
txflags (ripple::test::jtx)
TxFormats (ripple)
RCLCensorshipDetector::TxIDSeq (ripple)
TxMeta (ripple)
TxMetrics (ripple::metrics)
TxnTestData (ripple::RPC)
TxQ (ripple)
TxQ::TxQAccount (ripple)
TxQMetaInfo_test (ripple::test)
TxQPosNegFlows_test (ripple::test)
TxResult (ripple)
Ledger::txs_iter_impl (ripple)
OpenView::txs_iter_impl (ripple)
ReadView::txs_type (ripple)
TxSet (ripple::test::csf)
TxsRawView (ripple)
TypedField (ripple)
types_test (ripple)
diff --git a/classripple_1_1NodeStore_1_1TestBase.html b/classripple_1_1NodeStore_1_1TestBase.html index 5f80a01f93..2c4cd73bc6 100644 --- a/classripple_1_1NodeStore_1_1TestBase.html +++ b/classripple_1_1NodeStore_1_1TestBase.html @@ -1255,7 +1255,7 @@ template<class Condition >

Runs the suite.

-

Implemented in ripple::test::AccountDelete_test, ripple::AccountTxPaging_test, ripple::AmendmentTable_test, ripple::test::AMM_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AMMExtended_test, ripple::test::Batch_test, ripple::Check_test, ripple::Clawback_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DepositAuth_test, ripple::test::DepositPreauth_test, ripple::test::DID_test, ripple::Discrepancy_test, ripple::test::DNS_test, ripple::test::Escrow_test, ripple::test::EscrowToken_test, ripple::test::FeeVote_test, ripple::FixNFTokenPageLinks_test, ripple::test::Flow_test, ripple::test::Flow_manual_test, ripple::Freeze_test, ripple::test::HashRouter_test, ripple::test::Invariants_test, ripple::test::LedgerHistory_test, ripple::LedgerLoad_test, ripple::test::LedgerMaster_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayerLong_test, ripple::LoadFeeTrack_test, ripple::test::LPTokenTransfer_test, ripple::test::Manifest_test, ripple::test::MPToken_test, ripple::test::MultiSign_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenDisallowIncoming_test, ripple::NFTokenWOfixV1_test, ripple::NFTokenWOTokenRemint_test, ripple::NFTokenWOTokenReserve_test, ripple::NFTokenWOMintOffer_test, ripple::NFTokenWOModify_test, ripple::NFTokenAllFeatures_test, ripple::NFTokenAuth_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenBurnWOfixFungTokens_test, ripple::NFTokenBurnWOFixTokenRemint_test, ripple::NFTokenBurnWOFixNFTPageLinks_test, ripple::NFTokenBurnAllFeatures_test, ripple::NFTokenDir_test, ripple::test::OfferBaseUtil_test, ripple::test::OfferWTakerDryOffer_test, ripple::test::OfferWOSmallQOffers_test, ripple::test::OfferWOFillOrKill_test, ripple::test::OfferWOPermDEX_test, ripple::test::OfferAllFeatures_test, ripple::test::Offer_manual_test, ripple::OfferStream_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::PlumpBook_test, ripple::test::ThinBook_test, ripple::test::OversizeMeta_test, ripple::test::FindOversizeCross_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PseudoTx_test, ripple::test::RCLValidations_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::SetAuth_test, ripple::SetRegularKey_test, ripple::test::SetTrust_test, ripple::test::SHAMapStore_test, ripple::test::TheoreticalQuality_test, ripple::Ticket_test, ripple::test::Transaction_ordering_test, ripple::TrustAndBalance_test, ripple::Apply_test, ripple::test::TxQPosNegFlows_test, ripple::test::TxQMetaInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorSite_test, ripple::Vault_test, ripple::test::XChain_test, ripple::test::XChainSim_test, ripple::test::base_uint_test, ripple::test::Buffer_test, ripple::test::DetectCrash_test, ripple::test::Expected_test, ripple::FileUtilities_test, ripple::hardened_hash_test, ripple::tests::IntrusiveShared_test, ripple::IOUAmount_test, ripple::test::join_test, ripple::KeyCache_test, ripple::Number_test, ripple::PerfLog_test, ripple::StringUtilities_test, ripple::TaggedCache_test, ripple::test::units_test, ripple::XRPAmount_test, beast::aged_set_test, beast::aged_map_test, beast::aged_multiset_test, beast::aged_multimap_test, beast::aged_unordered_set_test, beast::aged_unordered_map_test, beast::aged_unordered_multiset_test, beast::aged_unordered_multimap_test, beast::abstract_clock_test, beast::basic_seconds_clock_test, ripple::test::CurrentThreadName_test, io_latency_probe_test, beast::Journal_test, beast::PropertyStream_test, beast::Zero_test, beast::unit_test::print_test, beast::IP::IPEndpoint_test, beast::LexicalCast_test, beast::SemanticVersion_test, beast::XXHasher_test, ripple::cryptoconditions::PreimageSha256_test, ripple::test::ByzantineFailureSim_test, ripple::test::Consensus_test, ripple::test::DistributedValidators_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::NegativeUNL_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::RCLCensorshipDetector_test, ripple::test::ScaleFreeSim_test, ripple::test::csf::Validations_test, ripple::test::ClosureCounter_test, ripple::Config_test, ripple::test::Coroutine_test, ripple::test::JobQueue_test, ripple::SociDB_test, ripple::Workers_test, ripple::test::BasicNetwork_test, ripple::test::Digraph_test, ripple::test::Histogram_test, ripple::test::Scheduler_test, ripple::json_value_test, Json::JsonObject_test, Json::Output_test, Json::JsonWriter_test, ripple::test::Env_test, ripple::test::WSClient_test, ripple::test::BookDirs_test, ripple::test::Directory_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::SkipList_test, ripple::test::View_test, ripple::test::GetAmendments_test, ripple::NodeStore::Backend_test, ripple::NodeStore::NodeStoreBasic_test, ripple::NodeStore::Database_test, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::tests::cluster_test, ripple::test::compression_test, ripple::test::handshake_test, ripple::ProtocolVersion_test, ripple::test::reduce_relay_test, ripple::test::reduce_relay_simulate_test, ripple::short_read_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::test::ApiVersion_test, ripple::BuildInfo_test, ripple::Hooks_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::Issue_test, ripple::Memo_test, ripple::test::MultiApiJson_test, ripple::PublicKey_test, ripple::Quality_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::STAccount_test, ripple::STAmount_test, ripple::test::STIssue_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::InnerObjectFormatsSerializer_test, ripple::STValidation_test, ripple::TER_test, ripple::types_test, ripple::Resource::ResourceManager_test, ripple::AccountCurrencies_test, ripple::RPC::AccountLines_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::AccountSet_test, ripple::test::AccountTx_test, ripple::AmendmentBlocked_test, ripple::test::AMMInfo_test, ripple::test::Book_test, ripple::test::BookChanges_test, ripple::Connect_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuthorized_test, ripple::Feature_test, ripple::test::GatewayBalances_test, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::GetCounts_test, ripple::test::Handler_test, ripple::RPC::JSONRPC_test, ripple::RPC::WalletPropose_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::test::LedgerEntry_test, ripple::test::LedgerEntry_XChain_test, ripple::LedgerHeader_test, ripple::RPC::LedgerRequestRPC_test, ripple::test::LedgerRPC_test, ripple::test::ManifestRPC_test, ripple::test::NoRipple_test, ripple::NoRippleCheck_test, ripple::NoRippleCheckLimits_test, ripple::OwnerInfo_test, ripple::Peers_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ServerInfo_test, ripple::test::Simulate_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::test::Subscribe_test, ripple::Transaction_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorRPC_test, ripple::Version_test, ripple::test::Server_test, ripple::test::ServerStatus_test, ripple::tests::FetchPack_test, ripple::tests::SHAMap_test, ripple::tests::SHAMapPathProof_test, and ripple::tests::SHAMapSync_test.

+

Implemented in ripple::test::AccountDelete_test, ripple::AccountTxPaging_test, ripple::AmendmentTable_test, ripple::test::AMM_test, ripple::test::AMMCalc_test, ripple::test::AMMClawback_test, ripple::test::AMMExtended_test, ripple::test::Batch_test, ripple::Check_test, ripple::Clawback_test, ripple::test::Credentials_test, ripple::test::CrossingLimits_test, ripple::test::Delegate_test, ripple::test::DeliverMin_test, ripple::test::DepositAuth_test, ripple::test::DepositPreauth_test, ripple::test::DID_test, ripple::Discrepancy_test, ripple::test::DNS_test, ripple::test::Escrow_test, ripple::test::EscrowToken_test, ripple::test::FeeVote_test, ripple::FixNFTokenPageLinks_test, ripple::test::Flow_test, ripple::test::Flow_manual_test, ripple::Freeze_test, ripple::test::HashRouter_test, ripple::test::Invariants_test, ripple::test::LedgerHistory_test, ripple::LedgerLoad_test, ripple::test::LedgerMaster_test, ripple::test::LedgerReplay_test, ripple::test::LedgerReplayer_test, ripple::test::LedgerReplayerTimeout_test, ripple::test::LedgerReplayerLong_test, ripple::LoadFeeTrack_test, ripple::test::LPTokenTransfer_test, ripple::test::Manifest_test, ripple::test::MPToken_test, ripple::test::MultiSign_test, ripple::test::NetworkID_test, ripple::test::NetworkOPs_test, ripple::NFTokenBaseUtil_test, ripple::NFTokenDisallowIncoming_test, ripple::NFTokenWOfixV1_test, ripple::NFTokenWOTokenRemint_test, ripple::NFTokenWOTokenReserve_test, ripple::NFTokenWOMintOffer_test, ripple::NFTokenWOModify_test, ripple::NFTokenAllFeatures_test, ripple::NFTokenAuth_test, ripple::NFTokenBurnBaseUtil_test, ripple::NFTokenBurnWOfixFungTokens_test, ripple::NFTokenBurnWOFixTokenRemint_test, ripple::NFTokenBurnWOFixNFTPageLinks_test, ripple::NFTokenBurnAllFeatures_test, ripple::NFTokenDir_test, ripple::test::OfferBaseUtil_test, ripple::test::OfferWTakerDryOffer_test, ripple::test::OfferWOSmallQOffers_test, ripple::test::OfferWOFillOrKill_test, ripple::test::OfferWOPermDEX_test, ripple::test::OfferAllFeatures_test, ripple::test::Offer_manual_test, ripple::OfferStream_test, ripple::test::jtx::oracle::Oracle_test, ripple::test::PlumpBook_test, ripple::test::ThinBook_test, ripple::test::OversizeMeta_test, ripple::test::FindOversizeCross_test, ripple::test::Path_test, ripple::test::PayChan_test, ripple::test::PayStrand_test, ripple::test::PermissionedDEX_test, ripple::test::PermissionedDomains_test, ripple::test::PseudoTx_test, ripple::test::RCLValidations_test, ripple::test::ReducedOffer_test, ripple::test::Regression_test, ripple::test::SetAuth_test, ripple::SetRegularKey_test, ripple::test::SetTrust_test, ripple::test::SHAMapStore_test, ripple::test::TheoreticalQuality_test, ripple::Ticket_test, ripple::test::Transaction_ordering_test, ripple::TrustAndBalance_test, ripple::Apply_test, ripple::test::TxQPosNegFlows_test, ripple::test::TxQMetaInfo_test, ripple::test::ValidatorKeys_test, ripple::test::ValidatorList_test, ripple::test::ValidatorSite_test, ripple::Vault_test, ripple::test::XChain_test, ripple::test::XChainSim_test, ripple::test::base_uint_test, ripple::test::Buffer_test, ripple::test::DetectCrash_test, ripple::test::Expected_test, ripple::FileUtilities_test, ripple::hardened_hash_test, ripple::tests::IntrusiveShared_test, ripple::IOUAmount_test, ripple::test::join_test, ripple::KeyCache_test, ripple::Number_test, ripple::PerfLog_test, ripple::StringUtilities_test, ripple::TaggedCache_test, ripple::test::units_test, ripple::XRPAmount_test, beast::aged_set_test, beast::aged_map_test, beast::aged_multiset_test, beast::aged_multimap_test, beast::aged_unordered_set_test, beast::aged_unordered_map_test, beast::aged_unordered_multiset_test, beast::aged_unordered_multimap_test, beast::abstract_clock_test, beast::basic_seconds_clock_test, ripple::test::CurrentThreadName_test, io_latency_probe_test, beast::Journal_test, beast::PropertyStream_test, beast::Zero_test, beast::unit_test::print_test, beast::IP::IPEndpoint_test, beast::LexicalCast_test, beast::SemanticVersion_test, beast::XXHasher_test, ripple::cryptoconditions::PreimageSha256_test, ripple::test::ByzantineFailureSim_test, ripple::test::Consensus_test, ripple::test::DistributedValidators_test, ripple::test::LedgerTiming_test, ripple::test::LedgerTrie_test, ripple::test::NegativeUNL_test, ripple::test::NegativeUNLNoAmendment_test, ripple::test::NegativeUNLVoteInternal_test, ripple::test::NegativeUNLVoteScoreTable_test, ripple::test::NegativeUNLVoteGoodScore_test, ripple::test::NegativeUNLVoteOffline_test, ripple::test::NegativeUNLVoteMaxListed_test, ripple::test::NegativeUNLVoteRetiredValidator_test, ripple::test::NegativeUNLVoteNewValidator_test, ripple::test::NegativeUNLVoteFilterValidations_test, ripple::test::RCLCensorshipDetector_test, ripple::test::ScaleFreeSim_test, ripple::test::csf::Validations_test, ripple::test::ClosureCounter_test, ripple::Config_test, ripple::test::Coroutine_test, ripple::test::JobQueue_test, ripple::SociDB_test, ripple::Workers_test, ripple::test::BasicNetwork_test, ripple::test::Digraph_test, ripple::test::Histogram_test, ripple::test::Scheduler_test, ripple::json_value_test, Json::JsonObject_test, Json::Output_test, Json::JsonWriter_test, ripple::test::Env_test, ripple::test::WSClient_test, ripple::test::BookDirs_test, ripple::test::Directory_test, ripple::test::PaymentSandbox_test, ripple::test::PendingSaves_test, ripple::test::SkipList_test, ripple::test::View_test, ripple::test::GetAmendments_test, ripple::NodeStore::Backend_test, ripple::NodeStore::NodeStoreBasic_test, ripple::NodeStore::Database_test, ripple::NodeStore::Timing_test, ripple::NodeStore::tests::varint_test, ripple::tests::cluster_test, ripple::test::compression_test, ripple::test::handshake_test, ripple::ProtocolVersion_test, ripple::test::reduce_relay_test, ripple::test::reduce_relay_simulate_test, ripple::short_read_test, ripple::test::traffic_count_test, ripple::test::tx_reduce_relay_test, ripple::PeerFinder::Livecache_test, ripple::PeerFinder::PeerFinder_test, ripple::test::ApiVersion_test, ripple::BuildInfo_test, ripple::Hooks_test, ripple::InnerObjectFormatsParsedJSON_test, ripple::Issue_test, ripple::Memo_test, ripple::test::MultiApiJson_test, ripple::PublicKey_test, ripple::Quality_test, ripple::SecretKey_test, ripple::Seed_test, ripple::SeqProxy_test, ripple::Serializer_test, ripple::STAccount_test, ripple::STAmount_test, ripple::STInteger_test, ripple::test::STIssue_test, ripple::STNumber_test, ripple::STObject_test, ripple::STParsedJSON_test, ripple::STTx_test, ripple::InnerObjectFormatsSerializer_test, ripple::STValidation_test, ripple::TER_test, ripple::types_test, ripple::Resource::ResourceManager_test, ripple::AccountCurrencies_test, ripple::RPC::AccountLines_test, ripple::test::AccountObjects_test, ripple::test::AccountOffers_test, ripple::AccountSet_test, ripple::test::AccountTx_test, ripple::AmendmentBlocked_test, ripple::test::AMMInfo_test, ripple::test::Book_test, ripple::test::BookChanges_test, ripple::Connect_test, ripple::test::DeliveredAmount_test, ripple::test::DepositAuthorized_test, ripple::Feature_test, ripple::test::GatewayBalances_test, ripple::test::jtx::oracle::GetAggregatePrice_test, ripple::GetCounts_test, ripple::test::Handler_test, ripple::RPC::JSONRPC_test, ripple::RPC::WalletPropose_test, ripple::LedgerClosed_test, ripple::LedgerData_test, ripple::test::LedgerEntry_test, ripple::test::LedgerEntry_XChain_test, ripple::LedgerHeader_test, ripple::RPC::LedgerRequestRPC_test, ripple::test::LedgerRPC_test, ripple::test::ManifestRPC_test, ripple::test::NoRipple_test, ripple::NoRippleCheck_test, ripple::NoRippleCheckLimits_test, ripple::OwnerInfo_test, ripple::Peers_test, ripple::test::RobustTransaction_test, ripple::test::Roles_test, ripple::test::RPCCall_test, ripple::test::RPCHelpers_test, ripple::test::RPCOverload_test, ripple::test::ServerInfo_test, ripple::test::Simulate_test, ripple::RPC::codeString_test, ripple::RPC::fillJson_test, ripple::test::Subscribe_test, ripple::Transaction_test, ripple::TransactionEntry_test, ripple::TransactionHistory_test, ripple::test::ValidatorInfo_test, ripple::test::ValidatorRPC_test, ripple::Version_test, ripple::test::Server_test, ripple::test::ServerStatus_test, ripple::tests::FetchPack_test, ripple::tests::SHAMap_test, ripple::tests::SHAMapPathProof_test, and ripple::tests::SHAMapSync_test.

diff --git a/classripple_1_1Permission-members.html b/classripple_1_1Permission-members.html index 4063307aa9..30b91e43ce 100644 --- a/classripple_1_1Permission-members.html +++ b/classripple_1_1Permission-members.html @@ -84,16 +84,17 @@ $(function() { getGranularTxType(GranularPermissionType const &gpType) constripple::Permission getGranularValue(std::string const &name) constripple::Permission getInstance()ripple::Permissionstatic - granularNameMap_ripple::Permissionprivate - granularPermissionMap_ripple::Permissionprivate - granularTxTypeMap_ripple::Permissionprivate - isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) constripple::Permission - operator=(Permission const &)=deleteripple::Permission - Permission()ripple::Permissionprivate - Permission(Permission const &)=deleteripple::Permission - permissionToTxType(uint32_t const &value) constripple::Permission - txFeatureMap_ripple::Permissionprivate - txToPermissionType(TxType const &type) constripple::Permission + getPermissionName(std::uint32_t const value) constripple::Permission + granularNameMap_ripple::Permissionprivate + granularPermissionMap_ripple::Permissionprivate + granularTxTypeMap_ripple::Permissionprivate + isDelegatable(std::uint32_t const &permissionValue, Rules const &rules) constripple::Permission + operator=(Permission const &)=deleteripple::Permission + Permission()ripple::Permissionprivate + Permission(Permission const &)=deleteripple::Permission + permissionToTxType(uint32_t const &value) constripple::Permission + txFeatureMap_ripple::Permissionprivate + txToPermissionType(TxType const &type) constripple::Permission
+
+
+ +

◆ getPermissionName()

+ +
+
+ + + + + + + + +
std::optional< std::string > ripple::Permission::getPermissionName (std::uint32_t const value) const
+
+ +

Definition at line 105 of file Permissions.cpp.

+
@@ -288,7 +310,7 @@ Private Attributes
-

Definition at line 105 of file Permissions.cpp.

+

Definition at line 121 of file Permissions.cpp.

@@ -308,7 +330,7 @@ Private Attributes
-

Definition at line 115 of file Permissions.cpp.

+

Definition at line 131 of file Permissions.cpp.

@@ -328,7 +350,7 @@ Private Attributes
-

Definition at line 125 of file Permissions.cpp.

+

Definition at line 141 of file Permissions.cpp.

@@ -358,7 +380,7 @@ Private Attributes
-

Definition at line 135 of file Permissions.cpp.

+

Definition at line 151 of file Permissions.cpp.

@@ -378,7 +400,7 @@ Private Attributes
-

Definition at line 173 of file Permissions.cpp.

+

Definition at line 189 of file Permissions.cpp.

@@ -398,7 +420,7 @@ Private Attributes
-

Definition at line 179 of file Permissions.cpp.

+

Definition at line 195 of file Permissions.cpp.

diff --git a/classripple_1_1STInteger.html b/classripple_1_1STInteger.html index 77a18226eb..cef02ad10b 100644 --- a/classripple_1_1STInteger.html +++ b/classripple_1_1STInteger.html @@ -393,7 +393,7 @@ template<typename Integer >
-

Definition at line 93 of file STInteger.cpp.

+

Definition at line 97 of file STInteger.cpp.

@@ -423,7 +423,7 @@ template<typename Integer >
-

Definition at line 158 of file STInteger.cpp.

+

Definition at line 162 of file STInteger.cpp.

@@ -453,7 +453,7 @@ template<typename Integer >
-

Definition at line 208 of file STInteger.cpp.

+

Definition at line 206 of file STInteger.cpp.

@@ -513,7 +513,7 @@ template<typename Integer >

Reimplemented from ripple::STBase.

-

Definition at line 74 of file STInteger.cpp.

+

Definition at line 76 of file STInteger.cpp.

diff --git a/classripple_1_1STParsedJSONArray-members.html b/classripple_1_1STParsedJSONArray-members.html deleted file mode 100644 index 4027305e58..0000000000 --- a/classripple_1_1STParsedJSONArray-members.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -rippled: Member List - - - - - - - - - -
-
- - - - - - -
-
rippled -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
ripple::STParsedJSONArray Member List
-
-
- -

This is the complete list of members for ripple::STParsedJSONArray, including all inherited members.

- - - - - - - - -
arrayripple::STParsedJSONArray
errorripple::STParsedJSONArray
operator=(STParsedJSONArray const &)=deleteripple::STParsedJSONArray
STParsedJSONArray(std::string const &name, Json::Value const &json)ripple::STParsedJSONArray
STParsedJSONArray()=deleteripple::STParsedJSONArray
STParsedJSONArray(STParsedJSONArray const &)=deleteripple::STParsedJSONArray
~STParsedJSONArray()=defaultripple::STParsedJSONArray
- - - - diff --git a/classripple_1_1STParsedJSONArray.html b/classripple_1_1STParsedJSONArray.html deleted file mode 100644 index 158fe526b1..0000000000 --- a/classripple_1_1STParsedJSONArray.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - -rippled: ripple::STParsedJSONArray Class Reference - - - - - - - - - -
-
- - - - - - -
-
rippled -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
ripple::STParsedJSONArray Class Reference
-
-
- -

Holds the serialized result of parsing an input JSON array. - More...

- -

#include <STParsedJSON.h>

-
-Collaboration diagram for ripple::STParsedJSONArray:
-
-
Collaboration graph
- - - - - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - -

-Public Member Functions

 STParsedJSONArray (std::string const &name, Json::Value const &json)
 Parses and creates an STParsedJSON array.
 
 STParsedJSONArray ()=delete
 
 STParsedJSONArray (STParsedJSONArray const &)=delete
 
STParsedJSONArrayoperator= (STParsedJSONArray const &)=delete
 
 ~STParsedJSONArray ()=default
 
- - - - - - - -

-Public Attributes

std::optional< STArrayarray
 The STArray if the parse was successful.
 
Json::Value error
 On failure, an appropriate set of error values.
 
-

Detailed Description

-

Holds the serialized result of parsing an input JSON array.

-

This does validation and checking on the provided JSON.

- -

Definition at line 60 of file STParsedJSON.h.

-

Constructor & Destructor Documentation

- -

◆ STParsedJSONArray() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - -
ripple::STParsedJSONArray::STParsedJSONArray (std::string const & name,
Json::Value const & json 
)
-
- -

Parses and creates an STParsedJSON array.

-

The result of the parsing is stored in array and error. Exceptions: Does not throw.

Parameters
- - - -
nameThe name of the JSON field, used in diagnostics.
jsonThe JSON-RPC to parse.
-
-
- -

Definition at line 1158 of file STParsedJSON.cpp.

- -
-
- -

◆ STParsedJSONArray() [2/3]

- -
-
- - - - - -
- - - - - - - -
ripple::STParsedJSONArray::STParsedJSONArray ()
-
-delete
-
- -
-
- -

◆ STParsedJSONArray() [3/3]

- -
-
- - - - - -
- - - - - - - - -
ripple::STParsedJSONArray::STParsedJSONArray (STParsedJSONArray const & )
-
-delete
-
- -
-
- -

◆ ~STParsedJSONArray()

- -
-
- - - - - -
- - - - - - - -
ripple::STParsedJSONArray::~STParsedJSONArray ()
-
-default
-
- -
-
-

Member Function Documentation

- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - - -
STParsedJSONArray & ripple::STParsedJSONArray::operator= (STParsedJSONArray const & )
-
-delete
-
- -
-
-

Member Data Documentation

- -

◆ array

- -
-
- - - - -
std::optional<STArray> ripple::STParsedJSONArray::array
-
- -

The STArray if the parse was successful.

- -

Definition at line 79 of file STParsedJSON.h.

- -
-
- -

◆ error

- -
-
- - - - -
Json::Value ripple::STParsedJSONArray::error
-
- -

On failure, an appropriate set of error values.

- -

Definition at line 82 of file STParsedJSON.h.

- -
-
-
- - - - diff --git a/classripple_1_1STParsedJSONArray__coll__graph.map b/classripple_1_1STParsedJSONArray__coll__graph.map deleted file mode 100644 index 033e1b2f38..0000000000 --- a/classripple_1_1STParsedJSONArray__coll__graph.map +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/classripple_1_1STParsedJSONArray__coll__graph.md5 b/classripple_1_1STParsedJSONArray__coll__graph.md5 deleted file mode 100644 index 870913f7c2..0000000000 --- a/classripple_1_1STParsedJSONArray__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -f333663a3702b4f525e76ec2463c4d96 \ No newline at end of file diff --git a/classripple_1_1STParsedJSONArray__coll__graph.png b/classripple_1_1STParsedJSONArray__coll__graph.png deleted file mode 100644 index 31b188393c..0000000000 Binary files a/classripple_1_1STParsedJSONArray__coll__graph.png and /dev/null differ diff --git a/classripple_1_1STParsedJSONObject.html b/classripple_1_1STParsedJSONObject.html index c1416127fd..24289f0d36 100644 --- a/classripple_1_1STParsedJSONObject.html +++ b/classripple_1_1STParsedJSONObject.html @@ -171,7 +171,7 @@ Public Attributes -

Definition at line 1148 of file STParsedJSON.cpp.

+

Definition at line 1159 of file STParsedJSON.cpp.

diff --git a/classripple_1_1STParsedJSON__test-members.html b/classripple_1_1STParsedJSON__test-members.html index ec68867d1a..655171347e 100644 --- a/classripple_1_1STParsedJSON__test-members.html +++ b/classripple_1_1STParsedJSON__test-members.html @@ -96,23 +96,40 @@ $(function() { operator()(runner &r)beast::unit_test::suite operator=(suite const &)=deletebeast::unit_test::suite p_this_suite()beast::unit_test::suiteprivatestatic - parseJSONString(std::string const &json, Json::Value &to)ripple::STParsedJSON_test + parseJSONString(std::string const &json, Json::Value &to)ripple::STParsedJSON_testprivate pass()beast::unit_test::suite propagate_abort()beast::unit_test::suiteprivate - run() overrideripple::STParsedJSON_testvirtual + run() overrideripple::STParsedJSON_testprivatevirtual runner_beast::unit_test::suiteprivate suite()beast::unit_test::suite suite(suite const &)=deletebeast::unit_test::suite + testAccount()ripple::STParsedJSON_testprivate + testAmount()ripple::STParsedJSON_testprivate + testArray()ripple::STParsedJSON_testprivate + testBlob()ripple::STParsedJSON_testprivate testcasebeast::unit_test::suite - testParseJSONArray()ripple::STParsedJSON_test - testParseJSONArrayWithInvalidChildrenObjects()ripple::STParsedJSON_test - testParseJSONEdgeCases()ripple::STParsedJSON_test - this_suite()beast::unit_test::suitestatic - unexcept(F &&f, String const &reason)beast::unit_test::suite - unexcept(F &&f)beast::unit_test::suite - unexpected(Condition shouldBeFalse, String const &reason)beast::unit_test::suite - unexpected(Condition shouldBeFalse)beast::unit_test::suite - ~suite()=defaultbeast::unit_test::suitevirtual + testCurrency()ripple::STParsedJSON_testprivate + testEdgeCases()ripple::STParsedJSON_testprivate + testIssue()ripple::STParsedJSON_testprivate + testNumber()ripple::STParsedJSON_testprivate + testObject()ripple::STParsedJSON_testprivate + testPathSet()ripple::STParsedJSON_testprivate + testUInt128()ripple::STParsedJSON_testprivate + testUInt16()ripple::STParsedJSON_testprivate + testUInt160()ripple::STParsedJSON_testprivate + testUInt192()ripple::STParsedJSON_testprivate + testUInt256()ripple::STParsedJSON_testprivate + testUInt32()ripple::STParsedJSON_testprivate + testUInt64()ripple::STParsedJSON_testprivate + testUInt8()ripple::STParsedJSON_testprivate + testVector256()ripple::STParsedJSON_testprivate + testXChainBridge()ripple::STParsedJSON_testprivate + this_suite()beast::unit_test::suitestatic + unexcept(F &&f, String const &reason)beast::unit_test::suite + unexcept(F &&f)beast::unit_test::suite + unexpected(Condition shouldBeFalse, String const &reason)beast::unit_test::suite + unexpected(Condition shouldBeFalse)beast::unit_test::suite + ~suite()=defaultbeast::unit_test::suitevirtual