Merge: Tests nitg --semi-global
authorJean Privat <jean@pryen.org>
Thu, 19 Jun 2014 15:01:24 +0000 (11:01 -0400)
committerJean Privat <jean@pryen.org>
Thu, 19 Jun 2014 15:01:24 +0000 (11:01 -0400)
Some work and cleanup on tests.sh and cie.
Also add a new engine `nitg-sg` that is `nitg --semi-global`

Pull-Request: #513
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

110 files changed:
tests/base_covar_int2.nit
tests/base_inline.nit
tests/base_inline_nested.nit
tests/base_output_class_name.nit
tests/base_var_null2.nit
tests/bench_tak.nit
tests/nitg-e.skip
tests/nitg-g.skip
tests/nitg-s.skip
tests/nitg-sg.skip [new file with mode: 0644]
tests/niti.skip
tests/rterror_attr_def.nit
tests/sav/base_covar_int2.res
tests/sav/base_output_class_name.res
tests/sav/base_var_null2.res
tests/sav/base_var_null2_1alt3.res
tests/sav/base_var_null2_1alt3_alt2.res
tests/sav/base_var_null2_alt1.res
tests/sav/base_var_null2_alt2.res
tests/sav/bench_tak.res
tests/sav/fixme/base_inline.res [new file with mode: 0644]
tests/sav/fixme/base_inline_nested.res [new file with mode: 0644]
tests/sav/fixme/base_inline_nested2.res [new file with mode: 0644]
tests/sav/fixme/zzz_test_fixme.res [new file with mode: 0644]
tests/sav/fixme/zzz_test_fixme_changed.res [new file with mode: 0644]
tests/sav/fixme/zzz_test_fixme_remains.res [new file with mode: 0644]
tests/sav/mnit.res [new file with mode: 0644]
tests/sav/nitg-e/base_output_class_name.res
tests/sav/nitg-e/fixme/base_covar_int2_alt1.res
tests/sav/nitg-e/fixme/base_covar_int2_alt3.res
tests/sav/nitg-e/fixme/base_covar_int2_alt5.res
tests/sav/nitg-e/fixme/converter.res [new file with mode: 0644]
tests/sav/nitg-e/fixme/pnacl.res [new file with mode: 0644]
tests/sav/nitg-g/fixme/base_covar_int2_alt3.res
tests/sav/nitg-g/fixme/base_covar_int2_alt5.res
tests/sav/nitg-g/fixme/pnacl.res [new file with mode: 0644]
tests/sav/nitg-s/fixme/base_covar_int2_alt1.res
tests/sav/nitg-s/fixme/base_covar_int2_alt3.res
tests/sav/nitg-s/fixme/base_covar_int2_alt5.res
tests/sav/nitg-s/fixme/converter.res [new file with mode: 0644]
tests/sav/nitg-s/fixme/pnacl.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_gen_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_init_val_raf_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt2.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt3.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt4.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt5.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_conflict_submodule_name.res [moved from tests/sav/nitg-g/fixme/mnit.res with 100% similarity]
tests/sav/nitg-sg/fixme/base_conflict_submodule_name_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_conflict_submodule_name_alt2.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_covar_int2_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_covar_int2_alt3.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_covar_int2_alt5.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_covar_int_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_covar_int_alt3.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_covar_int_alt5.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_gen_infinite.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_gen_variance3_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_gen_variance_int_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_virtual_int2_alt2.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/base_virtual_type_variance_int_alt1.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/pnacl.res [new file with mode: 0644]
tests/sav/nitg-sg/fixme/test_gen.res [new file with mode: 0644]
tests/sav/niti/rterror_attr_def_alt7.res
tests/sav/rterror_attr_def.res
tests/sav/rterror_attr_def_alt7.res
tests/sav/rterror_attr_def_alt8.res
tests/sav/shootout_mandelbrot_args1.res
tests/sav/test_accessor.res [deleted file]
tests/sav/test_array.res [deleted file]
tests/sav/test_array_int.res [deleted file]
tests/sav/test_attr.res [deleted file]
tests/sav/test_attr_long.res [deleted file]
tests/sav/test_blocks.res [deleted file]
tests/sav/test_cond.res [deleted file]
tests/sav/test_gets.res
tests/sav/test_meta.res [deleted file]
tests/sav/test_obj.res [deleted file]
tests/sav/test_operator_brackets.res
tests/sav/test_string.res [deleted file]
tests/sav/zzz_test_fail.res [new file with mode: 0644]
tests/sav/zzz_test_fixme_changed.res [new file with mode: 0644]
tests/sav/zzz_test_fixme_remains.res [new file with mode: 0644]
tests/sav/zzz_test_ok.res [new file with mode: 0644]
tests/sav/zzz_test_soso.res [new file with mode: 0644]
tests/shootout_mandelbrot.nit
tests/test_accessor.nit [deleted file]
tests/test_array.nit [deleted file]
tests/test_array_int.nit [deleted file]
tests/test_attr.nit [deleted file]
tests/test_attr_long.nit [deleted file]
tests/test_blocks.nit [deleted file]
tests/test_cond.nit [deleted file]
tests/test_gets.nit
tests/test_meta.nit [deleted file]
tests/test_obj.nit [deleted file]
tests/test_operator_brackets.nit
tests/test_string.nit [deleted file]
tests/testall.sh
tests/tests.sh
tests/zzz_tests/zzz_test_0k.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_fail.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_fixme.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_fixme_changed.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_fixme_remains.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_nosav.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_ok.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_soso.nit [new file with mode: 0644]
tests/zzz_tests/zzz_test_todo.nit [new file with mode: 0644]

index 550f651..cb8bdc9 100644 (file)
@@ -44,3 +44,4 @@ d1.foo(d2).output
 #alt4#1.foo(c2).output
 #alt5#d1.foo(c2).output
 c1.foo(c2).output
+'\n'.output
index e684f95..1f31600 100644 (file)
@@ -18,7 +18,7 @@ import kernel
 
 interface Inline__
        fun foo do 1.output
-       fun bar: Int = 2
+       fun bar: Int do return 2
 end
 
 class A
index 44867dd..90d344a 100644 (file)
@@ -18,7 +18,7 @@ import kernel
 
 interface Inline__
        fun foo do bar.output
-       fun bar: Int = 2
+       fun bar: Int do return 2
        fun baz is abstract
 end
 
index 4776e65..f5fae31 100644 (file)
@@ -34,3 +34,4 @@ test1.output_class_name
 test2.output_class_name
 test3.output_class_name
 test4.output_class_name
+'\n'.output
index 084a19a..1b41bcc 100644 (file)
@@ -21,6 +21,7 @@ do
        if i == 2 then a = 2
        #1alt3#if i == 3 then a = '3'
        if a == null then 0.output else a.output
+       '\n'.output
 end
 
 test(1)
index 3ffaaf1..d5be5e8 100644 (file)
@@ -27,4 +27,4 @@ do
        end
 end
 
-printn(tak(37,12,6))
+print(tak(37,12,6))
index 6aac93a..c782ec0 100644 (file)
@@ -1,6 +1,2 @@
 init_inherit
 init_linext
-inline
-test_json
-converter
-pnacl
index c626285..fb091a0 100644 (file)
@@ -1,6 +1,3 @@
 init_inherit
 init_linext
-inline
 nitg
-mnit
-pnacl
index 6aac93a..c782ec0 100644 (file)
@@ -1,6 +1,2 @@
 init_inherit
 init_linext
-inline
-test_json
-converter
-pnacl
diff --git a/tests/nitg-sg.skip b/tests/nitg-sg.skip
new file mode 100644 (file)
index 0000000..c782ec0
--- /dev/null
@@ -0,0 +1,2 @@
+init_inherit
+init_linext
index 7c2762c..afed2b6 100644 (file)
@@ -1,6 +1,5 @@
 init_inherit
 init_linext
-inline
 test_mem
 shoot_logic
 bench_
index 203f759..744ff2b 100644 (file)
@@ -45,6 +45,7 @@ class B
        fun foo
        do
                self.o.output
+               '\n'.output
                self.a.output
                self.b.output
                #alt2#self.c.output
@@ -57,3 +58,4 @@ end
 
 var b = new B
 b.foo
+'\n'.output
index 33afcf3..f916ec6 100644 (file)
@@ -1,4 +1,4 @@
 1
 1
 1
-a
\ No newline at end of file
+a
index cd2b594..611cfdb 100644 (file)
@@ -3,4 +3,4 @@ Int
 Test
 Test
 MyArray[Int]
-0
\ No newline at end of file
+0
index 5f5fbe7..7e7bac6 100644 (file)
@@ -1,3 +1,5 @@
 1
+
 2
-3
\ No newline at end of file
+
+3
index 3cacc0b..48082f7 100644 (file)
@@ -1 +1 @@
-12
\ No newline at end of file
+12
diff --git a/tests/sav/fixme/base_inline.res b/tests/sav/fixme/base_inline.res
new file mode 100644 (file)
index 0000000..336a4ce
--- /dev/null
@@ -0,0 +1,3 @@
+100
+200
+300
diff --git a/tests/sav/fixme/base_inline_nested.res b/tests/sav/fixme/base_inline_nested.res
new file mode 100644 (file)
index 0000000..9f4aea0
--- /dev/null
@@ -0,0 +1,3 @@
+20
+20
+20
diff --git a/tests/sav/fixme/base_inline_nested2.res b/tests/sav/fixme/base_inline_nested2.res
new file mode 100644 (file)
index 0000000..88a2829
--- /dev/null
@@ -0,0 +1,22 @@
+A10
+B9
+A8
+B7
+A6
+B5
+A4
+B3
+A2
+B1
+A0
+B10
+A9
+B8
+A7
+B6
+A5
+B4
+A3
+B2
+A1
+B0
diff --git a/tests/sav/fixme/zzz_test_fixme.res b/tests/sav/fixme/zzz_test_fixme.res
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/sav/fixme/zzz_test_fixme_changed.res b/tests/sav/fixme/zzz_test_fixme_changed.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/fixme/zzz_test_fixme_remains.res b/tests/sav/fixme/zzz_test_fixme_remains.res
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/sav/mnit.res b/tests/sav/mnit.res
new file mode 100644 (file)
index 0000000..3b9e4fd
--- /dev/null
@@ -0,0 +1 @@
+Runtime error: Abstract method `generate_input` called on `App` (../lib/mnit/mnit_app.nit:64)
diff --git a/tests/sav/nitg-e/fixme/converter.res b/tests/sav/nitg-e/fixme/converter.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-e/fixme/pnacl.res b/tests/sav/nitg-e/fixme/pnacl.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-g/fixme/pnacl.res b/tests/sav/nitg-g/fixme/pnacl.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-s/fixme/converter.res b/tests/sav/nitg-s/fixme/converter.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-s/fixme/pnacl.res b/tests/sav/nitg-s/fixme/pnacl.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-sg/fixme/base_attr_gen_alt1.res b/tests/sav/nitg-sg/fixme/base_attr_gen_alt1.res
new file mode 100644 (file)
index 0000000..2c8186c
--- /dev/null
@@ -0,0 +1 @@
+Caught signal : Segmentation fault
diff --git a/tests/sav/nitg-sg/fixme/base_attr_init_val_raf_alt1.res b/tests/sav/nitg-sg/fixme/base_attr_init_val_raf_alt1.res
new file mode 100644 (file)
index 0000000..2f1465d
--- /dev/null
@@ -0,0 +1,3 @@
+1
+1
+0
diff --git a/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt1.res b/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt1.res
new file mode 100644 (file)
index 0000000..5625f1f
--- /dev/null
@@ -0,0 +1,7 @@
+0
+0
+1
+2
+10
+20
+30
diff --git a/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt2.res b/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt2.res
new file mode 100644 (file)
index 0000000..2e8046c
--- /dev/null
@@ -0,0 +1,7 @@
+1
+0
+1
+2
+10
+20
+30
diff --git a/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt3.res b/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt3.res
new file mode 100644 (file)
index 0000000..f0c5f8f
--- /dev/null
@@ -0,0 +1,8 @@
+0
+0
+0
+1
+2
+10
+20
+30
diff --git a/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt4.res b/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt4.res
new file mode 100644 (file)
index 0000000..a12c8e0
--- /dev/null
@@ -0,0 +1,7 @@
+10
+0
+1
+2
+10
+20
+30
diff --git a/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt5.res b/tests/sav/nitg-sg/fixme/base_attr_nullable_int_alt5.res
new file mode 100644 (file)
index 0000000..f343f0e
--- /dev/null
@@ -0,0 +1,8 @@
+10
+20
+0
+1
+2
+10
+20
+30
diff --git a/tests/sav/nitg-sg/fixme/base_conflict_submodule_name_alt1.res b/tests/sav/nitg-sg/fixme/base_conflict_submodule_name_alt1.res
new file mode 100644 (file)
index 0000000..7f85acf
--- /dev/null
@@ -0,0 +1 @@
+Compilation error
diff --git a/tests/sav/nitg-sg/fixme/base_conflict_submodule_name_alt2.res b/tests/sav/nitg-sg/fixme/base_conflict_submodule_name_alt2.res
new file mode 100644 (file)
index 0000000..7f85acf
--- /dev/null
@@ -0,0 +1 @@
+Compilation error
diff --git a/tests/sav/nitg-sg/fixme/base_covar_int2_alt1.res b/tests/sav/nitg-sg/fixme/base_covar_int2_alt1.res
new file mode 100644 (file)
index 0000000..9c5d958
--- /dev/null
@@ -0,0 +1,4 @@
+1
+1
+a1
+a
diff --git a/tests/sav/nitg-sg/fixme/base_covar_int2_alt3.res b/tests/sav/nitg-sg/fixme/base_covar_int2_alt3.res
new file mode 100644 (file)
index 0000000..fbffc32
--- /dev/null
@@ -0,0 +1,4 @@
+1
+1
+1
+aa
diff --git a/tests/sav/nitg-sg/fixme/base_covar_int2_alt5.res b/tests/sav/nitg-sg/fixme/base_covar_int2_alt5.res
new file mode 100644 (file)
index 0000000..5f6d34c
--- /dev/null
@@ -0,0 +1,5 @@
+1
+1
+1
+1
+a
diff --git a/tests/sav/nitg-sg/fixme/base_covar_int_alt1.res b/tests/sav/nitg-sg/fixme/base_covar_int_alt1.res
new file mode 100644 (file)
index 0000000..f98f9e1
--- /dev/null
@@ -0,0 +1,5 @@
+true
+true
+false
+true
+true
diff --git a/tests/sav/nitg-sg/fixme/base_covar_int_alt3.res b/tests/sav/nitg-sg/fixme/base_covar_int_alt3.res
new file mode 100644 (file)
index 0000000..d3413ee
--- /dev/null
@@ -0,0 +1,5 @@
+true
+true
+true
+false
+true
diff --git a/tests/sav/nitg-sg/fixme/base_covar_int_alt5.res b/tests/sav/nitg-sg/fixme/base_covar_int_alt5.res
new file mode 100644 (file)
index 0000000..36c7afa
--- /dev/null
@@ -0,0 +1,5 @@
+true
+true
+true
+true
+true
diff --git a/tests/sav/nitg-sg/fixme/base_gen_infinite.res b/tests/sav/nitg-sg/fixme/base_gen_infinite.res
new file mode 100644 (file)
index 0000000..4fff55f
--- /dev/null
@@ -0,0 +1 @@
+Fatal error: limitation in the rapidtype analysis engine: a type depth of 256 is too important, the problematic type is G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[G[Int]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]].
diff --git a/tests/sav/nitg-sg/fixme/base_gen_variance3_alt1.res b/tests/sav/nitg-sg/fixme/base_gen_variance3_alt1.res
new file mode 100644 (file)
index 0000000..0096ae2
--- /dev/null
@@ -0,0 +1,4 @@
+2
+2
+!2
+!100
diff --git a/tests/sav/nitg-sg/fixme/base_gen_variance_int_alt1.res b/tests/sav/nitg-sg/fixme/base_gen_variance_int_alt1.res
new file mode 100644 (file)
index 0000000..3ab4fdc
--- /dev/null
@@ -0,0 +1,2 @@
+Cast error: Cannot cast Char to Int.
+2
diff --git a/tests/sav/nitg-sg/fixme/base_virtual_int2_alt2.res b/tests/sav/nitg-sg/fixme/base_virtual_int2_alt2.res
new file mode 100644 (file)
index 0000000..2e435a2
--- /dev/null
@@ -0,0 +1,3 @@
+4
+4
+4
diff --git a/tests/sav/nitg-sg/fixme/base_virtual_type_variance_int_alt1.res b/tests/sav/nitg-sg/fixme/base_virtual_type_variance_int_alt1.res
new file mode 100644 (file)
index 0000000..3ab4fdc
--- /dev/null
@@ -0,0 +1,2 @@
+Cast error: Cannot cast Char to Int.
+2
diff --git a/tests/sav/nitg-sg/fixme/pnacl.res b/tests/sav/nitg-sg/fixme/pnacl.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
diff --git a/tests/sav/nitg-sg/fixme/test_gen.res b/tests/sav/nitg-sg/fixme/test_gen.res
new file mode 100644 (file)
index 0000000..4ad3dc3
--- /dev/null
@@ -0,0 +1 @@
+UNDEFINED
index 4c87b06..4d56903 100644 (file)
@@ -1,2 +1,2 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:48)
-c
\ No newline at end of file
+Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:49)
+c
index c4a680e..4c1d495 100644 (file)
@@ -1,2 +1,2 @@
 Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:24)
-c
\ No newline at end of file
+c
index 66ef874..53f24b9 100644 (file)
@@ -1,2 +1,3 @@
-Runtime error: Receiver is null (alt/rterror_attr_def_alt8.nit:49)
-c1
+Runtime error: Receiver is null (alt/rterror_attr_def_alt8.nit:50)
+c
+1
index 2c6ff6b..505c003 100644 (file)
Binary files a/tests/sav/shootout_mandelbrot_args1.res and b/tests/sav/shootout_mandelbrot_args1.res differ
diff --git a/tests/sav/test_accessor.res b/tests/sav/test_accessor.res
deleted file mode 100644 (file)
index ea889b9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-p: 5q: 67
\ No newline at end of file
diff --git a/tests/sav/test_array.res b/tests/sav/test_array.res
deleted file mode 100644 (file)
index 2bfea71..0000000
+++ /dev/null
@@ -1 +0,0 @@
-2**0*1*
\ No newline at end of file
diff --git a/tests/sav/test_array_int.res b/tests/sav/test_array_int.res
deleted file mode 100644 (file)
index 1a4284d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-2530513
\ No newline at end of file
diff --git a/tests/sav/test_attr.res b/tests/sav/test_attr.res
deleted file mode 100644 (file)
index 8dfe4ff..0000000
+++ /dev/null
@@ -1 +0,0 @@
-55125012
\ No newline at end of file
diff --git a/tests/sav/test_attr_long.res b/tests/sav/test_attr_long.res
deleted file mode 100644 (file)
index efb4310..0000000
+++ /dev/null
@@ -1 +0,0 @@
-0010110010
\ No newline at end of file
diff --git a/tests/sav/test_blocks.res b/tests/sav/test_blocks.res
deleted file mode 100644 (file)
index f54df58..0000000
+++ /dev/null
@@ -1 +0,0 @@
-012345
\ No newline at end of file
diff --git a/tests/sav/test_cond.res b/tests/sav/test_cond.res
deleted file mode 100644 (file)
index 56b6510..0000000
+++ /dev/null
@@ -1 +0,0 @@
-11111
\ No newline at end of file
index 5d25dd1..a3f0a73 100644 (file)
@@ -1 +1,2 @@
-bonjourndjui
\ No newline at end of file
+bonjour
+ndjui
diff --git a/tests/sav/test_meta.res b/tests/sav/test_meta.res
deleted file mode 100644 (file)
index 67b0910..0000000
+++ /dev/null
@@ -1 +0,0 @@
-D34=578
\ No newline at end of file
diff --git a/tests/sav/test_obj.res b/tests/sav/test_obj.res
deleted file mode 100644 (file)
index 6527f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-11211221122132
\ No newline at end of file
index 42b5dfa..bb61552 100644 (file)
@@ -1 +1,3 @@
-112155
\ No newline at end of file
+11
+21
+55
diff --git a/tests/sav/test_string.res b/tests/sav/test_string.res
deleted file mode 100644 (file)
index 5769d17..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-abcdefghijklnmopqrstuvwxyz
-#"\
\ No newline at end of file
diff --git a/tests/sav/zzz_test_fail.res b/tests/sav/zzz_test_fail.res
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
diff --git a/tests/sav/zzz_test_fixme_changed.res b/tests/sav/zzz_test_fixme_changed.res
new file mode 100644 (file)
index 0000000..83b33d2
--- /dev/null
@@ -0,0 +1 @@
+1000
diff --git a/tests/sav/zzz_test_fixme_remains.res b/tests/sav/zzz_test_fixme_remains.res
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/sav/zzz_test_ok.res b/tests/sav/zzz_test_ok.res
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/tests/sav/zzz_test_soso.res b/tests/sav/zzz_test_soso.res
new file mode 100644 (file)
index 0000000..41aa675
--- /dev/null
@@ -0,0 +1,3 @@
+Error: other error
+Warning: some warning
+0
index fb6b5dd..f8482b2 100644 (file)
@@ -25,7 +25,7 @@ var iter = 20
 var limit = 2.0
 
 if args.length != 1 then
-    printn("Usage: shootout_mandelbrot <size>\n")
+    print("Usage: shootout_mandelbrot <size>")
     return
 end
 
@@ -35,7 +35,7 @@ var h = w
 var byte_acc = 0
 var bit_num = 0
 
-printn("P4\n{w} {h}\n")
+print("P4\n{w} {h}")
 
 for y in [0..h[ do
     for x in [0..w[ do
@@ -73,3 +73,4 @@ for y in [0..h[ do
        end
     end
 end
+print ""
diff --git a/tests/test_accessor.nit b/tests/test_accessor.nit
deleted file mode 100644 (file)
index e83de63..0000000
+++ /dev/null
@@ -1,34 +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.
-
-class A
-   fun p=(i: Int)
-   do
-      printn("p: ", i)
-   end
-   fun q=(i: Int, j: Int)
-   do
-      printn("q: ", i, j)
-   end
-
-   init
-   do
-   end
-end
-
-var a = new A
-a.p = 5
-a.q(6) = 7
diff --git a/tests/test_array.nit b/tests/test_array.nit
deleted file mode 100644 (file)
index fcce3bb..0000000
+++ /dev/null
@@ -1,35 +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.
-
-
-class Ant
-       redef fun to_s: String
-       do
-               return "*"
-       end
-
-       init do end
-end
-
-var t = [new Ant, new Ant]
-printn(t.length)
-printn(t)
-var i = 0
-while i < t.length do
-       printn(i)
-       printn(t[i])
-       i = i + 1
-end
diff --git a/tests/test_array_int.nit b/tests/test_array_int.nit
deleted file mode 100644 (file)
index 0719bbb..0000000
+++ /dev/null
@@ -1,26 +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.
-
-
-      var t = [5,3]
-         printn(t.length)
-         printn(t)
-         var i = 0
-         while i < t.length do
-            printn(i)
-            printn(t[i])
-            i = i + 1
-         end
diff --git a/tests/test_attr.nit b/tests/test_attr.nit
deleted file mode 100644 (file)
index d667658..0000000
+++ /dev/null
@@ -1,31 +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.
-
-redef class Sys
-       var _i: Int = 0
-       var _j: Int = 0
-       redef fun main
-       do
-               printn(5)
-               _i = 5
-               printn(_i)
-               _i = 12
-               printn(_i)
-               _j = 50
-               printn(_j)
-               printn(_i)
-       end
-end
diff --git a/tests/test_attr_long.nit b/tests/test_attr_long.nit
deleted file mode 100644 (file)
index 1444e23..0000000
+++ /dev/null
@@ -1,43 +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.
-
-class A
-       var _a_: Int = 0
-
-       fun a: Int
-       do
-               return _a_ * 10
-       end
-
-       fun a=(a: Int)
-       do
-               _a_ = a / 10
-       end
-
-
-
-       init
-       do
-       end
-end
-
-
-var a = new A
-printn(a.a, a._a_)
-a.a = 10
-printn(a.a, a._a_)
-a._a_ = 10
-printn(a.a, a._a_)
diff --git a/tests/test_blocks.nit b/tests/test_blocks.nit
deleted file mode 100644 (file)
index ce22835..0000000
+++ /dev/null
@@ -1,41 +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.
-
-
-         do
-           printn(0)
-        end
-         var a = 1
-        do
-           printn(a)
-        end
-        var b = 2
-        while b < 3 do
-           printn(b)
-           b = b + 1
-        end
-        var c = 3
-        while c < 4 do
-           printn(c)
-           c = c + 1
-        end
-        var d = 4 
-        var e = 2
-        while e > 0 do
-           printn(d)
-           d = d + 1 
-           e = e - 1
-        end
diff --git a/tests/test_cond.nit b/tests/test_cond.nit
deleted file mode 100644 (file)
index 3246b45..0000000
+++ /dev/null
@@ -1,58 +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.
-
-var a = true
-var b = false
-
-if true then
-       printn(1)
-else if false then
-       printn(0)
-else if true then
-       printn(0)
-else
-       printn(0)
-end
-
-if false then
-       printn(0)
-else if false then
-       printn(0)
-else if true then
-       printn(1)
-else
-       printn(0)
-end 
-
-if false then
-       printn(0)
-else if false then
-       printn(0)
-else
-       printn(1)
-end
-
-if a then
-       printn(1)
-else
-       printn(0)
-end
-
-if b then
-       printn(0)
-else
-       printn(1)
-end
index a7efb38..ad1112a 100644 (file)
@@ -14,5 +14,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-printn(gets)
-printn(gets)
+print(gets)
+print(gets)
diff --git a/tests/test_meta.nit b/tests/test_meta.nit
deleted file mode 100644 (file)
index b649f99..0000000
+++ /dev/null
@@ -1,87 +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.
-
-
-class A
-   fun foo
-      do
-          printn("A")
-      end
-   fun blup(a: Int)
-      do
-         blup2(a, 1)
-      end
-   fun blup2(a: Int, b : Int)
-      do
-         printn(a+b)
-      end
-   fun blop(a: Int, b: Int...)
-      do
-         var i = b.iterator
-         while i.is_ok do
-            printn(a+i.item)
-            i.next
-         end
-      end
-end
-
-class B
-       super A
-   redef fun foo
-      do
-          printn("B")
-      end
-end
-
-class C
-       super A
-   fun foo2
-      do
-          printn("C")
-      end
-end
-
-class D
-       super B
-       super C
-   redef fun foo
-      do
-          printn("D")
-      end
-
-   init do end
-end
-
-fun test1
-do
-       var b: B
-       b = new D
-       b.foo
-       b.blup2(1,2)
-       b.blup(3)
-end
-
-fun test2
-do
-       var b = new D
-       var a = [1,2,3]
-       var u: Object
-       printn("=",5)
-       b.blop(5,2,3)
-end
-
-test1
-test2
diff --git a/tests/test_obj.nit b/tests/test_obj.nit
deleted file mode 100644 (file)
index f4a430b..0000000
+++ /dev/null
@@ -1,71 +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.
-
-
-class O
-   fun foo
-   do
-      printn(10)
-   end
-   
-   fun bar
-   do
-      printn(20)
-   end
-
-   init do end
-end
-
-class A
-       super O
-   redef fun foo
-   do
-      printn(11)
-   end
-   
-   redef fun bar
-   do
-      printn(21)
-   end
-
-   init do end
-end
-
-class B
-       super A
-   redef fun foo
-   do
-      printn(12)
-   end
-   
-   fun baz
-   do
-      printn(32)
-   end
-
-   init do end
-end
-
-var a = new A
-var ab: A = new B
-var b = new B
-a.foo
-a.bar
-ab.foo
-ab.bar
-b.foo
-b.bar
-b.baz
index 2f680d4..cbf28d8 100644 (file)
@@ -66,6 +66,6 @@ var m = new Matrice
 m[1,1] = 11
 m[2,1] = 21
 m[5,5] = 55
-printn(m[1,1])
-printn(m[2,1])
-printn(m[5,5])
+print(m[1,1])
+print(m[2,1])
+print(m[5,5])
diff --git a/tests/test_string.nit b/tests/test_string.nit
deleted file mode 100644 (file)
index c76b0b3..0000000
+++ /dev/null
@@ -1,19 +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.
-
-
-printn("abcdefghijklnmopqrstuvwxyz")
-printn("\n#\"\\")
index c053160..8176ab2 100755 (executable)
@@ -1,4 +1,4 @@
-for x in nitg-g nitg-s nitg-e niti; do
+for x in nitg-g nitg-s nitg-sg nitg-e niti; do
        echo "--engine $x"
        ./tests.sh --engine $x "$@"
 done
index 956c0ab..b8ecd0a 100755 (executable)
@@ -42,10 +42,8 @@ Usage: $e [options] modulenames
 -o option   Pass option to the engine
 -v          Verbose (show tests steps)
 -h          This help
---tap       Produce TAP output
 --engine    Use a specific engine (default=nitg)
 --noskip    Do not skip a test even if the .skip file matches
---[no]soso  Force enable (or disable) SOSO
 END
 }
 
@@ -61,16 +59,16 @@ function compare_to_result()
        local pattern="$1"
        local sav="$2"
        if [ ! -r "$sav" ]; then return 0; fi
+       test "`cat "$sav"`" = "UNDEFINED" && return 1
        diff -u "$sav" "out/$pattern.res" > "out/$pattern.diff.sav.log"
        if [ "$?" == 0 ]; then
                return 1
        fi
-       [ -z "$soso" ] && return 3
        sed '/[Ww]arning/d;/[Ee]rror/d' "out/$pattern.res" > "out/$pattern.res2"
        sed '/[Ww]arning/d;/[Ee]rror/d' "$sav" > "out/$pattern.sav2"
        grep '[Ee]rror' "out/$pattern.res" >/dev/null && echo "Error" >> "out/$pattern.res2"
        grep '[Ee]rror' "$sav" >/dev/null && echo "Error" >> "out/$pattern.sav2"
-       diff -u "out/$pattern.sav2" "out/$pattern.res2" > "out/$pattern.diff.sav.log"
+       diff -u "out/$pattern.sav2" "out/$pattern.res2" > "out/$pattern.diff.sav.log2"
        if [ "$?" == 0 ]; then
                return 2
        else
@@ -81,7 +79,6 @@ function compare_to_result()
 # As argument: the pattern used for the file
 function process_result()
 {
-       ((tapcount=tapcount+1))
        # Result
        pattern=$1
        description=$2
@@ -100,46 +97,63 @@ function process_result()
        echo >>$xml "<testcase classname='$pack' name='$description'>"
        #for sav in "sav/$engine/fixme/$pattern.res" "sav/$engine/$pattern.res" "sav/fixme/$pattern.res" "sav/$pattern.res" "sav/$pattern.sav"; do
        for savdir in $savdirs; do
-               sav=$savdir/$pattern.res
+               sav=$savdir/fixme/$pattern.res
                compare_to_result "$pattern" "$sav"
-
-               case "$? $sav" in
-                       0*)
-                               continue;; # no file
-                       1*/fixme/*)
+               case "$?" in
+                       0)
+                               ;; # no file
+                       1)
                                OLD="$LIST"
                                FIXME="$sav"
+                               LIST="$LIST $sav"
+                               ;;
+                       2)
+                               if [ -z "$FIRST" ]; then
+                                       SOSOF="$sav"
+                                       FIRST="$sav"
+                               fi
+                               LIST="$LIST $sav"
                                ;;
-                       1*)
+                       3)
+                               if [ -z "$FIRST" ]; then
+                                       NFIXME="$sav"
+                                       FIRST="$sav"
+                               fi
+                               LIST="$LIST $sav"
+                               ;;
+               esac
+
+               sav=$savdir/$pattern.res
+               compare_to_result "$pattern" "$sav"
+               case "$?" in
+                       0)
+                               ;; # no file
+                       1)
                                OLD="$LIST"
                                SAV="$sav"
+                               LIST="$LIST $sav"
                                ;;
-                       2*/fixme/*)
-                               SOSOF="$sav" ;;
-                       2*)
-                               SOSO="$sav" ;;
-                       3*/fixme/*)
+                       2)
                                if [ -z "$FIRST" ]; then
-                                       NFIXME="$sav"
+                                       SOSO="$sav"
                                        FIRST="$sav"
                                fi
+                               LIST="$LIST $sav"
                                ;;
-                       3*)
+                       3)
                                if [ -z "$FIRST" ]; then
                                        NSAV="$sav"
                                        FIRST="$sav"
                                fi
+                               LIST="$LIST $sav"
                                ;;
                esac
-               LIST="$LIST $sav"
        done
        OLD=`echo "$OLD" | sed -e 's/   */ /g' -e 's/^ //' -e 's/ $//'`
        grep 'NOT YET IMPLEMENTED' "out/$pattern.res" >/dev/null
        NYI="$?"
        if [ -n "$SAV" ]; then
-               if [ -n "$tap" ]; then
-                       echo "ok - $description"
-               elif [ -n "$OLD" ]; then
+               if [ -n "$OLD" ]; then
                        echo "[*ok*] out/$pattern.res $SAV - but $OLD remains!"
                        echo >>$xml "<error message='ok out/$pattern.res - but $OLD remains'/>"
                        remains="$remains $OLD"
@@ -148,9 +162,7 @@ function process_result()
                fi
                ok="$ok $pattern"
        elif [ -n "$FIXME" ]; then
-               if [ -n "$tap" ]; then
-                       echo "not ok - $description # TODO expected failure"
-               elif [ -n "$OLD" ]; then
+               if [ -n "$OLD" ]; then
                        echo "[*fixme*] out/$pattern.res $FIXME - but $OLD remains!"
                        echo >>$xml "<error message='ok out/$pattern.res - but $OLD remains'/>"
                        remains="$remains $OLD"
@@ -159,35 +171,28 @@ function process_result()
                        echo >>$xml "<skipped/>"
                fi
                todos="$todos $pattern"
-       elif [ -n "$SOSO" ]; then
-               if [ -n "$tap" ]; then
-                       echo "ok - $description # SOSO"
-               else
-                       echo "[soso] out/$pattern.res $SOSO"
-               fi
-               ok="$ok $pattern"
        elif [ "x$NYI" = "x0" ]; then
-               if [ -n "$tap" ]; then
-                       echo "not ok - $description # TODO not yet implemented"
-               else
-                       echo "[todo] out/$pattern.res -> not yet implemented"
-                       echo >>$xml "<skipped/>"
-               fi
+               echo "[todo] out/$pattern.res -> not yet implemented"
+               echo >>$xml "<skipped/>"
                todos="$todos $pattern"
+       elif [ -n "$SOSO" ]; then
+               echo "[======= soso out/$pattern.res $SOSO =======]"
+               echo >>$xml "<error message='soso out/$pattern.res $SOSO'/>"
+               echo >>$xml "<system-out><![CDATA["
+               cat -v out/$pattern.diff.sav.log | head >>$xml -n 50
+               echo >>$xml "]]></system-out>"
+               nok="$nok $pattern"
+               echo "$ii" >> "$ERRLIST"
        elif [ -n "$SOSOF" ]; then
-               if [ -n "$tap" ]; then
-                       echo "not ok - $description # TODO SOSO expected failure"
-               else
-                       echo "[fixme soso] out/$pattern.res $SOSOF"
-                       echo >>$xml "<skipped/>"
-               fi
-               todos="$todos $pattern"
+               echo "[======= fixme soso out/$pattern.res $SOSOF =======]"
+               echo >>$xml "<error message='soso out/$pattern.res $SOSO'/>"
+               echo >>$xml "<system-out><![CDATA["
+               cat -v out/$pattern.diff.sav.log | head >>$xml -n 50
+               echo >>$xml "]]></system-out>"
+               nok="$nok $pattern"
+               echo "$ii" >> "$ERRLIST"
        elif [ -n "$NSAV" ]; then
-               if [ -n "$tap" ]; then
-                       echo "not ok - $description"
-               else
-                       echo "[======= fail out/$pattern.res $NSAV =======]"
-               fi
+               echo "[======= fail out/$pattern.res $NSAV =======]"
                echo >>$xml "<error message='fail out/$pattern.res $NSAV'/>"
                echo >>$xml "<system-out><![CDATA["
                cat -v out/$pattern.diff.sav.log | head >>$xml -n 50
@@ -195,11 +200,7 @@ function process_result()
                nok="$nok $pattern"
                echo "$ii" >> "$ERRLIST"
        elif [ -n "$NFIXME" ]; then
-               if [ -n "$tap" ]; then
-                       echo "not ok - $description"
-               else
-                       echo "[======= changed out/$pattern.res $NFIXME ======]"
-               fi
+               echo "[======= changed out/$pattern.res $NFIXME ======]"
                echo >>$xml "<error message='changed out/$pattern.res $NFIXME'/>"
                echo >>$xml "<system-out><![CDATA["
                cat -v out/$pattern.diff.sav.log | head >>$xml -n 50
@@ -207,11 +208,7 @@ function process_result()
                nok="$nok $pattern"
                echo "$ii" >> "$ERRLIST"
        elif [ -s out/$pattern.res ]; then
-               if [ -n "$tap" ]; then
-                       echo "no ok - $description"
-               else
-                       echo "[=== no sav ===] out/$pattern.res is not empty"
-               fi
+               echo "[=== no sav ===] out/$pattern.res is not empty"
                echo >>$xml "<error message='no sav and not empty'/>"
                echo >>$xml "<system-out><![CDATA["
                cat -v >>$xml out/$pattern.res
@@ -219,11 +216,7 @@ function process_result()
                nos="$nos $pattern"
        else
                # no sav but empty res
-               if [ -n "$tap" ]; then
-                       echo "ok - $description"
-               else
-                       echo "[0k] out/$pattern.res is empty"
-               fi
+               echo "[0k] out/$pattern.res is empty"
                ok="$ok $pattern"
        fi
        if test -s out/$pattern.cmp.err; then
@@ -238,22 +231,12 @@ need_skip()
 {
        test "$noskip" = true && return 1
        if echo "$1" | grep -f "$engine.skip" >/dev/null 2>&1; then
-               ((tapcount=tapcount+1))
-               if [ -n "$tap" ]; then
-                       echo "ok - $2 # skip"
-               else
-                       echo "=> $2: [skip]"
-               fi
+               echo "=> $2: [skip]"
                echo >>$xml "<testcase classname='$3' name='$2'><skipped/></testcase>"
                return 0
        fi
        if test $engine = niti && echo "$1" | grep -f "exec.skip" >/dev/null 2>&1; then
-               ((tapcount=tapcount+1))
-               if [ -n "$tap" ]; then
-                       echo "ok - $2 # skip"
-               else
-                       echo "=> $2: [skip exec]"
-               fi
+               echo "=> $2: [skip exec]"
                echo >>$xml "<testcase classname='$3' name='$2'><skipped/></testcase>"
                return 0
        fi
@@ -281,41 +264,28 @@ skip_cc()
 
 find_nitc()
 {
-       ((tapcount=tapcount+1))
        name="$enginebinname"
        recent=`ls -t ../src/$name ../src/$name_[0-9] ../bin/$name ../c_src/$name 2>/dev/null | head -1`
        if [[ "x$recent" == "x" ]]; then
-               if [ -n "$tap" ]; then
-                       echo "not ok - find binary for $engine"
-                       echo "Bail out! Could not find binary for engine $engine, aborting"
-               else
-                       echo "Could not find binary for engine $engine, aborting"
-               fi
+               echo "Could not find binary for engine $engine, aborting"
                exit 1
        fi
-       if [ -n "$tap" ]; then
-               echo "ok - find binary for $engine: $recent $OPT"
-       else
-               echo "Find binary for engine $engine: $recent $OPT"
-       fi
+       echo "Find binary for engine $engine: $recent $OPT"
        NITC=$recent
 }
 
 verbose=false
 stop=false
-tapcount=0
 engine=nitg
 noskip=
+savdirs=
 while [ $stop = false ]; do
        case $1 in
                -o) OPT="$OPT $2"; shift; shift;;
                -v) verbose=true; shift;;
                -h) usage; exit;;
-               --tap) tap=true; shift;;
                --engine) engine="$2"; shift; shift;;
                --noskip) noskip=true; shift;;
-               --soso) soso=true; shift;;
-               --nososo) nososo=true; shift;;
                *) stop=true
        esac
 done
@@ -324,31 +294,29 @@ case $engine in
        nitg)
                engine=nitg-s;
                enginebinname=nitg;
-               savdirs="sav/$engine/fixme/ sav/$engine/ sav/fixme/ sav/"
                OPT="--separate $OPT"
                ;;
        nitg-s)
                enginebinname=nitg;
-               savdirs="sav/$engine/fixme/ sav/$engine/ sav/fixme/ sav/"
                OPT="--separate $OPT"
                ;;
        nitg-e)
                enginebinname=nitg;
-               savdirs="sav/$engine/fixme/ sav/$engine/ sav/fixme/ sav/"
                OPT="--erasure $OPT"
                ;;
+       nitg-sg)
+               enginebinname=nitg;
+               OPT="--semi-global $OPT"
+               ;;
        nitg-g)
                enginebinname=nitg;
-               savdirs="sav/$engine/fixme/ sav/$engine/ sav/fixme/ sav/"
                OPT="--global $OPT"
                ;;
        nit)
                engine=niti
-               savdirs="sav/$engine/fixme/ sav/$engine/ sav/fixme/ sav/"
                ;;
        niti)
                enginebinname=nit
-               savdirs="sav/$engine/fixme/ sav/$engine/ sav/fixme/ sav/"
                ;;
        nitc)
                echo "disabled engine $engine"
@@ -360,6 +328,8 @@ case $engine in
                ;;
 esac
 
+savdirs="sav/$engine $savdirs sav/"
+
 # The default nitc compiler
 [ -z "$NITC" ] && find_nitc
 
@@ -431,7 +401,7 @@ for ii in "$@"; do
                # Sould we skip the alternative for this engine?
                need_skip $bf $bf $pack && continue
 
-               test -z "$tap" && echo -n "=> $bf: "
+               echo -n "=> $bf: "
 
                if [ -f "$f.inputs" ]; then
                        inputs="$f.inputs"
@@ -467,7 +437,7 @@ END
                        fi
                fi
                if [ "$ERR" != 0 ]; then
-                       test -z "$tap" && echo -n "! "
+                       echo -n "! "
                        cat "$ff.compile.log" "$ff.cmp.err" > "$ff.res"
                        process_result $bf $bf $pack
                elif skip_exec "$bf"; then
@@ -476,11 +446,11 @@ END
                        process_result $bf $bf $pack
                elif [ -n "$nocc" ]; then
                        # not compiled
-                       test -z "$tap" && echo -n "nocc "
+                       echo -n "nocc "
                        > "$ff.res"
                        process_result $bf $bf $pack
                elif [ -x "./$ff.bin" ]; then
-                       test -z "$tap" && echo -n ". "
+                       echo -n ". "
                        # Execute
                        args=""
                        if [ "x$verbose" = "xtrue" ]; then
@@ -527,7 +497,7 @@ END
                                                echo ""
                                                echo "NIT_NO_STACK=1 ./$ff.bin" $args
                                        fi
-                                       test -z "$tap" && echo -n "==> $name "
+                                       echo -n "==> $name "
                                        echo "./$ff.bin $args" > "./$fff.bin"
                                        chmod +x "./$fff.bin"
                                        WRITE="$fff.write" sh -c "NIT_NO_STACK=1 $TIMEOUT ./$fff.bin < $ffinputs > $fff.res 2>$fff.err"
@@ -551,7 +521,7 @@ END
                        echo "Not executable (platform?)" > "$ff.res"
                        process_result $bf "$bf" $pack
                else
-                       test -z "$tap" && echo -n "! "
+                       echo -n "! "
                        cat "$ff.cmp.err" > "$ff.res"
                        echo "Compilation error" > "$ff.res"
                        process_result $bf "$bf" $pack
@@ -559,16 +529,6 @@ END
        done
 done
 
-if [ -n "$tap" ]; then
-       echo "1..$tapcount"
-       echo "# ok:" `echo $ok | wc -w`
-       echo "# not ok:" `echo $nok | wc -w`
-       echo "# no sav:" `echo $nos | wc -w`
-       echo "# todo/fixme:" `echo $todos | wc -w`
-       echo "# of sav that remains:" `echo $remains | wc -w`
-       exit
-fi
-
 echo "engine: $engine ($enginebinname $OPT)"
 echo "ok: " `echo $ok | wc -w` "/" `echo $ok $nok $nos $todos | wc -w`
 
diff --git a/tests/zzz_tests/zzz_test_0k.nit b/tests/zzz_tests/zzz_test_0k.nit
new file mode 100644 (file)
index 0000000..8de86e9
--- /dev/null
@@ -0,0 +1 @@
+import kernel
diff --git a/tests/zzz_tests/zzz_test_fail.nit b/tests/zzz_tests/zzz_test_fail.nit
new file mode 100644 (file)
index 0000000..c76b503
--- /dev/null
@@ -0,0 +1,2 @@
+import kernel
+1.output
diff --git a/tests/zzz_tests/zzz_test_fixme.nit b/tests/zzz_tests/zzz_test_fixme.nit
new file mode 100644 (file)
index 0000000..c76b503
--- /dev/null
@@ -0,0 +1,2 @@
+import kernel
+1.output
diff --git a/tests/zzz_tests/zzz_test_fixme_changed.nit b/tests/zzz_tests/zzz_test_fixme_changed.nit
new file mode 100644 (file)
index 0000000..c76b503
--- /dev/null
@@ -0,0 +1,2 @@
+import kernel
+1.output
diff --git a/tests/zzz_tests/zzz_test_fixme_remains.nit b/tests/zzz_tests/zzz_test_fixme_remains.nit
new file mode 100644 (file)
index 0000000..c76b503
--- /dev/null
@@ -0,0 +1,2 @@
+import kernel
+1.output
diff --git a/tests/zzz_tests/zzz_test_nosav.nit b/tests/zzz_tests/zzz_test_nosav.nit
new file mode 100644 (file)
index 0000000..c76b503
--- /dev/null
@@ -0,0 +1,2 @@
+import kernel
+1.output
diff --git a/tests/zzz_tests/zzz_test_ok.nit b/tests/zzz_tests/zzz_test_ok.nit
new file mode 100644 (file)
index 0000000..c76b503
--- /dev/null
@@ -0,0 +1,2 @@
+import kernel
+1.output
diff --git a/tests/zzz_tests/zzz_test_soso.nit b/tests/zzz_tests/zzz_test_soso.nit
new file mode 100644 (file)
index 0000000..6106e56
--- /dev/null
@@ -0,0 +1,3 @@
+import string
+0.output
+"Error: bla bla".output
diff --git a/tests/zzz_tests/zzz_test_todo.nit b/tests/zzz_tests/zzz_test_todo.nit
new file mode 100644 (file)
index 0000000..d1c18f5
--- /dev/null
@@ -0,0 +1,2 @@
+import string
+"NOT YET IMPLEMENTED".output