Migrate Function tests to wasm

This commit is contained in:
Alex Crichton
2018-07-20 12:43:07 -07:00
parent 347c1daad9
commit 75215134a5
6 changed files with 74 additions and 210 deletions

View File

@ -0,0 +1,10 @@
// Used for `Function.rs` tests
exports.get_function_to_bind = function() {
return function() { return this.x || 1; }
};
exports.get_value_to_bind_to = function() {
return { x: 2 };
};
exports.call_function = function(f) {
return f();
};