Remove tests that are in Zinc repo

This commit is contained in:
Eugene Yokota 2020-07-25 00:23:58 -04:00
parent 7741b9ae2d
commit 9c18fb0cf6
18 changed files with 0 additions and 110 deletions

View File

@ -1,3 +0,0 @@
public class A {
public Integer x() { return 3; }
}

View File

@ -1 +0,0 @@
public class B extends A {}

View File

@ -1 +0,0 @@
public class C extends B {}

View File

@ -1,4 +0,0 @@
public class D {
public static final C c = new C();
public static String x() { return c.x().toString(); }
}

View File

@ -1,5 +0,0 @@
public class E {
public static void main(String[] args) {
assert(D.x() == "3");
}
}

View File

@ -1,25 +0,0 @@
import sbt.internal.inc.Analysis
import complete.DefaultParsers._
// Reset compiler iterations, necessary because tests run in batch mode
val recordPreviousIterations = taskKey[Unit]("Record previous iterations.")
recordPreviousIterations := {
val log = streams.value.log
CompileState.previousIterations = {
val previousAnalysis = (previousCompile in Compile).value.analysis.asScala
previousAnalysis match {
case None =>
log.info("No previous analysis detected")
0
case Some(a: Analysis) => a.compilations.allCompilations.size
}
}
}
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
checkIterations := {
val expected: Int = (Space ~> NatBasic).parsed
val actual: Int = ((compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size }) - CompileState.previousIterations
assert(expected == actual, s"Expected $expected compilations, got $actual")
}

View File

@ -1,3 +0,0 @@
public class A {
public String x() { return "3"; }
}

View File

@ -1,4 +0,0 @@
// This is necessary because tests are run in batch mode
object CompileState {
@volatile var previousIterations: Int = -1
}

View File

@ -1,10 +0,0 @@
# 1 iteration from initial full compile
> recordPreviousIterations
> run
$ copy-file changes/A2.java A.java
# 1 iteration for the initial changes
# 1 iteration to recompile all descendents and direct dependencies
# no further iteration, because APIs of directs don't change
> run
> checkIterations 3

View File

@ -1,3 +0,0 @@
class A {
def x = 3
}

View File

@ -1 +0,0 @@
class B extends A

View File

@ -1 +0,0 @@
class C extends B

View File

@ -1,4 +0,0 @@
object D {
val c = new C
def x: String = c.x.toString
}

View File

@ -1,3 +0,0 @@
object E extends App {
assert(D.x == "3")
}

View File

@ -1,25 +0,0 @@
import sbt.internal.inc.Analysis
import complete.DefaultParsers._
// Reset compiler iterations, necessary because tests run in batch mode
val recordPreviousIterations = taskKey[Unit]("Record previous iterations.")
recordPreviousIterations := {
val log = streams.value.log
CompileState.previousIterations = {
val previousAnalysis = (previousCompile in Compile).value.analysis.asScala
previousAnalysis match {
case None =>
log.info("No previous analysis detected")
0
case Some(a: Analysis) => a.compilations.allCompilations.size
}
}
}
val checkIterations = inputKey[Unit]("Verifies the accumulated number of iterations of incremental compilation.")
checkIterations := {
val expected: Int = (Space ~> NatBasic).parsed
val actual: Int = ((compile in Compile).value match { case a: Analysis => a.compilations.allCompilations.size }) - CompileState.previousIterations
assert(expected == actual, s"Expected $expected compilations, got $actual")
}

View File

@ -1,3 +0,0 @@
class A {
def x = "3"
}

View File

@ -1,4 +0,0 @@
// This is necessary because tests are run in batch mode
object CompileState {
@volatile var previousIterations: Int = -1
}

View File

@ -1,10 +0,0 @@
# 1 iteration from initial full compile
> recordPreviousIterations
> run
$ copy-file changes/A2.scala A.scala
# 1 iteration for the initial changes
# 1 iteration to recompile all descendents and direct dependencies
# no further iteration, because APIs of directs don't change
> run
> checkIterations 3