提交 497be902 编写于 作者: M Matias Romeo

Fix dice tests

上级 0f52f925
{
"types": [{
"new_type_name": "account_name",
"type": "name"
}
],
"types": [],
"structs": [{
"name": "transfer",
"base": "",
......
......@@ -468,7 +468,7 @@ namespace eosio { namespace testing {
const symbol& asset_symbol,
const account_name& account ) const {
const auto& db = control->get_database();
const auto* tbl = db.find<contracts::table_id_object, contracts::by_code_scope_table>(boost::make_tuple(code, account, N(account)));
const auto* tbl = db.find<contracts::table_id_object, contracts::by_code_scope_table>(boost::make_tuple(code, account, N(accounts)));
share_type result = 0;
// the balance is implied to be 0 if either the table or row does not exist
......
......@@ -5,6 +5,9 @@
#include <dice/dice.wast.hpp>
#include <dice/dice.abi.hpp>
#include <eosio.token/eosio.token.wast.hpp>
#include <eosio.token/eosio.token.abi.hpp>
#include <Runtime/Runtime.h>
#include <fc/variant_object.hpp>
......@@ -221,6 +224,9 @@ BOOST_AUTO_TEST_SUITE(dice_tests)
BOOST_FIXTURE_TEST_CASE( dice_test, dice_tester ) try {
set_code(config::system_account_name, eosio_token_wast);
set_abi(config::system_account_name, eosio_token_abi);
create_accounts( {N(dice),N(alice),N(bob),N(carol),N(david)}, false);
produce_block();
......@@ -228,9 +234,18 @@ BOOST_FIXTURE_TEST_CASE( dice_test, dice_tester ) try {
add_dice_authority(N(bob));
add_dice_authority(N(carol));
push_action(N(eosio), N(create), N(eosio), mvo()
("issuer", "eosio")
("maximum_supply", "1000000000000.0000 EOS")
("can_freeze", "0")
("can_recall", "0")
("can_whitelist", "0")
);
push_action(N(eosio), N(issue), N(eosio), mvo()
("to", "eosio")
("quantity", "1000000.0000 EOS")
("memo", "")
);
transfer( N(eosio), N(alice), "10000.0000 EOS", "", N(eosio) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册