mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Format first-party source according to .clang-format
This commit is contained in:
committed by
manojsdoshi
parent
65dfc5d19e
commit
50760c6935
@@ -35,36 +35,41 @@ class base64_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
void
|
||||
check (std::string const& in, std::string const& out)
|
||||
check(std::string const& in, std::string const& out)
|
||||
{
|
||||
auto const encoded = base64_encode (in);
|
||||
auto const encoded = base64_encode(in);
|
||||
BEAST_EXPECT(encoded == out);
|
||||
BEAST_EXPECT(base64_decode (encoded) == in);
|
||||
BEAST_EXPECT(base64_decode(encoded) == in);
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
check ("", "");
|
||||
check ("f", "Zg==");
|
||||
check ("fo", "Zm8=");
|
||||
check ("foo", "Zm9v");
|
||||
check ("foob", "Zm9vYg==");
|
||||
check ("fooba", "Zm9vYmE=");
|
||||
check ("foobar", "Zm9vYmFy");
|
||||
check("", "");
|
||||
check("f", "Zg==");
|
||||
check("fo", "Zm8=");
|
||||
check("foo", "Zm9v");
|
||||
check("foob", "Zm9vYg==");
|
||||
check("fooba", "Zm9vYmE=");
|
||||
check("foobar", "Zm9vYmFy");
|
||||
|
||||
check(
|
||||
"Man is distinguished, not only by his reason, but by this singular passion from "
|
||||
"other animals, which is a lust of the mind, that by a perseverance of delight "
|
||||
"in the continued and indefatigable generation of knowledge, exceeds the short "
|
||||
"vehemence of any carnal pleasure."
|
||||
,
|
||||
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz"
|
||||
"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg"
|
||||
"dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu"
|
||||
"dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo"
|
||||
"ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="
|
||||
);
|
||||
"Man is distinguished, not only by his reason, but by this "
|
||||
"singular passion from "
|
||||
"other animals, which is a lust of the mind, that by a "
|
||||
"perseverance of delight "
|
||||
"in the continued and indefatigable generation of knowledge, "
|
||||
"exceeds the short "
|
||||
"vehemence of any carnal pleasure.",
|
||||
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dC"
|
||||
"BieSB0aGlz"
|
||||
"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIG"
|
||||
"x1c3Qgb2Yg"
|
||||
"dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aG"
|
||||
"UgY29udGlu"
|
||||
"dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleG"
|
||||
"NlZWRzIHRo"
|
||||
"ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=");
|
||||
|
||||
std::string const notBase64 = "not_base64!!";
|
||||
std::string const truncated = "not";
|
||||
@@ -74,4 +79,4 @@ public:
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(base64, ripple_basics, ripple);
|
||||
|
||||
} // ripple
|
||||
} // namespace ripple
|
||||
|
||||
Reference in New Issue
Block a user