Files
openlayers/test/spec/ol/webgl/buffer.test.js
Éric Lemoine 57db47ac18 Rename ol.structs.Buffer to ol.webgl.Buffer
The Buffer class is WebGL specific, and it's not really a "data structure", in the pure sense of the term.
2014-11-21 15:48:31 +01:00

56 lines
1002 B
JavaScript

goog.provide('ol.test.webgl.Buffer');
describe('ol.webgl.Buffer', function() {
describe('constructor', function() {
describe('without an argument', function() {
var b;
beforeEach(function() {
b = new ol.webgl.Buffer();
});
it('constructs an empty instance', function() {
expect(b.getArray()).to.be.empty();
});
});
describe('with a single array argument', function() {
var b;
beforeEach(function() {
b = new ol.webgl.Buffer([0, 1, 2, 3]);
});
it('constructs a populated instance', function() {
expect(b.getArray()).to.eql([0, 1, 2, 3]);
});
});
});
describe('with an empty instance', function() {
var b;
beforeEach(function() {
b = new ol.webgl.Buffer();
});
describe('getArray', function() {
it('returns an empty array', function() {
expect(b.getArray()).to.be.empty();
});
});
});
});
goog.require('ol.webgl.Buffer');