aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2012-01-31 11:09:11 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2012-01-31 11:09:11 +0000
commita87cc50903ff21107014409fe50ae35fd8c0e4c2 (patch)
tree1d27f0ffff9ec965d40ff6caf377d94d3768ba1d /CMakeLists.txt
parent2c5664a0a523a51b8047e1d3b280b6b7c511ba5c (diff)
Add tests for the additional scaling factors
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@770 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 10 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a98839d..112d30c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -276,18 +276,13 @@ add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/t
else()
add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm testoutflt.ppm)
endif()
-add_test(djpeg-int-1_2 sharedlib/djpeg -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-int-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_2.ppm testoutint1_2.ppm)
+foreach(scale 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
+string(REGEX REPLACE "_" "/" scalearg ${scale})
+add_test(djpeg-int-${scale} sharedlib/djpeg -dct int -scale ${scalearg} -ppm -outfile testoutint${scale}.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
+add_test(djpeg-int-${scale}-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint${scale}.ppm testoutint${scale}.ppm)
+endforeach()
add_test(djpeg-fast-1_2 sharedlib/djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
add_test(djpeg-fast-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_2.ppm testoutfst1_2.ppm)
-add_test(djpeg-int-1_4 sharedlib/djpeg -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-int-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_4.ppm testoutint1_4.ppm)
-add_test(djpeg-fast-1_4 sharedlib/djpeg -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-fast-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_4.ppm testoutfst1_4.ppm)
-add_test(djpeg-int-1_8 sharedlib/djpeg -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-int-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_8.ppm testoutint1_8.ppm)
-add_test(djpeg-fast-1_8 sharedlib/djpeg -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-fast-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_8.ppm testoutfst1_8.ppm)
add_test(djpeg-256 sharedlib/djpeg -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
add_test(djpeg-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimg.bmp testout.bmp)
add_test(cjpeg-prog sharedlib/cjpeg -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
@@ -336,18 +331,13 @@ add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE
else()
add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm testoutflt.ppm)
endif()
-add_test(djpeg-static-int-1_2 djpeg-static -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-static-int-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_2.ppm testoutint1_2.ppm)
+foreach(scale 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
+string(REGEX REPLACE "_" "/" scalearg ${scale})
+add_test(djpeg-static-int-${scale} djpeg-static -dct int -scale ${scalearg} -ppm -outfile testoutint${scale}.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
+add_test(djpeg-static-int-${scale}-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint${scale}.ppm testoutint${scale}.ppm)
+endforeach()
add_test(djpeg-static-fast-1_2 djpeg-static -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
add_test(djpeg-static-fast-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_2.ppm testoutfst1_2.ppm)
-add_test(djpeg-static-int-1_4 djpeg-static -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-static-int-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_4.ppm testoutint1_4.ppm)
-add_test(djpeg-static-fast-1_4 djpeg-static -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-static-fast-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_4.ppm testoutfst1_4.ppm)
-add_test(djpeg-static-int-1_8 djpeg-static -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-static-int-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_8.ppm testoutint1_8.ppm)
-add_test(djpeg-static-fast-1_8 djpeg-static -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
-add_test(djpeg-static-fast-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_8.ppm testoutfst1_8.ppm)
add_test(djpeg-static-256 djpeg-static -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
add_test(djpeg-static-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimg.bmp testout.bmp)
add_test(cjpeg-static-prog cjpeg-static -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)