@@ -426,7 +426,7 @@ BOOST_FIXTURE_TEST_CASE(action_tests, TESTER) { try {
426
426
CALL_TEST_FUNCTION ( *this , " test_action" , " test_publication_time" , fc::raw::pack (pub_time) );
427
427
428
428
// test test_abort
429
- BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_action" , " test_abort" , {} ), assert_exception ,
429
+ BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_action" , " test_abort" , {} ), abort_called ,
430
430
[](const fc::exception & e) {
431
431
return expect_assert_message (e, " abort() called" );
432
432
}
@@ -496,7 +496,7 @@ BOOST_FIXTURE_TEST_CASE(cf_action_tests, TESTER) { try {
496
496
set_transaction_headers (trx);
497
497
// run (dummy_action.b = 200) case looking for invalid use of context_free api
498
498
sigs = trx.sign (get_private_key (N (testapi), " active" ), control->get_chain_id ());
499
- BOOST_CHECK_EXCEPTION (push_transaction (trx), assert_exception ,
499
+ BOOST_CHECK_EXCEPTION (push_transaction (trx), unaccessible_api ,
500
500
[](const fc::exception & e) {
501
501
return expect_assert_message (e, " this API may only be called from context_free apply" );
502
502
}
@@ -521,7 +521,7 @@ BOOST_FIXTURE_TEST_CASE(cf_action_tests, TESTER) { try {
521
521
trx.signatures .clear ();
522
522
set_transaction_headers (trx);
523
523
sigs = trx.sign (get_private_key (N (testapi), " active" ), control->get_chain_id ());
524
- BOOST_CHECK_EXCEPTION (push_transaction (trx), assert_exception ,
524
+ BOOST_CHECK_EXCEPTION (push_transaction (trx), unaccessible_api ,
525
525
[](const fc::exception & e) {
526
526
return expect_assert_message (e, " only context free api's can be used in this context" );
527
527
}
@@ -872,7 +872,7 @@ BOOST_FIXTURE_TEST_CASE(compiler_builtins_tests, TESTER) { try {
872
872
CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_divti3" , {});
873
873
874
874
// test test_divti3_by_0
875
- BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_divti3_by_0" , {}), assert_exception ,
875
+ BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_divti3_by_0" , {}), arithmetic_exception ,
876
876
[](const fc::exception & e) {
877
877
return expect_assert_message (e, " divide by zero" );
878
878
}
@@ -882,7 +882,7 @@ BOOST_FIXTURE_TEST_CASE(compiler_builtins_tests, TESTER) { try {
882
882
CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_udivti3" , {});
883
883
884
884
// test test_udivti3_by_0
885
- BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_udivti3_by_0" , {}), assert_exception ,
885
+ BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_udivti3_by_0" , {}), arithmetic_exception ,
886
886
[](const fc::exception & e) {
887
887
return expect_assert_message (e, " divide by zero" );
888
888
}
@@ -892,7 +892,7 @@ BOOST_FIXTURE_TEST_CASE(compiler_builtins_tests, TESTER) { try {
892
892
CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_modti3" , {});
893
893
894
894
// test test_modti3_by_0
895
- BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_modti3_by_0" , {}), assert_exception ,
895
+ BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION ( *this , " test_compiler_builtins" , " test_modti3_by_0" , {}), arithmetic_exception ,
896
896
[](const fc::exception & e) {
897
897
return expect_assert_message (e, " divide by zero" );
898
898
}
@@ -946,9 +946,9 @@ BOOST_FIXTURE_TEST_CASE(transaction_tests, TESTER) { try {
946
946
CALL_TEST_FUNCTION (*this , " test_transaction" , " send_action_empty" , {});
947
947
948
948
// test send_action_large
949
- BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION (*this , " test_transaction" , " send_action_large" , {}), assert_exception ,
949
+ BOOST_CHECK_EXCEPTION (CALL_TEST_FUNCTION (*this , " test_transaction" , " send_action_large" , {}), inline_action_too_big ,
950
950
[](const fc::exception & e) {
951
- return expect_assert_message (e, " data_len < context.control.get_global_properties().configuration.max_inline_action_size: inline action too big" );
951
+ return expect_assert_message (e, " inline action too big" );
952
952
}
953
953
);
954
954
@@ -1417,7 +1417,7 @@ BOOST_FIXTURE_TEST_CASE(crypto_tests, TESTER) { try {
1417
1417
CALL_TEST_FUNCTION ( *this , " test_crypto" , " test_recover_key_assert_true" , payload );
1418
1418
payload[payload.size ()-1 ] = 0 ;
1419
1419
BOOST_CHECK_EXCEPTION ( CALL_TEST_FUNCTION ( *this , " test_crypto" , " test_recover_key_assert_false" , payload ),
1420
- fc::assert_exception, fc_assert_exception_message_is (" Error expected key different than recovered key" ) );
1420
+ crypto_api_exception, fc_exception_message_is (" Error expected key different than recovered key" ) );
1421
1421
}
1422
1422
1423
1423
CALL_TEST_FUNCTION ( *this , " test_crypto" , " test_sha1" , {} );
@@ -1430,22 +1430,22 @@ BOOST_FIXTURE_TEST_CASE(crypto_tests, TESTER) { try {
1430
1430
CALL_TEST_FUNCTION ( *this , " test_crypto" , " ripemd160_no_data" , {} );
1431
1431
1432
1432
CALL_TEST_FUNCTION_AND_CHECK_EXCEPTION ( *this , " test_crypto" , " assert_sha256_false" , {},
1433
- assert_exception , " hash mismatch" );
1433
+ crypto_api_exception , " hash mismatch" );
1434
1434
1435
1435
CALL_TEST_FUNCTION ( *this , " test_crypto" , " assert_sha256_true" , {} );
1436
1436
1437
1437
CALL_TEST_FUNCTION_AND_CHECK_EXCEPTION ( *this , " test_crypto" , " assert_sha1_false" , {},
1438
- assert_exception , " hash mismatch" );
1438
+ crypto_api_exception , " hash mismatch" );
1439
1439
1440
1440
CALL_TEST_FUNCTION ( *this , " test_crypto" , " assert_sha1_true" , {} );
1441
1441
1442
1442
CALL_TEST_FUNCTION_AND_CHECK_EXCEPTION ( *this , " test_crypto" , " assert_sha512_false" , {},
1443
- assert_exception , " hash mismatch" );
1443
+ crypto_api_exception , " hash mismatch" );
1444
1444
1445
1445
CALL_TEST_FUNCTION ( *this , " test_crypto" , " assert_sha512_true" , {} );
1446
1446
1447
1447
CALL_TEST_FUNCTION_AND_CHECK_EXCEPTION ( *this , " test_crypto" , " assert_ripemd160_false" , {},
1448
- assert_exception , " hash mismatch" );
1448
+ crypto_api_exception , " hash mismatch" );
1449
1449
1450
1450
CALL_TEST_FUNCTION ( *this , " test_crypto" , " assert_ripemd160_true" , {} );
1451
1451
@@ -1886,15 +1886,15 @@ BOOST_FIXTURE_TEST_CASE(new_api_feature_tests, TESTER) { try {
1886
1886
produce_blocks (1 );
1887
1887
1888
1888
BOOST_CHECK_EXCEPTION ( CALL_TEST_FUNCTION ( *this , " test_transaction" , " new_feature" , {} ),
1889
- assert_exception ,
1889
+ unaccessible_api ,
1890
1890
[](const fc::exception & e) {
1891
- return expect_assert_message (e, " context.privileged: testapi does not have permission to call this API" );
1891
+ return expect_assert_message (e, " testapi does not have permission to call this API" );
1892
1892
});
1893
1893
1894
1894
BOOST_CHECK_EXCEPTION ( CALL_TEST_FUNCTION ( *this , " test_transaction" , " active_new_feature" , {} ),
1895
- assert_exception ,
1895
+ unaccessible_api ,
1896
1896
[](const fc::exception & e) {
1897
- return expect_assert_message (e, " context.privileged: testapi does not have permission to call this API" );
1897
+ return expect_assert_message (e, " testapi does not have permission to call this API" );
1898
1898
});
1899
1899
1900
1900
// change privilege
@@ -1919,7 +1919,7 @@ BOOST_FIXTURE_TEST_CASE(new_api_feature_tests, TESTER) { try {
1919
1919
CALL_TEST_FUNCTION ( *this , " test_transaction" , " new_feature" , {} );
1920
1920
1921
1921
BOOST_CHECK_EXCEPTION ( CALL_TEST_FUNCTION ( *this , " test_transaction" , " active_new_feature" , {} ),
1922
- assert_exception ,
1922
+ unsupported_feature ,
1923
1923
[](const fc::exception & e) {
1924
1924
return expect_assert_message (e, " Unsupported Hardfork Detected" );
1925
1925
});
0 commit comments