tests: migrate tests using Char::+|- and Int::succ|prec
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 3 Apr 2014 12:54:38 +0000 (08:54 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 3 Apr 2014 17:51:07 +0000 (13:51 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

tests/base_char_operators.nit
tests/base_gen_reassign.nit
tests/base_int.nit
tests/base_int2.nit
tests/sav/base_gen_reassign_alt3.res

index bbae613..95c65f3 100644 (file)
@@ -14,8 +14,8 @@
 
 import kernel
 
-('a'+1).output
-('a'-1).output
+('a'.successor(1)).output
+('a'.predecessor(1)).output
 ('a'<'b').output
 ('a'>'b').output
 ('a'<='b').output
index cf1e3de..0eabacc 100644 (file)
@@ -38,25 +38,25 @@ g.foo = gp
 g.foo = g.foo + 20
 g.foo += 30
 
-var gc = new G[Char]
+var gc = new G[Float]
 #alt1#var gcf = gc.foo
-#alt1#var gcp = gcf + 10
+#alt1#var gcp = gcf + 10.0
 #alt1#gc.foo = gcp
-#alt2#gc.foo = gc.foo + 20
+#alt2#gc.foo = gc.foo + 20.0
 #alt3#gc.foo += 30
 
-var gd: G[Discrete] = new G[Int]
+var gd: G[Numeric] = new G[Int]
 var gdf = gd.foo
 var gdp = gdf + 10
 gd.foo = gdp
 gd.foo = gd.foo + 20
 gd.foo += 30
 
-var gdc: G[Discrete] = new G[Char]
+var gdc: G[Numeric] = new G[Float]
 #alt4#var gdcf = gdc.foo
-#alt4#var gdcp = gdcf + 10
+#alt4#var gdcp = gdcf + 10.0
 #alt4#gdc.foo = gdcp
-#alt5#gdc.foo = gdc.foo + 20
-#alt6#gdc.foo += 30
+#alt5#gdc.foo = gdc.foo + 20.0
+#alt6#gdc.foo += 30.0
 
 var c = 'X'
index 8b93673..4a1c786 100644 (file)
@@ -69,5 +69,5 @@ import kernel
 (3<=>2).output
 '\n'.output
 
-1.succ.output
-3.prec.output
+1.successor(1).output
+3.predecessor(1).output
index eb1e7dc..3e66af7 100644 (file)
@@ -73,5 +73,5 @@ fun three: Int do return 3
 (three<=>two).output
 '\n'.output
 
-one.succ.output
-three.prec.output
+one.successor(1).output
+three.predecessor(1).output
index 602b7df..5c6088c 100644 (file)
@@ -1 +1 @@
-alt/base_gen_reassign_alt3.nit:46,11--12: Type error: expected Char, got Int
+alt/base_gen_reassign_alt3.nit:46,11--12: Type error: expected Float, got Int