mirror of
https://github.com/gpujs/gpu.js.git
synced 2025-12-08 20:35:56 +00:00
Change `HTMLImageArray` render strategy to `gl.NEAREST`, like all the others Let `WebGL2FunctionNode` extend `WebGLFunctionNode` and lighten Remove all the different html pages associated with tests, and just use one file to handle them and use qunit for filtering them Bump version number
27 lines
1015 B
JavaScript
27 lines
1015 B
JavaScript
///
|
|
/// Test the GPUUtils functions
|
|
///
|
|
|
|
QUnit.test( "GPU.utils: systemEndianness not null", function( assert ) {
|
|
assert.ok( GPU.utils.systemEndianness() !== null, "not null check" );
|
|
assert.ok( GPU.utils.systemEndianness() === "LE" || GPU.utils.systemEndianness() === "BE", "value = " + GPU.utils.systemEndianness() );
|
|
});
|
|
|
|
QUnit.test( "GPU.utils: isFunction", function( assert ) {
|
|
assert.ok( GPU.utils.isFunction( function() { } ) );
|
|
assert.notOk( GPU.utils.isFunction( {} ) );
|
|
});
|
|
|
|
QUnit.test( "GPU.utils: isFunctionString", function( assert ) {
|
|
assert.ok( GPU.utils.isFunctionString( "function() { }" ) );
|
|
assert.notOk( GPU.utils.isFunctionString( {} ) );
|
|
});
|
|
|
|
QUnit.test( "GPU.utils: getFunctionName_fromString", function( assert ) {
|
|
assert.equal( "test", GPU.utils.getFunctionNameFromString( "function test() { }" ) );
|
|
});
|
|
|
|
QUnit.test( "GPU.utils: getParamNames_fromString", function( assert ) {
|
|
assert.deepEqual( ["a","b","c"], GPU.utils.getParamNamesFromString( "function test(a,b,c) { }" ) );
|
|
});
|