From ec9382e7609601f5c739961b25c2e3c3e5d2cb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 24 Sep 2012 23:26:49 +0200 Subject: [PATCH] Jasmine tests for ol.Projection --- test/jasmine-extensions.js | 3 + test/ol.html | 1 + test/spec/ol/projection.test.js | 103 ++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 test/spec/ol/projection.test.js diff --git a/test/jasmine-extensions.js b/test/jasmine-extensions.js index 137090273e..4649130908 100644 --- a/test/jasmine-extensions.js +++ b/test/jasmine-extensions.js @@ -3,6 +3,9 @@ beforeEach(function() { this.addMatchers({ toBeA: function(type) { return this.actual instanceof type; + }, + toRoughlyEqual: function(other, tol) { + return Math.abs(this.actual - other) <= tol; } }); }); diff --git a/test/ol.html b/test/ol.html index a41861db9a..4b15c067fb 100644 --- a/test/ol.html +++ b/test/ol.html @@ -77,6 +77,7 @@ +