[GRASS5] Automated test-system for basic functionalities.

Markus Neteler neteler at itc.it
Tue Jan 10 12:29:08 EST 2006


On Tue, Jan 10, 2006 at 05:31:01PM +0100, Markus Neteler wrote:
...
> I have submitted an initial testsuite to CVS:
> 
> testsuite
> |-- README
> `-- raster
>     |-- README
>     |-- raster_md5test.sh   <- generates map, performs md5sum comparison
>     `-- rmapcalc_test.sh    <- generates map, performs comparison with results
>                                of univariate statistics on map
> 
> CELL and FCELL cases are tested currently.
> 
> The bug 
>  http://intevation.de/rt/webrt?serial_num=3974
> can be easily shown now:
> 
> ./raster_md5test.sh
> Saving current & setting test region.
> INT/CELL md5sum test.
>  100%
> MD5 checksum on output of INT/CELL test.
> ERROR. The md5sum differs.
> Removing temporary map
> Restoring user region
> 
> Markus

I have a question concerning EPSILON (here acceptable error between
expected and found value) and the test (currently written in awk):

On a 64bit box I get:

g.region s=0 n=3 w=0 e=3 res=1tbres=1
r.mapcalc "30432_tmp_testmap=1.1"
r.out.ascii 30432_tmp_testmap
north: 3
south: 0
east: 3
west: 0
rows: 3
cols: 3
1.1000000000000001 1.1000000000000001 1.1000000000000001
1.1000000000000001 1.1000000000000001 1.1000000000000001
1.1000000000000001 1.1000000000000001 1.1000000000000001

r.univar 30432_tmp_testmap
...
n: 9
minimum: 1.1
maximum: 1.1
range: 0
mean: 1.1
standard deviation: 2.43335e-08
variance: 5.92119e-16
variation coefficient: 2.21214e-06 %
sum: 9.9



The test fails at standard deviation:
rmapcalc_test.sh
...
Univariate statistics of FLOAT/FCELL test.
ERROR. stddev: Expected=0 | FOUND=2.43335e-08
...

Bug (where)? Correct?  The test is in testsuite/raster/rmapcalc_test.sh

Markus




More information about the grass-dev mailing list