From cfea090e7c4a4c48678a9d21b4cfa17c8949581c Mon Sep 17 00:00:00 2001 From: abitmore Date: Wed, 8 Aug 2018 07:33:45 -0400 Subject: [PATCH] Coding style update --- tests/tests/voting_tests.cpp | 38 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/tests/tests/voting_tests.cpp b/tests/tests/voting_tests.cpp index 4e81aedddc..34f39e48c1 100644 --- a/tests/tests/voting_tests.cpp +++ b/tests/tests/voting_tests.cpp @@ -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()