Skip to content

Commit

Permalink
Merge pull request #1624 from EOSIO/api-test-signed-unsigned-mismatch
Browse files Browse the repository at this point in the history
Fix signed/unsigned mismatches.
  • Loading branch information
bytemaster authored Mar 12, 2018
2 parents 885fd3e + 6ae3fc3 commit 05cf77b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/api_tests/api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
#include <sstream>
#include <numeric>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
#include <boost/test/unit_test.hpp>
#pragma GCC diagnostic pop
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream_buffer.hpp>
#include <boost/algorithm/string/predicate.hpp>
Expand Down Expand Up @@ -118,7 +121,7 @@ void CallFunction(tester& test, T ac, const vector<char>& data, const vector<acc

auto pl = vector<permission_level>{{scope[0], config::active_name}};
if (scope.size() > 1)
for (int i=1; i < scope.size(); i++)
for (unsigned int i=1; i < scope.size(); i++)
pl.push_back({scope[i], config::active_name});

action act(pl, ac);
Expand Down Expand Up @@ -309,7 +312,7 @@ BOOST_FIXTURE_TEST_CASE(action_tests, tester) { try {
auto tm = test_api_action<TEST_METHOD("test_action", "require_auth")>{};
auto pl = a3a4;
if (a3a4_scope.size() > 1)
for (int i=1; i < a3a4_scope.size(); i++)
for (unsigned int i=1; i < a3a4_scope.size(); i++)
pl.push_back({a3a4_scope[i], config::active_name});

action act(pl, tm);
Expand Down Expand Up @@ -612,7 +615,7 @@ BOOST_FIXTURE_TEST_CASE(chain_tests, tester) { try {
produce_blocks(100);
auto& gpo = control->get_global_properties();
std::vector<account_name> prods(gpo.active_producers.producers.size());
for ( int i=0; i < gpo.active_producers.producers.size(); i++ ) {
for ( unsigned int i=0; i < gpo.active_producers.producers.size(); i++ ) {
prods[i] = gpo.active_producers.producers[i].producer_name;
}

Expand Down

0 comments on commit 05cf77b

Please sign in to comment.