[GRASS5] Automated test-system for basic functionalities.
Roger Bivand
Roger.Bivand at nhh.no
Tue Jan 10 12:46:10 EST 2006
On Tue, 10 Jan 2006, Markus Neteler wrote:
> 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
> ...
For float this is numerically the same as zero, epsilon for doubles in
IEEE is 2.220446e-16. Where is the "Expected=0" coming from - is it output
from the initial (audited) run seen as correct, or is it assumed? I think
all IEEE float and double should give about the same fuzz.
Roger
>
> Bug (where)? Correct? The test is in testsuite/raster/rmapcalc_test.sh
>
> Markus
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-dev
mailing list