author | sundar |
Tue, 28 Jul 2015 14:52:34 +0530 | |
changeset 31925 | 85c87bc2f1f3 |
parent 24778 | 2ff5d7041566 |
permissions | -rw-r--r-- |
16147 | 1 |
/* |
16151 | 2 |
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. |
16147 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
24778
2ff5d7041566
8044638: Tidy up Nashorn codebase for code standards
attila
parents:
16151
diff
changeset
|
4 |
* |
16147 | 5 |
* This code is free software; you can redistribute it and/or modify it |
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
24778
2ff5d7041566
8044638: Tidy up Nashorn codebase for code standards
attila
parents:
16151
diff
changeset
|
8 |
* |
16147 | 9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
24778
2ff5d7041566
8044638: Tidy up Nashorn codebase for code standards
attila
parents:
16151
diff
changeset
|
14 |
* |
16147 | 15 |
* You should have received a copy of the GNU General Public License version |
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
24778
2ff5d7041566
8044638: Tidy up Nashorn codebase for code standards
attila
parents:
16151
diff
changeset
|
18 |
* |
16147 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/** |
|
25 |
* arity test. |
|
26 |
* |
|
27 |
* @test |
|
24778
2ff5d7041566
8044638: Tidy up Nashorn codebase for code standards
attila
parents:
16151
diff
changeset
|
28 |
* @run |
16147 | 29 |
*/ |
30 |
||
31 |
function func1(a) { print(a); } |
|
32 |
function func2(a, b) { print(a, b); } |
|
33 |
function func3(a, b, c) { print(a, b, c); } |
|
34 |
function func4(a, b, c, d) { print(a, b, c, d); } |
|
35 |
function func5(a, b, c, d, e) { print(a, b, c, d, e); } |
|
36 |
function func6(a, b, c, d, e, f) { print(a, b, c, d, e, f); } |
|
37 |
function func7(a, b, c, d, e, f, g) { print(a, b, c, d, e, f, g); } |
|
38 |
function func8(a, b, c, d, e, f, g, h) { print(a, b, c, d, e, f, g, h); } |
|
39 |
function func9(a, b, c, d, e, f, g, h, i) { print(a, b, c, d, e, f, g, h, i); } |
|
40 |
function func10(a, b, c, d, e, f, g, h, i, j) { print(a, b, c, d, e, f, g, h, i, j); } |
|
41 |
function func11(a, b, c, d, e, f, g, h, i, j, k) { print(a, b, c, d, e, f, g, h, i, j, k); } |
|
42 |
function func12(a, b, c, d, e, f, g, h, i, j, k, l) { print(a, b, c, d, e, f, g, h, i, j, k, l); } |
|
43 |
function func13(a, b, c, d, e, f, g, h, i, j, k, l, m) { print(a, b, c, d, e, f, g, h, i, j, k, l, m); } |
|
44 |
||
45 |
function vfunc1(a) { print(a); arguments; } |
|
46 |
function vfunc2(a, b) { print(a, b); arguments; } |
|
47 |
function vfunc3(a, b, c) { print(a, b, c); arguments; } |
|
48 |
function vfunc4(a, b, c, d) { print(a, b, c, d); arguments; } |
|
49 |
function vfunc5(a, b, c, d, e) { print(a, b, c, d, e); arguments; } |
|
50 |
function vfunc6(a, b, c, d, e, f) { print(a, b, c, d, e, f); arguments; } |
|
51 |
function vfunc7(a, b, c, d, e, f, g) { print(a, b, c, d, e, f, g); arguments; } |
|
52 |
function vfunc8(a, b, c, d, e, f, g, h) { print(a, b, c, d, e, f, g, h); arguments; } |
|
53 |
function vfunc9(a, b, c, d, e, f, g, h, i) { print(a, b, c, d, e, f, g, h, i); arguments; } |
|
54 |
function vfunc10(a, b, c, d, e, f, g, h, i, j) { print(a, b, c, d, e, f, g, h, i, j); arguments; } |
|
55 |
function vfunc11(a, b, c, d, e, f, g, h, i, j, k) { print(a, b, c, d, e, f, g, h, i, j, k); arguments; } |
|
56 |
function vfunc12(a, b, c, d, e, f, g, h, i, j, k, l) { print(a, b, c, d, e, f, g, h, i, j, k, l); arguments; } |
|
57 |
function vfunc13(a, b, c, d, e, f, g, h, i, j, k, l, m) { print(a, b, c, d, e, f, g, h, i, j, k, l, m); arguments; } |
|
58 |
||
59 |
func1(1); |
|
60 |
func2(1, 2); |
|
61 |
func3(1, 2, 3); |
|
62 |
func4(1, 2, 3, 4); |
|
63 |
func5(1, 2, 3, 4, 5); |
|
64 |
func6(1, 2, 3, 4, 5, 6); |
|
65 |
func7(1, 2, 3, 4, 5, 6, 7); |
|
66 |
func8(1, 2, 3, 4, 5, 6, 7, 8); |
|
67 |
func9(1, 2, 3, 4, 5, 6, 7, 8, 9); |
|
68 |
func10(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); |
|
69 |
func11(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); |
|
70 |
func12(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); |
|
71 |
func13(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); |
|
72 |
||
73 |
func1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); |
|
74 |
func13(1); |
|
75 |
||
76 |
vfunc1(1); |
|
77 |
vfunc2(1, 2); |
|
78 |
vfunc3(1, 2, 3); |
|
79 |
vfunc4(1, 2, 3, 4); |
|
80 |
vfunc5(1, 2, 3, 4, 5); |
|
81 |
vfunc6(1, 2, 3, 4, 5, 6); |
|
82 |
vfunc7(1, 2, 3, 4, 5, 6, 7); |
|
83 |
vfunc8(1, 2, 3, 4, 5, 6, 7, 8); |
|
84 |
vfunc9(1, 2, 3, 4, 5, 6, 7, 8, 9); |
|
85 |
vfunc10(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); |
|
86 |
vfunc11(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); |
|
87 |
vfunc12(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); |
|
88 |
vfunc13(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); |
|
89 |
||
90 |
vfunc1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); |
|
91 |
vfunc13(1); |