u02: Improve test performance
This commit is contained in:
parent
8b88c14b02
commit
240d5435f2
|
@ -142,6 +142,7 @@ TEST_CASE("DDA line tool (prop: for every row/column, only one pixel is set)") {
|
|||
unique_direction_max = y_max;
|
||||
}
|
||||
|
||||
bool all_sums_are_one = true;
|
||||
int sum;
|
||||
for (int dd = draw_direction_min; dd <= draw_direction_max; dd++) {
|
||||
sum = 0;
|
||||
|
@ -157,6 +158,9 @@ TEST_CASE("DDA line tool (prop: for every row/column, only one pixel is set)") {
|
|||
if (canvas->get_pixel(x, y))
|
||||
sum++;
|
||||
}
|
||||
REQUIRE(sum == 1);
|
||||
if (sum != 1)
|
||||
all_sums_are_one = false;
|
||||
}
|
||||
|
||||
REQUIRE(all_sums_are_one);
|
||||
}
|
||||
|
|
Reference in a new issue