1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/* 17 * @tc.name:multiargs 18 * @tc.desc:test multiple args 19 * @tc.type: FUNC 20 * @tc.require: issueI5NO8G 21 */ 22function zero() 23{ 24 var a = ' 0\n' 25 var b = ' 000\n' 26 var c = ' 00000\n' 27 var d = '0000000' 28 print(a+b+c+d) 29} 30 31function one(x) 32{ 33 print(x) 34} 35 36function two(x,y) 37{ 38 print(x+y) 39} 40 41function three(x,y,z) 42{ 43 print(x+y+z) 44} 45 46function four(x,y,z,t) 47{ 48 print(x+y+z+t) 49} 50 51function five(x,y,z,t,a) 52{ 53 let s = x + 10*y+ 100*z + 1000*t + 10000*a 54 print(s.toString(10)) 55} 56 57zero() 58one(123456789) 59two('hello,',' world') 60three('aaa','bbb','ccc') 61 62let x = 111 63let y = 222 64let z = 333 65let a = 666 66 67four(x.toString(10),y.toString(10),z.toString(10),a.toString(10)) 68five(1,2,3,4,5)