diff --git a/tests/common/database_fixture.cpp b/tests/common/database_fixture.cpp index 72ccccfe..c2206243 100644 --- a/tests/common/database_fixture.cpp +++ b/tests/common/database_fixture.cpp @@ -48,6 +48,16 @@ database_fixture::database_fixture() : app(), db( *app.chain_database() ) { try { + int argc = boost::unit_test::framework::master_test_suite().argc; + char** argv = boost::unit_test::framework::master_test_suite().argv; + for( int i=1; i(); auto mhplugin = app.register_plugin(); delegate_pub_key = delegate_priv_key.get_public_key(); diff --git a/tests/common/database_fixture.hpp b/tests/common/database_fixture.hpp index 39ad99f4..09e8aaf2 100644 --- a/tests/common/database_fixture.hpp +++ b/tests/common/database_fixture.hpp @@ -59,11 +59,13 @@ using namespace graphene::db; ("expr", #expr) \ ("exc_type", #exc_type) \ ); \ - std::cout << "GRAPHENE_REQUIRE_THROW begin " \ - << req_throw_info << std::endl; \ + if( fc::enable_record_assert_trip ) \ + std::cout << "GRAPHENE_REQUIRE_THROW begin " \ + << req_throw_info << std::endl; \ BOOST_REQUIRE_THROW( expr, exc_type ); \ - std::cout << "GRAPHENE_REQUIRE_THROW end " \ - << req_throw_info << std::endl; \ + if( fc::enable_record_assert_trip ) \ + std::cout << "GRAPHENE_REQUIRE_THROW end " \ + << req_throw_info << std::endl; \ } #define GRAPHENE_CHECK_THROW( expr, exc_type ) \ @@ -75,11 +77,13 @@ using namespace graphene::db; ("expr", #expr) \ ("exc_type", #exc_type) \ ); \ - std::cout << "GRAPHENE_CHECK_THROW begin " \ - << req_throw_info << std::endl; \ + if( fc::enable_record_assert_trip ) \ + std::cout << "GRAPHENE_CHECK_THROW begin " \ + << req_throw_info << std::endl; \ BOOST_CHECK_THROW( expr, exc_type ); \ - std::cout << "GRAPHENE_CHECK_THROW end " \ - << req_throw_info << std::endl; \ + if( fc::enable_record_assert_trip ) \ + std::cout << "GRAPHENE_CHECK_THROW end " \ + << req_throw_info << std::endl; \ } #define REQUIRE_OP_VALIDATION_FAILURE_2( op, field, value, exc_type ) \