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:
@@ -94,7 +94,7 @@ TEST(task, RangeIterPool)
|
|||||||
|
|
||||||
/* Those checks should ensure us all items of the listbase were processed once, and only once -
|
/* Those checks should ensure us all items of the listbase were processed once, and only once -
|
||||||
* as expected. */
|
* as expected. */
|
||||||
|
{
|
||||||
int expected_sum = 0;
|
int expected_sum = 0;
|
||||||
for (int j = 0; j < num_tasks; j++) {
|
for (int j = 0; j < num_tasks; j++) {
|
||||||
for (int i = 0; i < NUM_ITEMS; i++) {
|
for (int i = 0; i < NUM_ITEMS; i++) {
|
||||||
@@ -103,6 +103,7 @@ TEST(task, RangeIterPool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPECT_EQ(sum, expected_sum);
|
EXPECT_EQ(sum, expected_sum);
|
||||||
|
}
|
||||||
|
|
||||||
/* A pool can be re-used until it is freed. */
|
/* 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 -
|
/* Those checks should ensure us all items of the listbase were processed once, and only once -
|
||||||
* as expected. */
|
* as expected. */
|
||||||
|
{
|
||||||
for (int j = 0; j < num_tasks; j++) {
|
|
||||||
int expected_sum = 0;
|
int expected_sum = 0;
|
||||||
|
for (int j = 0; j < num_tasks; j++) {
|
||||||
for (int i = 0; i < NUM_ITEMS; i++) {
|
for (int i = 0; i < NUM_ITEMS; i++) {
|
||||||
// EXPECT_EQ(data[j][i], i);
|
// EXPECT_EQ(data[j][i], i);
|
||||||
expected_sum += i;
|
expected_sum += i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPECT_EQ(sum, expected_sum);
|
EXPECT_EQ(sum, expected_sum);
|
||||||
|
}
|
||||||
|
|
||||||
BLI_threadapi_exit();
|
BLI_threadapi_exit();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user