tests: remove implicit importation of standard on some `base` tests
authorJean Privat <jean@pryen.org>
Fri, 17 Jan 2014 19:22:01 +0000 (14:22 -0500)
committerJean Privat <jean@pryen.org>
Fri, 17 Jan 2014 19:22:01 +0000 (14:22 -0500)
1. it simplifies the requirement of the test (test more minimal)
2. it make tests slightly faster

Signed-off-by: Jean Privat <jean@pryen.org>

tests/base_attr_gen.nit
tests/base_class_name.nit
tests/sav/base_attr_gen.res
tests/sav/base_attr_gen_alt1.res
tests/sav/nitg-e/fixme/base_attr_gen_alt1.res

index 480c5ee..8a8a346 100644 (file)
@@ -1,3 +1,21 @@
+# 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.
+
+import kernel
+
 class A[E]
        var e: E
        init do end
index 6866ca0..95dbdbc 100644 (file)
@@ -14,6 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import string
+
 class Test end
 class MyArray[E] end
 
@@ -26,10 +28,16 @@ var test2: Object = new Test
 var test3 = new MyArray[Int]
 var test4 = new Toto
 
-print "".class_name
-print 1.class_name
+"".class_name.output
+'\n'.output
+1.class_name.output
+'\n'.output
 
-print test1.class_name
-print test2.class_name
-print test3.class_name
-print test4.class_name
+test1.class_name.output
+'\n'.output
+test2.class_name.output
+'\n'.output
+test3.class_name.output
+'\n'.output
+test4.class_name.output
+'\n'.output
index 56618fe..afe7755 100644 (file)
@@ -1 +1 @@
-Runtime error: Reciever is null (base_attr_gen.nit:8)
+Runtime error: Reciever is null (base_attr_gen.nit:26)
index 72f3c0b..8b464b6 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @e (alt/base_attr_gen_alt1.nit:7)
+Runtime error: Uninitialized attribute @e (alt/base_attr_gen_alt1.nit:25)
index 2b323b6..3b45242 100644 (file)
@@ -1 +1 @@
-Runtime error: Cast failed (alt/base_attr_gen_alt1.nit:8)
+Runtime error: Cast failed (alt/base_attr_gen_alt1.nit:26)