aoqi@0: /* aoqi@0: * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. attila@962: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. attila@962: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). attila@962: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. attila@962: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: */ aoqi@0: aoqi@0: /** aoqi@0: * arity test. aoqi@0: * aoqi@0: * @test attila@962: * @run aoqi@0: */ aoqi@0: aoqi@0: function func1(a) { print(a); } aoqi@0: function func2(a, b) { print(a, b); } aoqi@0: function func3(a, b, c) { print(a, b, c); } aoqi@0: function func4(a, b, c, d) { print(a, b, c, d); } aoqi@0: function func5(a, b, c, d, e) { print(a, b, c, d, e); } aoqi@0: function func6(a, b, c, d, e, f) { print(a, b, c, d, e, f); } aoqi@0: function func7(a, b, c, d, e, f, g) { print(a, b, c, d, e, f, g); } aoqi@0: function func8(a, b, c, d, e, f, g, h) { print(a, b, c, d, e, f, g, h); } aoqi@0: function func9(a, b, c, d, e, f, g, h, i) { print(a, b, c, d, e, f, g, h, i); } aoqi@0: function func10(a, b, c, d, e, f, g, h, i, j) { print(a, b, c, d, e, f, g, h, i, j); } aoqi@0: 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); } aoqi@0: 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); } aoqi@0: 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); } aoqi@0: aoqi@0: function vfunc1(a) { print(a); arguments; } aoqi@0: function vfunc2(a, b) { print(a, b); arguments; } aoqi@0: function vfunc3(a, b, c) { print(a, b, c); arguments; } aoqi@0: function vfunc4(a, b, c, d) { print(a, b, c, d); arguments; } aoqi@0: function vfunc5(a, b, c, d, e) { print(a, b, c, d, e); arguments; } aoqi@0: function vfunc6(a, b, c, d, e, f) { print(a, b, c, d, e, f); arguments; } aoqi@0: function vfunc7(a, b, c, d, e, f, g) { print(a, b, c, d, e, f, g); arguments; } aoqi@0: function vfunc8(a, b, c, d, e, f, g, h) { print(a, b, c, d, e, f, g, h); arguments; } aoqi@0: function vfunc9(a, b, c, d, e, f, g, h, i) { print(a, b, c, d, e, f, g, h, i); arguments; } aoqi@0: function vfunc10(a, b, c, d, e, f, g, h, i, j) { print(a, b, c, d, e, f, g, h, i, j); arguments; } aoqi@0: 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; } aoqi@0: 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; } aoqi@0: 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; } aoqi@0: aoqi@0: func1(1); aoqi@0: func2(1, 2); aoqi@0: func3(1, 2, 3); aoqi@0: func4(1, 2, 3, 4); aoqi@0: func5(1, 2, 3, 4, 5); aoqi@0: func6(1, 2, 3, 4, 5, 6); aoqi@0: func7(1, 2, 3, 4, 5, 6, 7); aoqi@0: func8(1, 2, 3, 4, 5, 6, 7, 8); aoqi@0: func9(1, 2, 3, 4, 5, 6, 7, 8, 9); aoqi@0: func10(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); aoqi@0: func11(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); aoqi@0: func12(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); aoqi@0: func13(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); aoqi@0: aoqi@0: func1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); aoqi@0: func13(1); aoqi@0: aoqi@0: vfunc1(1); aoqi@0: vfunc2(1, 2); aoqi@0: vfunc3(1, 2, 3); aoqi@0: vfunc4(1, 2, 3, 4); aoqi@0: vfunc5(1, 2, 3, 4, 5); aoqi@0: vfunc6(1, 2, 3, 4, 5, 6); aoqi@0: vfunc7(1, 2, 3, 4, 5, 6, 7); aoqi@0: vfunc8(1, 2, 3, 4, 5, 6, 7, 8); aoqi@0: vfunc9(1, 2, 3, 4, 5, 6, 7, 8, 9); aoqi@0: vfunc10(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); aoqi@0: vfunc11(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); aoqi@0: vfunc12(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); aoqi@0: vfunc13(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); aoqi@0: aoqi@0: vfunc1(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); aoqi@0: vfunc13(1);