2001
|
1 |
public class RegressionTests::JavaScriptTestClass extends Object
|
|
2 |
{
|
|
3 |
}
|
|
4 |
|
|
5 |
|
|
6 |
/** category: testing **/
|
|
7 |
|
|
8 |
/**
|
|
9 |
(new JavaScriptTestClass).testMap1()
|
|
10 |
**/
|
|
11 |
function testMap1() {
|
|
12 |
return [1,2,3].map( el => el ** 2 );
|
|
13 |
}
|
|
14 |
|
|
15 |
/** category: testing **/
|
|
16 |
|
|
17 |
/**
|
|
18 |
(new JavaScriptTestClass).testMap2()
|
|
19 |
**/
|
|
20 |
function testMap2() {
|
|
21 |
return [1,2,3].map( (el) => el ** 2 );
|
|
22 |
}
|
|
23 |
|
|
24 |
/** category: testing **/
|
|
25 |
|
|
26 |
/**
|
|
27 |
(new JavaScriptTestClass).testMap3()
|
|
28 |
**/
|
|
29 |
function testMap3() {
|
|
30 |
return [1,2,3].map( (el) => { return el ** 2; } );
|
|
31 |
}
|
|
32 |
|
|
33 |
/** category: testing **/
|
|
34 |
|
|
35 |
/**
|
|
36 |
(new JavaScriptTestClass).testMap4()
|
|
37 |
**/
|
|
38 |
function testMap4() {
|
|
39 |
function f(el) { return el ** 2; };
|
|
40 |
|
|
41 |
return [1,2,3].map( f );
|
|
42 |
}
|
|
43 |
|
|
44 |
/** category: testing **/
|
|
45 |
|
|
46 |
/**
|
|
47 |
(new JavaScriptTestClass).testMap5()
|
|
48 |
**/
|
|
49 |
function testMap5() {
|
|
50 |
function f(el) {
|
|
51 |
return el ** 2;
|
|
52 |
}
|
|
53 |
|
|
54 |
return [1,2,3].map( f );
|
|
55 |
}
|
|
56 |
|
2003
|
57 |
/** category: testing **/
|
|
58 |
|
|
59 |
/**
|
|
60 |
(new JavaScriptTestClass).testMap6()
|
|
61 |
**/
|
|
62 |
function testMap6() {
|
|
63 |
var f = function (el) { return el ** 2; };
|
|
64 |
|
|
65 |
return [1,2,3].map( f );
|
|
66 |
}
|
|
67 |
|
|
68 |
/** category: testing **/
|
|
69 |
|
|
70 |
/**
|
|
71 |
(new JavaScriptTestClass).testMap7()
|
|
72 |
**/
|
|
73 |
function testMap7() {
|
|
74 |
var f = el => el ** 2;
|
|
75 |
|
|
76 |
return [1,2,3].map( f );
|
|
77 |
}
|
|
78 |
|
2001
|
79 |
|
|
80 |
/** category: documentation **/
|
|
81 |
|
2002
|
82 |
static function version_CVS() {
|
2001
|
83 |
return("$Header$");
|
|
84 |
}
|
|
85 |
|