@@ -52,9 +52,6 @@ BOOST_FIXTURE_TEST_SUITE(custom_authority_tests, database_fixture)
52
52
53
53
#define FUNC (TYPE ) BOOST_PP_CAT(restriction::func_, TYPE)
54
54
55
- size_t restriction_count (const vector<restriction>& rs) {
56
- return std::for_each (rs.begin (), rs.end (), restriction::adder ()).sum ;
57
- }
58
55
template <typename Object>
59
56
unsigned_int member_index (string name) {
60
57
unsigned_int index ;
@@ -109,7 +106,7 @@ BOOST_AUTO_TEST_CASE(restriction_predicate_tests) { try {
109
106
// "extensions": []
110
107
// }
111
108
// ]
112
- BOOST_CHECK_EQUAL (restriction_count (restrictions), 1 );
109
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (restrictions), 1 );
113
110
BOOST_CHECK (get_restriction_predicate (restrictions, operation::tag<transfer_operation>::value)(transfer)
114
111
.rejection_path .size () == 2 );
115
112
// Index 0 (the outer-most) rejection path refers to the first and only restriction
@@ -226,7 +223,7 @@ BOOST_AUTO_TEST_CASE(restriction_predicate_tests) { try {
226
223
// }
227
224
// ]
228
225
229
- BOOST_CHECK_EQUAL (restriction_count (restrictions), 2 );
226
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (restrictions), 2 );
230
227
// ////
231
228
// Check the transfer operation that pays the fee with Asset ID 0 against the restriction.
232
229
// This should violate the restriction.
@@ -280,7 +277,7 @@ BOOST_AUTO_TEST_CASE(restriction_predicate_tests) { try {
280
277
// "extensions": []
281
278
// }
282
279
// ]
283
- BOOST_CHECK_EQUAL (restriction_count (restrictions), 3 );
280
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (restrictions), 3 );
284
281
285
282
// ////
286
283
// Create a transfer operation that authorizes transfer to Account ID 12
@@ -338,7 +335,7 @@ BOOST_AUTO_TEST_CASE(restriction_predicate_tests) { try {
338
335
// "extensions": []
339
336
// }
340
337
// ]
341
- BOOST_CHECK_EQUAL (restriction_count (restrictions), 2 );
338
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (restrictions), 2 );
342
339
auto predicate = get_restriction_predicate (restrictions, operation::tag<account_update_operation>::value);
343
340
344
341
// ////
@@ -453,7 +450,7 @@ BOOST_AUTO_TEST_CASE(restriction_predicate_tests) { try {
453
450
// "extensions": []
454
451
// }
455
452
// ]
456
- BOOST_CHECK_EQUAL (restriction_count (or_restrictions), 3 );
453
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (or_restrictions), 3 );
457
454
auto predicate = get_restriction_predicate (or_restrictions, operation::tag<transfer_operation>::value);
458
455
459
456
// ////
@@ -570,7 +567,7 @@ BOOST_AUTO_TEST_CASE(custom_auths) { try {
570
567
// "extensions": []
571
568
// }
572
569
// ]
573
- BOOST_CHECK_EQUAL (restriction_count (op.restrictions ), 3 );
570
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (op.restrictions ), 3 );
574
571
575
572
576
573
// ////
@@ -1643,7 +1640,7 @@ BOOST_AUTO_TEST_CASE(custom_auths) { try {
1643
1640
// "extensions": []
1644
1641
// }
1645
1642
// ]
1646
- BOOST_CHECK_EQUAL (restriction_count (op.restrictions ), 3 );
1643
+ BOOST_CHECK_EQUAL (restriction:: restriction_count (op.restrictions ), 3 );
1647
1644
1648
1645
// Publish the new custom authority
1649
1646
trx.clear ();
0 commit comments