mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +00:00
LibCrypto: Add Formatter<SignedBigInteger>
Useful for seeing SignedBigInteger values in test failure messages.
This commit is contained in:
parent
b87e517deb
commit
ec37eadb39
2 changed files with 12 additions and 0 deletions
|
@ -308,3 +308,10 @@ bool SignedBigInteger::operator>=(const SignedBigInteger& other) const
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
ErrorOr<void> AK::Formatter<Crypto::SignedBigInteger>::format(FormatBuilder& fmtbuilder, const Crypto::SignedBigInteger& value)
|
||||
{
|
||||
if (value.is_negative())
|
||||
TRY(fmtbuilder.put_string("-"));
|
||||
return Formatter<Crypto::UnsignedBigInteger>::format(fmtbuilder, value.unsigned_value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue