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@codeweavers.com --- dlls/windowscodecs/tests/ddsformat.c | 177 ++++++++++----------------- 1 file changed, 67 insertions(+), 110 deletions(-)