diff options
Diffstat (limited to 'gm/tests')
24 files changed, 25 insertions, 17 deletions
diff --git a/gm/tests/inputs/dashing-correct-images/4444/dashing.png b/gm/tests/inputs/dashing-correct-images/4444/dashing.png Binary files differdeleted file mode 100644 index e201a72d68..0000000000 --- a/gm/tests/inputs/dashing-correct-images/4444/dashing.png +++ /dev/null diff --git a/gm/tests/inputs/dashing-incorrect-images/4444/dashing.png b/gm/tests/inputs/dashing-incorrect-images/4444/dashing.png Binary files differdeleted file mode 100644 index c319eabb2e..0000000000 --- a/gm/tests/inputs/dashing-incorrect-images/4444/dashing.png +++ /dev/null diff --git a/gm/tests/inputs/different-pixels/4444/dashing2.png b/gm/tests/inputs/different-pixels/4444/dashing2.png Binary files differnew file mode 100644 index 0000000000..bb94276936 --- /dev/null +++ b/gm/tests/inputs/different-pixels/4444/dashing2.png diff --git a/gm/tests/inputs/dashing-correct-images/4444/dashing2.png b/gm/tests/inputs/identical-bytes/4444/dashing2.png Binary files differindex 91d37eb901..91d37eb901 100644 --- a/gm/tests/inputs/dashing-correct-images/4444/dashing2.png +++ b/gm/tests/inputs/identical-bytes/4444/dashing2.png diff --git a/gm/tests/inputs/dashing-incorrect-images/4444/dashing2.png b/gm/tests/inputs/identical-pixels/4444/dashing2.png Binary files differindex ed37a88211..ed37a88211 100644 --- a/gm/tests/inputs/dashing-incorrect-images/4444/dashing2.png +++ b/gm/tests/inputs/identical-pixels/4444/dashing2.png diff --git a/gm/tests/outputs/compared-against-different-pixels/output-expected/command_line b/gm/tests/outputs/compared-against-different-pixels/output-expected/command_line new file mode 100644 index 0000000000..1bcbead0e0 --- /dev/null +++ b/gm/tests/outputs/compared-against-different-pixels/output-expected/command_line @@ -0,0 +1 @@ +out/Debug/gm --hierarchy --match dashing2 --config 4444 -r gm/tests/inputs/different-pixels -w gm/tests/outputs/compared-against-different-pixels/output-actual/images diff --git a/gm/tests/outputs/dashing-compared-against-correct/output-expected/images/4444/dashing2.png b/gm/tests/outputs/compared-against-different-pixels/output-expected/images/4444/dashing2.png Binary files differindex 91d37eb901..91d37eb901 100644 --- a/gm/tests/outputs/dashing-compared-against-correct/output-expected/images/4444/dashing2.png +++ b/gm/tests/outputs/compared-against-different-pixels/output-expected/images/4444/dashing2.png diff --git a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/return_value b/gm/tests/outputs/compared-against-different-pixels/output-expected/return_value index ace9d03621..ace9d03621 100644 --- a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/return_value +++ b/gm/tests/outputs/compared-against-different-pixels/output-expected/return_value diff --git a/gm/tests/outputs/compared-against-different-pixels/output-expected/stdout b/gm/tests/outputs/compared-against-different-pixels/output-expected/stdout new file mode 100644 index 0000000000..1eda31c7db --- /dev/null +++ b/gm/tests/outputs/compared-against-different-pixels/output-expected/stdout @@ -0,0 +1,6 @@ +reading from gm/tests/inputs/different-pixels +writing to gm/tests/outputs/compared-against-different-pixels/output-actual/images +drawing... dashing2 [640 480] +----- max pixel mismatch for 4444/dashing2 is 51 +Ran 1 tests: 0 passed, 1 failed, 0 missing reference images + 4444/dashing2 pixel_error 51 diff --git a/gm/tests/outputs/compared-against-identical-bytes/output-expected/command_line b/gm/tests/outputs/compared-against-identical-bytes/output-expected/command_line new file mode 100644 index 0000000000..c70d01dc8c --- /dev/null +++ b/gm/tests/outputs/compared-against-identical-bytes/output-expected/command_line @@ -0,0 +1 @@ +out/Debug/gm --hierarchy --match dashing2 --config 4444 -r gm/tests/inputs/identical-bytes -w gm/tests/outputs/compared-against-identical-bytes/output-actual/images diff --git a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/images/4444/dashing2.png b/gm/tests/outputs/compared-against-identical-bytes/output-expected/images/4444/dashing2.png Binary files differindex 91d37eb901..91d37eb901 100644 --- a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/images/4444/dashing2.png +++ b/gm/tests/outputs/compared-against-identical-bytes/output-expected/images/4444/dashing2.png diff --git a/gm/tests/outputs/dashing-compared-against-correct/output-expected/return_value b/gm/tests/outputs/compared-against-identical-bytes/output-expected/return_value index 573541ac97..573541ac97 100644 --- a/gm/tests/outputs/dashing-compared-against-correct/output-expected/return_value +++ b/gm/tests/outputs/compared-against-identical-bytes/output-expected/return_value diff --git a/gm/tests/outputs/compared-against-identical-bytes/output-expected/stdout b/gm/tests/outputs/compared-against-identical-bytes/output-expected/stdout new file mode 100644 index 0000000000..301f17f5e7 --- /dev/null +++ b/gm/tests/outputs/compared-against-identical-bytes/output-expected/stdout @@ -0,0 +1,4 @@ +reading from gm/tests/inputs/identical-bytes +writing to gm/tests/outputs/compared-against-identical-bytes/output-actual/images +drawing... dashing2 [640 480] +Ran 1 tests: 1 passed, 0 failed, 0 missing reference images diff --git a/gm/tests/outputs/compared-against-identical-pixels/output-expected/command_line b/gm/tests/outputs/compared-against-identical-pixels/output-expected/command_line new file mode 100644 index 0000000000..d6b58501d6 --- /dev/null +++ b/gm/tests/outputs/compared-against-identical-pixels/output-expected/command_line @@ -0,0 +1 @@ +out/Debug/gm --hierarchy --match dashing2 --config 4444 -r gm/tests/inputs/identical-pixels -w gm/tests/outputs/compared-against-identical-pixels/output-actual/images diff --git a/gm/tests/outputs/compared-against-identical-pixels/output-expected/images/4444/dashing2.png b/gm/tests/outputs/compared-against-identical-pixels/output-expected/images/4444/dashing2.png Binary files differnew file mode 100644 index 0000000000..91d37eb901 --- /dev/null +++ b/gm/tests/outputs/compared-against-identical-pixels/output-expected/images/4444/dashing2.png diff --git a/gm/tests/outputs/compared-against-identical-pixels/output-expected/return_value b/gm/tests/outputs/compared-against-identical-pixels/output-expected/return_value new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/gm/tests/outputs/compared-against-identical-pixels/output-expected/return_value @@ -0,0 +1 @@ +0 diff --git a/gm/tests/outputs/compared-against-identical-pixels/output-expected/stdout b/gm/tests/outputs/compared-against-identical-pixels/output-expected/stdout new file mode 100644 index 0000000000..00868ac5b1 --- /dev/null +++ b/gm/tests/outputs/compared-against-identical-pixels/output-expected/stdout @@ -0,0 +1,4 @@ +reading from gm/tests/inputs/identical-pixels +writing to gm/tests/outputs/compared-against-identical-pixels/output-actual/images +drawing... dashing2 [640 480] +Ran 1 tests: 1 passed, 0 failed, 0 missing reference images diff --git a/gm/tests/outputs/dashing-compared-against-correct/output-expected/command_line b/gm/tests/outputs/dashing-compared-against-correct/output-expected/command_line deleted file mode 100644 index 8a95ecd2bc..0000000000 --- a/gm/tests/outputs/dashing-compared-against-correct/output-expected/command_line +++ /dev/null @@ -1 +0,0 @@ -out/Debug/gm --hierarchy --match dashing --config 4444 -r gm/tests/inputs/dashing-correct-images -w gm/tests/outputs/dashing-compared-against-correct/output-actual/images diff --git a/gm/tests/outputs/dashing-compared-against-correct/output-expected/images/4444/dashing.png b/gm/tests/outputs/dashing-compared-against-correct/output-expected/images/4444/dashing.png Binary files differdeleted file mode 100644 index e201a72d68..0000000000 --- a/gm/tests/outputs/dashing-compared-against-correct/output-expected/images/4444/dashing.png +++ /dev/null diff --git a/gm/tests/outputs/dashing-compared-against-correct/output-expected/stdout b/gm/tests/outputs/dashing-compared-against-correct/output-expected/stdout deleted file mode 100644 index d7f2c6bb08..0000000000 --- a/gm/tests/outputs/dashing-compared-against-correct/output-expected/stdout +++ /dev/null @@ -1,5 +0,0 @@ -reading from gm/tests/inputs/dashing-correct-images -writing to gm/tests/outputs/dashing-compared-against-correct/output-actual/images -drawing... dashing2 [640 480] -drawing... dashing [640 300] -Ran 2 tests: 2 passed, 0 failed, 0 missing reference images diff --git a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/command_line b/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/command_line deleted file mode 100644 index 423a7f1ba8..0000000000 --- a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/command_line +++ /dev/null @@ -1 +0,0 @@ -out/Debug/gm --hierarchy --match dashing --config 4444 -r gm/tests/inputs/dashing-incorrect-images -w gm/tests/outputs/dashing-compared-against-incorrect/output-actual/images diff --git a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/images/4444/dashing.png b/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/images/4444/dashing.png Binary files differdeleted file mode 100644 index e201a72d68..0000000000 --- a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/images/4444/dashing.png +++ /dev/null diff --git a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/stdout b/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/stdout deleted file mode 100644 index 10956becc8..0000000000 --- a/gm/tests/outputs/dashing-compared-against-incorrect/output-expected/stdout +++ /dev/null @@ -1,7 +0,0 @@ -reading from gm/tests/inputs/dashing-incorrect-images -writing to gm/tests/outputs/dashing-compared-against-incorrect/output-actual/images -drawing... dashing2 [640 480] -drawing... dashing [640 300] ------ max pixel mismatch for 4444/dashing is 51 -Ran 2 tests: 1 passed, 1 failed, 0 missing reference images - 4444/dashing pixel_error 51 diff --git a/gm/tests/run.sh b/gm/tests/run.sh index 103a71f816..acf4b5feef 100755 --- a/gm/tests/run.sh +++ b/gm/tests/run.sh @@ -63,9 +63,13 @@ GM_TESTDIR=gm/tests GM_INPUTS=$GM_TESTDIR/inputs GM_OUTPUTS=$GM_TESTDIR/outputs -gm_test "--hierarchy --match dashing --config 4444 -r $GM_INPUTS/dashing-correct-images" "$GM_OUTPUTS/dashing-compared-against-correct" +# Compare generated image against an input image file with identical bytes. +gm_test "--hierarchy --match dashing2 --config 4444 -r $GM_INPUTS/identical-bytes" "$GM_OUTPUTS/compared-against-identical-bytes" -# In this case, dashing.png has different pixels, but dashing2.png differs only in PNG encoding (identical pixels) -gm_test "--hierarchy --match dashing --config 4444 -r $GM_INPUTS/dashing-incorrect-images" "$GM_OUTPUTS/dashing-compared-against-incorrect" +# Compare generated image against an input image file with identical pixels but different PNG encoding. +gm_test "--hierarchy --match dashing2 --config 4444 -r $GM_INPUTS/identical-pixels" "$GM_OUTPUTS/compared-against-identical-pixels" + +# Compare generated image against an input image file with different pixels. +gm_test "--hierarchy --match dashing2 --config 4444 -r $GM_INPUTS/different-pixels" "$GM_OUTPUTS/compared-against-different-pixels" echo "All tests passed." |