Skip to content

Commit 0965028

Browse files
authored
Merge pull request scala#5695 from SethTisue/fix-indexedseqtest-under-ant
fix IndexedSeqTest to work in both Ant and sbt
2 parents 214a158 + e08bccb commit 0965028

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

test/junit/scala/collection/IndexedSeqTest.scala

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
package scala.collection
22

33
import org.junit.Test
4+
import org.junit.Ignore
45
import org.junit.Assert.{assertEquals, _}
56
import org.junit.runner.RunWith
67
import org.junit.runners.JUnit4
78

9+
// with the Ant JUnit runner, it's necessary to @Ignore the abstract
10+
// classes here, or JUnit tries to instantiate them. the annotations
11+
// can be removed when this is merged forward (TODO 2.12.x)
12+
813
/**
914
* base class for testing common methods on a various implementations
1015
*
1116
* @tparam T the collection type
1217
* @tparam E the element type
1318
*/
1419
@RunWith(classOf[JUnit4])
20+
@Ignore
1521
abstract class IndexedTest[T, E] {
1622

1723
protected def size = 10
@@ -311,8 +317,9 @@ package IndexedTestImpl {
311317
def toType(n: Int)= if ((n & 0) == 0) null else BoxedUnit.UNIT
312318
}
313319

320+
@Ignore
314321
abstract class ArrayTest[E] (
315-
//the object or primative type of the array
322+
//the object or primitive type of the array
316323
val TYPE: Class[_]) extends IndexedTest[Array[E], E]{
317324
override final def length(underTest: Array[E]) = underTest.length
318325

@@ -342,8 +349,9 @@ package IndexedTestImpl {
342349
}
343350

344351

352+
@Ignore
345353
abstract class WrappedArrayTest[E](
346-
//the object or primative type of the array
354+
//the object or primitive type of the array
347355
val TYPE: Class[_]) extends IndexedTest[mutable.WrappedArray[E], E] with DataProvider[E]{
348356
import mutable.WrappedArray
349357
override final def length(underTest: WrappedArray[E]) = underTest.length
@@ -375,6 +383,7 @@ package IndexedTestImpl {
375383

376384
//construct the data using java as much as possible to avoid invalidating the test
377385

386+
@Ignore
378387
abstract class MutableIndexedSeqTest[T <: mutable.Seq[E], E] extends IndexedTest[T, E] with DataProvider[E]{
379388
override final def length(underTest: T) = underTest.length
380389

@@ -404,6 +413,7 @@ package IndexedTestImpl {
404413
}
405414

406415
}
416+
@Ignore
407417
abstract class ImmutableIndexedSeqTest[T <: SeqLike[E, T], E] extends IndexedTest[T, E] with DataProvider[E] {
408418
override final def length(underTest: T) = underTest.length
409419

@@ -424,6 +434,7 @@ package IndexedTestImpl {
424434
}
425435

426436
}
437+
@Ignore
427438
abstract class StringOpsBaseTest extends IndexedTest[StringOps, Char] with DataProvider[Char] {
428439
override final def length(underTest: StringOps) = underTest.length
429440

@@ -564,4 +575,4 @@ package IndexedTestImpl {
564575
}
565576
}
566577

567-
}
578+
}

0 commit comments

Comments
 (0)