mirror of
https://github.com/Xahau/xahaud.git
synced 2026-10-12 06:48:05 +00:00
Compare commits
4 Commits
sync-3.0.0
...
reenable_s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c894633b6f | ||
|
|
2baa23d14b | ||
|
|
de9d5e53f1 | ||
|
|
80c70ec03d |
@@ -34,10 +34,11 @@
|
||||
// If you add an amendment here, then do not forget to increment `numFeatures`
|
||||
// in include/xrpl/protocol/Feature.h.
|
||||
|
||||
XRPL_FIX (20261005, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(EscrowDestinationCancel, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (20260929, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(HookOnV2_1, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(OnChainManifests, Supported::no, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(OnChainManifests, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (HookMap, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FIX (GuardDepth32, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(NamedHooks, Supported::yes, VoteBehavior::DefaultNo)
|
||||
|
||||
@@ -56,9 +56,9 @@ getVersionString()
|
||||
(versionString == std::string("0.") + std::string("0.0") ||
|
||||
versionString == std::string("0.0.0+DEBUG")))
|
||||
{
|
||||
std::string y = std::string(__DATE__ + 7);
|
||||
std::string y = std::string(&__DATE__[7]);
|
||||
std::string d = std::string(
|
||||
__DATE__ + 4 + (__DATE__[4] == ' ' ? 1 : 0),
|
||||
&__DATE__[4 + (__DATE__[4] == ' ' ? 1 : 0)],
|
||||
__DATE__[4] == ' ' ? 1 : 2);
|
||||
std::string m;
|
||||
switch (__DATE__[0])
|
||||
|
||||
@@ -798,21 +798,18 @@ public:
|
||||
void
|
||||
run() override
|
||||
{
|
||||
// RH TODO: re-add these when the amendment is ready for supported::yes
|
||||
/*
|
||||
using namespace test::jtx;
|
||||
auto const sa = supported_amendments();
|
||||
testSubmission(sa);
|
||||
testUpdate(sa);
|
||||
testRevocation(sa);
|
||||
testRetrieval(sa);
|
||||
testSigningKeyRetrieval(sa);
|
||||
testMalformed(sa);
|
||||
testEnvelopeRejections(sa);
|
||||
testCorruptLedger(sa);
|
||||
testGossipSelection(sa);
|
||||
testDisabled(sa);
|
||||
*/
|
||||
using namespace test::jtx;
|
||||
auto const sa = supported_amendments();
|
||||
testSubmission(sa);
|
||||
testUpdate(sa);
|
||||
testRevocation(sa);
|
||||
testRetrieval(sa);
|
||||
testSigningKeyRetrieval(sa);
|
||||
testMalformed(sa);
|
||||
testEnvelopeRejections(sa);
|
||||
testCorruptLedger(sa);
|
||||
testGossipSelection(sa);
|
||||
testDisabled(sa);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <xrpl/beast/core/SemanticVersion.h>
|
||||
#include <xrpl/beast/unit_test.h>
|
||||
#include <xrpl/protocol/BuildInfo.h>
|
||||
|
||||
@@ -25,6 +26,44 @@ namespace ripple {
|
||||
class BuildInfo_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
void
|
||||
testGetVersionString()
|
||||
{
|
||||
testcase("GetVersionString");
|
||||
|
||||
auto const& s = BuildInfo::getVersionString();
|
||||
BEAST_EXPECT(!s.empty());
|
||||
|
||||
// Same reference on every call (static cache).
|
||||
BEAST_EXPECT(&BuildInfo::getVersionString() == &s);
|
||||
|
||||
// Must be strict semver and round-trip unchanged (no leading
|
||||
// zeros, no stray whitespace).
|
||||
beast::SemanticVersion v;
|
||||
BEAST_EXPECT(v.parse(s));
|
||||
BEAST_EXPECT(v.print() == s);
|
||||
|
||||
BEAST_EXPECT(BuildInfo::getFullVersionString() == "xahaud-" + s);
|
||||
|
||||
if (s.find("-CustomBuild") == std::string::npos)
|
||||
return;
|
||||
|
||||
// Version generated from __DATE__ ("Mmm dd yyyy"):
|
||||
// <year>.<month>.<day>-CustomBuild[+DEBUG]
|
||||
BEAST_EXPECT(v.majorVersion >= 2023 && v.majorVersion <= 9999);
|
||||
BEAST_EXPECT(v.minorVersion >= 1 && v.minorVersion <= 12);
|
||||
BEAST_EXPECT(v.patchVersion >= 1 && v.patchVersion <= 31);
|
||||
BEAST_EXPECT(
|
||||
v.preReleaseIdentifiers ==
|
||||
beast::SemanticVersion::identifier_list{"CustomBuild"});
|
||||
#ifdef DEBUG
|
||||
BEAST_EXPECT(
|
||||
v.metaData == beast::SemanticVersion::identifier_list{"DEBUG"});
|
||||
#else
|
||||
BEAST_EXPECT(v.metaData.empty());
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
testEncodeSoftwareVersion()
|
||||
{
|
||||
@@ -119,6 +158,7 @@ public:
|
||||
void
|
||||
run() override
|
||||
{
|
||||
testGetVersionString();
|
||||
testEncodeSoftwareVersion();
|
||||
testIsRippledVersion();
|
||||
testIsNewerVersion();
|
||||
|
||||
Reference in New Issue
Block a user