test to check proper tracking of generated classes

This commit is contained in:
Mark Harrah 2010-01-26 09:38:28 -05:00
parent 64fae31248
commit 31609f57e6
5 changed files with 100 additions and 0 deletions

View File

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

View File

@ -0,0 +1,7 @@
import sbt._
class CompactifyTest(info: ProjectInfo) extends DefaultProject(info)
{
def classes = (outputPath ** "*.class").get
lazy val outputEmpty = task { if(classes.isEmpty) None else Some("Classes existed:\n\t" + classes.mkString("\n\t")) }
}

View File

@ -0,0 +1,44 @@
package somereallylongpackagenamethatwilltestsbtsanalyzer_somereallylongpackagenamethatwilltestsbtsanalyzer.somereallylongpackagenamethatwilltestsbtsanalyzer
object T
{
val y = List(3)
for(a <- y;
b <- y;
c <- y;
d <- y;
e <- y;
f <- y;
g <- y;
h <- y;
i <- y;
j <- y;
k <- y;
l <- y;
m <- y;
n <- y;
o <- y;
p <- y;
q <- y;
r <- y;
s <- y;
t <- y;
u <- y;
v <- y;
w <- y;
x <- y;
yx <- y;
z <- y;
aa <- y;
bb <- y;
cc <- y;
dd <- y;
ee <- y;
ff <- y;
gg <- y;
hh<- y;
ii <- y;
jj <- y;
kk <- y
) yield a + b + c + d + e
}

View File

@ -0,0 +1,41 @@
package test
object TopLevelModule1
{
object InnerModule1
{
object InnerModule2
{
trait Z { def q = 3 }
def x = 3
}
}
class InnerClass1
{
class InnerClass2
{
val z = new TopLevelModule1.InnerClass2
}
object InnerModule3
{
val y = new TopLevel1 with InnerModule1.InnerModule2.Z { val x = 4 }
}
}
class InnerClass2
}
class TopLevel1
{
object Inner1_1
}
object TopLevel1
{
class Inner1_2
object Inner1_2
}
object TopLevel2
class TopLevel2
object TopLevel3
class TopLevel4

View File

@ -0,0 +1,6 @@
> output-empty
> compile
-> output-empty
$ delete src/main/scala/For.scala src/main/scala/Nested.scala
> compile
> output-empty