MCPcopy
hub / github.com/processing/p5.js / assertAllPixelsAreColor

Function assertAllPixelsAreColor

test/unit/webgl/p5.RendererGL.js:1297–1304  ·  view source on GitHub ↗
(target, r, g, b, a)

Source from the content-addressed store, hash-verified

1295
1296 suite('background()', function() {
1297 function assertAllPixelsAreColor(target, r, g, b, a) {
1298 target.loadPixels();
1299 const expectedPixels = [];
1300 for (let i = 0; i < target.width * target.height; i++) {
1301 expectedPixels.push(r, g, b, a);
1302 }
1303 assert.deepEqual([ ...target.pixels ], expectedPixels);
1304 }
1305
1306 function testDepthGetsCleared(target) {
1307 target.pixelDensity(1);

Callers 1

testDepthGetsClearedFunction · 0.85

Calls 2

loadPixelsMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected