diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-06-29 19:02:18 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-06-29 19:02:18 +0000 |
commit | 9602cdc10e7e2321ced1f30053a0b7b22edd433d (patch) | |
tree | 9a947bdd3cb43d45a8bfa3fc4288cac44ae4835e /test/pgmcrater.test | |
parent | fe835f6d3d19026dc3316de80062b44cfa78f7f9 (diff) | |
download | netpbm-mirror-9602cdc10e7e2321ced1f30053a0b7b22edd433d.tar.gz netpbm-mirror-9602cdc10e7e2321ced1f30053a0b7b22edd433d.tar.xz netpbm-mirror-9602cdc10e7e2321ced1f30053a0b7b22edd433d.zip |
New tests
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1964 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pgmcrater.test')
-rw-r--r-- | test/pgmcrater.test | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/pgmcrater.test b/test/pgmcrater.test new file mode 100644 index 00000000..e8df9a23 --- /dev/null +++ b/test/pgmcrater.test @@ -0,0 +1,29 @@ +#! /bin/bash +# This script tests: pgmcrater +# Also requires: pgmnoise + +# This test is sensitive to differences in floating point math. +# With GCC slight results start to appear with -number 75 in +# the following test. Compiler type (GCC, Clang, etc.), +# SSE math (by default off with x86 32 bit on with x86 64 bit) +# and --ffast-math are factors. + +# We hope that by keeping the number of craters small the +# difference will not show up. +# +# The slight differences in the image file are not discernable by +# the naked eye. + +${PBM_BINPREFIX}pgmnoise --testrandom --quiet +case $? in + 81) + # Should print: 3828822912 65551 + ${PBM_TESTPREFIX}pgmcrater -quiet -number 25 -randomseed 1 | cksum + ;; + + 8[02-9] | 90) + echo "Skipping: random number generator is not glibc." 1>&2 + exit 80;; + + *) exit 1;; # pgmnoise --testrandom failed +esac |