Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / base_arg_named.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
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 import base_arg_default
16
17 var a = new A
18 a.foo(a=1,b=2,c=3,d=4,e=5,f=6)
19 a.foo(a=1,b=2,3,4,e=5,f=6)
20 a.foo(f=6,3,e=5,b=2,4,a=1)
21 a.foo(f=6,d=4,e=5,b=2,c=3,a=1)
22 #alt1#a.foo(3,e=5,b=2,4)
23
24 a.bar
25
26 a.bar(a=1)
27 a.bar(2,a=1)
28 a.bar(2,a=1,3)
29 a.bar(b=2)
30 a.bar(1,b=2)
31 a.bar(1,b=2,3)
32 a.bar(c=3)
33 a.bar(1,c=3)
34 a.bar(1,c=3,2)
35
36 a.bar(a=1,b=2)
37 a.bar(a=1,3,b=2)
38 a.bar(a=1,c=3)
39 a.bar(a=1,2,c=3)
40 a.bar(b=2,c=3)
41 a.bar(b=2,1,c=3)
42
43 a.bar(b=2,a=1,c=3)
44
45 #alt1#a.bar(2,a=1,3, 4)
46 #alt1#a.bar(fail=1)
47 #alt1#a.bar(a=1,a=1)