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

Function verifyOutput

tests/modules/pins/audioout/generate-volume.js:45–55  ·  view source on GitHub ↗
(count, expected)

Source from the content-addressed store, hash-verified

43verifyOutput(127, initial / 2);
44
45function verifyOutput(count, expected) {
46 const result = mixer.mix(count);
47 const samples = new Int16Array(result);
48 for (let i = 0; i < count; i++) {
49 let value = samples[i];
50 if (value < 0)
51 value = -value;
52 assert.sameValue(value, expected);
53 }
54 $262.gc();
55}

Callers 1

generate-volume.jsFile · 0.70

Calls 2

mixMethod · 0.80
gcMethod · 0.80

Tested by

no test coverage detected