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

Function testAttributes

test/unit/webgl/p5.Shader.js:39–51  ·  view source on GitHub ↗
(shaderName, attributes, expectedAttributes)

Source from the content-addressed store, hash-verified

37 }
38 };
39 var testAttributes = function(shaderName, attributes, expectedAttributes) {
40 // assert(expectedAttributes.length === Object.keys(attributes).length,
41 // shaderName + ' expected ' + expectedAttributes.length +
42 // ' attributes but has ' + Object.keys(attributes).length);
43 // test each one
44 for (var i = 0; i < expectedAttributes.length; i++) {
45 var attribute = attributes[expectedAttributes[i]];
46 assert(
47 attribute !== undefined,
48 shaderName + ' missing expected attribute: ' + expectedAttributes[i]
49 );
50 }
51 };
52 var testShader = function(
53 shaderName,
54 shaderObj,

Callers 1

testShaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected