diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-01-10 13:33:45 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-01-11 11:32:39 -0800 |
commit | 3bb8745ca7dcda8c81103b3965b83973b4a72214 (patch) | |
tree | 723f7227b600d827c89cea17e934c8bf10e6f544 /test | |
parent | 64ec51b31f9563580e250ac45714b9d3d86abde1 (diff) | |
download | scala-3bb8745ca7dcda8c81103b3965b83973b4a72214.tar.gz scala-3bb8745ca7dcda8c81103b3965b83973b4a72214.tar.bz2 scala-3bb8745ca7dcda8c81103b3965b83973b4a72214.zip |
Fixes and features for javap (fixing SI-6894)
Output filtering is refactored for javap6.
That means javap6 also supports -raw.
Handling of # is: Foo#foo filter on foo,
Foo# filter on apply, -fun Foo#foo for anonfuns of foo,
-fun Foo# anonfuns filtering on apply.
One is loath to add command options, so it's not possible
to ask for "only apply methods in anonfuns pertaining to
a method." Hypothetical syntax to say "show me the
apply only": -fun Foo#foo(), for future reference.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/repl-javap-outdir-funs/foo_1.scala | 6 | ||||
-rw-r--r-- | test/files/run/repl-javap-outdir-funs/run-repl_7.scala | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/repl-javap-outdir-funs/foo_1.scala b/test/files/run/repl-javap-outdir-funs/foo_1.scala new file mode 100644 index 0000000000..9b98e94733 --- /dev/null +++ b/test/files/run/repl-javap-outdir-funs/foo_1.scala @@ -0,0 +1,6 @@ + +package disktest + +class Foo { + def m(vs: List[Int]) = vs map (_ + 1) +} diff --git a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala new file mode 100644 index 0000000000..dfe3dae270 --- /dev/null +++ b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala @@ -0,0 +1,12 @@ +import scala.tools.partest.JavapTest + +object Test extends JavapTest { + def code = """ + |:javap -fun disktest/Foo.class + """.stripMargin + + override def yah(res: Seq[String]) = { + def filtered = res filter (_ contains "public final class disktest.Foo") + 1 == filtered.size + } +} |