Added test for tracking anonymous classes from Java sources

git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@895 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
dmharrah 2009-07-27 15:17:43 +00:00
parent 3cd6f75b4a
commit c8f0a72da9
5 changed files with 36 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#Project properties
#Sat Jul 25 19:50:26 EDT 2009
#Mon Jul 27 09:16:46 EDT 2009
project.organization=sbt
project.name=Simple Build Tool Parent
sbt.version=0.5.2
project.version=0.5.3-SNAPSHOT
scala.version=2.7.2
project.version=0.5.2
scala.version=2.7.4

View File

@ -0,0 +1,9 @@
import java.util.Iterator;
class Anon
{
public static final Iterator<String> it = new Iterator<String>() {
public boolean hasNext() { return false; }
public String next() { return ""; }
public void remove() {}
};
}

View File

@ -0,0 +1,2 @@
project.name=Test
project.version=1.0

View File

@ -0,0 +1,5 @@
import sbt._
class AnonTest(info: ProjectInfo) extends DefaultProject(info)
{
override def compileOrder = CompileOrder.JavaThenScala
}

View File

@ -0,0 +1,17 @@
$ copy-file changes/Anon.java src/main/java/Anon.java
[success]
> compile
[success]
$ exists target/classes/Anon.class target/classes/Anon$1.class
[success]
$ delete src/main/java/Anon.java
[success]
> compile
[success]
$ absent target/classes/Anon.class target/classes/Anon$1.class
[success]