2014-09-14 19:32:30 +00:00
|
|
|
/* global it, describe */
|
2014-09-09 19:30:36 +00:00
|
|
|
|
|
|
|
define(["tests/Core", "chai", "Tone/instrument/DuoSynth", "Tone/instrument/MonoSynth", "Tone/instrument/FMSynth",
|
2014-09-14 19:32:30 +00:00
|
|
|
"Tone/instrument/PolySynth", "Tone/instrument/Sampler", "Tone/instrument/MultiSampler", "tests/Common"],
|
|
|
|
function(Tone, chai, DuoSynth, MonoSynth, FMSynth, PolySynth, Sampler, MultiSampler, Test){
|
2014-09-09 19:30:36 +00:00
|
|
|
|
|
|
|
var expect = chai.expect;
|
|
|
|
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.onlineContext();
|
|
|
|
|
2014-09-09 19:30:36 +00:00
|
|
|
describe("Tone.MonoSynth", function(){
|
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var ms = new MonoSynth();
|
|
|
|
ms.dispose();
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.wasDisposed(ms, expect);
|
2014-09-09 19:30:36 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Tone.DuoSynth", function(){
|
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var ds = new DuoSynth();
|
|
|
|
ds.dispose();
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.wasDisposed(ds, expect);
|
2014-09-09 19:30:36 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Tone.FMSynth", function(){
|
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var fms = new FMSynth();
|
|
|
|
fms.dispose();
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.wasDisposed(fms, expect);
|
2014-09-09 19:30:36 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Tone.PolySynth", function(){
|
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var ps = new PolySynth();
|
|
|
|
ps.dispose();
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.wasDisposed(ps, expect);
|
2014-09-09 19:30:36 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Tone.Sampler", function(){
|
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var samp = new Sampler();
|
|
|
|
samp.dispose();
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.wasDisposed(samp, expect);
|
2014-09-09 19:30:36 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Tone.MultiSampler", function(){
|
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var samp = new MultiSampler();
|
|
|
|
samp.dispose();
|
2014-09-14 19:32:30 +00:00
|
|
|
Test.wasDisposed(samp, expect);
|
2014-09-09 19:30:36 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|