summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-02-21 15:01:46 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-02-21 15:01:46 +0100
commitd79fc2cae4e550bf0a3276a3961ed007bdd428e7 (patch)
tree8dd84da7c1648b7586f239ee3b66c5e515e9980c /test
parente72f77be2e2c47e1f3905089e16c2ba4826de089 (diff)
parent4223bc2ddc497457c7dccd1b9b65e98244a9b4d1 (diff)
downloadscala-d79fc2cae4e550bf0a3276a3961ed007bdd428e7.tar.gz
scala-d79fc2cae4e550bf0a3276a3961ed007bdd428e7.tar.bz2
scala-d79fc2cae4e550bf0a3276a3961ed007bdd428e7.zip
Merge pull request #3555 from adriaanm/rebase-3553
Small Predef cleanup
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/logImplicits.check2
-rw-r--r--test/files/neg/predef-masking.scala2
-rw-r--r--test/files/neg/t8229.check4
-rw-r--r--test/files/neg/t8229.scala6
-rw-r--r--test/files/pos/t7788.scala8
-rw-r--r--test/scaladoc/run/diagrams-base.scala2
-rw-r--r--test/scaladoc/run/diagrams-filtering.scala2
7 files changed, 22 insertions, 4 deletions
diff --git a/test/files/neg/logImplicits.check b/test/files/neg/logImplicits.check
index 2265614962..270882b71a 100644
--- a/test/files/neg/logImplicits.check
+++ b/test/files/neg/logImplicits.check
@@ -10,7 +10,7 @@ logImplicits.scala:15: inferred view from String("abc") to Int = C.this.convert:
logImplicits.scala:19: applied implicit conversion from Int(1) to ?{def ->: ?} = implicit def ArrowAssoc[A](self: A): ArrowAssoc[A]
def f = (1 -> 2) + "c"
^
-logImplicits.scala:19: applied implicit conversion from (Int, Int) to ?{def +: ?} = implicit def StringAdd[A](self: A): StringAdd[A]
+logImplicits.scala:19: applied implicit conversion from (Int, Int) to ?{def +: ?} = implicit def any2stringadd[A](self: A): any2stringadd[A]
def f = (1 -> 2) + "c"
^
logImplicits.scala:22: error: class Un needs to be abstract, since method unimplemented is not defined
diff --git a/test/files/neg/predef-masking.scala b/test/files/neg/predef-masking.scala
index 6f4f4859d0..67b69aa169 100644
--- a/test/files/neg/predef-masking.scala
+++ b/test/files/neg/predef-masking.scala
@@ -1,5 +1,5 @@
// Testing predef masking
-import Predef.{ StringAdd => _, _ }
+import Predef.{ any2stringadd => _, _ }
object StringPlusConfusion {
// Would love to do something about this error message, but by the
diff --git a/test/files/neg/t8229.check b/test/files/neg/t8229.check
new file mode 100644
index 0000000000..cc504fa34e
--- /dev/null
+++ b/test/files/neg/t8229.check
@@ -0,0 +1,4 @@
+t8229.scala:5: error: value + is not a member of Object
+ o + ""
+ ^
+one error found
diff --git a/test/files/neg/t8229.scala b/test/files/neg/t8229.scala
new file mode 100644
index 0000000000..91966311e2
--- /dev/null
+++ b/test/files/neg/t8229.scala
@@ -0,0 +1,6 @@
+import Predef.{any2stringadd => _, _}
+
+object Test {
+ val o = new Object()
+ o + ""
+}
diff --git a/test/files/pos/t7788.scala b/test/files/pos/t7788.scala
new file mode 100644
index 0000000000..81eada962b
--- /dev/null
+++ b/test/files/pos/t7788.scala
@@ -0,0 +1,8 @@
+class Test {
+ // Predef used to define a method `conforms` to produce the implicit evidence below
+ // all this does is ensure we don't rename Predef.$conforms back to conforms when $ goes out of fashion
+ // or that there is some other way of generating the implicit value that witnesses T => U for T <: U
+ def conforms(x: Int, y: Int) = x < y
+ def foo[A](implicit ev: Int => A) = ???
+ foo[Int]
+} \ No newline at end of file
diff --git a/test/scaladoc/run/diagrams-base.scala b/test/scaladoc/run/diagrams-base.scala
index b7aeed51d2..1e83a78b38 100644
--- a/test/scaladoc/run/diagrams-base.scala
+++ b/test/scaladoc/run/diagrams-base.scala
@@ -46,7 +46,7 @@ object Test extends ScaladocModelTest {
val (incoming, outgoing) = diag.edges.partition(!_._1.isThisNode)
assert(incoming.length == 5)
- assert(outgoing.head._2.length == 4)
+ assert(outgoing.head._2.length == 4, s"${outgoing.head._2} has length ${outgoing.head._2.length}, expecting 4")
val (outgoingSuperclass, outgoingImplicit) = outgoing.head._2.partition(_.isNormalNode)
assert(outgoingSuperclass.length == 3)
diff --git a/test/scaladoc/run/diagrams-filtering.scala b/test/scaladoc/run/diagrams-filtering.scala
index 54e3e9ac63..12b5f4caba 100644
--- a/test/scaladoc/run/diagrams-filtering.scala
+++ b/test/scaladoc/run/diagrams-filtering.scala
@@ -57,7 +57,7 @@ object Test extends ScaladocModelTest {
// Assert we have just 3 nodes and 2 edges
val A = base._trait("A")
val ADiag = A.inheritanceDiagram.get
- assert(ADiag.nodes.length == 3)
+ assert(ADiag.nodes.length == 3, s"${ADiag.nodes} has length ${ADiag.nodes.length}, expected 3")
assert(ADiag.edges.map(_._2.length).sum == 2)
// trait C