8000 SI-7003 Partest redirects stderr to log file · dragos/scala-parser-combinators@2006c37 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 2006c37

Browse files
som-snyttadriaanm
authored andcommitted
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.
1 parent f1b112b commit 2006c37

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

test/files/run/json.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
/*
2+
* filter: inliner warning(s); re-run with -Yinline-warnings for details
3+
*/
14
import scala.util.parsing.json._
25
import scala.collection.immutable.TreeMap
36

7+
@deprecated("Suppress warnings", since="2.11")
48
object Test extends App {
59
/* This method converts parsed JSON back into real JSON notation with objects in
610
* sorted-key order. Not required by the spec, but it allows us to do a stable
711
* toString comparison. */
812
def jsonToString(in : Any) : String = in match {
913
case l : List[_] => "[" + l.map(jsonToString).mkString(", ") + "]"
10-
case m : Map[String,_] => "{" + m.iterator.toList
14+
case m : Map[String @unchecked,_] => "{" + m.iterator.toList
1115
.sortWith({ (x,y) => x._1 < y._1 })
1216
.map({ case (k,v) => "\"" + k + "\": " + jsonToString(v) })
1317
.mkString(", ") + "}"
@@ -20,7 +24,7 @@ object Test extends App {
2024
*/
2125
def sortJSON(in : Any) : Any = in match {
2226
case l : List[_] => l.map(sortJSON)
23-
case m : Map[String,_] => TreeMap(m.mapValues(sortJSON).iterator.toSeq : _*)
27+
case m : Map[String @unchecked,_] => TreeMap(m.mapValues(sortJSON).iterator.toSeq : _*)
2428
// For the object versions, sort their contents, ugly casts and all...
2529
case JSONObject(data) => JSONObject(sortJSON(data).asInstanceOf[Map[String,Any]])
2630
case JSONArray(data) => JSONArray(sortJSON(data).asInstanceOf[List[Any]])

test/files/run/t4929.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import scala.util.parsing.json._
22
import java.util.concurrent._
33
import collection.JavaConversions._
44

5+
@deprecated("Suppress warnings", since="2.11")
56
object Test extends App {
67

78
val LIMIT = 2000

test/files/run/unittest_io.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
@deprecated("Suppress warnings", since="2.11")
13
object Test {
24

35
def main(args: Array[String]) {

0 commit comments

Comments
 (0)
0