You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
616 B
JavaScript
19 lines
616 B
JavaScript
exports.test = function(libUncrustify, assert){
|
|
var uncrustify = libUncrustify();
|
|
|
|
var input = ' string a = "aaaa";';
|
|
var expectedOutput = 'string a = "aaaa";';
|
|
var generatedOutput = uncrustify.uncrustify( input, uncrustify.Language.CPP );
|
|
|
|
assert.deepEqual(expectedOutput, generatedOutput, "comparing expectedOutput and generatedOutput");
|
|
|
|
uncrustify.destruct();
|
|
};
|
|
|
|
if (module == require.main) {
|
|
if(process.argv.length < 3) {throw "libUncrustify.js path missing";}
|
|
var uncrustify = require(process.argv[2]);
|
|
var assert = require("assert");
|
|
exports.test(uncrustify, assert);
|
|
}
|