Skip to content

Commit

Permalink
Bump Scalatest and sjson-new
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Dec 23, 2016
1 parent 60e1fb0 commit 46f84e3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class ExtractAPISpecification extends UnitSpec {
}""".stripMargin
val fooMethodApi2 = compileAndGetFooMethodApi(src2)
assert(SameAPI.apply(fooMethodApi1, fooMethodApi2), "APIs are not the same.")
()
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class ExtractUsedNamesSpecification extends UnitSpec {
val usedNames = compilerForTesting.extractUsedNamesFromSrc(src)
val expectedNames = standardNames ++ Set("A", "foo", "Int")
assert(usedNames === expectedNames)
()
}

// test for https://github.com/gkossakowski/sbt/issues/4
Expand All @@ -133,6 +134,7 @@ class ExtractUsedNamesSpecification extends UnitSpec {
val usedNames = compilerForTesting.extractUsedNamesFromSrc(srcA, srcB)
val expectedNames = standardNames ++ Set("B", "A", "a", "Int", "selectDynamic", "bla")
assert(usedNames === expectedNames)
()
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class JavaCompilerSpec extends UnitSpec {
val rightAPI = compileWithPrimitive(rightType, right)
leftAPI.size shouldBe rightAPI.size
((leftAPI, rightAPI).zipped forall SameAPI.apply) shouldBe (left == right)
()
}

def lineMatches(p: Problem, lineno: Int, lineContent: Option[String] = None): Boolean = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
(analysis.compilations.allCompilations.size: Int) == expected,
"analysis.compilations.allCompilations.size = %d (expected %d)".format(analysis.compilations.allCompilations.size, expected)
)
()
}

def checkRecompilations(i: IncInstance, step: Int, expected: List[String]): Unit =
Expand All @@ -265,7 +266,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto

assert(step < allCompilations.size.toInt)
recompiledClassesInIteration(step, expected.toSet)

()
}

def checkClasses(i: IncInstance, src: String, expected: List[String]): Unit = {
Expand All @@ -275,6 +276,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
assert(expected == actual, s"Expected $expected classes, got $actual")

assertClasses(expected.toSet, classes(src))
()
}

def checkProducts(i: IncInstance, src: String, expected: List[String]): Unit = {
Expand All @@ -288,6 +290,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
assert(expected == actual, s"Expected $expected products, got $actual")

assertClasses(expected.toSet, products(src))
()
}

def checkDependencies(i: IncInstance, className: String, expected: List[String]): Unit = {
Expand All @@ -297,6 +300,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
assert(expected == actual, s"Expected $expected dependencies, got $actual")

assertDependencies(expected.toSet, classDeps(className))
()
}

def compile(i: IncInstance): Analysis =
Expand Down Expand Up @@ -365,6 +369,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
currentThread.setContextClassLoader(loader)
try { main.invoke(null, options.toArray[String]); () }
finally { currentThread.setContextClassLoader(oldLoader) }
()
}

def loadIncOptions(src: File): IncOptions = {
Expand All @@ -391,6 +396,7 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
val messages = getProblems() filter (_.severity == severity)
assert(messages.length == expected, s"""Expected $expected messages with severity $severity but ${messages.length} found:
|${messages mkString "\n"}""".stripMargin)
()
}

def checkMessage(index: Int, expected: String, severity: Severity): Unit = {
Expand All @@ -401,6 +407,6 @@ case class ProjectStructure(name: String, dependsOn: Vector[String], baseDirecto
case None =>
throw new TestFailed(s"Problem not found: $index (there are ${problems.length} problem with severity $severity).")
}

()
}
}
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ object Dependencies {
lazy val scalaReflect = Def.setting { "org.scala-lang" % "scala-reflect" % scalaVersion.value }

lazy val sbinary = "org.scala-sbt" %% "sbinary" % "0.4.3"
lazy val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.13.1"
lazy val scalatest = "org.scalatest" %% "scalatest" % "2.2.6"
lazy val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.13.4"
lazy val scalatest = "org.scalatest" %% "scalatest" % "3.0.1"
lazy val junit = "junit" % "junit" % "4.11"
lazy val diffUtils = "com.googlecode.java-diff-utils" % "diffutils" % "1.3.0"
lazy val sjsonnewScalaJson = "com.eed3si9n" %% "sjson-new-scalajson" % "0.6.0"
lazy val sjsonnewScalaJson = "com.eed3si9n" %% "sjson-new-scalajson" % "0.7.0"

def addTestDependencies(p: Project): Project = p.settings(libraryDependencies ++=
Seq(
Expand Down

0 comments on commit 46f84e3

Please sign in to comment.