summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-02-05 14:38:06 +0000
committermihaylov <mihaylov@epfl.ch>2007-02-05 14:38:06 +0000
commitfd8dff6dd8148e83d24f3be3f8b22b7f4b253760 (patch)
tree0d3e00aabbca154e09f89dd800c5f37cdd680e14 /test/files/run
parent611f4541686a87ba6d871a95951d476a288816a4 (diff)
downloadscala-fd8dff6dd8148e83d24f3be3f8b22b7f4b253760.tar.gz
scala-fd8dff6dd8148e83d24f3be3f8b22b7f4b253760.tar.bz2
scala-fd8dff6dd8148e83d24f3be3f8b22b7f4b253760.zip
MSIL-firendly test suit
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/Course-2002-01-msil.check34
-rw-r--r--test/files/run/Course-2002-02-msil.check187
-rw-r--r--test/files/run/Course-2002-03-msil.check67
-rw-r--r--test/files/run/Course-2002-04-msil.check64
-rw-r--r--test/files/run/Course-2002-08-msil.check171
-rw-r--r--test/files/run/Course-2002-09-msil.check50
-rw-r--r--test/files/run/Course-2002-10-msil.check46
-rw-r--r--test/files/run/absoverride-msil.check20
-rw-r--r--test/files/run/boolord-msil.check4
-rw-r--r--test/files/run/bugs-msil.check96
-rw-r--r--test/files/run/classof.scala2
-rwxr-xr-xtest/files/run/collections.scala5
-rw-r--r--test/files/run/impconvtimes-msil.check1
-rw-r--r--test/files/run/infix-msil.check2
-rw-r--r--test/files/run/misc-msil.check33
-rw-r--r--test/files/run/promotion-msil.check4
-rw-r--r--test/files/run/runtime-msil.check64
-rw-r--r--test/files/run/tuples-msil.check2
-rw-r--r--test/files/run/unittest_io.scala30
-rw-r--r--test/files/run/unittest_xml.scala61
20 files changed, 849 insertions, 94 deletions
diff --git a/test/files/run/Course-2002-01-msil.check b/test/files/run/Course-2002-01-msil.check
new file mode 100644
index 0000000000..ca9d7ac54b
--- /dev/null
+++ b/test/files/run/Course-2002-01-msil.check
@@ -0,0 +1,34 @@
+232
+667
+11
+10
+62.8318
+62.8318
+62.8318
+4
+81
+256
+25
+1
+737
+1
+0
+1
+76
+1.41421568627451
+1.73214285714286
+2.00000009292229
+1.41421568627451
+1.73214285714286
+2.00000009292229
+1.41421568627451
+1.73214285714286
+2.00000009292229
+sqrt(2) = 1.41421356237469
+sqrt(2) = 1.41421356237469
+cbrt(2) = 1.25992105001777
+1
+1 1
+1 2 1
+1 3 3 1
+1 4 6 4 1
diff --git a/test/files/run/Course-2002-02-msil.check b/test/files/run/Course-2002-02-msil.check
new file mode 100644
index 0000000000..12ac0b1739
--- /dev/null
+++ b/test/files/run/Course-2002-02-msil.check
@@ -0,0 +1,187 @@
+7
+120
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+
+pi = 3.18110488557771
+pi = 3.18110488557771
+
+10
+100
+2.08333333333333
+3025.76877140318
+pi = 3.16597927284322
+pi = 3.18110488557771
+pi = 3.18110488557771
+
+1.5
+1.41666666666667
+1.41421568627451
+1.41421356237469
+sqrt(2) = 1.41421356237469
+
+1.5
+1.41666666666667
+1.41421568627451
+1.41421356237469
+sqrt(2) = 1.41421356237469
+
+1 + 2 + .. + 5 = 15
+1 * 2 * .. * 5 = 120
+
+1^2 + 2^2 + .. + 5^2 = 55
+1^2 * 2^2 * .. * 5^2 = 14400
+
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+
+1 + 2 + .. + 5 = 15
+1 * 2 * .. * 5 = 120
+
+1^2 + 2^2 + .. + 5^2 = 55
+1^2 * 2^2 * .. * 5^2 = 14400
+
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+
+1 + 2 + .. + 5 = 15
+1 * 2 * .. * 5 = 120
+
+1^2 + 2^2 + .. + 5^2 = 55
+1^2 * 2^2 * .. * 5^2 = 14400
+
+factorial(0) = 1
+factorial(1) = 1
+factorial(2) = 2
+factorial(3) = 6
+factorial(4) = 24
+factorial(5) = 120
+
+fib(0) = 0
+fib(1) = 1
+fib(2) = 1
+fib(3) = 2
+fib(4) = 3
+fib(5) = 5
+fib(6) = 8
+fib(7) = 13
+fib(8) = 21
+fib(9) = 34
+fib(0) = 0
+fib(1) = 1
+fib(2) = 1
+fib(3) = 2
+fib(4) = 3
+fib(5) = 5
+fib(6) = 8
+fib(7) = 13
+fib(8) = 21
+fib(9) = 34
+power(0,0) = 1
+power(0,1) = 0
+power(0,2) = 0
+power(0,3) = 0
+power(0,4) = 0
+power(0,5) = 0
+power(0,6) = 0
+power(0,7) = 0
+power(0,8) = 0
+
+power(1,0) = 1
+power(1,1) = 1
+power(1,2) = 1
+power(1,3) = 1
+power(1,4) = 1
+power(1,5) = 1
+power(1,6) = 1
+power(1,7) = 1
+power(1,8) = 1
+
+power(2,0) = 1
+power(2,1) = 2
+power(2,2) = 4
+power(2,3) = 8
+power(2,4) = 16
+power(2,5) = 32
+power(2,6) = 64
+power(2,7) = 128
+power(2,8) = 256
+
+power(3,0) = 1
+power(3,1) = 3
+power(3,2) = 9
+power(3,3) = 27
+power(3,4) = 81
+power(3,5) = 243
+power(3,6) = 729
+power(3,7) = 2187
+power(3,8) = 6561
+
+power(4,0) = 1
+power(4,1) = 4
+power(4,2) = 16
+power(4,3) = 64
+power(4,4) = 256
+power(4,5) = 1024
+power(4,6) = 4096
+power(4,7) = 16384
+power(4,8) = 65536
+
+power(5,0) = 1
+power(5,1) = 5
+power(5,2) = 25
+power(5,3) = 125
+power(5,4) = 625
+power(5,5) = 3125
+power(5,6) = 15625
+power(5,7) = 78125
+power(5,8) = 390625
+
diff --git a/test/files/run/Course-2002-03-msil.check b/test/files/run/Course-2002-03-msil.check
new file mode 100644
index 0000000000..3556893e16
--- /dev/null
+++ b/test/files/run/Course-2002-03-msil.check
@@ -0,0 +1,67 @@
+1
+2
+1/2
+5/6
+
+1/3
+5/7
+3/2
+66/42
+
+1/3
+5/7
+3/2
+11/7
+
+11/7
+7/11
+11/7
+11/7
+
+13/36
+
+False
+True
+True
+False
+
+set0 = []
+set1 = [1]
+set2 = [1,2]
+set3 = [1,2,3]
+set4 = [1,2,3,4]
+
+set2 contains the following elements:
+1
+2
+
+set3 contains the following elements:
+1
+2
+3
+
+set4 contains the following elements:
+1
+2
+3
+4
+
+2 <- set2: True
+3 <- set2: False
+
+setx = [-10,-1,0,3,5,21]
+setx * 2 = [-20,-2,0,6,10,42]
+
+setx = [-10,-1,0,3,5,21]
+sety = [-9,-5,-1,0,3,7,8]
+setx & sety = [-1,0,3]
+sety & setx = [-1,0,3]
+setx > 0 = [3,5,21]
+sety > 0 = [3,7,8]
+setx & sety = [-1,0,3]
+sety & setx = [-1,0,3]
+
+1/1
+1/1
+1/1
+
diff --git a/test/files/run/Course-2002-04-msil.check b/test/files/run/Course-2002-04-msil.check
new file mode 100644
index 0000000000..c5709d2116
--- /dev/null
+++ b/test/files/run/Course-2002-04-msil.check
@@ -0,0 +1,64 @@
+list0 = List(6,3,1,8,7,1,2,5,8,4,3,4,8)
+list1 = List(1,1,2,3,3,4,4,5,6,7,8,8,8)
+list2 = List(1,1,2,3,3,4,4,5,6,7,8,8,8)
+list3 = List(1,1,2,3,3,4,4,5,6,7,8,8,8)
+list4 = List(1,1,2,3,3,4,4,5,6,7,8,8,8)
+list5 = List(8,8,8,7,6,5,4,4,3,3,2,1,1)
+list6 = List(8,8,8,7,6,5,4,4,3,3,2,1,1)
+
+list0: List() -> List()
+list1: List(0) -> List(0)
+list2: List(0,1) -> List(0,1)
+list3: List(1,0) -> List(0,1)
+list4: List(0,1,2) -> List(0,1,2)
+list5: List(1,0,2) -> List(0,1,2)
+list6: List(0,1,2) -> List(0,1,2)
+list7: List(1,0,2) -> List(0,1,2)
+list8: List(2,0,1) -> List(0,1,2)
+list9: List(2,1,0) -> List(0,1,2)
+listA: List(6,3,1,8,7,1,2,5,8,4) -> List(1,1,2,3,4,5,6,7,8,8)
+
+f(x) = 5x^3+7x^2+5x+9
+f(0) = 9
+f(1) = 26
+f(2) = 87
+f(3) = 222
+
+v1 = List(2,3,4)
+v2 = List(6,7,8)
+
+id = List(List(1,0,0),List(0,1,0),List(0,0,1))
+m1 = List(List(2,0,0),List(0,2,0),List(0,0,2))
+m2 = List(List(1,2,3),List(4,5,6),List(7,8,9))
+
+v1 * v1 = 29
+v1 * v2 = 65
+v2 * v1 = 65
+v1 * v2 = 65
+
+id * v1 = List(2,3,4)
+m1 * v1 = List(4,6,8)
+m2 * v1 = List(20,47,74)
+
+trn(id) = List(List(1,0,0),List(0,1,0),List(0,0,1))
+trn(m1) = List(List(2,0,0),List(0,2,0),List(0,0,2))
+trn(m2) = List(List(1,4,7),List(2,5,8),List(3,6,9))
+
+List(v1) * id = List(List(2,3,4))
+List(v1) * m1 = List(List(4,6,8))
+List(v1) * m2 = List(List(42,51,60))
+
+id * List(v1) = List(List(2,3,4),List(0,0,0),List(0,0,0))
+m1 * List(v1) = List(List(4,6,8),List(0,0,0),List(0,0,0))
+m2 * List(v1) = List(List(2,3,4),List(8,12,16),List(14,21,28))
+
+id * id = List(List(1,0,0),List(0,1,0),List(0,0,1))
+id * m1 = List(List(2,0,0),List(0,2,0),List(0,0,2))
+m1 * id = List(List(2,0,0),List(0,2,0),List(0,0,2))
+m1 * m1 = List(List(4,0,0),List(0,4,0),List(0,0,4))
+id * m2 = List(List(1,2,3),List(4,5,6),List(7,8,9))
+m2 * id = List(List(1,2,3),List(4,5,6),List(7,8,9))
+m1 * m2 = List(List(2,4,6),List(8,10,12),List(14,16,18))
+m2 * m1 = List(List(2,4,6),List(8,10,12),List(14,16,18))
+m2 * m2 = List(List(30,36,42),List(66,81,96),List(102,126,150))
+
diff --git a/test/files/run/Course-2002-08-msil.check b/test/files/run/Course-2002-08-msil.check
new file mode 100644
index 0000000000..c5b26c719b
--- /dev/null
+++ b/test/files/run/Course-2002-08-msil.check
@@ -0,0 +1,171 @@
+x = abc
+count = 111
+x = hello
+count = 112
+
+account deposit 50 -> ()
+account withdraw 20 -> 30
+account withdraw 20 -> 10
+account withdraw 15 ->
+
+x deposit 30 -> ()
+y withdraw 20 ->
+
+x deposit 30 -> ()
+x withdraw 20 -> 10
+
+x deposit 30 -> ()
+y withdraw 20 -> 10
+
+2^0 = 1
+2^1 = 2
+2^2 = 4
+2^3 = 8
+
+2^0 = 1
+2^1 = 2
+2^2 = 4
+2^3 = 8
+
+1 2 3
+List(1,2,3)
+
+out 0 new-value = False
+*** simulation started ***
+out 1 new-value = True
+!0 = 1
+
+*** simulation started ***
+out 2 new-value = False
+!1 = 0
+
+out 2 new-value = False
+
+*** simulation started ***
+0 & 0 = 0
+
+*** simulation started ***
+0 & 1 = 0
+
+*** simulation started ***
+out 11 new-value = True
+out 11 new-value = False
+1 & 0 = 0
+
+*** simulation started ***
+out 14 new-value = True
+1 & 1 = 1
+
+out 14 new-value = False
+
+*** simulation started ***
+0 | 0 = 0
+
+*** simulation started ***
+out 24 new-value = True
+0 | 1 = 1
+
+*** simulation started ***
+1 | 0 = 1
+
+*** simulation started ***
+1 | 1 = 1
+
+sum 34 new-value = False
+carry 34 new-value = False
+
+*** simulation started ***
+0 + 0 = 0
+
+*** simulation started ***
+sum 47 new-value = True
+0 + 1 = 1
+
+*** simulation started ***
+carry 50 new-value = True
+carry 50 new-value = False
+sum 54 new-value = False
+sum 54 new-value = True
+1 + 0 = 1
+
+*** simulation started ***
+carry 57 new-value = True
+sum 61 new-value = False
+1 + 1 = 2
+
+sum 61 new-value = False
+carry 61 new-value = False
+
+*** simulation started ***
+0 + 0 + 0 = 0
+
+*** simulation started ***
+sum 82 new-value = True
+0 + 0 + 1 = 1
+
+*** simulation started ***
+sum 89 new-value = False
+carry 90 new-value = True
+sum 97 new-value = True
+carry 98 new-value = False
+0 + 1 + 0 = 1
+
+*** simulation started ***
+sum 113 new-value = False
+carry 114 new-value = True
+0 + 1 + 1 = 2
+
+*** simulation started ***
+sum 121 new-value = True
+carry 122 new-value = False
+sum 129 new-value = False
+sum 129 new-value = True
+1 + 0 + 0 = 1
+
+*** simulation started ***
+carry 137 new-value = True
+sum 144 new-value = False
+1 + 0 + 1 = 2
+
+*** simulation started ***
+carry 152 new-value = False
+sum 152 new-value = True
+sum 158 new-value = False
+carry 159 new-value = True
+1 + 1 + 0 = 2
+
+*** simulation started ***
+sum 173 new-value = True
+1 + 1 + 1 = 3
+
+in 0 new-value = False
+ctrl0 0 new-value = False
+ctrl1 0 new-value = False
+ctrl2 0 new-value = False
+out0 0 new-value = False
+out1 0 new-value = False
+out2 0 new-value = False
+out3 0 new-value = False
+out4 0 new-value = False
+out5 0 new-value = False
+out6 0 new-value = False
+out7 0 new-value = False
+in 0 new-value = True
+*** simulation started ***
+out0 10 new-value = True
+ctrl0 10 new-value = True
+*** simulation started ***
+out1 13 new-value = True
+out0 14 new-value = False
+ctrl1 14 new-value = True
+*** simulation started ***
+out3 20 new-value = True
+out1 21 new-value = False
+ctrl2 21 new-value = True
+*** simulation started ***
+out7 30 new-value = True
+out3 31 new-value = False
+ctrl0 31 new-value = False
+*** simulation started ***
+out7 34 new-value = False
+out6 35 new-value = True
diff --git a/test/files/run/Course-2002-09-msil.check b/test/files/run/Course-2002-09-msil.check
new file mode 100644
index 0000000000..c921361db7
--- /dev/null
+++ b/test/files/run/Course-2002-09-msil.check
@@ -0,0 +1,50 @@
+Probe: f = 32
+Probe: c = 0
+Probe: f = ?
+Probe: c = ?
+
+Probe: f = 212
+Probe: c = 100
+Probe: f = ?
+Probe: c = ?
+
+Probe: c = 0
+Probe: f = 32
+Probe: c = ?
+Probe: f = ?
+
+Probe: c = 100
+Probe: f = 212
+Probe: c = ?
+Probe: f = ?
+
+0 Celsius -> 32 Fahrenheits
+100 Celsius -> 212 Fahrenheits
+32 Fahrenheits -> 0 Celsius
+212 Fahrenheits -> 100 Celsius
+
+a = ?, b = ?, c = ? => ? * ? = ?
+a = 2, b = ?, c = ? => 2 * ? = ?
+a = ?, b = 3, c = ? => ? * 3 = ?
+a = ?, b = ?, c = 6 => ? * ? = 6
+a = 2, b = 3, c = ? => 2 * 3 = 6
+a = 2, b = ?, c = 6 => 2 * 3 = 6
+a = ?, b = 3, c = 6 => 2 * 3 = 6
+a = 2, b = 3, c = 6 => 2 * 3 = 6
+
+a = 0, b = ?, c = ? => 0 * ? = 0
+a = ?, b = 0, c = ? => ? * 0 = 0
+a = ?, b = ?, c = 0 => ? * ? = 0
+a = 0, b = 7, c = ? => 0 * 7 = 0
+a = 7, b = 0, c = ? => 7 * 0 = 0
+a = 0, b = 0, c = ? => 0 * 0 = 0
+a = 0, b = ?, c = 0 => 0 * ? = 0
+a = ?, b = 0, c = 0 => ? * 0 = 0
+a = 0, b = 7, c = 0 => 0 * 7 = 0
+a = 7, b = 0, c = 0 => 7 * 0 = 0
+a = 0, b = 0, c = 0 => 0 * 0 = 0
+
+a = 3, b = 4 => c = 5
+a = 3, c = 5 => b = 4
+b = 4, c = 5 => a = 3
+
diff --git a/test/files/run/Course-2002-10-msil.check b/test/files/run/Course-2002-10-msil.check
new file mode 100644
index 0000000000..bbd9414370
--- /dev/null
+++ b/test/files/run/Course-2002-10-msil.check
@@ -0,0 +1,46 @@
+fib(0) = 0
+fib(1) = 1
+fib(2) = 1
+fib(3) = 2
+fib(4) = 3
+fib(5) = 5
+fib(6) = 8
+fib(7) = 13
+fib(8) = 21
+fib(9) = 34
+fib(10) = 55
+fib(11) = 89
+fib(12) = 144
+fib(13) = 233
+fib(14) = 377
+fib(15) = 610
+fib(16) = 987
+fib(17) = 1597
+fib(18) = 2584
+fib(19) = 4181
+
+pi(0) = 4 , 3.16666666666667 , 4
+pi(1) = 2.66666666666667 , 3.13333333333333 , 3.16666666666667
+pi(2) = 3.46666666666667 , 3.1452380952381 , 3.1421052631579
+pi(3) = 2.8952380952381 , 3.13968253968254 , 3.141599357319
+pi(4) = 3.33968253968254 , 3.14271284271284 , 3.14159271403378
+pi(5) = 2.97604617604618 , 3.14088134088134 , 3.14159265397529
+pi(6) = 3.28373848373848 , 3.14207181707182 , 3.14159265359118
+pi(7) = 3.01707181707182 , 3.14125482360776 , 3.14159265358978
+pi(8) = 3.25236593471888 , 3.1418396189294 , 3.14159265358979
+pi(9) = 3.0418396189294 , 3.1414067184965 , 3.14159265358979
+pi = 3.14159265358979 , 3.14159265358979 , 3.14159265358979
+
+ln(0) = 1 , 0.7 , 1
+ln(1) = 0.5 , 0.69047619047619 , 0.7
+ln(2) = 0.833333333333333 , 0.694444444444444 , 0.69327731092437
+ln(3) = 0.583333333333333 , 0.692424242424242 , 0.693148869332925
+ln(4) = 0.783333333333333 , 0.693589743589744 , 0.693147196073549
+ln(5) = 0.616666666666667 , 0.692857142857143 , 0.693147180663564
+ln(6) = 0.759523809523809 , 0.693347338935574 , 0.693147180560404
+ln(7) = 0.634523809523809 , 0.693003341687552 , 0.693147180559944
+ln(8) = 0.745634920634921 , 0.693253968253968 , 0.693147180559943
+ln(9) = 0.645634920634921 , 0.693065750674446 , 0.693147180559945
+ln = 0.693147180559945 , 0.693147180559945 , 0.693147180559945
+
+prime numbers: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113
diff --git a/test/files/run/absoverride-msil.check b/test/files/run/absoverride-msil.check
new file mode 100644
index 0000000000..938f62221f
--- /dev/null
+++ b/test/files/run/absoverride-msil.check
@@ -0,0 +1,20 @@
+<sync>
+next: m
+</sync>
+log: m
+m
+<sync>
+next: s
+</sync>
+log: s
+s
+<sync>
+next: i
+</sync>
+log: i
+i
+<sync>
+next: l
+</sync>
+log: l
+l
diff --git a/test/files/run/boolord-msil.check b/test/files/run/boolord-msil.check
new file mode 100644
index 0000000000..e5f1daa0e5
--- /dev/null
+++ b/test/files/run/boolord-msil.check
@@ -0,0 +1,4 @@
+false < false = False
+false < true = True
+true < false = False
+true < true = False
diff --git a/test/files/run/bugs-msil.check b/test/files/run/bugs-msil.check
new file mode 100644
index 0000000000..4e15409547
--- /dev/null
+++ b/test/files/run/bugs-msil.check
@@ -0,0 +1,96 @@
+<<< bug 98
+mycase
+>>> bug 98
+
+<<< bug 120
+one
+A
+B
+C
+>>> bug 120
+
+<<< bug 135
+Some(The answer)
+>>> bug 135
+
+<<< bug 142
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+>>> bug 142
+
+<<< bug 166
+>>> bug 166
+
+<<< bug 167
+>>> bug 167
+
+<<< bug 168
+>>> bug 168
+
+<<< bug 174
+>>> bug 174
+
+<<< bug 176
+1
+>>> bug 176
+
+<<< bug 199
+>>> bug 199
+
+<<< bug 213
+Cannot cast unit to Nothing
+Cannot cast empty string to Null
+>>> bug 213
+
+<<< bug 217
+>>> bug 217
+
+<<< bug 222
+>>> bug 222
+
+<<< bug 225
+>>> bug 225
+
+<<< bug 226
+>>> bug 226
+
+<<< bug 233
+True
+>>> bug 233
+
+<<< bug 250
+>>> bug 250
+
+<<< bug 257
+I should come 1st and 2nd
+I should come 1st and 2nd
+I should come last
+>>> bug 257
+
+<<< bug 266
+hello
+4
+>>> bug 266
+
+<<< bug 316
+>>> bug 316
+
+<<< bug 328
+>>> bug 328
+
+<<< bug 396
+A
+B
+C
+>>> bug 396
+
+<<< bug 399
+a
+>>> bug 399
+
diff --git a/test/files/run/classof.scala b/test/files/run/classof.scala
index 3b6180396c..3aa049ef68 100644
--- a/test/files/run/classof.scala
+++ b/test/files/run/classof.scala
@@ -3,6 +3,6 @@ class SomeClass
object Test {
def main(args: Array[String]): Unit = {
val cls: Class = classOf[SomeClass]
- Console.println(compat.Platform.getName(cls))
+ Console.println(cls.getName())
}
}
diff --git a/test/files/run/collections.scala b/test/files/run/collections.scala
index e1f769bf4c..f0a005d198 100755
--- a/test/files/run/collections.scala
+++ b/test/files/run/collections.scala
@@ -1,4 +1,5 @@
import collection._
+import scala.compat.Platform.currentTime
object Test extends Application {
@@ -7,9 +8,9 @@ object Test extends Application {
def sum[A](xs: Iterable[int]) = (0 /: xs)((x, y) => x + y)
def time(op: => unit): unit = {
- val start = System.currentTimeMillis;
+ val start = currentTime
op
- if (printTime) Console.println(" time = "+(System.currentTimeMillis - start)+"ms")
+ if (printTime) Console.println(" time = "+(currentTime - start)+"ms")
}
def test(msg: String, s0: collection.immutable.Set[int], iters: int) = {
diff --git a/test/files/run/impconvtimes-msil.check b/test/files/run/impconvtimes-msil.check
new file mode 100644
index 0000000000..082377e474
--- /dev/null
+++ b/test/files/run/impconvtimes-msil.check
@@ -0,0 +1 @@
+3.0 * Hour = Measure(3,Hour)
diff --git a/test/files/run/infix-msil.check b/test/files/run/infix-msil.check
new file mode 100644
index 0000000000..b37cdcd80b
--- /dev/null
+++ b/test/files/run/infix-msil.check
@@ -0,0 +1,2 @@
+op(op(op(,0,0),1,1),2,2)
+OK
diff --git a/test/files/run/misc-msil.check b/test/files/run/misc-msil.check
new file mode 100644
index 0000000000..480a840b9a
--- /dev/null
+++ b/test/files/run/misc-msil.check
@@ -0,0 +1,33 @@
+### Hello
+### 17
+### Bye
+
+### fib(0) = 1
+### fib(1) = 1
+### fib(2) = 2
+### fib(3) = 3
+### fib(4) = 5
+=== MyClass::toString ===
+=== MySubclass::toString ===
+=== MyClass::test ===
+
+identity
+
+A.a = 1
+B.a = 5
+B.b = 2
+
+X.a = 4
+Y.a = 11
+Y.b = 5
+Y.b = 5
+
+X::foo
+
+Y::foo
+X::foo
+
+3
+3
+
+True
diff --git a/test/files/run/promotion-msil.check b/test/files/run/promotion-msil.check
new file mode 100644
index 0000000000..41e36c369d
--- /dev/null
+++ b/test/files/run/promotion-msil.check
@@ -0,0 +1,4 @@
+2
+6
+20
+30
diff --git a/test/files/run/runtime-msil.check b/test/files/run/runtime-msil.check
new file mode 100644
index 0000000000..70e7608a11
--- /dev/null
+++ b/test/files/run/runtime-msil.check
@@ -0,0 +1,64 @@
+<<< Test0
+[False,True]
+[0,1,2]
+[3,4,5]
+[a,b,c]
+[6,7,8]
+[9,10,11]
+[12,13]
+[14,15]
+[string]
+>>> Test0
+
+<<< Test1
+10
+14
+15
+16
+20
+23
+24
+25
+26
+>>> Test1
+
+<<< Test2
+A
+M0
+N0
+
+A
+N0
+M0
+
+A
+M0
+M1
+N0
+
+A
+N0
+N1
+M0
+
+>>> Test2
+
+<<< Test3
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+Ok
+>>> Test3
+
diff --git a/test/files/run/tuples-msil.check b/test/files/run/tuples-msil.check
new file mode 100644
index 0000000000..bd53523c74
--- /dev/null
+++ b/test/files/run/tuples-msil.check
@@ -0,0 +1,2 @@
+{1,abc,True}
+OK
diff --git a/test/files/run/unittest_io.scala b/test/files/run/unittest_io.scala
deleted file mode 100644
index 59b82ff57e..0000000000
--- a/test/files/run/unittest_io.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-object Test {
-
- import scala.testing.SUnit._
- import scala.io.Source
-
- class ReadlinesTest extends TestCase("scala.io.Source method getLines") {
-
- val src = Source.fromString("""
-This is a file
-it is split on several lines.
-
-isn't it?
-""")
- assertEquals("wrong number of lines",src.getLines.toList.length,5) // five new lines in there
- //for(val line <- src.getLines) {
- // Console.print(line)
- //}
- }
- def main(args:Array[String]) = {
- val ts = new TestSuite(
- new ReadlinesTest
- )
- val tr = new TestResult()
- ts.run(tr)
- for(val failure <- tr.failures) {
- Console.println(failure)
- }
- }
-
-}
diff --git a/test/files/run/unittest_xml.scala b/test/files/run/unittest_xml.scala
deleted file mode 100644
index 99284f144e..0000000000
--- a/test/files/run/unittest_xml.scala
+++ /dev/null
@@ -1,61 +0,0 @@
-
-object Test {
-
- import scala.testing.SUnit._
- import scala.xml.{MetaData, Null, Parsing, PrefixedAttribute, UnprefixedAttribute }
-
- class ParsingTest extends TestCase("scala.xml.Parsing") with Assert {
- override def runTest = {
- assertTrue(Parsing.isNameStart('b'))
- }
- }
- class MetaDataTest extends TestCase("scala.xml.MetaData") with Assert {
-
- import scala.xml.{TopScope, NamespaceBinding, Atom, Text }
-
- override def runTest = {
-
- var x: MetaData = Null
- var s: NamespaceBinding = TopScope
-
- // testing method def apply(uri:String, scp:NamespaceBinding, k:String): Seq[Node]
- // def apply(k:String): Seq[Node]
-
- assertEquals("absent element (prefixed) 1", null, x("za://foo.com", s, "bar" ))
- assertEquals("absent element (unprefix) 1", null, x("bar"))
-
- assertEquals("absent element (prefixed) 2", None, x.get("za://foo.com", s, "bar" ))
- assertEquals("absent element (unprefix) 2", None, x.get("bar"))
-
- x = new PrefixedAttribute("zo","bar", new Atom(42), x)
- s = new NamespaceBinding("zo","za://foo.com",s)
-
- assertEquals("present element (prefixed) 3", new Atom(42), x("za://foo.com", s, "bar" ))
- assertEquals("present element (unprefix) 3", null, x("bar"))
-
- assertEquals("present element (prefixed) 4", Some(new Atom(42)), x.get("za://foo.com", s, "bar" ))
- assertEquals("present element (unprefix) 4", None, x.get("bar"))
-
- x = new UnprefixedAttribute("bar","meaning", x)
-
- assertEquals("present element (prefixed) 5", null, x(null, s, "bar" ))
- assertEquals("present element (unprefix) 5", Text("meaning"), x("bar"))
-
- assertEquals("present element (prefixed) 6", None, x.get(null, s, "bar" ))
- assertEquals("present element (unprefix) 6", Some(Text("meaning")), x.get("bar"))
-
- }
- }
-
- def main(args:Array[String]) = {
- val ts = new TestSuite(
- new ParsingTest,
- new MetaDataTest //,
- )
- val tr = new TestResult()
- ts.run(tr)
- for(val failure <- tr.failures) {
- Console.println(failure)
- }
- }
-}