Skip to content

Commit

Permalink
Merge pull request #636 from eosnetworkfoundation/fix_misc_warning
Browse files Browse the repository at this point in the history
[3.2] fixed compile warnings in abi_tests.cpp (real bug, missing test), auth_tests.cpp, bootseq_tests.cpp, and whitelist_blacklist_tests.cpp
  • Loading branch information
linh2931 authored Jul 12, 2022
2 parents 685d5f1 + a024a78 commit b019793
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion unittests/abi_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,8 @@ BOOST_AUTO_TEST_CASE(abi_account_name_in_eosio_abi)
)=====";

auto abi = eosio_contract_abi(fc::json::from_string(repeat_abi).as<abi_def>());
auto is_type_exception = [](fc::assert_exception const & e) -> bool { return e.to_detail_string().find("abi.types.size") != std::string::npos; };
auto is_type_exception = [](fc::assert_exception const & e) -> bool { return e.to_detail_string().find("type already exists") != std::string::npos; };
BOOST_CHECK_EXCEPTION( abi_serializer abis(abi, abi_serializer::create_yield_function(max_serialization_time )), duplicate_abi_type_def_exception, is_type_exception );

} FC_LOG_AND_RETHROW() }

Expand Down
1 change: 0 additions & 1 deletion unittests/auth_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ BOOST_AUTO_TEST_CASE( any_auth ) { try {

const auto spending_priv_key = chain.get_private_key(name("alice"), "spending");
const auto spending_pub_key = spending_priv_key.get_public_key();
const auto bob_spending_priv_key = chain.get_private_key(name("bob"), "spending");
const auto bob_spending_pub_key = spending_priv_key.get_public_key();

chain.set_authority(name("alice"), name("spending"), spending_pub_key, name("active"));
Expand Down
1 change: 0 additions & 1 deletion unittests/bootseq_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ BOOST_FIXTURE_TEST_CASE( bootseq_test, bootseq_tester ) {
claim_rewards("runnerup1"_n);
BOOST_TEST(get_balance("runnerup1"_n).get_amount() > 0);

const auto first_june_2018 = fc::seconds(1527811200); // 2018-06-01
const auto first_june_2028 = fc::seconds(1843430400); // 2028-06-01
// Ensure that now is yet 10 years after 2018-06-01 yet
BOOST_REQUIRE(control->head_block_time().time_since_epoch() < first_june_2028);
Expand Down
2 changes: 1 addition & 1 deletion unittests/whitelist_blacklist_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ BOOST_AUTO_TEST_CASE( greylist_limit_tests ) { try {
("cpu_weight", 249'999'999)
);

const uint64_t reqauth_net_charge = 104;
const int64_t reqauth_net_charge = 104;
auto push_reqauth = [&]( name acnt, name perm, uint32_t billed_cpu_time_us ) {
signed_transaction trx;
trx.actions.emplace_back( c.get_action( config::system_account_name, "reqauth"_n,
Expand Down

0 comments on commit b019793

Please sign in to comment.