use specific type for vector to match expected sizes

This commit is contained in:
Sascha Kühl 2026-05-18 19:25:20 +02:00
parent 25405de2e0
commit 0f3028c5c7
1 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with many-to-m
REQUIRE(find_result.is_ok()); REQUIRE(find_result.is_ok());
auto all_ingredients = find_result.release(); auto all_ingredients = find_result.release();
std::vector<object_ptr<ingredient>> ingredients_repo; std::vector<object_ptr<ingredient>> ingredients_repo;
std::vector expected_ingredients_sizes {2, 1, 1, 1, 1, 1, 1}; std::vector<size_t> expected_ingredients_sizes {2, 1, 1, 1, 1, 1, 1};
size_t index {0}; size_t index {0};
for (auto it = all_ingredients.begin(); it != all_ingredients.end(); ++it) { for (auto it = all_ingredients.begin(); it != all_ingredients.end(); ++it) {
REQUIRE(!it->recipes.empty()); REQUIRE(!it->recipes.empty());
@ -370,7 +370,7 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with many-to-m
REQUIRE(find_result.is_ok()); REQUIRE(find_result.is_ok());
auto all_recipes = find_result.release(); auto all_recipes = find_result.release();
std::vector<object_ptr<recipe>> recipes_repo; std::vector<object_ptr<recipe>> recipes_repo;
std::vector expected_recipe_sizes {3, 2, 3}; std::vector<size_t> expected_recipe_sizes {3, 2, 3};
size_t index {0}; size_t index {0};
for (auto it = all_recipes.begin(); it != all_recipes.end(); ++it) { for (auto it = all_recipes.begin(); it != all_recipes.end(); ++it) {
REQUIRE(!it->ingredients.empty()); REQUIRE(!it->ingredients.empty());