diff --git a/tests/auto-tests.html b/tests/auto-tests.html index a02c0f2064..b73107e2fd 100644 --- a/tests/auto-tests.html +++ b/tests/auto-tests.html @@ -379,8 +379,18 @@ Test.AnotherWay._constructor_name=function( x ) }else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) { return RegExp.$1; }else { - return ""; - } + var c = ''; + switch(typeof x) { + case 'string': + c = 'String'; + break; + case 'object': + c = 'Object'; + break; + default: + c = ''; + } + return c; } } Test.AnotherWay._is_array=function( x ) { diff --git a/tests/run-tests.html b/tests/run-tests.html index cabada0fec..ecc475c376 100644 --- a/tests/run-tests.html +++ b/tests/run-tests.html @@ -345,7 +345,18 @@ Test.AnotherWay._constructor_name=function( x ) }else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) { return RegExp.$1; }else { - return ""; + var c = ''; + switch(typeof x) { + case 'string': + c = 'String'; + break; + case 'object': + c = 'Object'; + break; + default: + c = ''; + } + return c; } } Test.AnotherWay._is_array=function( x )