summaryrefslogtreecommitdiff
path: root/test/files/specialized
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-04-27 21:36:53 -0700
committerSom Snytt <som.snytt@gmail.com>2013-05-25 09:51:37 -0700
commit99b4d95fe6c908ce3170ff4d090420f8e47efa1d (patch)
treef7819550cc9b9cbce24b98f1c5b085939e37883d /test/files/specialized
parent369f1f27ac6a27918e767e393dc6e22f7424aa38 (diff)
downloadscala-99b4d95fe6c908ce3170ff4d090420f8e47efa1d.tar.gz
scala-99b4d95fe6c908ce3170ff4d090420f8e47efa1d.tar.bz2
scala-99b4d95fe6c908ce3170ff4d090420f8e47efa1d.zip
SI-7003 Partest redirects stderr to log file
Some scalac output is on stderr, and it's useful to see that in the log file, especially for debugging. Adds a line filter for logs, specified as "filter: pattern" in the test source. Backslashes are made forward only when detected as paths. Test alignments: Deprecations which do not pertain to the system under test are corrected in the obvious way. When testing deprecated API, suppress warnings by deprecating the Test object. Check files are updated with useful true warnings, instead of running under -nowarn. Language feature imports as required, instead of running under -language. Language feature not required, such as casual use of postfix. Heed useful warning. Ignore broken warnings. (Rarely, -nowarn.) Inliner warnings pop up under -optimise only, so for now, just filter them out where they occur. Debug output from the test required an update.
Diffstat (limited to 'test/files/specialized')
-rw-r--r--test/files/specialized/spec-matrix-old.scala2
-rw-r--r--test/files/specialized/spec-super.check5
-rw-r--r--test/files/specialized/spec-t3896.scala2
-rw-r--r--test/files/specialized/tb3651.check5
-rw-r--r--test/files/specialized/tc3651.check5
-rw-r--r--test/files/specialized/td3651.check8
6 files changed, 22 insertions, 5 deletions
diff --git a/test/files/specialized/spec-matrix-old.scala b/test/files/specialized/spec-matrix-old.scala
index 98735c8c03..83941e80a7 100644
--- a/test/files/specialized/spec-matrix-old.scala
+++ b/test/files/specialized/spec-matrix-old.scala
@@ -1,6 +1,7 @@
/** Test matrix multiplication with specialization.
*/
+@deprecated("Suppress warnings", since="2.11")
class Matrix[@specialized A: ClassManifest](val rows: Int, val cols: Int) {
private val arr: Array[Array[A]] = Array.ofDim[A](rows, cols)
@@ -25,6 +26,7 @@ class Matrix[@specialized A: ClassManifest](val rows: Int, val cols: Int) {
}
}
+@deprecated("Suppress warnings", since="2.11")
object Test {
def main(args: Array[String]) {
val m = randomMatrix(200, 100)
diff --git a/test/files/specialized/spec-super.check b/test/files/specialized/spec-super.check
index 4be83ca9e6..2f4d60018b 100644
--- a/test/files/specialized/spec-super.check
+++ b/test/files/specialized/spec-super.check
@@ -1,3 +1,6 @@
+spec-super.scala:18: warning: class Base must be a trait. Specialized version of class Extended will inherit generic Base[Int]
+class Extended [@specialized(Int) T](t: T) extends Base[T](t) {
+ ^
s
1
-2 \ No newline at end of file
+2
diff --git a/test/files/specialized/spec-t3896.scala b/test/files/specialized/spec-t3896.scala
index 605ed0df9d..3a3be3da2b 100644
--- a/test/files/specialized/spec-t3896.scala
+++ b/test/files/specialized/spec-t3896.scala
@@ -12,7 +12,7 @@ object Test {
def main(args: Array[String]): Unit = {
val e = new AtomicBoolean(false)
val x = e.f( (a : Boolean) => !a ) // ok
- println( e.f( (a : Boolean) => !a ) toString ) // ok
+ println( e.f( (a : Boolean) => !a ).toString ) // ok
println( e.f( (a : Boolean) => !a) ) // compiler crash
println(runtime.BoxesRunTime.integerBoxCount)
diff --git a/test/files/specialized/tb3651.check b/test/files/specialized/tb3651.check
index c227083464..8a3f686ef5 100644
--- a/test/files/specialized/tb3651.check
+++ b/test/files/specialized/tb3651.check
@@ -1 +1,4 @@
-0 \ No newline at end of file
+tb3651.scala:8: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ lk.a
+ ^
+0
diff --git a/test/files/specialized/tc3651.check b/test/files/specialized/tc3651.check
index c227083464..e2dbadf22c 100644
--- a/test/files/specialized/tc3651.check
+++ b/test/files/specialized/tc3651.check
@@ -1 +1,4 @@
-0 \ No newline at end of file
+tc3651.scala:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ lk.a
+ ^
+0
diff --git a/test/files/specialized/td3651.check b/test/files/specialized/td3651.check
index 9aea9e0ce5..1a709fd0a7 100644
--- a/test/files/specialized/td3651.check
+++ b/test/files/specialized/td3651.check
@@ -1,2 +1,8 @@
+td3651.scala:12: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ b.a
+ ^
+td3651.scala:16: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
+ der.a
+ ^
+0
0
-0 \ No newline at end of file