forked from gpujs/gpu.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.js
More file actions
26 lines (21 loc) · 1007 Bytes
/
utils.js
File metadata and controls
26 lines (21 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
///
/// 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) { }" ) );
});