MCPcopy Create free account
hub / github.com/nodejs/node / createFuzzTest

Function createFuzzTest

deps/v8/tools/clusterfuzz/js_fuzzer/test/test_regressions.js:36–45  ·  view source on GitHub ↗
(fake_db, settings, inputFiles)

Source from the content-addressed store, hash-verified

34const SYNTAX_ERROR_RE = /.*SyntaxError.*/
35
36function createFuzzTest(fake_db, settings, inputFiles) {
37 const sources = inputFiles.map(input => helpers.loadV8TestData(input));
38
39 const mutator = new scriptMutator.ScriptMutator(settings, fake_db);
40 const result = mutator.mutateMultiple(sources);
41
42 const output_file = tempfile('.js');
43 fs.writeFileSync(output_file, result.code);
44 return { file:output_file, flags:result.flags };
45}
46
47function execFile(jsFile) {
48 execSync("node --allow-natives-syntax " + jsFile, {stdio: ['pipe']});

Callers 1

Calls 3

mutateMultipleMethod · 0.95
mapMethod · 0.65
writeFileSyncMethod · 0.45

Tested by

no test coverage detected