tests: add base_covar_int.nit
authorJean Privat <jean@pryen.org>
Wed, 17 Jul 2013 14:57:54 +0000 (10:57 -0400)
committerJean Privat <jean@pryen.org>
Wed, 17 Jul 2013 14:57:54 +0000 (10:57 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/base_covar_int.nit [new file with mode: 0644]
tests/sav/base_covar_int.res [new file with mode: 0644]
tests/sav/base_covar_int_alt1.res [new file with mode: 0644]
tests/sav/base_covar_int_alt2.res [new file with mode: 0644]
tests/sav/base_covar_int_alt3.res [new file with mode: 0644]
tests/sav/base_covar_int_alt4.res [new file with mode: 0644]
tests/sav/base_covar_int_alt5.res [new file with mode: 0644]
tests/sav/nitc/base_covar_int_alt1.res [new file with mode: 0644]
tests/sav/nitc/base_covar_int_alt3.res [new file with mode: 0644]
tests/sav/nitc/base_covar_int_alt5.res [new file with mode: 0644]

diff --git a/tests/base_covar_int.nit b/tests/base_covar_int.nit
new file mode 100644 (file)
index 0000000..db5d705
--- /dev/null
@@ -0,0 +1,29 @@
+# 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
+
+var d1: Discrete = 1
+var d2: Discrete = 2
+var c1: Discrete = 'a'
+var c2: Discrete = 'b'
+(1<2).output
+(d1<2).output
+#alt1#(c1<2).output
+#alt2#(1<d2).output
+(d1<d2).output
+#alt3#(c1<d2).output
+#alt4#(1<c2).output
+#alt5#(d1<c2).output
+(c1<c2).output
diff --git a/tests/sav/base_covar_int.res b/tests/sav/base_covar_int.res
new file mode 100644 (file)
index 0000000..1140ff5
--- /dev/null
@@ -0,0 +1,4 @@
+true
+true
+true
+true
diff --git a/tests/sav/base_covar_int_alt1.res b/tests/sav/base_covar_int_alt1.res
new file mode 100644 (file)
index 0000000..927bc59
--- /dev/null
@@ -0,0 +1,3 @@
+Runtime error: Cast failed (../lib/standard/kernel.nit:386)
+true
+true
diff --git a/tests/sav/base_covar_int_alt2.res b/tests/sav/base_covar_int_alt2.res
new file mode 100644 (file)
index 0000000..9aa073e
--- /dev/null
@@ -0,0 +1 @@
+alt/base_covar_int_alt2.nit:24,4--5: Type error: expected Int, got Discrete
diff --git a/tests/sav/base_covar_int_alt3.res b/tests/sav/base_covar_int_alt3.res
new file mode 100644 (file)
index 0000000..eeb11ae
--- /dev/null
@@ -0,0 +1,4 @@
+Runtime error: Cast failed (../lib/standard/kernel.nit:386)
+true
+true
+true
diff --git a/tests/sav/base_covar_int_alt4.res b/tests/sav/base_covar_int_alt4.res
new file mode 100644 (file)
index 0000000..e13ee62
--- /dev/null
@@ -0,0 +1 @@
+alt/base_covar_int_alt4.nit:27,4--5: Type error: expected Int, got Discrete
diff --git a/tests/sav/base_covar_int_alt5.res b/tests/sav/base_covar_int_alt5.res
new file mode 100644 (file)
index 0000000..b45080b
--- /dev/null
@@ -0,0 +1,4 @@
+Runtime error: Cast failed (../lib/standard/kernel.nit:235)
+true
+true
+true
diff --git a/tests/sav/nitc/base_covar_int_alt1.res b/tests/sav/nitc/base_covar_int_alt1.res
new file mode 100644 (file)
index 0000000..a9013d7
--- /dev/null
@@ -0,0 +1,3 @@
+Runtime error: Cast failed (../lib/standard/kernel.nit)
+true
+true
diff --git a/tests/sav/nitc/base_covar_int_alt3.res b/tests/sav/nitc/base_covar_int_alt3.res
new file mode 100644 (file)
index 0000000..76c1229
--- /dev/null
@@ -0,0 +1,4 @@
+Runtime error: Cast failed (../lib/standard/kernel.nit)
+true
+true
+true
diff --git a/tests/sav/nitc/base_covar_int_alt5.res b/tests/sav/nitc/base_covar_int_alt5.res
new file mode 100644 (file)
index 0000000..76c1229
--- /dev/null
@@ -0,0 +1,4 @@
+Runtime error: Cast failed (../lib/standard/kernel.nit)
+true
+true
+true