Skip to content

Commit

Permalink
Coding style update
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Aug 8, 2018
1 parent cef14fe commit cfea090
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions tests/tests/voting_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,26 +395,24 @@ BOOST_AUTO_TEST_CASE(track_votes_committee_disabled)

BOOST_AUTO_TEST_CASE(invalid_voting_account)
{
ACTORS((alice));

account_id_type invalid_account_id;
invalid_account_id.instance = 99999;

graphene::chain::account_update_operation op;
op.account = alice_id;
op.new_options = alice.options;
op.new_options->voting_account = invalid_account_id;
trx.operations.push_back(op);
sign(trx, alice_private_key);
try
{
PUSH_TX(db, trx, ~0);
BOOST_FAIL("Updating an account with an invalid voting account should fail.");
}
catch (fc::exception& ex)
{
// We should end up here
}
try
{
ACTORS((alice));

account_id_type invalid_account_id( (uint64_t)999999 );

BOOST_CHECK( !db.find( invalid_account_id ) );

graphene::chain::account_update_operation op;
op.account = alice_id;
op.new_options = alice.options;
op.new_options->voting_account = invalid_account_id;
trx.operations.push_back(op);
sign(trx, alice_private_key);

GRAPHENE_REQUIRE_THROW( PUSH_TX( db, trx, ~0 ), fc::exception );

} FC_LOG_AND_RETHROW()
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit cfea090

Please sign in to comment.