@@ -34,6 +34,15 @@ struct AMM_test : public jtx::AMMTest
3434 NumberMantissaScaleGuard const sg_{ripple::MantissaRange::small};
3535
3636private:
37+ FeatureBitset
38+ testable_amendments ()
39+ {
40+ // For now, just disable SAV entirely, which locks in the small Number
41+ // mantissas
42+ return jtx::testable_amendments () -
43+ featureSingleAssetVault /* - featureLendingProtocol */ ;
44+ }
45+
3746 void
3847 testInstanceCreate ()
3948 {
@@ -1368,8 +1377,8 @@ struct AMM_test : public jtx::AMMTest
13681377 {
13691378 testcase (" Deposit" );
13701379
1371- using namespace jtx ;
13721380 auto const all = testable_amendments ();
1381+ using namespace jtx ;
13731382
13741383 // Equal deposit: 1000000 tokens, 10% of the current pool
13751384 testAMM ([&](AMM& ammAlice, Env& env) {
@@ -1487,7 +1496,9 @@ struct AMM_test : public jtx::AMMTest
14871496 });
14881497
14891498 // Single deposit: 100000 tokens worth of XRP
1490- testAMM ([&](AMM& ammAlice, Env&) {
1499+ testAMM ([&](AMM& ammAlice, Env& env) {
1500+ BEAST_EXPECT (
1501+ !env.app ().config ().features .contains (featureSingleAssetVault));
14911502 ammAlice.deposit (carol, 100'000 , XRP (205 ));
14921503 BEAST_EXPECT (ammAlice.expectBalances (
14931504 XRP (10'201 ), USD (10'000 ), IOUAmount{10'100'000 , 0 }));
@@ -1668,8 +1679,8 @@ struct AMM_test : public jtx::AMMTest
16681679 {
16691680 testcase (" Invalid Withdraw" );
16701681
1671- using namespace jtx ;
16721682 auto const all = testable_amendments ();
1683+ using namespace jtx ;
16731684
16741685 testAMM (
16751686 [&](AMM& ammAlice, Env& env) {
@@ -2248,8 +2259,8 @@ struct AMM_test : public jtx::AMMTest
22482259 {
22492260 testcase (" Withdraw" );
22502261
2251- using namespace jtx ;
22522262 auto const all = testable_amendments ();
2263+ using namespace jtx ;
22532264
22542265 // Equal withdrawal by Carol: 1000000 of tokens, 10% of the current
22552266 // pool
@@ -2669,8 +2680,8 @@ struct AMM_test : public jtx::AMMTest
26692680 testFeeVote ()
26702681 {
26712682 testcase (" Fee Vote" );
2672- using namespace jtx ;
26732683 auto const all = testable_amendments ();
2684+ using namespace jtx ;
26742685
26752686 // One vote sets fee to 1%.
26762687 testAMM ([&](AMM& ammAlice, Env& env) {
@@ -4846,12 +4857,12 @@ struct AMM_test : public jtx::AMMTest
48464857 testAmendment ()
48474858 {
48484859 testcase (" Amendment" );
4849- using namespace jtx ;
48504860 FeatureBitset const all{testable_amendments ()};
48514861 FeatureBitset const noAMM{all - featureAMM};
48524862 FeatureBitset const noNumber{all - fixUniversalNumber};
48534863 FeatureBitset const noAMMAndNumber{
48544864 all - featureAMM - fixUniversalNumber};
4865+ using namespace jtx ;
48554866
48564867 for (auto const & feature : {noAMM, noNumber, noAMMAndNumber})
48574868 {
@@ -7037,7 +7048,7 @@ struct AMM_test : public jtx::AMMTest
70377048 {{xrpPool, iouPool}},
70387049 889 ,
70397050 std::nullopt ,
7040- {jtx:: testable_amendments () | fixAMMv1_1});
7051+ {testable_amendments () | fixAMMv1_1});
70417052 }
70427053
70437054 void
@@ -7892,7 +7903,7 @@ struct AMM_test : public jtx::AMMTest
78927903 void
78937904 run () override
78947905 {
7895- FeatureBitset const all{jtx:: testable_amendments ()};
7906+ FeatureBitset const all{testable_amendments ()};
78967907 testInvalidInstance ();
78977908 testInstanceCreate ();
78987909 testInvalidDeposit (all);
0 commit comments