未验证 提交 7c2592d1 编写于 作者: L luchiagogogo 提交者: GitHub

update yta

上级 deea71cb
......@@ -58,14 +58,14 @@ BOOST_FIXTURE_TEST_CASE( get_scope_test, TESTER ) try {
// create currency
auto act = mutable_variant_object()
("issuer", "eosio")
("maximum_supply", eosio::chain::asset::from_string("1000000000.0000 SYS"));
("maximum_supply", eosio::chain::asset::from_string("1000000000.0000 YTA"));
push_action(N(eosio.token), N(create), N(eosio.token), act );
// issue
for (account_name a: accs) {
push_action( N(eosio.token), N(issue), "eosio", mutable_variant_object()
("to", name(a) )
("quantity", eosio::chain::asset::from_string("999.0000 SYS") )
("quantity", eosio::chain::asset::from_string("999.0000 YTA") )
("memo", "")
);
}
......@@ -134,14 +134,14 @@ BOOST_FIXTURE_TEST_CASE( get_table_test, TESTER ) try {
// create currency
auto act = mutable_variant_object()
("issuer", "eosio")
("maximum_supply", eosio::chain::asset::from_string("1000000000.0000 SYS"));
("maximum_supply", eosio::chain::asset::from_string("1000000000.0000 YTA"));
push_action(N(eosio.token), N(create), N(eosio.token), act );
// issue
for (account_name a: accs) {
push_action( N(eosio.token), N(issue), "eosio", mutable_variant_object()
("to", name(a) )
("quantity", eosio::chain::asset::from_string("10000.0000 SYS") )
("quantity", eosio::chain::asset::from_string("10000.0000 YTA") )
("memo", "")
);
}
......@@ -207,7 +207,7 @@ BOOST_FIXTURE_TEST_CASE( get_table_test, TESTER ) try {
BOOST_REQUIRE_EQUAL("9999.0000 AAA", result.rows[0]["balance"].as_string());
BOOST_REQUIRE_EQUAL("8888.0000 BBB", result.rows[1]["balance"].as_string());
BOOST_REQUIRE_EQUAL("7777.0000 CCC", result.rows[2]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 SYS", result.rows[3]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 YTA", result.rows[3]["balance"].as_string());
}
// get table: reverse ordered
......@@ -219,7 +219,7 @@ BOOST_FIXTURE_TEST_CASE( get_table_test, TESTER ) try {
BOOST_REQUIRE_EQUAL("9999.0000 AAA", result.rows[3]["balance"].as_string());
BOOST_REQUIRE_EQUAL("8888.0000 BBB", result.rows[2]["balance"].as_string());
BOOST_REQUIRE_EQUAL("7777.0000 CCC", result.rows[1]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 SYS", result.rows[0]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 YTA", result.rows[0]["balance"].as_string());
}
// get table: reverse ordered, with ram payer
......@@ -232,7 +232,7 @@ BOOST_FIXTURE_TEST_CASE( get_table_test, TESTER ) try {
BOOST_REQUIRE_EQUAL("9999.0000 AAA", result.rows[3]["data"]["balance"].as_string());
BOOST_REQUIRE_EQUAL("8888.0000 BBB", result.rows[2]["data"]["balance"].as_string());
BOOST_REQUIRE_EQUAL("7777.0000 CCC", result.rows[1]["data"]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 SYS", result.rows[0]["data"]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 YTA", result.rows[0]["data"]["balance"].as_string());
BOOST_REQUIRE_EQUAL("eosio", result.rows[0]["payer"].as_string());
BOOST_REQUIRE_EQUAL("eosio", result.rows[1]["payer"].as_string());
BOOST_REQUIRE_EQUAL("eosio", result.rows[2]["payer"].as_string());
......@@ -283,7 +283,7 @@ BOOST_FIXTURE_TEST_CASE( get_table_test, TESTER ) try {
BOOST_REQUIRE_EQUAL(1, result.rows.size());
BOOST_REQUIRE_EQUAL(true, result.more);
if (result.rows.size() >= 1) {
BOOST_REQUIRE_EQUAL("10000.0000 SYS", result.rows[0]["balance"].as_string());
BOOST_REQUIRE_EQUAL("10000.0000 YTA", result.rows[0]["balance"].as_string());
}
// get table: normal case, with bound & limit
......@@ -329,14 +329,14 @@ BOOST_FIXTURE_TEST_CASE( get_table_by_seckey_test, TESTER ) try {
// create currency
auto act = mutable_variant_object()
("issuer", "eosio")
("maximum_supply", eosio::chain::asset::from_string("1000000000.0000 SYS"));
("maximum_supply", eosio::chain::asset::from_string("1000000000.0000 YTA"));
push_action(N(eosio.token), N(create), N(eosio.token), act );
// issue
for (account_name a: accs) {
push_action( N(eosio.token), N(issue), "eosio", mutable_variant_object()
("to", name(a) )
("quantity", eosio::chain::asset::from_string("10000.0000 SYS") )
("quantity", eosio::chain::asset::from_string("10000.0000 YTA") )
("memo", "")
);
}
......@@ -354,10 +354,10 @@ BOOST_FIXTURE_TEST_CASE( get_table_by_seckey_test, TESTER ) try {
);
};
bidname(N(inita), N(com), eosio::chain::asset::from_string("10.0000 SYS"));
bidname(N(initb), N(org), eosio::chain::asset::from_string("11.0000 SYS"));
bidname(N(initc), N(io), eosio::chain::asset::from_string("12.0000 SYS"));
bidname(N(initd), N(html), eosio::chain::asset::from_string("14.0000 SYS"));
bidname(N(inita), N(com), eosio::chain::asset::from_string("10.0000 YTA"));
bidname(N(initb), N(org), eosio::chain::asset::from_string("11.0000 YTA"));
bidname(N(initc), N(io), eosio::chain::asset::from_string("12.0000 YTA"));
bidname(N(initd), N(html), eosio::chain::asset::from_string("14.0000 YTA"));
produce_blocks(1);
// get table: normal case
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册