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

Method loadTestcase

deps/v8/tools/clusterfuzz/js_fuzzer/corpus.js:160–179  ·  view source on GitHub ↗
(relPath, strict, label)

Source from the content-addressed store, hash-verified

158 }
159
160 loadTestcase(relPath, strict, label) {
161 const start = Date.now();
162 try {
163 const source = sourceHelpers.loadSource(
164 this, relPath, strict, random.choose(module.exports.TRANSPILE_PROB));
165 if (program.verbose) {
166 const duration = Date.now() - start;
167 console.log(`Parsing ${relPath} ${label} took ${duration} ms.`);
168 }
169 if (exceptions.hasFlagsDiscouragingFiles(source.flags) &&
170 random.choose(module.exports.DROP_DISCOURAGED_FILES_PROB)) {
171 return undefined
172 }
173 return source;
174 } catch (e) {
175 console.log(`WARNING: failed to ${label} parse ${relPath}`);
176 console.log(e);
177 }
178 return undefined;
179 }
180
181 *loadTestcases(relPaths) {
182 for (const relPath of relPaths) {

Callers 2

loadTestcasesMethod · 0.95
inputGenMethod · 0.80

Calls 2

nowMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected