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

Function assertValidPixels

test/unit/core/p5.Graphics.js:40–45  ·  view source on GitHub ↗
(graph, w, h, density)

Source from the content-addressed store, hash-verified

38 }
39
40 function assertValidPixels(graph, w, h, density) {
41 graph.loadPixels();
42 var real = graph.pixels.length;
43 var expected = w * density * h * density * 4;
44 assert.strictEqual(real, expected, 'invalid number of pixels');
45 }
46
47 suite('p5.prototype.createGraphics', function() {
48 test('it creates a graphics', function() {

Callers 1

p5.Graphics.jsFile · 0.85

Calls 1

loadPixelsMethod · 0.45

Tested by

no test coverage detected