Skip to content

Commit

Permalink
remove duplicate checks
Browse files Browse the repository at this point in the history
Signed-off-by: Rafał Malinowski <[email protected]>
  • Loading branch information
vogel committed May 25, 2017
1 parent 9290e1b commit d2890fa
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/test/TxTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,42 +631,8 @@ applyManageOffer(Application& app, uint64 offerId, SecretKey const& source,
ManageOfferResult const& createOfferRes = applyCreateOfferHelper(
app, offerId, source, selling, buying, price, amount, seq);

switch (createOfferRes.code())
{
case MANAGE_OFFER_MALFORMED:
throw ex_MANAGE_OFFER_MALFORMED{};
case MANAGE_OFFER_SELL_NO_TRUST:
throw ex_MANAGE_OFFER_SELL_NO_TRUST{};
case MANAGE_OFFER_BUY_NO_TRUST:
throw ex_MANAGE_OFFER_BUY_NO_TRUST{};
case MANAGE_OFFER_SELL_NOT_AUTHORIZED:
throw ex_MANAGE_OFFER_SELL_NOT_AUTHORIZED{};
case MANAGE_OFFER_BUY_NOT_AUTHORIZED:
throw ex_MANAGE_OFFER_BUY_NOT_AUTHORIZED{};
case MANAGE_OFFER_LINE_FULL:
throw ex_MANAGE_OFFER_LINE_FULL{};
case MANAGE_OFFER_UNDERFUNDED:
throw ex_MANAGE_OFFER_UNDERFUNDED{};
case MANAGE_OFFER_CROSS_SELF:
throw ex_MANAGE_OFFER_CROSS_SELF{};
case MANAGE_OFFER_SELL_NO_ISSUER:
throw ex_MANAGE_OFFER_SELL_NO_ISSUER{};
case MANAGE_OFFER_BUY_NO_ISSUER:
throw ex_MANAGE_OFFER_BUY_NO_ISSUER{};
case MANAGE_OFFER_NOT_FOUND:
throw ex_MANAGE_OFFER_NOT_FOUND{};
case MANAGE_OFFER_LOW_RESERVE:
throw ex_MANAGE_OFFER_LOW_RESERVE{};
default:
break;
}

REQUIRE(createOfferRes.code() == MANAGE_OFFER_SUCCESS);

auto& success = createOfferRes.success().offer;

REQUIRE(success.effect() == expectedEffect);

return success.effect() == MANAGE_OFFER_CREATED ? success.offer().offerID
: 0;
}
Expand Down

5 comments on commit d2890fa

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging vogel/stellar-core/test-improvements = d2890fa into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vogel/stellar-core/test-improvements = d2890fa merged ok, testing candidate = 060c815

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 060c815

Please sign in to comment.