tests: massive update of tests files
authorJean Privat <jean@pryen.org>
Mon, 6 Jul 2009 18:24:57 +0000 (14:24 -0400)
committerJean Privat <jean@pryen.org>
Mon, 6 Jul 2009 18:24:57 +0000 (14:24 -0400)
Remove some obsolete tests.
Fix broken tests.
Add missing *.sav files
Add mal *.fail files.

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

55 files changed:
tests/base_virtual_type_self.nit
tests/error_super_many.nit [deleted file]
tests/rterror_cov_param.nit [deleted file]
tests/rterror_cov_ret.nit [deleted file]
tests/rterror_deep.nit [deleted file]
tests/rterror_nilcall_attr.nit [deleted file]
tests/rterror_nilcall_mono.nit [deleted file]
tests/rterror_nilcall_poly.nit [deleted file]
tests/rterror_nilcall_undead.nit [deleted file]
tests/sav/base_closure_raf.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt1.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt10.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt11.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt12.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt13.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt14.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt15.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt2.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt3.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt4.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt5.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt6.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt7.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt8.fail [new file with mode: 0644]
tests/sav/base_closure_raf_alt9.fail [new file with mode: 0644]
tests/sav/base_primitive_null_alt1.fail [new file with mode: 0644]
tests/sav/base_primitive_null_alt2.fail [new file with mode: 0644]
tests/sav/base_primitive_null_alt3.fail [new file with mode: 0644]
tests/sav/base_sig_inh_alt1.fail [new file with mode: 0644]
tests/sav/base_virtual_type_self.fail [new file with mode: 0644]
tests/sav/base_virtual_type_self_alt1.fail [new file with mode: 0644]
tests/sav/base_virtual_type_self_alt2.fail [new file with mode: 0644]
tests/sav/base_virtual_type_self_alt3.fail [new file with mode: 0644]
tests/sav/base_virtual_type_self_alt4.fail [new file with mode: 0644]
tests/sav/base_virtual_type_self_alt5.fail [new file with mode: 0644]
tests/sav/bench_int_range_iterator.sav [new file with mode: 0644]
tests/sav/error_class_glob.fail [new file with mode: 0644]
tests/sav/error_prop_glob.fail [new file with mode: 0644]
tests/sav/error_ref_param.sav [new file with mode: 0644]
tests/sav/error_type_not_ok2.fail [new file with mode: 0644]
tests/sav/error_type_not_ok2_alt1.fail [new file with mode: 0644]
tests/sav/error_type_not_ok_alt1.fail [new file with mode: 0644]
tests/sav/module_2.fail [new file with mode: 0644]
tests/sav/shootout_pidigits.fail [new file with mode: 0644]
tests/sav/test_inheritance_raf.fail [new file with mode: 0644]
tests/sav/test_paire.fail [new file with mode: 0644]
tests/sav/test_super_explicit.sav [new file with mode: 0644]
tests/sav/test_variance_param_alt1.fail [new file with mode: 0644]
tests/sav/test_variance_param_alt2.fail [new file with mode: 0644]
tests/sav/test_variance_param_alt3.fail [new file with mode: 0644]
tests/sav/test_variance_param_alt4.fail [new file with mode: 0644]
tests/sav/test_variance_param_alt5.fail [new file with mode: 0644]
tests/sav/test_variance_param_alt6.fail [new file with mode: 0644]
tests/test_inh.nit [deleted file]
tests/test_variance_param.nit

index 7d2633c..214fa90 100644 (file)
@@ -39,7 +39,7 @@ class B
                #alt4#var a = new A[A[Int]]
                #alt5#var a = new A[A[U]]
 
-               var f: Float
+               var f: Float = 1.0
 
                a.foo(f)
                f = a.foo2
diff --git a/tests/error_super_many.nit b/tests/error_super_many.nit
deleted file mode 100644 (file)
index f0ca826..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# 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
-       fun foo
-       do
-               0.output
-       end
-end
-
-class B
-special A
-       redef fun foo
-       do
-               1.output
-       end
-end
-
-class C
-special A
-       redef fun foo
-       do
-               2.output
-       end
-end
-
-class D
-special B
-special C
-       redef fun foo
-       do
-               super
-       end
-end
diff --git a/tests/rterror_cov_param.nit b/tests/rterror_cov_param.nit
deleted file mode 100644 (file)
index 159b884..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 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
-       fun bar(a: Object)
-       do
-               a.output
-       end
-       redef fun output
-       do
-               'A'.output
-       end
-
-       fun ret_test
-       # see rterror_cov_ret
-       do
-               ret.output
-       end
-       fun ret: A
-       do
-               return self
-       end
-
-       init do end
-end
-
-class B
-special A
-       redef fun bar(a: B)
-       do
-               a.output
-       end
-       redef fun output
-       do
-               'B'.output
-       end
-       redef fun ret: B
-       do
-               return self
-       end
-
-       init do end
-end
-
-var a = new A
-var b = a
-b = new B
-b.bar(5)
diff --git a/tests/rterror_cov_ret.nit b/tests/rterror_cov_ret.nit
deleted file mode 100644 (file)
index bcdfdfe..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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 rterror_cov_param
-redef class A
-       redef fun ret: Object
-       do
-               return 5
-       end
-end
-
-var a = new A
-#a = new B
-a.ret_test
diff --git a/tests/rterror_deep.nit b/tests/rterror_deep.nit
deleted file mode 100644 (file)
index e44b923..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-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
-       fun foo(i: Int)
-       do
-               i.output
-               if i == 1 then
-                       return
-               end
-               if i % 2 == 0 then
-                       bar(i)
-               else
-                       baz(self, i)
-               end
-       end
-
-       fun bar(i: Int)
-       do
-               foo(i/2)
-       end
-
-       init do end
-end
-
-class B
-special A
-       redef fun foo(i: Int)
-       do
-               if i == 1 then
-                       var a: A
-                       a.foo(i) # Nil call
-               end
-               super
-       end
-
-       init do end
-end
-
-fun baz(a: A, i: Int)
-do
-       a.foo(i+3)
-end
-
-var a = new A
-a.foo(5)
-a = new B
-a.foo(5)
diff --git a/tests/rterror_nilcall_attr.nit b/tests/rterror_nilcall_attr.nit
deleted file mode 100644 (file)
index b18e04d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-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 Foo
-       var _attr: Object
-
-       init do 
-               _attr = 0
-       end
-end
-
-var f = new Foo
-f._attr = 1
-f._attr.output
-f = null
-f._attr = 2
-f._attr.output
diff --git a/tests/rterror_nilcall_mono.nit b/tests/rterror_nilcall_mono.nit
deleted file mode 100644 (file)
index 66aef15..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2005-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 Foo
-       fun bar
-       do
-               baz.output
-       end
-
-       fun baz: Int
-       do
-               return 5
-       end
-
-       init do end
-end
-
-var f = new Foo
-f.bar
-f = null
-f.bar
diff --git a/tests/rterror_nilcall_poly.nit b/tests/rterror_nilcall_poly.nit
deleted file mode 100644 (file)
index 6336ae9..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2005-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
-
-redef class Object
-       fun foo
-       do
-               0.output
-       end
-end
-
-redef class Int
-       redef fun foo
-       do
-               output
-       end
-end
-
-redef class Char
-       redef fun foo
-       do
-               ascii.foo
-       end
-end
-
-class Foo
-       redef fun foo
-       do
-               5.output
-       end
-
-       init do end
-end
-
-class Bar
-       redef fun foo
-       do
-               6.output
-       end
-
-       init do end
-end
-
-var a: Object
-a = new Foo
-a = new Bar
-a.foo
-a = null
-a.foo
diff --git a/tests/rterror_nilcall_undead.nit b/tests/rterror_nilcall_undead.nit
deleted file mode 100644 (file)
index f2a11bf..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
-       fun foo
-       do
-               1.output
-       end
-       fun bar: Int
-       do
-               return 2
-       end
-end
-
-var a: A = null
-a.bar.output
-a.foo
diff --git a/tests/sav/base_closure_raf.fail b/tests/sav/base_closure_raf.fail
new file mode 100644 (file)
index 0000000..1b5b3d1
--- /dev/null
@@ -0,0 +1,7 @@
+0
+10
+20
+21
+40
+5
+6
diff --git a/tests/sav/base_closure_raf_alt1.fail b/tests/sav/base_closure_raf_alt1.fail
new file mode 100644 (file)
index 0000000..6348156
--- /dev/null
@@ -0,0 +1,5 @@
+0
+10
+40
+5
+6
diff --git a/tests/sav/base_closure_raf_alt10.fail b/tests/sav/base_closure_raf_alt10.fail
new file mode 100644 (file)
index 0000000..70e905e
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt10.nit:50,3--7: Error: foo requires 1 blocks.
diff --git a/tests/sav/base_closure_raf_alt11.fail b/tests/sav/base_closure_raf_alt11.fail
new file mode 100644 (file)
index 0000000..03642ee
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt11.nit:39,8--47:14: Error: 1 automatic variable names expected, 0 found.
diff --git a/tests/sav/base_closure_raf_alt12.fail b/tests/sav/base_closure_raf_alt12.fail
new file mode 100644 (file)
index 0000000..45c88d4
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt12.nit:30,7--9: Type error: expected Int, got Char
diff --git a/tests/sav/base_closure_raf_alt13.fail b/tests/sav/base_closure_raf_alt13.fail
new file mode 100644 (file)
index 0000000..5ca9788
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt13.nit:27,3--8: Error: 'bar' arity missmatch.
diff --git a/tests/sav/base_closure_raf_alt14.fail b/tests/sav/base_closure_raf_alt14.fail
new file mode 100644 (file)
index 0000000..3eaaf00
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt14.nit:27,7--8: Type error: expected Bool, got Int
diff --git a/tests/sav/base_closure_raf_alt15.fail b/tests/sav/base_closure_raf_alt15.fail
new file mode 100644 (file)
index 0000000..1b5b3d1
--- /dev/null
@@ -0,0 +1,7 @@
+0
+10
+20
+21
+40
+5
+6
diff --git a/tests/sav/base_closure_raf_alt2.fail b/tests/sav/base_closure_raf_alt2.fail
new file mode 100644 (file)
index 0000000..e7d1878
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt2.nit:29,3--5: Error: 'bar' arity missmatch.
diff --git a/tests/sav/base_closure_raf_alt3.fail b/tests/sav/base_closure_raf_alt3.fail
new file mode 100644 (file)
index 0000000..a5e47ee
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt3.nit:31,11--15: Type error: expected expression.
diff --git a/tests/sav/base_closure_raf_alt4.fail b/tests/sav/base_closure_raf_alt4.fail
new file mode 100644 (file)
index 0000000..3123837
--- /dev/null
@@ -0,0 +1,5 @@
+0
+10
+20
+5
+6
diff --git a/tests/sav/base_closure_raf_alt5.fail b/tests/sav/base_closure_raf_alt5.fail
new file mode 100644 (file)
index 0000000..34f2509
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt5.nit:43,3--11: Error: break without value required in this block.
diff --git a/tests/sav/base_closure_raf_alt6.fail b/tests/sav/base_closure_raf_alt6.fail
new file mode 100644 (file)
index 0000000..408dba1
--- /dev/null
@@ -0,0 +1,6 @@
+0
+10
+20
+40
+5
+6
diff --git a/tests/sav/base_closure_raf_alt7.fail b/tests/sav/base_closure_raf_alt7.fail
new file mode 100644 (file)
index 0000000..717a6e6
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt7.nit:45,3--14: Error: continue without value required in this block.
diff --git a/tests/sav/base_closure_raf_alt8.fail b/tests/sav/base_closure_raf_alt8.fail
new file mode 100644 (file)
index 0000000..b6a127d
--- /dev/null
@@ -0,0 +1,4 @@
+0
+10
+20
+6
diff --git a/tests/sav/base_closure_raf_alt9.fail b/tests/sav/base_closure_raf_alt9.fail
new file mode 100644 (file)
index 0000000..93502f8
--- /dev/null
@@ -0,0 +1 @@
+alt/base_closure_raf_alt9.nit:47,3--12: Error: Return with value in a procedure.
diff --git a/tests/sav/base_primitive_null_alt1.fail b/tests/sav/base_primitive_null_alt1.fail
new file mode 100644 (file)
index 0000000..4fbbe1f
--- /dev/null
@@ -0,0 +1,16 @@
+I
+true
+true
+true
+true
+0
+B
+true
+true
+true
+true
+C
+true
+true
+true
+true
diff --git a/tests/sav/base_primitive_null_alt2.fail b/tests/sav/base_primitive_null_alt2.fail
new file mode 100644 (file)
index 0000000..c301ecc
--- /dev/null
@@ -0,0 +1,16 @@
+I
+true
+true
+true
+true
+B
+true
+true
+true
+true
+false
+C
+true
+true
+true
+true
diff --git a/tests/sav/base_primitive_null_alt3.fail b/tests/sav/base_primitive_null_alt3.fail
new file mode 100644 (file)
index 0000000..e3f7561
--- /dev/null
@@ -0,0 +1,16 @@
+I
+true
+true
+true
+true
+B
+true
+true
+true
+true
+C
+true
+true
+true
+true
+0
diff --git a/tests/sav/base_sig_inh_alt1.fail b/tests/sav/base_sig_inh_alt1.fail
new file mode 100644 (file)
index 0000000..1577c9e
--- /dev/null
@@ -0,0 +1,33 @@
+Aborted in abstract_collection::CoupleMap::(abstract_collection::MapRead::[]) (../bin/../lib/standard//abstract_collection.nit:384)
+,---- Stack trace -- - -  -
+| abstract_collection::CoupleMap::(abstract_collection::MapRead::[]) (../bin/../lib/standard//abstract_collection.nit:380)
+| abstractmetamodel::MMModule::class_by_name (./metamodel//abstractmetamodel.nit:214)
+| syntax_base::AbsSyntaxVisitor::type_array (./syntax//syntax_base.nit:299)
+| mmbuilder::PParam::(mmbuilder::PNode::accept_property_verifier) (./syntax//mmbuilder.nit:1166)
+| mmbuilder::PropertyVerifierVisitor::(parser_prod::Visitor::visit) (./syntax//mmbuilder.nit:371)
+| parser_prod::ASignature::(parser_prod::PNode::visit_all) (./parser//parser_prod.nit:3775)
+| syntax_base::PNode::accept_abs_syntax_visitor (./syntax//syntax_base.nit:445)
+| mmbuilder::PNode::accept_property_verifier (./syntax//mmbuilder.nit:409)
+| mmbuilder::ASignature::(mmbuilder::PNode::accept_property_verifier) (./syntax//mmbuilder.nit:1114)
+| mmbuilder::PropertyVerifierVisitor::(parser_prod::Visitor::visit) (./syntax//mmbuilder.nit:371)
+| parser_prod::AConcreteMethPropdef::(parser_prod::PNode::visit_all) (./parser//parser_prod.nit:2347)
+| syntax_base::PNode::accept_abs_syntax_visitor (./syntax//syntax_base.nit:445)
+| mmbuilder::AMethPropdef::(syntax_base::PNode::accept_abs_syntax_visitor) (./syntax//mmbuilder.nit:1034)
+| mmbuilder::PNode::accept_property_verifier (./syntax//mmbuilder.nit:409)
+| mmbuilder::AMethPropdef::(mmbuilder::PNode::accept_property_verifier) (./syntax//mmbuilder.nit:1014)
+| mmbuilder::PropertyVerifierVisitor::(parser_prod::Visitor::visit) (./syntax//mmbuilder.nit:371)
+| parser_prod::ATopClassdef::(parser_prod::PNode::visit_all) (./parser//parser_prod.nit:881)
+| syntax_base::PNode::accept_abs_syntax_visitor (./syntax//syntax_base.nit:445)
+| mmbuilder::PClassdef::(syntax_base::PNode::accept_abs_syntax_visitor) (./syntax//mmbuilder.nit:547)
+| mmbuilder::PNode::accept_property_verifier (./syntax//mmbuilder.nit:409)
+| mmbuilder::PropertyVerifierVisitor::(parser_prod::Visitor::visit) (./syntax//mmbuilder.nit:371)
+| mmbuilder::MMSrcLocalClass::(mmbuilder::MMLocalClass::accept_properties_visitor) (./syntax//mmbuilder.nit:144)
+| mmbuilder::MMSrcModule::do_mmbuilder (./syntax//mmbuilder.nit:36)
+| syntax::MMSrcModule::process_syntax (./syntax//syntax.nit:66)
+| syntax::SrcModuleLoader::(mmloader::ModuleLoader::process_metamodel) (./syntax//syntax.nit:49)
+| mmloader::ModuleLoader::load_and_process_module (./mmloader.nit:277)
+| mmloader::ToolContext::try_to_load (./mmloader.nit:129)
+| mmloader::ToolContext::get_module_from_filename (./mmloader.nit:175)
+| abstracttool::AbstractCompiler::exec_cmd_line (./abstracttool.nit:40)
+| nitc::Sys::(kernel::Sys::main) (./nitc.nit:105)
+`------------------- - -  -
diff --git a/tests/sav/base_virtual_type_self.fail b/tests/sav/base_virtual_type_self.fail
new file mode 100644 (file)
index 0000000..e35355b
--- /dev/null
@@ -0,0 +1,4 @@
+./base_virtual_type_self.nit:44,3--3: Error: Method or variable 'a' unknown in B.
+./base_virtual_type_self.nit:45,7--7: Error: Method or variable 'a' unknown in B.
+./base_virtual_type_self.nit:46,3--3: Error: Method or variable 'a' unknown in B.
+./base_virtual_type_self.nit:47,7--7: Error: Method or variable 'a' unknown in B.
diff --git a/tests/sav/base_virtual_type_self_alt1.fail b/tests/sav/base_virtual_type_self_alt1.fail
new file mode 100644 (file)
index 0000000..1996d7d
--- /dev/null
@@ -0,0 +1,4 @@
+alt/base_virtual_type_self_alt1.nit:44,9--9: Type error: expected Int, got Float
+alt/base_virtual_type_self_alt1.nit:45,7--12: Type error: expected Float, got Int
+alt/base_virtual_type_self_alt1.nit:46,9--9: Type error: expected A[T], got Float
+alt/base_virtual_type_self_alt1.nit:47,7--12: Type error: expected Float, got A[T]
diff --git a/tests/sav/base_virtual_type_self_alt2.fail b/tests/sav/base_virtual_type_self_alt2.fail
new file mode 100644 (file)
index 0000000..c55efd8
--- /dev/null
@@ -0,0 +1,4 @@
+alt/base_virtual_type_self_alt2.nit:44,9--9: Type error: expected Int, got Float
+alt/base_virtual_type_self_alt2.nit:45,7--12: Type error: expected Float, got Int
+alt/base_virtual_type_self_alt2.nit:46,9--9: Type error: expected A[T], got Float
+alt/base_virtual_type_self_alt2.nit:47,7--12: Type error: expected Float, got A[T]
diff --git a/tests/sav/base_virtual_type_self_alt3.fail b/tests/sav/base_virtual_type_self_alt3.fail
new file mode 100644 (file)
index 0000000..71d3ee3
--- /dev/null
@@ -0,0 +1,4 @@
+alt/base_virtual_type_self_alt3.nit:44,9--9: Type error: expected Int, got Float
+alt/base_virtual_type_self_alt3.nit:45,7--12: Type error: expected Float, got Int
+alt/base_virtual_type_self_alt3.nit:46,9--9: Type error: expected A[T], got Float
+alt/base_virtual_type_self_alt3.nit:47,7--12: Type error: expected Float, got A[T]
diff --git a/tests/sav/base_virtual_type_self_alt4.fail b/tests/sav/base_virtual_type_self_alt4.fail
new file mode 100644 (file)
index 0000000..ab7b629
--- /dev/null
@@ -0,0 +1,4 @@
+alt/base_virtual_type_self_alt4.nit:44,9--9: Type error: expected A[Int], got Float
+alt/base_virtual_type_self_alt4.nit:45,7--12: Type error: expected Float, got A[Int]
+alt/base_virtual_type_self_alt4.nit:46,9--9: Type error: expected A[T], got Float
+alt/base_virtual_type_self_alt4.nit:47,7--12: Type error: expected Float, got A[T]
diff --git a/tests/sav/base_virtual_type_self_alt5.fail b/tests/sav/base_virtual_type_self_alt5.fail
new file mode 100644 (file)
index 0000000..71fe8ef
--- /dev/null
@@ -0,0 +1,4 @@
+alt/base_virtual_type_self_alt5.nit:44,9--9: Type error: expected A[U], got Float
+alt/base_virtual_type_self_alt5.nit:45,7--12: Type error: expected Float, got A[U]
+alt/base_virtual_type_self_alt5.nit:46,9--9: Type error: expected A[T], got Float
+alt/base_virtual_type_self_alt5.nit:47,7--12: Type error: expected Float, got A[T]
diff --git a/tests/sav/bench_int_range_iterator.sav b/tests/sav/bench_int_range_iterator.sav
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/tests/sav/error_class_glob.fail b/tests/sav/error_class_glob.fail
new file mode 100644 (file)
index 0000000..ff05281
--- /dev/null
@@ -0,0 +1 @@
+./tests.sh: line 119: ./error_class_glob.bin: No such file or directory
diff --git a/tests/sav/error_prop_glob.fail b/tests/sav/error_prop_glob.fail
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/sav/error_ref_param.sav b/tests/sav/error_ref_param.sav
new file mode 100644 (file)
index 0000000..08bbdf4
--- /dev/null
@@ -0,0 +1 @@
+./error_ref_param.nit:20,2--17: Redef error: Expected B (as in C::r), got C in C::r.
diff --git a/tests/sav/error_type_not_ok2.fail b/tests/sav/error_type_not_ok2.fail
new file mode 100644 (file)
index 0000000..4d19b73
--- /dev/null
@@ -0,0 +1,16 @@
+./error_type_not_ok2.nit:21,15: Type error: class Fail not found in module error_type_not_ok2.
+Cast failled in static_type::MMAncestor::stype (./metamodel//static_type.nit:265)
+,---- Stack trace -- - -  -
+| static_type::MMAncestor::stype (./metamodel//static_type.nit:264)
+| inheritance::MMAncestor::add_in (./metamodel//inheritance.nit:384)
+| inheritance::MMLocalClass::build_ancestors (./metamodel//inheritance.nit:243)
+| inheritance::MMLocalClass::compute_ancestors (./metamodel//inheritance.nit:90)
+| mmbuilder::MMSrcModule::do_mmbuilder (./syntax//mmbuilder.nit:36)
+| syntax::MMSrcModule::process_syntax (./syntax//syntax.nit:66)
+| syntax::SrcModuleLoader::(mmloader::ModuleLoader::process_metamodel) (./syntax//syntax.nit:49)
+| mmloader::ModuleLoader::load_and_process_module (./mmloader.nit:277)
+| mmloader::ToolContext::try_to_load (./mmloader.nit:129)
+| mmloader::ToolContext::get_module_from_filename (./mmloader.nit:175)
+| abstracttool::AbstractCompiler::exec_cmd_line (./abstracttool.nit:40)
+| nitc::Sys::(kernel::Sys::main) (./nitc.nit:105)
+`------------------- - -  -
diff --git a/tests/sav/error_type_not_ok2_alt1.fail b/tests/sav/error_type_not_ok2_alt1.fail
new file mode 100644 (file)
index 0000000..53d3cc3
--- /dev/null
@@ -0,0 +1,16 @@
+alt/error_type_not_ok2_alt1.nit:21,15--18: Type error: 'Fail' is a generic class.
+Cast failled in static_type::MMAncestor::stype (./metamodel//static_type.nit:265)
+,---- Stack trace -- - -  -
+| static_type::MMAncestor::stype (./metamodel//static_type.nit:264)
+| inheritance::MMAncestor::add_in (./metamodel//inheritance.nit:384)
+| inheritance::MMLocalClass::build_ancestors (./metamodel//inheritance.nit:243)
+| inheritance::MMLocalClass::compute_ancestors (./metamodel//inheritance.nit:90)
+| mmbuilder::MMSrcModule::do_mmbuilder (./syntax//mmbuilder.nit:36)
+| syntax::MMSrcModule::process_syntax (./syntax//syntax.nit:66)
+| syntax::SrcModuleLoader::(mmloader::ModuleLoader::process_metamodel) (./syntax//syntax.nit:49)
+| mmloader::ModuleLoader::load_and_process_module (./mmloader.nit:277)
+| mmloader::ToolContext::try_to_load (./mmloader.nit:129)
+| mmloader::ToolContext::get_module_from_filename (./mmloader.nit:175)
+| abstracttool::AbstractCompiler::exec_cmd_line (./abstracttool.nit:40)
+| nitc::Sys::(kernel::Sys::main) (./nitc.nit:105)
+`------------------- - -  -
diff --git a/tests/sav/error_type_not_ok_alt1.fail b/tests/sav/error_type_not_ok_alt1.fail
new file mode 100644 (file)
index 0000000..3c42717
--- /dev/null
@@ -0,0 +1,16 @@
+alt/error_type_not_ok_alt1.nit:21,9--12: Type error: 'Fail' is a generic class.
+Cast failled in static_type::MMAncestor::stype (./metamodel//static_type.nit:265)
+,---- Stack trace -- - -  -
+| static_type::MMAncestor::stype (./metamodel//static_type.nit:264)
+| inheritance::MMAncestor::add_in (./metamodel//inheritance.nit:384)
+| inheritance::MMLocalClass::build_ancestors (./metamodel//inheritance.nit:243)
+| inheritance::MMLocalClass::compute_ancestors (./metamodel//inheritance.nit:90)
+| mmbuilder::MMSrcModule::do_mmbuilder (./syntax//mmbuilder.nit:36)
+| syntax::MMSrcModule::process_syntax (./syntax//syntax.nit:66)
+| syntax::SrcModuleLoader::(mmloader::ModuleLoader::process_metamodel) (./syntax//syntax.nit:49)
+| mmloader::ModuleLoader::load_and_process_module (./mmloader.nit:277)
+| mmloader::ToolContext::try_to_load (./mmloader.nit:129)
+| mmloader::ToolContext::get_module_from_filename (./mmloader.nit:175)
+| abstracttool::AbstractCompiler::exec_cmd_line (./abstracttool.nit:40)
+| nitc::Sys::(kernel::Sys::main) (./nitc.nit:105)
+`------------------- - -  -
diff --git a/tests/sav/module_2.fail b/tests/sav/module_2.fail
new file mode 100644 (file)
index 0000000..c63d0ac
--- /dev/null
@@ -0,0 +1 @@
+Fatal error: inherit_local_property error
diff --git a/tests/sav/shootout_pidigits.fail b/tests/sav/shootout_pidigits.fail
new file mode 100644 (file)
index 0000000..6225592
--- /dev/null
@@ -0,0 +1,100 @@
+3140000000     :10
+0000000000     :20
+0000000000     :30
+1100000000     :40
+0000000000     :50
+0000000000     :60
+1100000000     :70
+0000000000     :80
+0000000000     :90
+1100000000     :100
+0000000000     :110
+0000000000     :120
+1100000000     :130
+0000000000     :140
+0000000000     :150
+1100000000     :160
+0000000000     :170
+0000000000     :180
+1100000000     :190
+0000000000     :200
+0000000000     :210
+1100000000     :220
+0000000000     :230
+0000000000     :240
+1100000000     :250
+0000000000     :260
+0000000000     :270
+1100000000     :280
+0000000000     :290
+0000000000     :300
+1100000000     :310
+0000000000     :320
+0000000000     :330
+1100000000     :340
+0000000000     :350
+0000000000     :360
+1100000000     :370
+0000000000     :380
+0000000000     :390
+1100000000     :400
+0000000000     :410
+0000000000     :420
+1100000000     :430
+0000000000     :440
+0000000000     :450
+1100000000     :460
+0000000000     :470
+0000000000     :480
+1100000000     :490
+0000000000     :500
+0000000000     :510
+1100000000     :520
+0000000000     :530
+0000000000     :540
+1100000000     :550
+0000000000     :560
+0000000000     :570
+1100000000     :580
+0000000000     :590
+0000000000     :600
+1100000000     :610
+0000000000     :620
+0000000000     :630
+1100000000     :640
+0000000000     :650
+0000000000     :660
+1100000000     :670
+0000000000     :680
+0000000000     :690
+1100000000     :700
+0000000000     :710
+0000000000     :720
+1100000000     :730
+0000000000     :740
+0000000000     :750
+1100000000     :760
+0000000000     :770
+0000000000     :780
+1100000000     :790
+0000000000     :800
+0000000000     :810
+1100000000     :820
+0000000000     :830
+0000000000     :840
+1100000000     :850
+0000000000     :860
+0000000000     :870
+1100000000     :880
+0000000000     :890
+0000000000     :900
+1100000000     :910
+0000000000     :920
+0000000000     :930
+1100000000     :940
+0000000000     :950
+0000000000     :960
+1100000000     :970
+0000000000     :980
+0000000000     :990
+1100000000     :1000
diff --git a/tests/sav/test_inheritance_raf.fail b/tests/sav/test_inheritance_raf.fail
new file mode 100644 (file)
index 0000000..c63d0ac
--- /dev/null
@@ -0,0 +1 @@
+Fatal error: inherit_local_property error
diff --git a/tests/sav/test_paire.fail b/tests/sav/test_paire.fail
new file mode 100644 (file)
index 0000000..2aca21f
--- /dev/null
@@ -0,0 +1,2 @@
+./test_paire.nit:45,1--50:43: Error: A class Pair is already defined at line 17.
+./test_paire.nit:54,1--58:25: Error: A class Pair is already defined at line 17.
diff --git a/tests/sav/test_super_explicit.sav b/tests/sav/test_super_explicit.sav
new file mode 100644 (file)
index 0000000..45ed075
--- /dev/null
@@ -0,0 +1,12 @@
+11
+1
+10
+2
+12
+1
+10
+2
+13
+1
+10
+2
diff --git a/tests/sav/test_variance_param_alt1.fail b/tests/sav/test_variance_param_alt1.fail
new file mode 100644 (file)
index 0000000..329511a
--- /dev/null
@@ -0,0 +1,18 @@
+AB5
+B5
+5
+AB5
+5
+5
+5
+5
+5
+B5
+5
+5
+5
+5
+5
+5
+5
+5
diff --git a/tests/sav/test_variance_param_alt2.fail b/tests/sav/test_variance_param_alt2.fail
new file mode 100644 (file)
index 0000000..4ac4e3c
--- /dev/null
@@ -0,0 +1,18 @@
+AB5
+B5
+5
+B5
+B5
+5
+5
+5
+5
+B5
+5
+5
+5
+5
+5
+5
+5
+5
diff --git a/tests/sav/test_variance_param_alt3.fail b/tests/sav/test_variance_param_alt3.fail
new file mode 100644 (file)
index 0000000..fab8897
--- /dev/null
@@ -0,0 +1,18 @@
+AB5
+B5
+5
+B5
+5
+5
+A5
+5
+5
+B5
+5
+5
+5
+5
+5
+5
+5
+5
diff --git a/tests/sav/test_variance_param_alt4.fail b/tests/sav/test_variance_param_alt4.fail
new file mode 100644 (file)
index 0000000..bd44b47
--- /dev/null
@@ -0,0 +1,18 @@
+AB5
+B5
+5
+B5
+5
+5
+B5
+5
+5
+B5
+5
+5
+5
+5
+5
+5
+5
+5
diff --git a/tests/sav/test_variance_param_alt5.fail b/tests/sav/test_variance_param_alt5.fail
new file mode 100644 (file)
index 0000000..7d83e9e
--- /dev/null
@@ -0,0 +1,18 @@
+AB5
+B5
+5
+B5
+5
+5
+5
+B5
+5
+B5
+5
+5
+5
+5
+5
+5
+5
+5
diff --git a/tests/sav/test_variance_param_alt6.fail b/tests/sav/test_variance_param_alt6.fail
new file mode 100644 (file)
index 0000000..7494b82
--- /dev/null
@@ -0,0 +1,18 @@
+AB5
+B5
+5
+B5
+5
+5
+5
+5
+5
+B5
+5
+5
+B5
+5
+5
+5
+5
+5
diff --git a/tests/test_inh.nit b/tests/test_inh.nit
deleted file mode 100644 (file)
index 7be7f1a..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2004-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 end
-
-# Base Classes
-
-class Object
-end
-
-class Hashable
-special Object
-end
-# Ancestor:    "Object" on "Hashable"
-
-class Comparable
-special Object
-end
-
-class Int
-special Hashable
-special Comparable
-end
-
-# Complex Classes
-
-class Pair[E]
-special Object
-end
-class Pair[F: Hashable]
-special Hashable
-end
-# Ancestor:    "ANY": "Object" on "Pair[E: Object]"
-#              "HASHABLE": "Hashable" on "Pair[F: Hashable]"
-
-class PairCmp[G: Comparable]
-special Pair[G]
-special Comparable
-end
-# Ancestor:    "PAIR": "Pair[G]" on "PairCmp[G: Comparable]"
-#      =>      "ANY": "Object" on "PairCmp[G: Comparable]"
-#      =>      "HASHABLE": "Hashable" on "PairCmp[G: Comparable+Hahsable]"
-# Ancestor:    "COMPARABLE": "Comparable" on "PairCmp[G: Comparable]"
-
-class Complex
-special PairCmp[Int]
-end
-# Ancestor:    "PAIRCMP": "PairCmp[Int]" on "Complex"
-#      =>      "PAIR": "Pair[Int]" on "Complex"
-#      =>      "ANY": "Object" on "Complex"
-#      =>      "HASHABLE": "Hashable" on "Complex"
-
-# Un ancètre d'une classe c est un couple de types (ancetre, héritier) où héritier est dérivé de c
-# les ancètres indirects de c par la filiation (a, h) sont
-# pour chaque ancètres (aa, ha) de la classe de a
-# 
-
-# un type a un contexte. 
-# Les ancetres d'une classes c sont un tas de types dont le contexte est dérivé de la classe c
-
-
-# application: type1 x type2 x type3 -> type4 (ex "A[U]" x "A[E: T]" x "B[E,C]" -> "B[U,C]")
-#   * map: type1 x type2 -> hash (ex "A[U] x A[E: T]" -> {E->U})
-#   * betared: hash x type3 -> type4 (ex {E->U} x "B[E,C]" -> "B[U,C]"
-#   * application(x,y,z) = betared(map(x,y), z)
-# remarques : 
-#   * type2 est la liste des parametres formels
-#   * type1 peut contenir des paramètres formels
-# ... l'application est plus compliquée
-
-# application("Pair[Comparable]", "Pair[E: Comparable]", )
index 679fa68..00009d2 100644 (file)
 class A
        type T: A
        type U: B
-       fun foo(a: T) do a.output
-       fun bar(b: U) do b.output
-       fun baz(i: Int) do i.output
-       redef fun output do 'A'.output
+       fun foo(a: T) do a.out
+       fun bar(b: U) do b.out
+       fun baz(i: Int) do i.out
+       fun out do 'A'.output
 
        init do end
 end
@@ -29,10 +29,10 @@ class B
 special A
        redef type T: B
        redef type U: Int
-       redef fun foo(a: T) do a.output
-       redef fun bar(b: U) do b.output
-       redef fun baz(i: Int) do i.output
-       redef fun output do 'B'.output
+       redef fun foo(a: T) do a.out
+       redef fun bar(b: U) do b.out
+       redef fun baz(i: Int) do i.out
+       redef fun out do 'B'.output
 
        init do end
 end
@@ -40,9 +40,19 @@ end
 redef class Int
 special B
        redef type T: Int
-       redef fun foo(a: T) do a.output
-       redef fun bar(b: U) do b.output
+       redef fun foo(a: T) do a.out
+       redef fun bar(b: U) do b.out
        redef fun output is intern
+       redef fun out
+       do
+               var i: Object = self
+               if i isa Int then
+                       i.output
+               else
+                       'X'.output
+               end
+       end
+
 end
 
 var a = new A