MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / verifyOutput

Function verifyOutput

tests/modules/pins/audioout/generate-flush.js:28–38  ·  view source on GitHub ↗
(count, expected)

Source from the content-addressed store, hash-verified

26verifyOutput(100, 0);
27
28function verifyOutput(count, expected) {
29 const result = mixer.mix(count);
30 const samples = new Int16Array(result);
31 for (let i = 0; i < count; i++) {
32 let value = samples[i];
33 if (value < 0)
34 value = -value;
35 assert.sameValue(value, expected);
36 }
37 $262.gc();
38}

Callers 1

generate-flush.jsFile · 0.70

Calls 2

mixMethod · 0.80
gcMethod · 0.80

Tested by

no test coverage detected