mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-25 16:10:57 +00:00
Merge remote-tracking branch 'XRPLF/develop' into ximinez/fix-getledger
* XRPLF/develop: ci: Rewrite clang-tidy workflow(s) in a reusable manner (7062) chore: Ignore identifier-naming update in git blame (7066) refactor: Enable clang-tidy `readability-identifier-naming` check (6571) refactor: Revert certain `Throw`s by `LogicError`s (7036) ci: Rename print-env -> print-build-env (7061) fix: Gate -mcmodel flags to x86_64 in sanitizer builds (7049) fix: Prevents overwriting a bool value in an invariant (6609) fix: Address code review comments regarding `boost::coroutine2` (6977) refactor: Apply various minor improvements and corrections (7045) fix: Store `Delegate` object in delegating and authorized account directories for proper deletion (6681) ci: Use print-env from XRPLF/actions (7052) fix: Make assorted RPC fixes (6529) chore: Enable clang-tidy v21 new checks (7031) feat: Create new transaction testing framework `TxTest` (6537) feat: Add cleanup amendment for 3.2.0 (7037) fix: Fix ubsan flagged issues (6151)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
class ProtocolVersion_test : public beast::unit_test::suite
|
||||
class ProtocolVersion_test : public beast::unit_test::Suite
|
||||
{
|
||||
private:
|
||||
void
|
||||
@@ -34,10 +34,10 @@ public:
|
||||
run() override
|
||||
{
|
||||
testcase("Convert protocol version to string");
|
||||
BEAST_EXPECT(to_string(make_protocol(1, 3)) == "XRPL/1.3");
|
||||
BEAST_EXPECT(to_string(make_protocol(2, 0)) == "XRPL/2.0");
|
||||
BEAST_EXPECT(to_string(make_protocol(2, 1)) == "XRPL/2.1");
|
||||
BEAST_EXPECT(to_string(make_protocol(10, 10)) == "XRPL/10.10");
|
||||
BEAST_EXPECT(to_string(makeProtocol(1, 3)) == "XRPL/1.3");
|
||||
BEAST_EXPECT(to_string(makeProtocol(2, 0)) == "XRPL/2.0");
|
||||
BEAST_EXPECT(to_string(makeProtocol(2, 1)) == "XRPL/2.1");
|
||||
BEAST_EXPECT(to_string(makeProtocol(10, 10)) == "XRPL/10.10");
|
||||
|
||||
{
|
||||
testcase("Convert strings to protocol versions");
|
||||
@@ -60,11 +60,11 @@ public:
|
||||
|
||||
BEAST_EXPECT(negotiateProtocolVersion("RTXP/1.2") == std::nullopt);
|
||||
BEAST_EXPECT(
|
||||
negotiateProtocolVersion("RTXP/1.2, XRPL/2.0, XRPL/2.1") == make_protocol(2, 1));
|
||||
BEAST_EXPECT(negotiateProtocolVersion("XRPL/2.2") == make_protocol(2, 2));
|
||||
negotiateProtocolVersion("RTXP/1.2, XRPL/2.0, XRPL/2.1") == makeProtocol(2, 1));
|
||||
BEAST_EXPECT(negotiateProtocolVersion("XRPL/2.2") == makeProtocol(2, 2));
|
||||
BEAST_EXPECT(
|
||||
negotiateProtocolVersion("RTXP/1.2, XRPL/2.2, XRPL/2.3, XRPL/2.4, XRPL/999.999") ==
|
||||
make_protocol(2, 3));
|
||||
makeProtocol(2, 3));
|
||||
BEAST_EXPECT(negotiateProtocolVersion("XRPL/999.999, WebSocket/1.0") == std::nullopt);
|
||||
BEAST_EXPECT(negotiateProtocolVersion("") == std::nullopt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user