Skip to content

Commit

Permalink
Add generate_block() to tests for order_update op
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed May 10, 2023
1 parent 75914cb commit ff48c7e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/tests/operation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ BOOST_AUTO_TEST_CASE(limit_order_update_test)
BOOST_REQUIRE_EQUAL(order_id(db).amount_for_sale().amount.value, 500);
BOOST_REQUIRE_EQUAL(db.get_balance(nathan_id, core.get_id()).amount.value, 500);

generate_block();

} FC_LOG_AND_RETHROW() }

BOOST_AUTO_TEST_CASE( limit_order_update_asset_authorization_test )
Expand Down Expand Up @@ -405,6 +407,8 @@ BOOST_AUTO_TEST_CASE( limit_order_update_asset_authorization_test )
BOOST_REQUIRE_EQUAL(order_id(db).expiration.sec_since_epoch(), expiration.sec_since_epoch());
}

generate_block();

} FC_LOG_AND_RETHROW() }

BOOST_AUTO_TEST_CASE(limit_order_update_dust_test)
Expand All @@ -429,6 +433,8 @@ BOOST_AUTO_TEST_CASE(limit_order_update_dust_test)
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(asset(2000), munee.amount(100)), asset(-985)),
fc::assert_exception);

generate_block();

} FC_LOG_AND_RETHROW() }

BOOST_AUTO_TEST_CASE(limit_order_update_match_test)
Expand All @@ -452,6 +458,8 @@ BOOST_AUTO_TEST_CASE(limit_order_update_match_test)
BOOST_REQUIRE( !db.find(order_id_1) );
BOOST_REQUIRE_EQUAL(db.find(order_id_2)->amount_for_sale().amount.value, 1);

generate_block();

} FC_LOG_AND_RETHROW() }

BOOST_AUTO_TEST_CASE(limit_order_update_match_test_2)
Expand All @@ -475,6 +483,8 @@ BOOST_AUTO_TEST_CASE(limit_order_update_match_test_2)
BOOST_REQUIRE( !db.find(order_id_1) );
BOOST_REQUIRE( !db.find(order_id_2) );

generate_block();

} FC_LOG_AND_RETHROW() }

BOOST_AUTO_TEST_CASE( call_order_update_test )
Expand Down

0 comments on commit ff48c7e

Please sign in to comment.