Remove enums from tests

This commit is contained in:
Peter Robins
2016-06-03 07:38:15 +00:00
parent d51fecd827
commit 06fd92353b
41 changed files with 379 additions and 435 deletions
+6 -8
View File
@@ -91,7 +91,7 @@ describe('ol.geom.Circle', function() {
it('maintains Z coordinates', function() {
var circle = new ol.geom.Circle([0, 0, 1], 1);
expect(circle.getLayout()).to.be(ol.geom.GeometryLayout.XYZ);
expect(circle.getLayout()).to.be('XYZ');
var closestPoint = circle.getClosestPoint([2, 0]);
expect(closestPoint).to.have.length(3);
expect(closestPoint[0]).to.roughlyEqual(1, 1e-15);
@@ -101,7 +101,7 @@ describe('ol.geom.Circle', function() {
it('maintains M coordinates', function() {
var circle = new ol.geom.Circle([0, 0, 2], 1,
ol.geom.GeometryLayout.XYM);
'XYM');
var closestPoint = circle.getClosestPoint([2, 0]);
expect(closestPoint).to.have.length(3);
expect(closestPoint[0]).to.roughlyEqual(1, 1e-15);
@@ -111,7 +111,7 @@ describe('ol.geom.Circle', function() {
it('maintains Z and M coordinates', function() {
var circle = new ol.geom.Circle([0, 0, 1, 2], 1);
expect(circle.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
expect(circle.getLayout()).to.be('XYZM');
var closestPoint = circle.getClosestPoint([2, 0]);
expect(closestPoint).to.have.length(4);
expect(closestPoint[0]).to.roughlyEqual(1, 1e-15);
@@ -149,7 +149,7 @@ describe('ol.geom.Circle', function() {
describe('#getType', function() {
it('returns the expected value', function() {
expect(circle.getType()).to.be(ol.geom.GeometryType.CIRCLE);
expect(circle.getType()).to.be('Circle');
});
});
@@ -173,7 +173,7 @@ describe('ol.geom.Circle', function() {
describe('#setFlatCoordinates', function() {
it('sets both center and radius', function() {
circle.setFlatCoordinates(ol.geom.GeometryLayout.XY, [1, 2, 4, 2]);
circle.setFlatCoordinates('XY', [1, 2, 4, 2]);
expect(circle.getCenter()).to.eql([1, 2]);
expect(circle.getRadius()).to.be(3);
});
@@ -181,7 +181,7 @@ describe('ol.geom.Circle', function() {
it('fires a single change event', function() {
var spy = sinon.spy();
circle.on('change', spy);
circle.setFlatCoordinates(ol.geom.GeometryLayout.XY, [1, 2, 4, 2]);
circle.setFlatCoordinates('XY', [1, 2, 4, 2]);
expect(spy.calledOnce).to.be(true);
});
@@ -276,5 +276,3 @@ describe('ol.geom.Circle', function() {
goog.require('ol.geom.Circle');
goog.require('ol.geom.GeometryType');
goog.require('ol.geom.GeometryLayout');