public class RegressionTests::JavaScriptTestClass extends Object
{
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap1()
**/
function testMap1() {
return [1,2,3].map( el => el ** 2 );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap2()
**/
function testMap2() {
return [1,2,3].map( (el) => el ** 2 );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap3()
**/
function testMap3() {
return [1,2,3].map( (el) => { return el ** 2; } );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap4()
**/
function testMap4() {
function f(el) { return el ** 2; };
return [1,2,3].map( f );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap5()
**/
function testMap5() {
function f(el) {
return el ** 2;
}
return [1,2,3].map( f );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap6()
**/
function testMap6() {
var f = function (el) { return el ** 2; };
return [1,2,3].map( f );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap7()
**/
function testMap7() {
var f = el => el ** 2;
return [1,2,3].map( f );
}
/** category: testing **/
/**
(new JavaScriptTestClass).testMap8()
**/
function testMap8() {
var f = (el => el ** 2);
return [1,2,3].map( f );
}
/** category: documentation **/
static function version_CVS() {
return("$Header$");
}