added test for vibrato... and fixed vibrato

naturally when i actually tested it, it turned out to be subtly broken

also reorg'd the tests a bit, sorry @hillerstorm.
This commit is contained in:
Andy Sloane 2015-11-13 22:06:50 -08:00
commit 570aa33a20
6 changed files with 104 additions and 28 deletions

View file

@ -4,7 +4,6 @@ require('../xm.js');
require('../xmeffects.js');
var XMPlayer = window.XMPlayer;
tests = {};
testdata = require('./testdata.js');
// test TODO:
@ -12,7 +11,7 @@ testdata = require('./testdata.js');
// - unit test for envelopes
//
// using assert passed to the test function that just logs failures
tests['test XM startup'] = function(assert) {
exports['test XM startup'] = function(assert) {
testdata.resetXMData();
XMPlayer.nextTick();
assert.equal(XMPlayer.cur_songpos, 0, 'advance to initial song position');
@ -21,7 +20,7 @@ tests['test XM startup'] = function(assert) {
assert.equal(XMPlayer.cur_row, 1, 'advance to row 1');
};
require('./instrument.js');
require('./effects.js');
exports['test instruments'] = require('./instrument.js');
exports['test effects'] = require('./effects.js');
if (module == require.main) require('test').run(tests);
if (module == require.main) require('test').run(exports);