mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Add STInt32 as a new SType (#5788)
This change adds `STInt32` as a new `SType` under the `STInteger` umbrella, with `SType` value `12`. This is the first and only `STInteger` type that supports negative values.
This commit is contained in:
@@ -122,10 +122,27 @@ struct STAccount_test : public beast::unit_test::suite
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
testAccountID()
|
||||
{
|
||||
auto const s = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh";
|
||||
if (auto const parsed = parseBase58<AccountID>(s); BEAST_EXPECT(parsed))
|
||||
{
|
||||
BEAST_EXPECT(toBase58(*parsed) == s);
|
||||
}
|
||||
|
||||
{
|
||||
auto const s =
|
||||
"âabcd1rNxp4h8apvRis6mJf9Sh8C6iRxfrDWNâabcdAVâ\xc2\x80\xc2\x8f";
|
||||
BEAST_EXPECT(!parseBase58<AccountID>(s));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
testSTAccount();
|
||||
testAccountID();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user