Simple enough, how can I run the leak test for the node -gyp C ++ module I just wrote? Most of the imported C ++ code has been tested in different projects, but I would like to make sure there are no leaks.
AFAIK, the only execution mode I've seen is through node:
var wv = require('./build/Release/word_vec.node');
var json = JSON.parse(require('fs').readFileSync('amazon.json', 'utf8'));
var res = wv.convert_sparse(json, 5, 6, 0);
var fs = require('fs');
fs.writeFile("output", JSON.stringify(res), function(err) {
if(err) {
return console.log(err);
}
});
The function I want to test is convert_sparsethat which is in word_vec.cppand compiled in ./build/Release/word_vec.nodeor the equivalent debug subdirectory.
source
share