diff --git a/tests/eosio.msig_tests.cpp b/tests/eosio.msig_tests.cpp index 766f1ef8..609a2715 100644 --- a/tests/eosio.msig_tests.cpp +++ b/tests/eosio.msig_tests.cpp @@ -413,9 +413,9 @@ BOOST_FIXTURE_TEST_CASE( update_system_contract_all_approve, eosio_msig_tester ) set_code( config::system_account_name, contracts::system_wasm() ); set_abi( config::system_account_name, contracts::system_abi().data() ); - base_tester::push_action(config::system_account_name, N(init), - config::system_account_name, mutable_variant_object() - ("core", CORE_SYM_STR)); + base_tester::push_action( config::system_account_name, N(init), + config::system_account_name, mutable_variant_object() + ("core", CORE_SYM_STR) ); produce_blocks(); create_account_with_resources( N(alice1111111), N(eosio), core_sym::from_string("1.0000"), false ); create_account_with_resources( N(bob111111111), N(eosio), core_sym::from_string("0.4500"), false ); @@ -525,7 +525,9 @@ BOOST_FIXTURE_TEST_CASE( update_system_contract_major_approve, eosio_msig_tester set_code( config::system_account_name, contracts::system_wasm() ); set_abi( config::system_account_name, contracts::system_abi().data() ); - + base_tester::push_action( config::system_account_name, N(init), + config::system_account_name, mutable_variant_object() + ("core", CORE_SYM_STR) ); produce_blocks(); create_account_with_resources( N(alice1111111), N(eosio), core_sym::from_string("1.0000"), false ); diff --git a/tests/test_symbol.hpp b/tests/test_symbol.hpp index 21cff898..598ea434 100644 --- a/tests/test_symbol.hpp +++ b/tests/test_symbol.hpp @@ -1,11 +1,16 @@ #pragma once -#define CORE_SYM SY(4, TST) + #define CORE_SYM_NAME "TST" -#define CORE_SYM_STR "4,TST" +#define CORE_SYM_PRECISION 4 + +#define _STRINGIZE1(x) #x +#define _STRINGIZE2(x) _STRINGIZE1(x) + +#define CORE_SYM_STR ( _STRINGIZE2(CORE_SYM_PRECISION) "," CORE_SYM_NAME ) +#define CORE_SYM ( ::eosio::chain::string_to_symbol_c( CORE_SYM_PRECISION, CORE_SYM_NAME ) ) struct core_sym { static inline eosio::chain::asset from_string(const std::string& s) { return eosio::chain::asset::from_string(s + " " CORE_SYM_NAME); } }; -