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
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.