RegressionTests__JavaScriptTestClass.st
author Claus Gittinger <cg@exept.de>
Tue, 28 Aug 2018 11:56:53 +0200
changeset 2001 6fa077edd661
child 2002 721352c71cac
permissions -rw-r--r--
initial checkin

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: documentation **/

function version_CVS() {
    return("$Header$");
}