Skip to content

Commit

Permalink
remove interface test helper. We'll use WebIDL now.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislo committed Jul 12, 2013
1 parent 0aad382 commit d5b8864
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions webaudio/js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,6 @@ function assert_defined(obj, desc) {
assert_true(undefined != obj, desc);
};

// Test the passed in =obj= has the properties and methods to
// implement the AudioParam Interface
// (https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioParam)
function test_implements_audio_param_interface(obj) {
var properties = ["value", "computedValue", "minValue", "maxValue",
"defaultValue"];

_(properties).forEach(function(property) {
fn = function () { assert_has_property(obj, property, "has " + property) };
test(fn, "'" + obj.name + "'" + " implements: " + property);
});

var methods = ["setValueAtTime", "linearRampToValueAtTime",
"exponentialRampToValueAtTime", "setTargetAtTime",
"setValueCurveAtTime", "cancelScheduledValues"];

_(methods).forEach(function(meth) {
fn = function () { assert_is_method(obj, meth, "has " + meth + "()") };
test(fn, "'" + obj.name + "'" + " implements: " + meth + "()");
});
};


function fuzzyCompare(a, b) {
return Math.abs(a - b) < 5e-5;
}
Expand Down

0 comments on commit d5b8864

Please sign in to comment.