Allow a ol.structs.Buffer to update multiple dirty sets

This commit is contained in:
Tom Payne
2013-03-21 11:33:36 +01:00
parent 4ee73bc02f
commit ba0e7ae89c
2 changed files with 36 additions and 52 deletions

View File

@@ -67,14 +67,6 @@ describe('ol.structs.Buffer', function() {
});
describe('getDirtySet', function() {
it('returns an empty set', function() {
expect(b.getDirtySet().isEmpty()).to.be(true);
});
});
});
describe('with an empty instance with spare capacity', function() {
@@ -149,14 +141,6 @@ describe('ol.structs.Buffer', function() {
});
describe('getDirtySet', function() {
it('returns an empty set', function() {
expect(b.getDirtySet().isEmpty()).to.be(true);
});
});
describe('remove', function() {
it('allows items to be removes', function() {
@@ -175,8 +159,10 @@ describe('ol.structs.Buffer', function() {
});
it('marks the set items as dirty', function() {
var dirtySet = new ol.structs.IntegerSet();
b.addDirtySet(dirtySet);
expect(dirtySet.isEmpty()).to.be(true);
b.set([5, 6], 2);
var dirtySet = b.getDirtySet();
expect(dirtySet.isEmpty()).to.be(false);
expect(dirtySet.getArray()).to.equalArray([2, 4]);
});
@@ -222,14 +208,6 @@ describe('ol.structs.Buffer', function() {
});
describe('getDirtySet', function() {
it('returns an empty set', function() {
expect(b.getDirtySet().isEmpty()).to.be(true);
});
});
describe('getFreeSet', function() {
it('returns the expected set', function() {
@@ -281,3 +259,4 @@ describe('ol.structs.Buffer', function() {
goog.require('ol.structs.Buffer');
goog.require('ol.structs.IntegerSet');