Skip to content

Commit

Permalink
revert token test's asset warning fix for now
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonincode committed Aug 5, 2022
1 parent 5449f5b commit 507ba01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unittests/eosio.token_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ BOOST_FIXTURE_TEST_CASE( create_max_supply, eosio_token_tester ) try {
share_type amount = 4611686018427387904;
static_assert(sizeof(share_type) <= sizeof(asset), "asset changed so test is no longer valid");
static_assert(std::is_trivially_copyable<asset>::value, "asset is not trivially copyable");
memcpy((char*)&max, &amount, sizeof(share_type)); // hack in an invalid amount
memcpy(&max, &amount, sizeof(share_type)); // hack in an invalid amount

BOOST_CHECK_EXCEPTION( create( "alice"_n, max) , asset_type_exception, [](const asset_type_exception& e) {
return expect_assert_message(e, "magnitude of asset amount must be less than 2^62");
Expand All @@ -177,7 +177,7 @@ BOOST_FIXTURE_TEST_CASE( create_max_decimals, eosio_token_tester ) try {
share_type amount = 0x8ac7230489e80000L;
static_assert(sizeof(share_type) <= sizeof(asset), "asset changed so test is no longer valid");
static_assert(std::is_trivially_copyable<asset>::value, "asset is not trivially copyable");
memcpy((char*)&max, &amount, sizeof(share_type)); // hack in an invalid amount
memcpy(&max, &amount, sizeof(share_type)); // hack in an invalid amount

BOOST_CHECK_EXCEPTION( create( "alice"_n, max) , asset_type_exception, [](const asset_type_exception& e) {
return expect_assert_message(e, "magnitude of asset amount must be less than 2^62");
Expand Down

0 comments on commit 507ba01

Please sign in to comment.