Merge: tests: Test result update for `curl_http`
[nit.git] / tests / sav / nitlight_args4.res
index 9104b4b..8bb2bc8 100644 (file)
@@ -1,66 +1,66 @@
-\e[34m# This file is part of NIT ( http://www.nitlanguage.org ).
-\e[m\e[34m#
-\e[m\e[34m# Copyright 2006-2008 Jean Privat <jean@pryen.org>
-\e[m\e[34m#
-\e[m\e[34m# Licensed under the Apache License, Version 2.0 (the "License");
-\e[m\e[34m# you may not use this file except in compliance with the License.
-\e[m\e[34m# You may obtain a copy of the License at
-\e[m\e[34m#
-\e[m\e[34m#     http://www.apache.org/licenses/LICENSE-2.0
-\e[m\e[34m#
-\e[m\e[34m# Unless required by applicable law or agreed to in writing, software
-\e[m\e[34m# distributed under the License is distributed on an "AS IS" BASIS,
-\e[m\e[34m# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-\e[m\e[34m# See the License for the specific language governing permissions and
-\e[m\e[34m# limitations under the License.
-\e[m
-\e[33mimport\e[m \e[33mend\e[m
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2006-2008 Jean Privat <jean@pryen.org>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 
-\e[33minterface\e[m \e[32mObject\e[m
-\e[33mend\e[m
+import end
 
-\e[33menum\e[m \e[32mBool\e[m
-\e[33mend\e[m
+interface Object
+end
 
-\e[33menum\e[m \e[32mInt\e[m
-       \e[33mfun\e[m output \e[33mis\e[m intern
-\e[33mend\e[m
+enum Bool
+end
 
-\e[33mclass\e[m \e[32mA\e[m
-       \e[33minit\e[m \e[33mdo\e[m \e[31m5\e[m.output
-       \e[33mfun\e[m run \e[33mdo\e[m \e[31m6\e[m.output
-\e[33mend\e[m
+enum Int
+       fun output is intern
+end
 
-\e[33mclass\e[m \e[32mB\e[m
-       \e[33mvar\e[m val: \e[32mInt\e[m
-       \e[33minit\e[m(v: \e[32mInt\e[m)
-       \e[33mdo\e[m
-               \e[31m7\e[m.output
-               \e[33mself\e[m.val = v
-       \e[33mend\e[m
-       \e[33mfun\e[m run \e[33mdo\e[m val.output
-\e[33mend\e[m
+class A
+       init do 5.output
+       fun run do 6.output
+end
 
-\e[33mclass\e[m \e[32mC\e[m
-       \e[33mvar\e[m val1: \e[32mInt\e[m
-       \e[33mvar\e[m val2: \e[32mInt\e[m = \e[31m10\e[m
-\e[33mend\e[m
+class B
+       var val: Int
+       init(v: Int)
+       do
+               7.output
+               self.val = v
+       end
+       fun run do val.output
+end
 
-\e[33mfun\e[m foo \e[33mdo\e[m \e[31m2\e[m.output
-\e[33mfun\e[m bar(i: \e[32mInt\e[m) \e[33mdo\e[m i.output
-\e[33mfun\e[m baz: \e[32mInt\e[m \e[33mdo\e[m \e[33mreturn\e[m \e[31m4\e[m
+class C
+       var val1: Int
+       var val2: Int = 10
+end
 
-\e[31m1\e[m.output
+fun foo do 2.output
+fun bar(i: Int) do i.output
+fun baz: Int do return 4
+
+1.output
 foo
-bar(\e[31m3\e[m)
+bar(3)
 baz.output
 
-\e[33mvar\e[m a = \e[33mnew\e[m \e[32mA\e[m
+var a = new A
 a.run
 
-\e[33mvar\e[m b = \e[33mnew\e[m \e[32mB\e[m(\e[31m8\e[m)
+var b = new B(8)
 b.run
 
-\e[33mvar\e[m c = \e[33mnew\e[m \e[32mC\e[m(\e[31m9\e[m)
+var c = new C(9)
 c.val1.output
 c.val2.output