Files
openlayers/tests
Schuyler Erle e89774d568 Fix #1951 by rounding all floats passed to Bounds.initialize() and
LonLat.initialize() to 14 significant figures.

Added an OpenLayers.Util.toFloat() function, and changed the LonLat constructor
and the Bounds constructor to truncate all float parameters to 14 significant
figures to avoid numeric comparison errors caused by floating point precision
loss. See the comments around the definition of
OpenLayers.Util.DEFAULT_PRECISION for how it works.

Also refactored Bounds.intersectBounds() for readability, and added a
Bounds.touchesBounds() in the process. After tweaking the tests for
Layer.SphericalMercator and Format.WKT (because they were expecting too many
significant figures), all tests pass.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@9022 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2009-03-11 22:45:32 +00:00
..
2009-03-06 17:42:41 +00:00
2006-07-01 01:32:18 +00:00
2007-12-17 02:18:04 +00:00
2008-01-20 15:32:10 +00:00

This directory contains unit tests for the OpenLayers library.

Tests use the Test.AnotherWay library from <http://openjsan.org>. The test
runner is 'run-tests.html' and new test files need to be added to
'list-tests.html'.

The following file naming conventions are used:

  * A filename that starts with `test_` and has an `.html` extension
    contains tests. These should contain tests for a specific class.

  * A filename starting with `page_` and has an `.html` extension is a
    supporting HTML file used in one or more tests.

  * A filename starting with 'data_` is a supporting data file used in one
    or more tests.