tests: remove native interface tests
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 19 Oct 2013 17:49:42 +0000 (13:49 -0400)
committerJean Privat <jean@pryen.org>
Mon, 17 Feb 2014 14:14:48 +0000 (09:14 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

49 files changed:
tests/base_ni.nit [deleted file]
tests/sav/base_ni.res [deleted file]
tests/sav/base_ni_alt10.res [deleted file]
tests/sav/base_ni_alt2.res [deleted file]
tests/sav/base_ni_alt3.res [deleted file]
tests/sav/base_ni_alt4.res [deleted file]
tests/sav/base_ni_alt5.res [deleted file]
tests/sav/base_ni_alt6.res [deleted file]
tests/sav/base_ni_alt7.res [deleted file]
tests/sav/base_ni_alt8.res [deleted file]
tests/sav/base_ni_alt9.res [deleted file]
tests/sav/test_ni_cast_extra.res [deleted file]
tests/sav/test_ni_cast_simple.res [deleted file]
tests/sav/test_ni_global_only_from_native.res [deleted file]
tests/sav/test_ni_import_init.res [deleted file]
tests/sav/test_ni_import_meth.res [deleted file]
tests/sav/test_ni_local_ref.res [deleted file]
tests/sav/test_ni_null.res [deleted file]
tests/sav/test_ni_operators.res [deleted file]
tests/sav/test_ni_optimized.res [deleted file]
tests/sav/test_ni_out.res [deleted file]
tests/sav/test_ni_pointer.res [deleted file]
tests/sav/test_ni_special_all_native.res [deleted file]
tests/sav/test_ni_special_from_native.res [deleted file]
tests/sav/test_ni_special_pointer.res [deleted file]
tests/sav/test_ni_special_to_native.res [deleted file]
tests/sav/test_ni_strings.res [deleted file]
tests/test_ni_accessor.nit [deleted file]
tests/test_ni_cast_extra.nit [deleted file]
tests/test_ni_cast_simple.nit [deleted file]
tests/test_ni_fibonacci.nit [deleted file]
tests/test_ni_global_not_called_but_referred.nit [deleted file]
tests/test_ni_global_only_from_native.nit [deleted file]
tests/test_ni_import_init.nit [deleted file]
tests/test_ni_import_meth.nit [deleted file]
tests/test_ni_local_ref.nit [deleted file]
tests/test_ni_new.nit [deleted file]
tests/test_ni_null.nit [deleted file]
tests/test_ni_operators.nit [deleted file]
tests/test_ni_optimized.nit [deleted file]
tests/test_ni_out.nit [deleted file]
tests/test_ni_pointer.nit [deleted file]
tests/test_ni_primitives.nit [deleted file]
tests/test_ni_special_all_native.nit [deleted file]
tests/test_ni_special_from_native.nit [deleted file]
tests/test_ni_special_pointer.nit [deleted file]
tests/test_ni_special_to_native.nit [deleted file]
tests/test_ni_strings.nit [deleted file]
tests/test_ni_super.nit [deleted file]

diff --git a/tests/base_ni.nit b/tests/base_ni.nit
deleted file mode 100644 (file)
index e28d36f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.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
-
-interface I
-end
-
-abstract class AC
-end
-
-class C
-end
-
-enum E
-end
-
-extern class EC
-       #alt1# super I
-       #alt2# super AC
-       #alt3# super C
-       #alt4# super E
-       fun foo do 1.output
-       #alt5# var x: Int 
-end
-
-class I2
-       #alt6# super EC
-end
-
-class AC2
-       #alt7# super EC
-end
-
-class C2
-       #alt8# super EC
-end
-
-class E2
-       #alt9# super EC
-end
-
-fun inita: EC is extern
-
-var a = inita
-#alt10# a = new EC 
-a.foo
-
diff --git a/tests/sav/base_ni.res b/tests/sav/base_ni.res
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/sav/base_ni_alt10.res b/tests/sav/base_ni_alt10.res
deleted file mode 100644 (file)
index 5d037e1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt10.nit:57,5--10: Error: Method 'init' doesn't exists in EC.
diff --git a/tests/sav/base_ni_alt2.res b/tests/sav/base_ni_alt2.res
deleted file mode 100644 (file)
index 8087dee..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt2.nit:29,14--15: Special error: Extern class EC try to specialise class AC.
diff --git a/tests/sav/base_ni_alt3.res b/tests/sav/base_ni_alt3.res
deleted file mode 100644 (file)
index aab403b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt3.nit:29,14--15: Special error: Extern class EC try to specialise class C.
diff --git a/tests/sav/base_ni_alt4.res b/tests/sav/base_ni_alt4.res
deleted file mode 100644 (file)
index 1824bf8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-alt/base_ni_alt4.nit:29,14--15: Special error: Class EC try to specialise enum class E.
-alt/base_ni_alt4.nit:29,14--15: Special error: Extern class EC try to specialise class E.
diff --git a/tests/sav/base_ni_alt5.res b/tests/sav/base_ni_alt5.res
deleted file mode 100644 (file)
index c513c9a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt5.nit:35,6: Error: Attempt to define attribute x in the extern class EC.
diff --git a/tests/sav/base_ni_alt6.res b/tests/sav/base_ni_alt6.res
deleted file mode 100644 (file)
index a7d3c3c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt6.nit:38,7--8: Special error: Class I2 try to specialise extern class EC.
diff --git a/tests/sav/base_ni_alt7.res b/tests/sav/base_ni_alt7.res
deleted file mode 100644 (file)
index 3b96b89..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt7.nit:42,7--9: Special error: Class AC2 try to specialise extern class EC.
diff --git a/tests/sav/base_ni_alt8.res b/tests/sav/base_ni_alt8.res
deleted file mode 100644 (file)
index 53fe5bb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt8.nit:46,7--8: Special error: Class C2 try to specialise extern class EC.
diff --git a/tests/sav/base_ni_alt9.res b/tests/sav/base_ni_alt9.res
deleted file mode 100644 (file)
index d76ace3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-alt/base_ni_alt9.nit:50,7--8: Special error: Class E2 try to specialise extern class EC.
diff --git a/tests/sav/test_ni_cast_extra.res b/tests/sav/test_ni_cast_extra.res
deleted file mode 100644 (file)
index d9f08d7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-test_ni_cast_extra.nit:50,21--28: Warning: comparaison between null and a non nullable value.
-a isa b false (expected: false)
-c isa a true (expected: true)
-d isa b true (expected: true)
-da is null? false (expected: false)
-db is null? false (expected: false)
-ab is null? true (expected: true)
diff --git a/tests/sav/test_ni_cast_simple.res b/tests/sav/test_ni_cast_simple.res
deleted file mode 100644 (file)
index 86e041d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-foo
-bar
-baz
diff --git a/tests/sav/test_ni_global_only_from_native.res b/tests/sav/test_ni_global_only_from_native.res
deleted file mode 100644 (file)
index 6178079..0000000
+++ /dev/null
@@ -1 +0,0 @@
-b
diff --git a/tests/sav/test_ni_import_init.res b/tests/sav/test_ni_import_init.res
deleted file mode 100644 (file)
index 0d8f9dd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-100==100
-33==33
diff --git a/tests/sav/test_ni_import_meth.res b/tests/sav/test_ni_import_meth.res
deleted file mode 100644 (file)
index def9538..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-nity
-nity
-nity1 3
-nity2 7 13
diff --git a/tests/sav/test_ni_local_ref.res b/tests/sav/test_ni_local_ref.res
deleted file mode 100644 (file)
index 4195344..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-x
-y
-y
-y
-x
-y
-y
-y
-x
-y
-y
-y
-x
-y
-y
-y
-x
-y
-y
-y
-x
-y
-y
-y
diff --git a/tests/sav/test_ni_null.res b/tests/sav/test_ni_null.res
deleted file mode 100644 (file)
index 2cd94a1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-true -? true
-false -? false
-false -? false
-true -? true
-false -? false
-is null, ok
-something
diff --git a/tests/sav/test_ni_operators.res b/tests/sav/test_ni_operators.res
deleted file mode 100644 (file)
index 625c36c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-test_ni_operators.nit:77,7--25: Warning: comparaison between null and a non nullable value.
-11
-9
-22
-3
-false
-false
-false
-false
-true
-3
-4096
-true
-false
-false
-false
-false
-true
-true
-true
-false
-false
-true
-true
-52
-456
diff --git a/tests/sav/test_ni_optimized.res b/tests/sav/test_ni_optimized.res
deleted file mode 100644 (file)
index 2e5bb49..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-1234
-4
diff --git a/tests/sav/test_ni_out.res b/tests/sav/test_ni_out.res
deleted file mode 100644 (file)
index f67ecaf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-1
-2
-3
-3
-hello world
diff --git a/tests/sav/test_ni_pointer.res b/tests/sav/test_ni_pointer.res
deleted file mode 100644 (file)
index 190a180..0000000
+++ /dev/null
@@ -1 +0,0 @@
-123
diff --git a/tests/sav/test_ni_special_all_native.res b/tests/sav/test_ni_special_all_native.res
deleted file mode 100644 (file)
index 35d242b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-A
-B
diff --git a/tests/sav/test_ni_special_from_native.res b/tests/sav/test_ni_special_from_native.res
deleted file mode 100644 (file)
index 6fa5513..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-a from nit
-A
-a from extern
-A
-a from nit
-B
-a from extern
-B
diff --git a/tests/sav/test_ni_special_pointer.res b/tests/sav/test_ni_special_pointer.res
deleted file mode 100644 (file)
index 3697126..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-0
-1
-2
-1234
diff --git a/tests/sav/test_ni_special_to_native.res b/tests/sav/test_ni_special_to_native.res
deleted file mode 100644 (file)
index 7acfbdb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-test_ni_special_to_native.nit:37,1--7: Warning: Expression is already a A since it is a B.
-test_ni_special_to_native.nit:38,1--7: Warning: Expression is already a A since it is a B.
-A
-A from native
-B
-B from native
-B
-B from native
diff --git a/tests/sav/test_ni_strings.res b/tests/sav/test_ni_strings.res
deleted file mode 100644 (file)
index 4dad352..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-hello world...
-hello world?
-hello world!
-something
-9
diff --git a/tests/test_ni_accessor.nit b/tests/test_ni_accessor.nit
deleted file mode 100644 (file)
index dd13759..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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
-       readable var _r : String = "r"
-       writable var _w : String = "w"
-       readable writable var _rw : String = "rw"
-
-       fun print_all is extern import String::to_cstring, r, rw
-       fun modify is extern import NativeString::to_s, w=, rw=
-end
-
-class B
-       fun print_and_modify( a : A ) is extern import A::rw, A::rw=, String::to_cstring, NativeString::to_s
-end
-
-var a = new A
-a.print_all
-a.modify
-a.print_all
-
-var b = new B
-b.print_and_modify( a )
diff --git a/tests/test_ni_cast_extra.nit b/tests/test_ni_cast_extra.nit
deleted file mode 100644 (file)
index 96a239a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 isa_b : Bool is extern import A as(B)
-    fun as_b : nullable B is extern import A as(B), A as(nullable B)
-end
-
-class B
-end
-
-class C
-super A
-    fun isa_a : Bool is extern import C as(A)
-end
-
-class D # triangle
-super A
-super B
-    init do end
-    fun as_a : A is extern import D as(A)
-end
-
-# isa
-var a = new A
-var c = new C
-var d = new D
-
-print "a isa b {a.isa_b} (expected: false)"
-print "c isa a {c.isa_a} (expected: true)"
-print "d isa b {d.isa_b} (expected: true)"
-
-var da = d.as_a
-var db = d.as_b
-var ab = a.as_b
-
-print "da is null? {da==null} (expected: false)"
-print "db is null? {db==null} (expected: false)"
-print "ab is null? {ab==null} (expected: true)"
diff --git a/tests/test_ni_cast_simple.nit b/tests/test_ni_cast_simple.nit
deleted file mode 100644 (file)
index f6c5824..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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.
-
-fun s_to_o( s : String ) : Object is extern import String as ( Object )
-
-fun n_to_nn( s : String ) : nullable String is extern import String as nullable
-fun nn_to_n( s : nullable String ) : String is extern import nullable String as not nullable
-
-var o = s_to_o( "foo" )
-var nn = n_to_nn( "bar" )
-var n = nn_to_n( "baz" )
-
-print o
-
-if nn == null
-then
-    print "null (not good)"
-else
-    print nn
-end
-
-print n
diff --git a/tests/test_ni_fibonacci.nit b/tests/test_ni_fibonacci.nit
deleted file mode 100644 (file)
index 155add3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 FibonacciEngine
-       fun fibonacci( n : Int ) : Int is extern import fibonacci
-end
-
-redef class Int
-       fun fibonacci : Int is extern import fibonacci
-end
-
-var engine = new FibonacciEngine
-print engine.fibonacci( 0 )
-print engine.fibonacci( 1 )
-print engine.fibonacci( 5 )
-print engine.fibonacci( 12 )
-# print engine.fibonacci( 123 )
-
-print 0.fibonacci
-print 1.fibonacci
-print 5.fibonacci
-print 12.fibonacci
-# print 123.fibonacci
diff --git a/tests/test_ni_global_not_called_but_referred.nit b/tests/test_ni_global_not_called_but_referred.nit
deleted file mode 100644 (file)
index eb3c30e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 f( b : B ) is extern import B::g
-end
-
-class B
-       fun g do print "b"
-end
-
diff --git a/tests/test_ni_global_only_from_native.nit b/tests/test_ni_global_only_from_native.nit
deleted file mode 100644 (file)
index d6517ff..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 f( b : B ) is extern import B::g
-end
-
-class B
-       fun g do print "b"
-end
-
-var b = new B
-var a = new A
-a.f( b )
diff --git a/tests/test_ni_import_init.nit b/tests/test_ni_import_init.nit
deleted file mode 100644 (file)
index f7ecbc9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 B
-       var _i : Int = 0
-
-       init do end
-
-       init from( i : Int )
-       do
-               _i = i
-       end
-
-       fun i : Int do return _i end
-end
-
-class A
-       fun ex_sees_b_attr( b : B ) : Int is extern import B::i
-
-       fun ex_sees_b_init( i : Int ) : B is extern import B, B::from
-end
-
-var a = new A
-var b100 = new B.from( 100 )
-
-print "100=={a.ex_sees_b_attr( b100 )}"
-print "33=={a.ex_sees_b_init( 33 ).i}"
diff --git a/tests/test_ni_import_meth.nit b/tests/test_ni_import_meth.nit
deleted file mode 100644 (file)
index db9a014..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 nity do print "nity"
-       fun nity1 ( x : Int ) do print "nity1 {x}"
-       fun nity2 ( x : Int, y : Int ) do print "nity2 {x} {y}"
-
-       fun ex_sees_nity is extern import nity
-
-       fun ex_sees_nities is extern import nity1, nity2
-end
-
-var a = new A
-a.ex_sees_nity
-a.ex_sees_nities
diff --git a/tests/test_ni_local_ref.nit b/tests/test_ni_local_ref.nit
deleted file mode 100644 (file)
index 8c80f67..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 ToBePreserved
-       var id : String
-
-       redef fun output do print id
-end
-
-class A
-       fun run( a, b, c, d : ToBePreserved ) is extern import ToBePreserved::output, launch_gc
-       fun run2( a, b, c, d : ToBePreserved ) is extern import ToBePreserved::output, launch_gc, run
-
-       fun launch_gc do sys.force_garbage_collection
-end
-
-var x = new ToBePreserved( "x" )
-var y = new ToBePreserved( "y" )
-
-var a = new A
-a.run( x, y, y, y )
-a.run2( x, y, y, y )
-
diff --git a/tests/test_ni_new.nit b/tests/test_ni_new.nit
deleted file mode 100644 (file)
index e25214e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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.
-
-extern A super Pointer
-       new is extern import p
-       new with_args( x : Int, a : A ) is extern
-
-       fun a do print "a"
-       fun p is extern
-       fun d : A is extern import d, A
-end
-
-class B
-       init do end
-end
-
-var a = new A
-var b = new A.with_args( 2345, a )
-a.a
-b.a
-
-a.p # 1234
-b.p # 2345
-new A.with_args( 3456, b ).p # 3456
-
-a.d.p #
-b.d.p #
-
-var c = new B
diff --git a/tests/test_ni_null.nit b/tests/test_ni_null.nit
deleted file mode 100644 (file)
index 22941b4..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 is_int_null( ni : nullable Int ) : Bool is extern import Int as not nullable
-       fun is_a_null( na : nullable A ) : Bool is extern import A as not nullable
-
-       fun get_nullable_string( get_nulled : Bool ) : nullable String is extern import NativeString::to_s, String as nullable
-end
-
-var a = new A
-
-print "true -? {a.is_int_null( null )}"
-print "false -? {a.is_int_null( 0 )}"
-print "false -? {a.is_int_null( 1234 )}"
-
-print "true -? {a.is_a_null( null )}"
-print "false -? {a.is_a_null( a )}"
-
-var nstr = a.get_nullable_string( true )
-if nstr == null then print "is null, ok" else print nstr # expects "is null"
-
-nstr = a.get_nullable_string( false )
-if nstr == null then print "is null, error" else print nstr # expects "something"
diff --git a/tests/test_ni_operators.nit b/tests/test_ni_operators.nit
deleted file mode 100644 (file)
index e1b33f2..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 value : Int
-
-       init ( value : Int ) do self.value = value
-
-       fun +( other : A ) : A is extern import value, A
-
-       fun -( other : A ) : A is extern import value, A
-
-       fun *( by : Int ) : A is extern import value, A
-
-       fun /( by : Int ) : A is extern import value, A
-
-       redef fun ==( other ) is extern import value, nullable Object as(A)
-
-       fun %( other : A ) : A is extern import value, A
-
-#      fun +=( other : A ) : A is extern import value, value=, A `{
-#              int new_val = A_value( recv ) + A_value( other );
-#              A_value__assign( recv, new_val );
-#              return new_A( new_val );
-#      `}
-
-#      fun -=( other : A ) : A is extern import +=, A, value `{
-#              A inv_other = new_A( -1*A_value( other ) );
-#              return A__plus_equal( recv, int_other );
-#      `}
-
-       fun <=>( other : A ) : A is extern import value, A
-
-#      fun @( other : A ) : A is extern import value, A `{
-#              return new_A( A_value( recv )* 1000 );
-#      `}
-
-       fun >( other : A ) : Bool is extern import value
-
-       fun <( other : A ) : Bool is extern import value
-
-       fun >=( other : A ) : Bool is extern import value
-
-       fun <=( other : A ) : Bool is extern import value
-
-       fun >>( other : A ) is extern import value, value=, A
-
-       fun <<( other : A ) is extern import value, A
-
-       fun []( index : Int ) : A is extern import A
-
-       fun []=( index : Int, value : A ) : A is extern import A
-
-       redef fun to_s do return value.to_s
-end
-
-print new A( 1 ) + new A( 10 ) # 11
-print new A( 10 ) - new A( 1 ) # 9
-
-print new A( 2 ) * 11 # 22
-print new A( 33 ) / 11 # 3
-
-print new A( 44 ) == null # false
-print new A( 55 ) == 55 # false
-print new A( 33 ) == new A( 11 ) # false
-print new A( 22 ) == new A( 77 ) # false
-print new A( 11 ) == new A( 11 ) # true
-
-print new A( 147 ) % new A( 12 ) # 3
-print new A( 4 ) <=> new A( 123 ) # 4096
-
-print new A( 1 ) < new A( 100 ) # true
-print new A( 100 ) < new A( 100 ) # false
-print new A( 100 ) < new A( 1 ) # false
-
-print new A( 1 ) > new A( 100 ) # false
-print new A( 100 ) > new A( 100 ) # false
-print new A( 100 ) > new A( 1 ) # true
-
-print new A( 1 ) <= new A( 100 ) # true
-print new A( 100 ) <= new A( 100 ) # true
-print new A( 100 ) <= new A( 1 ) # false
-
-print new A( 1 ) >= new A( 100 ) # false
-print new A( 100 ) >= new A( 100 ) # true
-print new A( 100 ) >= new A( 1 ) # true
-
-#var x = new A( 1 )
-#x << new A( 5 )
-#print x # 16
-
-#var y = new A( 32 )
-#y >> new A( 2 )
-#print y # 8
-
-var a = new A( 456 )
-print a[ 52 ] # 52
-
-a[ 74 ] = new A( 96 )
-print a # 96
diff --git a/tests/test_ni_optimized.nit b/tests/test_ni_optimized.nit
deleted file mode 100644 (file)
index a7acf8a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2012 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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( i : Int, o : Object ) is extern
-end
-
-redef class Int
-       fun bar( o : Object, u : nullable Object ) : Int is extern
-end
-
-(new A).foo( 1234, sys )
-print 2.bar( "titi", null )
-
diff --git a/tests/test_ni_out.nit b/tests/test_ni_out.nit
deleted file mode 100644 (file)
index 83a80c3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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
-       init do end
-
-       fun is_not_extern do end
-
-       fun proc is extern
-       fun function : Int is extern
-
-       fun one( x : Int ) : Int is extern
-       fun two( x : Int, y : Int ) : Int is extern
-       fun three( x : Int, y : Int, z : Int ) : Int is extern
-end
-
-fun in_object( o : Object ) : Object is extern
-
-var a = new A
-print a.function
-print a.one( 2 )
-print a.two( 1, 2 )
-print a.three( 2, 4, 3 )
-print in_object( "hello world" )
diff --git a/tests/test_ni_pointer.nit b/tests/test_ni_pointer.nit
deleted file mode 100644 (file)
index 85a06c7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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.
-
-extern A
-super Pointer
-       new is extern
-
-       redef fun to_s : String is extern import NativeString::to_s
-end
-
-var a = new A
-print a
diff --git a/tests/test_ni_primitives.nit b/tests/test_ni_primitives.nit
deleted file mode 100644 (file)
index 88fd001..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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.
-
-fun opposite( v : Bool ) : Bool is extern
-fun plus_10( v : Char ) : Char is extern
-fun plus_1000( v : Int ) : Int is extern
-fun multiply_by_100( v : Float ) : Float is extern
-fun print_ns( s : NativeString ) is extern
-
-print opposite( true )
-print opposite( false )
-
-print plus_10( 'a' )
-
-print plus_1000( 1234 )
-
-print multiply_by_100( 123.45 )
-
-print_ns( "hello world".to_cstring )
diff --git a/tests/test_ni_special_all_native.nit b/tests/test_ni_special_all_native.nit
deleted file mode 100644 (file)
index 55e1900..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 work is extern
-       fun call is extern import work
-end
-
-class B
-super A
-       redef fun work is extern
-end
-
-var a = new A
-var b = new B
-
-a.call
-b.call
diff --git a/tests/test_ni_special_from_native.nit b/tests/test_ni_special_from_native.nit
deleted file mode 100644 (file)
index 6a8c2ef..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 nity do print "A"
-       fun exy is extern import nity
-end
-
-class B
-super A
-       redef fun nity do print "B"
-end
-
-var a = new A
-print "a from nit"
-a.nity
-print "a from extern"
-a.exy
-
-var b = new B
-print "a from nit"
-b.nity
-print "a from extern"
-b.exy
diff --git a/tests/test_ni_special_pointer.nit b/tests/test_ni_special_pointer.nit
deleted file mode 100644 (file)
index afd9833..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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.
-
-extern ExternInt super Pointer
-       new as_0 is extern
-       new as_1 is extern
-       new as_2 is extern
-
-       redef fun to_s : String is extern import NativeString::to_s
-       fun to_i : Int is extern
-end
-
-redef class Int
-       fun to_extern_int : ExternInt is extern
-end
-
-var i = new ExternInt.as_0
-print i.to_i
-
-i = new ExternInt.as_1
-print i.to_i
-
-i = new ExternInt.as_2
-print i.to_i
-
-i = 1234 .to_extern_int
-print i.to_i
diff --git a/tests/test_ni_special_to_native.nit b/tests/test_ni_special_to_native.nit
deleted file mode 100644 (file)
index 0ba73d2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 extern_echo is extern
-       fun echo do print "A"
-end
-
-class B
-super A
-       redef fun extern_echo is extern
-       redef fun echo do print "B"
-end
-
-var a = new A
-a.echo
-a.extern_echo
-
-var b = new B
-b.echo
-b.extern_echo
-
-# explicit casts
-b.as(A).echo
-b.as(A).extern_echo
diff --git a/tests/test_ni_strings.nit b/tests/test_ni_strings.nit
deleted file mode 100644 (file)
index 60af299..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 get_str_from_nstr( nstr : NativeString ) : String is extern import NativeString::to_s
-       fun get_str_from_nstr_with_len( nstr : NativeString ) : String is extern import NativeString::to_s_with_length, NativeString::cstring_length
-
-       fun get_nstr_from_str( str : String ) : NativeString is extern import String::to_cstring
-
-       fun get_something : String is extern import NativeString::to_s
-end
-
-var a = new A
-print a.get_str_from_nstr( "hello world...".to_cstring )
-print a.get_str_from_nstr_with_len( "hello world?".to_cstring )
-print a.get_nstr_from_str( "hello world!" ).to_s
-
-
-var something = a.get_something # expects "something"
-print something
-print something.length
diff --git a/tests/test_ni_super.nit b/tests/test_ni_super.nit
deleted file mode 100644 (file)
index e0c0d1b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
-#
-# 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 id : String do return "A"
-end
-
-class B
-super A
-       redef fun id : String is extern import super, NativeString::to_s, String::to_cstring
-end
-
-var a = new A
-print a.id
-
-var b = new B
-print b.id