aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-11-24 17:25:46 +0100
committerGitHub <noreply@github.com>2016-11-24 17:25:46 +0100
commitb26af1b24bb1a938627709d0e8c6932fe902d7b4 (patch)
tree6fb6585cfeee75e93449d79dc829b97251c98f2b /tests
parent3588832eb3c45b151d78e66b5cde1f4e772d52a8 (diff)
parentc52ffd7c9cb189f168470b9004cfb2dd554e3cc8 (diff)
downloaddotty-b26af1b24bb1a938627709d0e8c6932fe902d7b4.tar.gz
dotty-b26af1b24bb1a938627709d0e8c6932fe902d7b4.tar.bz2
dotty-b26af1b24bb1a938627709d0e8c6932fe902d7b4.zip
Merge pull request #1742 from dotty-staging/topic/colon-in-printer
Fix colons in printer
Diffstat (limited to 'tests')
-rw-r--r--tests/repl/def.check9
-rw-r--r--tests/repl/import.check8
-rw-r--r--tests/repl/imports.check4
-rw-r--r--tests/repl/onePlusOne.check2
-rw-r--r--tests/repl/patdef.check14
-rw-r--r--tests/repl/toplevelTry.check2
-rw-r--r--tests/repl/vars.check4
7 files changed, 26 insertions, 17 deletions
diff --git a/tests/repl/def.check b/tests/repl/def.check
new file mode 100644
index 000000000..498ecb282
--- /dev/null
+++ b/tests/repl/def.check
@@ -0,0 +1,9 @@
+scala> def foo = 5
+def foo: Int
+scala> def bar: String = "1"
+def bar: String
+scala> def baz() = 2
+def baz(): Int
+scala> def qux(): Int = 2
+def qux(): Int
+scala> :quit
diff --git a/tests/repl/import.check b/tests/repl/import.check
index ccaa52190..3ed0fe46c 100644
--- a/tests/repl/import.check
+++ b/tests/repl/import.check
@@ -1,11 +1,11 @@
scala> import collection.mutable._
import collection.mutable._
scala> val buf = new ListBuffer[Int]
-buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer()
+val buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer()
scala> buf += 22
-res0: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22)
+val res0: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22)
scala> buf ++= List(1, 2, 3)
-res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22, 1, 2, 3)
+val res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22, 1, 2, 3)
scala> buf.toList
-res2: scala.collection.immutable.List[Int] = List(22, 1, 2, 3)
+val res2: scala.collection.immutable.List[Int] = List(22, 1, 2, 3)
scala> :quit
diff --git a/tests/repl/imports.check b/tests/repl/imports.check
index 7e078fe00..5260589a9 100644
--- a/tests/repl/imports.check
+++ b/tests/repl/imports.check
@@ -1,7 +1,7 @@
scala> import scala.collection.mutable
import scala.collection.mutable
scala> val buf = mutable.ListBuffer[Int]()
-buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer()
+val buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer()
scala> object o { val xs = List(1, 2, 3) }
defined module o
scala> import o._
@@ -14,7 +14,7 @@ scala> buf += xs
| required: String
|
scala> buf ++= xs
-res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3)
+val res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3)
scala> import util.foo
-- Error: <console> ------------------------------------------------------------
8 |import util.foo
diff --git a/tests/repl/onePlusOne.check b/tests/repl/onePlusOne.check
index 9db6e6817..1e9060693 100644
--- a/tests/repl/onePlusOne.check
+++ b/tests/repl/onePlusOne.check
@@ -1,3 +1,3 @@
scala> 1+1
-res0: Int = 2
+val res0: Int = 2
scala> :quit
diff --git a/tests/repl/patdef.check b/tests/repl/patdef.check
index 0cb1c6d4f..c92b678e0 100644
--- a/tests/repl/patdef.check
+++ b/tests/repl/patdef.check
@@ -1,10 +1,10 @@
-scala> val Const,x = 0
-Const: Int = 0
-x: Int = 0
+scala> val Const, x = 0
+val Const: Int = 0
+val x: Int = 0
scala> val (Const, List(`x`, _, a), b) = (0, List(0, 1337, 1), 2)
-a: Int = 1
-b: Int = 2
+val a: Int = 1
+val b: Int = 2
scala> val a@b = 0
-a: Int @unchecked = 0
-b: Int @unchecked = 0
+val a: Int @unchecked = 0
+val b: Int @unchecked = 0
scala> :quit
diff --git a/tests/repl/toplevelTry.check b/tests/repl/toplevelTry.check
index 9d2c87b35..5b9be157f 100644
--- a/tests/repl/toplevelTry.check
+++ b/tests/repl/toplevelTry.check
@@ -1,3 +1,3 @@
scala> try { 0 } catch { _: Throwable => 1 }
-res0: Int = 0
+val res0: Int = 0
scala> :quit
diff --git a/tests/repl/vars.check b/tests/repl/vars.check
index 5cebbf61c..2e21e1a9f 100644
--- a/tests/repl/vars.check
+++ b/tests/repl/vars.check
@@ -1,8 +1,8 @@
scala> var x = 0
-x: Int = 0
+var x: Int = 0
scala> x = x + 1
x: Int = 1
scala> x *= 2
scala> x
-res2: Int = 2
+val res2: Int = 2
scala> :quit