Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/split_system_tests' into merge-s…
Browse files Browse the repository at this point in the history
…avanna-tokenonmics
  • Loading branch information
ericpassmore committed Jun 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents fee936f + e21f721 commit 1157964
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/eosio.system_tests.cpp
Original file line number Diff line number Diff line change
@@ -24,11 +24,13 @@ FC_REFLECT( connector, (balance)(weight) );

using namespace eosio_system;

BOOST_AUTO_TEST_SUITE(eosio_system_tests)

bool within_error(int64_t a, int64_t b, int64_t err) { return std::abs(a - b) <= err; };
bool within_one(int64_t a, int64_t b) { return within_error(a, b, 1); }

// Split the tests into multiple suites so that they can be finished within CICD time limit.
// Each suite takes approximately same amount of time.
BOOST_AUTO_TEST_SUITE(eosio_system_part1_tests)

BOOST_FIXTURE_TEST_CASE( buysell, eosio_system_tester ) try {

BOOST_REQUIRE_EQUAL( core_sym::from_string("0.0000"), get_balance( "alice1111111" ) );
@@ -1661,6 +1663,9 @@ BOOST_FIXTURE_TEST_CASE(producer_pay, eosio_system_tester, * boost::unit_test::t

} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part2_tests)

BOOST_FIXTURE_TEST_CASE(change_inflation, eosio_system_tester) try {

{
@@ -1807,6 +1812,9 @@ BOOST_AUTO_TEST_CASE(extreme_inflation) try {
BOOST_REQUIRE_EQUAL(t.wasm_assert_msg("insufficient system token balance for claiming rewards"), t.push_action("defproducera"_n, "claimrewards"_n, mvo()("owner", "defproducera")));
} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part3_tests)

BOOST_FIXTURE_TEST_CASE(multiple_producer_pay, eosio_system_tester, * boost::unit_test::tolerance(1e-10)) try {

const int64_t secs_per_year = 52 * 7 * 24 * 3600;
@@ -3069,6 +3077,8 @@ BOOST_FIXTURE_TEST_CASE( voters_actions_affect_proxy_and_producers, eosio_system

} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part4_tests)

BOOST_FIXTURE_TEST_CASE( vote_both_proxy_and_producers, eosio_system_tester ) try {
//alice1111111 becomes a proxy
@@ -3752,6 +3762,9 @@ BOOST_FIXTURE_TEST_CASE( wasmcfg, eosio_system_tester ) try {
BOOST_REQUIRE_EQUAL( active_params.max_table_elements, 8192 );
} FC_LOG_AND_RETHROW()

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(eosio_system_part5_tests)

BOOST_FIXTURE_TEST_CASE( setram_effect, eosio_system_tester ) try {

const asset net = core_sym::from_string("8.0000");

0 comments on commit 1157964

Please sign in to comment.