Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppressed compiler warnings in database_api_tests #1181

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/tests/database_api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,12 @@ BOOST_AUTO_TEST_CASE(get_account_limit_orders)
BOOST_CHECK_EQUAL( 10000000, get_balance(seller, core) );

/// Create 250 versatile orders
for (int i = 0 ; i < 50 ; ++i)
for (size_t i = 0 ; i < 50 ; ++i)
{
BOOST_CHECK(create_sell_order(seller, core.amount(100), bitcny.amount(250)));
}

for (int i = 1 ; i < 101 ; ++i)
for (size_t i = 1 ; i < 101 ; ++i)
{
BOOST_CHECK(create_sell_order(seller, core.amount(100), bitcny.amount(250 + i)));
BOOST_CHECK(create_sell_order(seller, core.amount(100), bitcny.amount(250 - i)));
Expand All @@ -726,7 +726,7 @@ BOOST_AUTO_TEST_CASE(get_account_limit_orders)
// 2. orders were sorted by price desendingly
results = db_api.get_account_limit_orders(seller.name, GRAPHENE_SYMBOL, "CNY");
BOOST_CHECK(results.size() == 101);
for (int i = 0 ; i < results.size() - 1 ; ++i)
for (size_t i = 0 ; i < results.size() - 1 ; ++i)
{
BOOST_CHECK(results[i].sell_price >= results[i+1].sell_price);
}
Expand All @@ -739,7 +739,7 @@ BOOST_AUTO_TEST_CASE(get_account_limit_orders)
// 2. orders were sorted by price desendingly
results = db_api.get_account_limit_orders(seller.name, GRAPHENE_SYMBOL, "CNY", 50);
BOOST_CHECK(results.size() == 50);
for (int i = 0 ; i < results.size() - 1 ; ++i)
for (size_t i = 0 ; i < results.size() - 1 ; ++i)
{
BOOST_CHECK(results[i].sell_price >= results[i+1].sell_price);
}
Expand All @@ -755,7 +755,7 @@ BOOST_AUTO_TEST_CASE(get_account_limit_orders)
limit_order_id_type(o.id));
BOOST_CHECK(results.size() == 80);
BOOST_CHECK(results.front().id == o.id);
for (int i = 0 ; i < results.size() - 1 ; ++i)
for (size_t i = 0 ; i < results.size() - 1 ; ++i)
{
BOOST_CHECK(results[i].sell_price >= results[i+1].sell_price);
}
Expand All @@ -778,7 +778,7 @@ BOOST_AUTO_TEST_CASE(get_account_limit_orders)
BOOST_CHECK(results.front().id > o.id);
// NOTE 2: because of NOTE 1, here should be equal
BOOST_CHECK(results.front().sell_price == o.sell_price);
for (int i = 0 ; i < results.size() - 1 ; ++i)
for (size_t i = 0 ; i < results.size() - 1 ; ++i)
{
BOOST_CHECK(results[i].sell_price >= results[i+1].sell_price);
}
Expand All @@ -796,7 +796,7 @@ BOOST_AUTO_TEST_CASE(get_account_limit_orders)
BOOST_CHECK(results.front().id > o.id);
// NOTE 3: because of NOTE 1, here should be little than
BOOST_CHECK(results.front().sell_price < o.sell_price);
for (int i = 0 ; i < results.size() - 1 ; ++i)
for (size_t i = 0 ; i < results.size() - 1 ; ++i)
{
BOOST_CHECK(results[i].sell_price >= results[i+1].sell_price);
}
Expand Down