Skip to content

Commit b26d877

Browse files
committed
Add tests for virtual operation fees
1 parent 6636959 commit b26d877

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/tests/fee_tests.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -3928,6 +3928,14 @@ BOOST_AUTO_TEST_CASE( defaults_test )
39283928
asset fee = schedule.calculate_fee( limit_order_create_operation() );
39293929
BOOST_CHECK_EQUAL( (int64_t)default_order_fee.fee, fee.amount.value );
39303930

3931+
// fill_order fee is zero
3932+
fee = schedule.calculate_fee( fill_order_operation() );
3933+
BOOST_CHECK_EQUAL( (int64_t)0, fee.amount.value );
3934+
3935+
// execute_bid fee is zero
3936+
fee = schedule.calculate_fee( execute_bid_operation() );
3937+
BOOST_CHECK_EQUAL( (int64_t)0, fee.amount.value );
3938+
39313939
limit_order_create_operation::fee_params_t new_order_fee; new_order_fee.fee = 123;
39323940
// set fee + check
39333941
schedule.parameters.insert( new_order_fee );
@@ -3951,6 +3959,15 @@ BOOST_AUTO_TEST_CASE( defaults_test )
39513959
schedule.parameters.insert( new_bid_fee );
39523960
fee = schedule.calculate_fee( bid_collateral_operation() );
39533961
BOOST_CHECK_EQUAL( (int64_t)new_bid_fee.fee, fee.amount.value );
3962+
3963+
// fill_order fee is still zero
3964+
fee = schedule.calculate_fee( fill_order_operation() );
3965+
BOOST_CHECK_EQUAL( (int64_t)0, fee.amount.value );
3966+
3967+
// execute_bid fee is still zero
3968+
fee = schedule.calculate_fee( execute_bid_operation() );
3969+
BOOST_CHECK_EQUAL( (int64_t)0, fee.amount.value );
3970+
39543971
}
39553972
catch( const fc::exception& e )
39563973
{

0 commit comments

Comments
 (0)