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

Function testUniforms

test/unit/webgl/p5.Shader.js:26–38  ·  view source on GitHub ↗
(shaderName, uniforms, expectedUniforms)

Source from the content-addressed store, hash-verified

24 });
25 });
26 var testUniforms = function(shaderName, uniforms, expectedUniforms) {
27 // assert(expectedUniforms.length === Object.keys(uniforms).length,
28 // shaderName + ' expected ' + expectedUniforms.length + ' uniforms but has ' +
29 // Object.keys(uniforms).length);
30 // test each one
31 for (var i = 0; i < expectedUniforms.length; i++) {
32 var uniform = uniforms[expectedUniforms[i]];
33 assert(
34 uniform !== undefined,
35 shaderName + ' missing expectedUniform: ' + expectedUniforms[i]
36 );
37 }
38 };
39 var testAttributes = function(shaderName, attributes, expectedAttributes) {
40 // assert(expectedAttributes.length === Object.keys(attributes).length,
41 // shaderName + ' expected ' + expectedAttributes.length +

Callers 1

testShaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected