Skip to content
Snippets Groups Projects
Commit 650be818 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: move increment to the end to prevent decrease below value bound

parent ca6d71c2
No related branches found
No related tags found
1 merge request!12TEST: Test for numeric values.
Pipeline #12644 canceled
......@@ -691,9 +691,7 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void {
auto values_orig = test_transaction::generateValues<T>();
auto props_orig = std::vector<Entity>();
size_t i = 0;
--i;
for (auto value : values_orig) {
++i;
auto insert_transaction(connection->CreateTransaction());
Entity prop;
prop.SetRole(Role::PROPERTY);
......@@ -711,13 +709,12 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void {
auto t_stat = insert_transaction->WaitForIt();
EXPECT_TRUE(t_stat.IsTerminated());
EXPECT_FALSE(t_stat.IsError());
++i;
}
// Retrieve and verify
i = 0;
--i;
for (const auto value : values_orig) {
++i;
auto retrieve_transaction(connection->CreateTransaction());
const auto prop = props_orig[i];
const auto name =
......@@ -736,6 +733,7 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void {
test_transaction::getValueAs<T>(result.GetValue());
// std::cout << "retrieved_value: " << retrieved_value << std::endl;
EXPECT_EQ(retrieved_value, value);
++i;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment