MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test

Function test

tools/unsafe_optimizations.mjs:242–250  ·  view source on GitHub ↗
(input, expected)

Source from the content-addressed store, hash-verified

240let numTestFailures = 0;
241
242function test(input, expected) {
243 const observed = runOnJsText(input);
244 if (observed != expected) {
245 console.error(`ERROR: Input: ${input}\nobserved: ${observed}\nexpected: ${expected}\n`);
246 ++numTestFailures;
247 } else {
248 console.log(`OK: ${input} -> ${expected}`);
249 }
250}
251
252function runTests() {
253 // optPassSimplifyModularizeFunction:

Callers 1

runTestsFunction · 0.70

Calls 3

runOnJsTextFunction · 0.85
logMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected