diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-07 06:52:02 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-07 06:52:02 +0000 |
commit | 5c18620fa475d32de62472de55a6bcec3da1b515 (patch) | |
tree | 8d9363ddf785f94d610892684a5d44bf3d6986a3 /test/files/run | |
parent | 1065c911a1b896132b54d2573d80152b5fe7404f (diff) | |
download | scala-5c18620fa475d32de62472de55a6bcec3da1b515.tar.gz scala-5c18620fa475d32de62472de55a6bcec3da1b515.tar.bz2 scala-5c18620fa475d32de62472de55a6bcec3da1b515.zip |
Added all the javap command line options to :ja...
Added all the javap command line options to :javap. No review.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/javap.check | 18 | ||||
-rw-r--r-- | test/files/run/javap.scala | 24 |
2 files changed, 42 insertions, 0 deletions
diff --git a/test/files/run/javap.check b/test/files/run/javap.check new file mode 100644 index 0000000000..1985fd611d --- /dev/null +++ b/test/files/run/javap.check @@ -0,0 +1,18 @@ +Arguments: '' +public class Bippy extends java.lang.Object implements scala.ScalaObject{ +public scala.collection.immutable.List f(scala.collection.immutable.List); +public Bippy(); +Arguments: '-v' +public class Bippy extends java.lang.Object implements scala.ScalaObject +public #28= #25 of #27; //Bippy=class Bippy of class +public scala.collection.immutable.List f(scala.collection.immutable.List); +public Bippy(); +Arguments: '-s' +public class Bippy extends java.lang.Object implements scala.ScalaObject{ +public scala.collection.immutable.List f(scala.collection.immutable.List); +public Bippy(); +Arguments: '-private' +public class Bippy extends java.lang.Object implements scala.ScalaObject{ +private int privateMethod(); +public scala.collection.immutable.List f(scala.collection.immutable.List); +public Bippy(); diff --git a/test/files/run/javap.scala b/test/files/run/javap.scala new file mode 100644 index 0000000000..241a83fa6f --- /dev/null +++ b/test/files/run/javap.scala @@ -0,0 +1,24 @@ +import scala.tools.nsc.interpreter._ + +object Test { + def run(args: String) = { + println("Arguments: '" + args + "'") + ILoop.run(""" + |class Bippy { + | private def privateMethod = 5 + | def f[T <: List[_]](x: T): T = x + |} + | + |:javap %s Bippy + """.stripMargin.format(args)).lines map (_.trim) filter { line => + (line startsWith "private") || (line startsWith "public") + } foreach println + } + + def main(args: Array[String]): Unit = { + run("") + run("-v") + run("-s") + run("-private") + } +} |