[PATCH 2/3] windowscodecs/tests: Move the loop in test_dds_decoder_frame_count() and test_dds_decoder_image_parameters() into a single one.
test_dds_decoder_frame_count() and test_dds_decoder_image_parameters() have the same structure. They have a same loop, they use same test data, which makes code duplicate. This patch move the loop to test_dds_decoder() so that there is only one loop. Also, make the test data a global array rather than two local arrays. PATCH 1 and PATCH 2 in this patches set used to be one patch. I split them to make the patches look clearer. (PATCH 2 is still not too clear to review but better than before) Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> --- dlls/windowscodecs/tests/ddsformat.c | 177 ++++++++++----------------- 1 file changed, 67 insertions(+), 110 deletions(-)
Couldn't you just add the new checks to the test data and loop in test_dds_decoder_frame_count?
participants (2)
-
Esme Povirk (they/them) -
Ziqing Hui