summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2017-02-14 12:05:23 -0800
committerGitHub <noreply@github.com>2017-02-14 12:05:23 -0800
commit096502880900d8daa75d813c63ac88aa50c25ef0 (patch)
tree9a2bd95face96461453f75f45333eff64eb62613
parent214a158f67405f420f144f1e83a3df51fcb97866 (diff)
parente08bccb3d07984deabd17fd297922b7bb198659e (diff)
downloadscala-096502880900d8daa75d813c63ac88aa50c25ef0.tar.gz
scala-096502880900d8daa75d813c63ac88aa50c25ef0.tar.bz2
scala-096502880900d8daa75d813c63ac88aa50c25ef0.zip
Merge pull request #5695 from SethTisue/fix-indexedseqtest-under-ant
fix IndexedSeqTest to work in both Ant and sbt
-rw-r--r--test/junit/scala/collection/IndexedSeqTest.scala17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/junit/scala/collection/IndexedSeqTest.scala b/test/junit/scala/collection/IndexedSeqTest.scala
index badad2b60e..a33849e60b 100644
--- a/test/junit/scala/collection/IndexedSeqTest.scala
+++ b/test/junit/scala/collection/IndexedSeqTest.scala
@@ -1,10 +1,15 @@
package scala.collection
import org.junit.Test
+import org.junit.Ignore
import org.junit.Assert.{assertEquals, _}
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
+// with the Ant JUnit runner, it's necessary to @Ignore the abstract
+// classes here, or JUnit tries to instantiate them. the annotations
+// can be removed when this is merged forward (TODO 2.12.x)
+
/**
* base class for testing common methods on a various implementations
*
@@ -12,6 +17,7 @@ import org.junit.runners.JUnit4
* @tparam E the element type
*/
@RunWith(classOf[JUnit4])
+@Ignore
abstract class IndexedTest[T, E] {
protected def size = 10
@@ -311,8 +317,9 @@ package IndexedTestImpl {
def toType(n: Int)= if ((n & 0) == 0) null else BoxedUnit.UNIT
}
+ @Ignore
abstract class ArrayTest[E] (
- //the object or primative type of the array
+ //the object or primitive type of the array
val TYPE: Class[_]) extends IndexedTest[Array[E], E]{
override final def length(underTest: Array[E]) = underTest.length
@@ -342,8 +349,9 @@ package IndexedTestImpl {
}
+ @Ignore
abstract class WrappedArrayTest[E](
- //the object or primative type of the array
+ //the object or primitive type of the array
val TYPE: Class[_]) extends IndexedTest[mutable.WrappedArray[E], E] with DataProvider[E]{
import mutable.WrappedArray
override final def length(underTest: WrappedArray[E]) = underTest.length
@@ -375,6 +383,7 @@ package IndexedTestImpl {
//construct the data using java as much as possible to avoid invalidating the test
+ @Ignore
abstract class MutableIndexedSeqTest[T <: mutable.Seq[E], E] extends IndexedTest[T, E] with DataProvider[E]{
override final def length(underTest: T) = underTest.length
@@ -404,6 +413,7 @@ package IndexedTestImpl {
}
}
+ @Ignore
abstract class ImmutableIndexedSeqTest[T <: SeqLike[E, T], E] extends IndexedTest[T, E] with DataProvider[E] {
override final def length(underTest: T) = underTest.length
@@ -424,6 +434,7 @@ package IndexedTestImpl {
}
}
+ @Ignore
abstract class StringOpsBaseTest extends IndexedTest[StringOps, Char] with DataProvider[Char] {
override final def length(underTest: StringOps) = underTest.length
@@ -564,4 +575,4 @@ package IndexedTestImpl {
}
}
-} \ No newline at end of file
+}