Rename _ol_source_Source_ to Source

This commit is contained in:
Frederic Junod
2017-12-19 08:51:50 +01:00
parent 1e307c16ac
commit aa45598ae1
11 changed files with 71 additions and 71 deletions

View File

@@ -4,7 +4,7 @@ import Point from '../../../../src/ol/geom/Point.js';
import Polygon from '../../../../src/ol/geom/Polygon.js';
import {get as getProjection} from '../../../../src/ol/proj.js';
import _ol_source_Cluster_ from '../../../../src/ol/source/Cluster.js';
import _ol_source_Source_ from '../../../../src/ol/source/Source.js';
import Source from '../../../../src/ol/source/Source.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
describe('ol.source.Cluster', function() {
@@ -15,7 +15,7 @@ describe('ol.source.Cluster', function() {
projection: getProjection('EPSG:4326'),
source: new _ol_source_Vector_()
});
expect(source).to.be.a(_ol_source_Source_);
expect(source).to.be.a(Source);
expect(source).to.be.a(_ol_source_Cluster_);
expect(source.getDistance()).to.be(20);
});

View File

@@ -5,7 +5,7 @@ import _ol_layer_Image_ from '../../../../src/ol/layer/Image.js';
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
import _ol_source_ImageStatic_ from '../../../../src/ol/source/ImageStatic.js';
import _ol_source_Raster_ from '../../../../src/ol/source/Raster.js';
import _ol_source_Source_ from '../../../../src/ol/source/Source.js';
import Source from '../../../../src/ol/source/Source.js';
import _ol_source_Tile_ from '../../../../src/ol/source/Tile.js';
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
@@ -94,7 +94,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() {
threads: 0,
sources: [new _ol_source_Tile_({})]
});
expect(source).to.be.a(_ol_source_Source_);
expect(source).to.be.a(Source);
expect(source).to.be.a(_ol_source_Raster_);
});

View File

@@ -1,27 +1,27 @@
import {get as getProjection} from '../../../../src/ol/proj.js';
import _ol_source_Source_ from '../../../../src/ol/source/Source.js';
import Source from '../../../../src/ol/source/Source.js';
describe('ol.source.Source', function() {
describe('constructor', function() {
it('returns a source', function() {
var source = new _ol_source_Source_({
var source = new Source({
projection: getProjection('EPSG:4326')
});
expect(source).to.be.a(_ol_source_Source_);
expect(source).to.be.a(Source);
});
});
describe('config option `attributions`', function() {
it('accepts undefined', function() {
var source = new _ol_source_Source_({});
var source = new Source({});
var attributions = source.getAttributions();
expect(attributions).to.be(null);
});
it('accepts a single string', function() {
var source = new _ol_source_Source_({
var source = new Source({
attributions: 'Humpty'
});
var attributions = source.getAttributions();
@@ -31,7 +31,7 @@ describe('ol.source.Source', function() {
});
it('accepts an array of strings', function() {
var source = new _ol_source_Source_({
var source = new Source({
attributions: ['Humpty', 'Dumpty']
});
var attributions = source.getAttributions();
@@ -41,7 +41,7 @@ describe('ol.source.Source', function() {
});
it('accepts a function that returns a string', function() {
var source = new _ol_source_Source_({
var source = new Source({
attributions: function() {
return 'Humpty';
}
@@ -53,7 +53,7 @@ describe('ol.source.Source', function() {
});
it('accepts a function that returns an array of strings', function() {
var source = new _ol_source_Source_({
var source = new Source({
attributions: function() {
return ['Humpty', 'Dumpty'];
}
@@ -67,7 +67,7 @@ describe('ol.source.Source', function() {
describe('#refresh()', function() {
it('dispatches the change event', function() {
var source = new _ol_source_Source_({
var source = new Source({
projection: getProjection('EPSG:4326')
});
var changedSpy = sinon.spy();
@@ -81,7 +81,7 @@ describe('ol.source.Source', function() {
var source = null;
beforeEach(function() {
source = new _ol_source_Source_({
source = new Source({
attributions: 'before'
});
});

View File

@@ -3,7 +3,7 @@ import _ol_Tile_ from '../../../../src/ol/Tile.js';
import TileRange from '../../../../src/ol/TileRange.js';
import {get as getProjection} from '../../../../src/ol/proj.js';
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
import _ol_source_Source_ from '../../../../src/ol/source/Source.js';
import Source from '../../../../src/ol/source/Source.js';
import _ol_source_Tile_ from '../../../../src/ol/source/Tile.js';
import _ol_tilecoord_ from '../../../../src/ol/tilecoord.js';
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
@@ -59,7 +59,7 @@ describe('ol.source.Tile', function() {
var source = new _ol_source_Tile_({
projection: getProjection('EPSG:4326')
});
expect(source).to.be.a(_ol_source_Source_);
expect(source).to.be.a(Source);
expect(source).to.be.a(_ol_source_Tile_);
});
it('sets a custom cache size', function() {

View File

@@ -1,4 +1,4 @@
import _ol_source_Source_ from '../../../../src/ol/source/Source.js';
import Source from '../../../../src/ol/source/Source.js';
import _ol_source_TileJSON_ from '../../../../src/ol/source/TileJSON.js';
import _ol_Observable_ from '../../../../src/ol/Observable.js';
@@ -11,7 +11,7 @@ describe('ol.source.TileJSON', function() {
var source = new _ol_source_TileJSON_({
url: 'spec/ol/data/tilejson.json'
});
expect(source).to.be.a(_ol_source_Source_);
expect(source).to.be.a(Source);
expect(source).to.be.a(_ol_source_TileJSON_);
});
});