module({
Emscripten: '../../../../build/embind_test.js',
}, function(imports) {
var cm = imports.Emscripten;
var CheckForLeaks = fixture("check for leaks", function() {
this.setUp(function() {
if (typeof INVOKED_FROM_EMSCRIPTEN_TEST_RUNNER === "undefined") { // TODO: Enable this to work in Emscripten runner as well!
cm._mallocDebug(2);
assert.equal(0, cm.count_emval_handles());
cm._mallocAssertAllMemoryFree();
}
});
this.tearDown(function() {
if (typeof INVOKED_FROM_EMSCRIPTEN_TEST_RUNNER === "undefined") <