未验证 提交 d0089510 编写于 作者: K Kevin Heifner 提交者: GitHub

Merge pull request #2741 from EOSIO/slim-fix-currency-tests

Fix eosio_token_tests/transfer_tests and auth_tests/link_then_update_auth
......@@ -31,7 +31,7 @@ add_dependencies(unit_test asserter test_api test_api_mem test_api_db test_api_m
#Manually run unit_test for all supported runtimes
#To run unit_test with all log from blockchain displayed, put --verbose after --, i.e. unit_test -- --verbose
add_test(NAME unit_test_binaryen COMMAND unit_test
add_test(NAME unit_test_binaryen COMMAND unit_test
-t \!eosio_system_tests/*
-t \!delay_tests/*
-t \!currency_tests/test_deferred_failure
......
......@@ -282,7 +282,9 @@ BOOST_AUTO_TEST_CASE(link_then_update_auth) { try {
chain.link_authority("alice", "eosio", "first", "reqauth");
chain.push_reqauth("alice", { permission_level{N(alice), "first"} }, { first_priv_key });
chain.produce_blocks(13); // Wait at least 6 seconds for first push_reqauth transaction to expire.
// Update "first" auth public key
chain.set_authority("alice", "first", second_pub_key, "active");
// Authority updated, using previous "first" auth should fail on linked auth
......
......@@ -571,11 +571,6 @@ BOOST_FIXTURE_TEST_CASE( test_input_quantity, currency_tester ) try {
eosio_assert_message_is("asset symbol has higher precision than expected") );
}
// transfer using different symbol name fails
{
BOOST_REQUIRE_THROW(transfer(N(alice), N(carl), "20.50 USD"), fc::assert_exception);
}
} FC_LOG_AND_RETHROW() /// test_currency
BOOST_AUTO_TEST_SUITE_END()
......@@ -299,7 +299,7 @@ BOOST_FIXTURE_TEST_CASE( transfer_tests, eosio_token_tester ) try {
transfer( N(alice), N(bob), asset::from_string("-1000 CERO"), "hola" )
);
BOOST_REQUIRE_EQUAL( error( "condition: assertion failed: attempt to subtract asset with different symbol" ),
BOOST_REQUIRE_EQUAL( error( "condition: assertion failed: asset symbol has higher precision than expected" ),
transfer( N(alice), N(bob), asset::from_string("1.0 CERO"), "hola" )
);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册