Fix T76005: BLI_task test failing after recent changes

This was an error in changes made to this test to accomodate the new reduce
callback.
This commit is contained in:
Brecht Van Lommel 2020-04-23 13:59:55 +02:00
parent 614621747e
commit 8f51f60948
Notes: blender-bot 2023-02-14 01:11:05 +01:00
Referenced by issue #76005, test: failing test BLI_task_test in master
1 changed files with 15 additions and 13 deletions

View File

@ -94,15 +94,16 @@ TEST(task, RangeIterPool)
/* Those checks should ensure us all items of the listbase were processed once, and only once -
* as expected. */
int expected_sum = 0;
for (int j = 0; j < num_tasks; j++) {
for (int i = 0; i < NUM_ITEMS; i++) {
// EXPECT_EQ(data[j][i], i);
expected_sum += i;
{
int expected_sum = 0;
for (int j = 0; j < num_tasks; j++) {
for (int i = 0; i < NUM_ITEMS; i++) {
// EXPECT_EQ(data[j][i], i);
expected_sum += i;
}
}
EXPECT_EQ(sum, expected_sum);
}
EXPECT_EQ(sum, expected_sum);
/* A pool can be re-used until it is freed. */
@ -126,15 +127,16 @@ TEST(task, RangeIterPool)
/* Those checks should ensure us all items of the listbase were processed once, and only once -
* as expected. */
for (int j = 0; j < num_tasks; j++) {
{
int expected_sum = 0;
for (int i = 0; i < NUM_ITEMS; i++) {
// EXPECT_EQ(data[j][i], i);
expected_sum += i;
for (int j = 0; j < num_tasks; j++) {
for (int i = 0; i < NUM_ITEMS; i++) {
// EXPECT_EQ(data[j][i], i);
expected_sum += i;
}
}
EXPECT_EQ(sum, expected_sum);
}
EXPECT_EQ(sum, expected_sum);
BLI_threadapi_exit();
}