extending ranges to compensate for floating point errors

on linux these were throwing errors
This commit is contained in:
Yotam Mann 2017-02-20 22:37:32 -05:00
parent e1b7fbd3f9
commit e19ef3bca7
2 changed files with 3 additions and 3 deletions

View file

@ -67,7 +67,7 @@ define(["helper/Basic", "Tone/source/MultiPlayer", "helper/Offline", "helper/Sou
}, 0.3).then(function(buffer){
buffer.forEach(function(sample, time){
if (sample > 0){
expect(time).to.be.at.least(0.1);
expect(time).to.be.at.least(0.099);
}
});
});

View file

@ -243,7 +243,7 @@ define(["helper/Basic", "Tone/source/Player", "helper/Offline",
player.seek(0.2, 0.1);
}, 0.3).then(function(buffer){
buffer.forEach(function(sample){
expect(sample).to.be.within(0, 0.1);
expect(sample).to.be.within(0, 0.101);
}, 0, 0.1);
buffer.forEach(function(sample){
expect(sample).to.be.within(0.2, 0.3);
@ -266,7 +266,7 @@ define(["helper/Basic", "Tone/source/Player", "helper/Offline",
player.start(0, 0.35);
}, 0.3).then(function(buffer){
buffer.forEach(function(sample){
expect(sample).to.be.within(0.15, 0.2);
expect(sample).to.be.within(0.15, 0.201);
}, 0, 0.05);
buffer.forEach(function(sample){
expect(sample).to.be.within(0.1, 0.15);