Merge pull request #5429 from probins/testenums
Remove enums from tests
This commit is contained in:
@@ -33,7 +33,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.LineString);
|
||||
expect(g.getCoordinates()).to.eql([]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
});
|
||||
|
||||
it('can read and write various rte attributes', function() {
|
||||
@@ -90,7 +90,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.LineString);
|
||||
expect(g.getCoordinates()).to.eql([[2, 1, 0, 0], [4, 3, 0, 0]]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -119,7 +119,7 @@ describe('ol.format.GPX', function() {
|
||||
var p2 = ol.proj.transform([6, 5], 'EPSG:4326', 'EPSG:3857');
|
||||
p2.push(0, 0);
|
||||
expect(g.getCoordinates()).to.eql([p1, p2]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs, {
|
||||
featureProjection: 'EPSG:3857'
|
||||
});
|
||||
@@ -159,7 +159,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql([]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
});
|
||||
|
||||
it('can read and write various trk attributes', function() {
|
||||
@@ -215,7 +215,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.MultiLineString);
|
||||
expect(g.getCoordinates()).to.eql([[]]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -248,7 +248,7 @@ describe('ol.format.GPX', function() {
|
||||
expect(g.getCoordinates()).to.eql([
|
||||
[[2, 1, 3, 1263115752], [6, 5, 7, 1263115812]]
|
||||
]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -285,7 +285,7 @@ describe('ol.format.GPX', function() {
|
||||
var p2 = ol.proj.transform([6, 5], 'EPSG:4326', 'EPSG:3857');
|
||||
p2.push(7, 1263115812);
|
||||
expect(g.getCoordinates()).to.eql([[p1, p2]]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs, {
|
||||
featureProjection: 'EPSG:3857'
|
||||
});
|
||||
@@ -331,7 +331,7 @@ describe('ol.format.GPX', function() {
|
||||
[[2, 1, 3, 1263115752], [6, 5, 7, 1263115812]],
|
||||
[[9, 8, 10, 1263115872], [12, 11, 13, 1263115932]]
|
||||
]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -390,7 +390,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.Point);
|
||||
expect(g.getCoordinates()).to.eql([2, 1, 0, 0]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -414,7 +414,7 @@ describe('ol.format.GPX', function() {
|
||||
var expectedPoint = ol.proj.transform([2, 1], 'EPSG:4326', 'EPSG:3857');
|
||||
expectedPoint.push(0, 0);
|
||||
expect(g.getCoordinates()).to.eql(expectedPoint);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs, {
|
||||
featureProjection: 'EPSG:3857'
|
||||
});
|
||||
@@ -438,7 +438,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.Point);
|
||||
expect(g.getCoordinates()).to.eql([2, 1, 3, 0]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -460,7 +460,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.Point);
|
||||
expect(g.getCoordinates()).to.eql([2, 1, 0, 1263115752]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -483,7 +483,7 @@ describe('ol.format.GPX', function() {
|
||||
var g = f.getGeometry();
|
||||
expect(g).to.be.an(ol.geom.Point);
|
||||
expect(g.getCoordinates()).to.eql([2, 1, 3, 1263115752]);
|
||||
expect(g.getLayout()).to.be(ol.geom.GeometryLayout.XYZM);
|
||||
expect(g.getLayout()).to.be('XYZM');
|
||||
var serialized = format.writeFeaturesNode(fs);
|
||||
expect(serialized).to.xmleql(ol.xml.parse(text));
|
||||
});
|
||||
@@ -677,7 +677,6 @@ describe('ol.format.GPX', function() {
|
||||
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.format.GPX');
|
||||
goog.require('ol.geom.GeometryLayout');
|
||||
goog.require('ol.geom.LineString');
|
||||
goog.require('ol.geom.MultiLineString');
|
||||
goog.require('ol.geom.Point');
|
||||
|
||||
Reference in New Issue
Block a user