Skip to content

Commit

Permalink
Increase unit tests coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Mar 26, 2024
1 parent 02be370 commit 7d63654
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/app/AMM_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3693,6 +3693,32 @@ struct AMM_test : public jtx::AMMTest
Env env{*this, feature};
fund(env, gw, {alice}, {USD(1'000)}, Fund::All);
AMM amm(env, alice, XRP(1'000), USD(1'000), ter(temDISABLED));
amm.bid(
alice,
1000,
std::nullopt,
{},
std::nullopt,
std::nullopt,
std::nullopt,
ter(temMALFORMED));
amm.vote(
std::nullopt,
100,
std::nullopt,
std::nullopt,
std::nullopt,
ter(temDISABLED));
amm.withdraw(
alice, 100, std::nullopt, std::nullopt, ter(temMALFORMED));
amm.deposit(
alice,
USD(100),
std::nullopt,
std::nullopt,
std::nullopt,
ter(temDISABLED));
amm.ammDelete(alice, ter(temDISABLED));
}
}

Expand Down Expand Up @@ -4391,6 +4417,9 @@ struct AMM_test : public jtx::AMMTest
amm.ammDelete(alice);
BEAST_EXPECT(!amm.ammExists());
BEAST_EXPECT(!env.le(keylet::ownerDir(amm.ammAccount())));

// Try redundant delete
amm.ammDelete(alice, ter(terNO_AMM));
}
}

Expand Down

0 comments on commit 7d63654

Please sign in to comment.