@@ -8,6 +8,7 @@ QUnit.test( "hello_world: just return magic 42", function( assert ) {
88
99 // Create a function hello node
1010 var node = new functionNode (
11+ null ,
1112 "hello_world" ,
1213 function ( ) {
1314 return 42 ;
@@ -17,7 +18,7 @@ QUnit.test( "hello_world: just return magic 42", function( assert ) {
1718 assert . notEqual ( node , null , "class creation check" ) ;
1819 assert . notEqual ( node . getJS_AST ( ) , null , "AST fetch check" ) ;
1920
20- assert . equal (
21+ assert . equal (
2122 node . getWebglFunctionString ( ) . replace ( / \s + / g, ' ' ) ,
2223 "float hello_world() { return 42.0; }" ,
2324 "webgl function conversion check"
@@ -34,6 +35,7 @@ QUnit.test( "hello_inner: call a funciton inside a function", function( assert )
3435
3536 // Create a function hello node
3637 var node = new functionNode (
38+ null ,
3739 "hello_inner" ,
3840 function ( ) {
3941 return inner ( ) ;
@@ -43,7 +45,7 @@ QUnit.test( "hello_inner: call a funciton inside a function", function( assert )
4345 assert . notEqual ( node , null , "class creation check" ) ;
4446 assert . notEqual ( node . getJS_AST ( ) , null , "AST fetch check" ) ;
4547
46- assert . equal (
48+ assert . equal (
4749 node . getWebglFunctionString ( ) . replace ( / \s + / g, ' ' ) ,
4850 "float hello_inner() { return inner(); }" ,
4951 "webgl function conversion check"
@@ -56,6 +58,7 @@ QUnit.test( "hello_inner: call a funciton inside a function", function( assert )
5658QUnit . test ( "Math.round implementation: A function with arguments" , function ( assert ) {
5759 // Math.round node
5860 var node = new functionNode (
61+ null ,
5962 "round" ,
6063 function ( a ) {
6164 return Math . floor ( a + 0.5 ) ;
@@ -65,7 +68,7 @@ QUnit.test( "Math.round implementation: A function with arguments", function( as
6568 assert . notEqual ( node , null , "class creation check" ) ;
6669 assert . notEqual ( node . getJS_AST ( ) , null , "AST fetch check" ) ;
6770
68- assert . equal (
71+ assert . equal (
6972 node . getWebglFunctionString ( ) . replace ( / \s + / g, ' ' ) ,
7073 "float round(float a) { return floor(a+0.5); }" ,
7174 "webgl function conversion check"
@@ -78,6 +81,7 @@ QUnit.test( "Math.round implementation: A function with arguments", function( as
7881QUnit . test ( "Two arguments test" , function ( assert ) {
7982
8083 var node = new functionNode (
84+ null ,
8185 "add_together" ,
8286 function ( a , b ) {
8387 return a + b ;
@@ -87,7 +91,7 @@ QUnit.test( "Two arguments test", function( assert ) {
8791 assert . notEqual ( node , null , "class creation check" ) ;
8892 assert . notEqual ( node . getJS_AST ( ) , null , "AST fetch check" ) ;
8993
90- assert . equal (
94+ assert . equal (
9195 node . getWebglFunctionString ( ) . replace ( / \s + / g, ' ' ) ,
9296 "float add_together(float a, float b) { return a+b; }" ,
9397 "webgl function conversion check"
@@ -102,7 +106,7 @@ QUnit.test( "Automatic naming support", function( assert ) {
102106 return 42 ;
103107 }
104108 // Create a function hello node
105- var node = new functionNode ( null , hello_world ) ;
109+ var node = new functionNode ( null , null , hello_world ) ;
106110 assert . notEqual ( node , null , "class creation check" ) ;
107111 assert . equal ( node . functionName , "hello_world" ) ;
108112} ) ;
0 commit comments