diff options
author | Paul Phillips <paulp@improving.org> | 2010-09-28 00:51:25 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-09-28 00:51:25 +0000 |
commit | 9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f (patch) | |
tree | 857d48a844aa0479863f79c2a991984ac6a0104f /test/pending/pos | |
parent | a56c33b6a470939a1396015972f09e19dc493245 (diff) | |
download | scala-9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f.tar.gz scala-9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f.tar.bz2 scala-9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f.zip |
Cleaning up the contents of test.
including "CheckEither", written against scalacheck 1.2 in the year 471
AD. Removed all the duplicates I could find, mostly between pending
and files. Renamed a bunch of tests so they wouldn't look like likely
duplicates next time around. Nominated somebody else to do this once in
a while.
No review.
Diffstat (limited to 'test/pending/pos')
-rw-r--r-- | test/pending/pos/bug2018.scala | 15 | ||||
-rw-r--r-- | test/pending/pos/bug3420.flags | 1 | ||||
-rw-r--r-- | test/pending/pos/bug3420.scala | 5 | ||||
-rw-r--r-- | test/pending/pos/bug563.scala | 7 | ||||
-rw-r--r-- | test/pending/pos/foo.scala | 3 | ||||
-rw-r--r-- | test/pending/pos/t0716.scala | 24 | ||||
-rw-r--r-- | test/pending/pos/t2162.scala | 20 | ||||
-rw-r--r-- | test/pending/pos/t2179.scala | 6 | ||||
-rw-r--r-- | test/pending/pos/t2635.scala | 16 | ||||
-rw-r--r-- | test/pending/pos/t2641.scala | 16 | ||||
-rw-r--r-- | test/pending/pos/t3636.scala | 49 |
11 files changed, 0 insertions, 162 deletions
diff --git a/test/pending/pos/bug2018.scala b/test/pending/pos/bug2018.scala deleted file mode 100644 index f1753f4d7a..0000000000 --- a/test/pending/pos/bug2018.scala +++ /dev/null @@ -1,15 +0,0 @@ -class A { - val b = new B - - def getChildren = List(new A).elements - - class B { - private def check = true - - private def getAncestor(p: A): A = { - val c = (p.getChildren.find(_.b.check)) match {case Some(d) => d case None => p} - - if (c == p) p else c.b.getAncestor(c) - } - } -} diff --git a/test/pending/pos/bug3420.flags b/test/pending/pos/bug3420.flags deleted file mode 100644 index ea03113c66..0000000000 --- a/test/pending/pos/bug3420.flags +++ /dev/null @@ -1 +0,0 @@ --optimise -Xfatal-warnings
\ No newline at end of file diff --git a/test/pending/pos/bug3420.scala b/test/pending/pos/bug3420.scala deleted file mode 100644 index 0fc56ed67b..0000000000 --- a/test/pending/pos/bug3420.scala +++ /dev/null @@ -1,5 +0,0 @@ -class C { - val cv = Map[Int, Int](1 -> 2) - lazy val cl = Map[Int, Int](1 -> 2) - def cd = Map[Int, Int](1 -> 2) -} diff --git a/test/pending/pos/bug563.scala b/test/pending/pos/bug563.scala deleted file mode 100644 index d559226bdb..0000000000 --- a/test/pending/pos/bug563.scala +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - def map[A,R](a : List[A], f : A => R) : List[R] = a.map(f); - - def split(sn : Iterable[List[Cell[int]]]) : unit = - for (val n <- sn) - map(n,ptr => new Cell(ptr.elem)); -} diff --git a/test/pending/pos/foo.scala b/test/pending/pos/foo.scala deleted file mode 100644 index 8b45addbd5..0000000000 --- a/test/pending/pos/foo.scala +++ /dev/null @@ -1,3 +0,0 @@ -object foo { - var x: String -} diff --git a/test/pending/pos/t0716.scala b/test/pending/pos/t0716.scala deleted file mode 100644 index 98ba9bb2aa..0000000000 --- a/test/pending/pos/t0716.scala +++ /dev/null @@ -1,24 +0,0 @@ -trait Functor[F[_]] { - def fmap[A,B](fun: A=>B, arg:F[A]): F[B] -} -object Functor{ - implicit val ListFunctor = new Functor[List] { - def fmap[A, B](f: A => B, arg: List[A]):List[B] = arg map f - } - - final class OOFunctor[F[_],A](arg:F[A])(implicit ftr: Functor[F]) { - def fmap[B](fun: A=>B):F[B] = ftr.fmap(fun,arg) - } - - //breaks if uncommented - implicit def lifttoOO[F[_],A](arg:F[A])(implicit ftr: Functor[F]) = new OOFunctor[F,A](arg)(ftr) - - //works if uncommented - //implicit def liftListtoOO[A](arg:List[A]):OOFunctor[List,A] = new OOFunctor[List,A](arg) -} - -object GeneralLiftingDemo extends Application { - import Functor._ - val l = List(1,2,3) - println("OO : " + l.fmap( 1+) ) -} diff --git a/test/pending/pos/t2162.scala b/test/pending/pos/t2162.scala deleted file mode 100644 index b21404726b..0000000000 --- a/test/pending/pos/t2162.scala +++ /dev/null @@ -1,20 +0,0 @@ -// crash verified; no solution yet -class Foo(x: Int) -class Bar extends Foo(1) - -trait A { - def foo[T <: Foo] -} -class B extends A { - def foo[Bar] { println("B.foo[Bar]") } -} -object test { - val x = new B - val y = new A { - def foo[Bar] { println("A.foo[Bar]") } - } - def main(args: Array[String]) { - x.foo // ok - y.foo // java.lang.AssertionError: assertion failed (Erasure.scala:441 in r18338)) - } -} diff --git a/test/pending/pos/t2179.scala b/test/pending/pos/t2179.scala deleted file mode 100644 index fd37d8f760..0000000000 --- a/test/pending/pos/t2179.scala +++ /dev/null @@ -1,6 +0,0 @@ -on trunk r18368, this delightful little poison pill: - -(Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d)) - -sends the compiler into an apparently infinite loop. a sample thread dump shows: - diff --git a/test/pending/pos/t2635.scala b/test/pending/pos/t2635.scala deleted file mode 100644 index 378631b23d..0000000000 --- a/test/pending/pos/t2635.scala +++ /dev/null @@ -1,16 +0,0 @@ -abstract class Base - -object Test -{ - def run(c: Class[_ <: Base]): Unit = { - } - - def main(args: Array[String]): Unit = - { - val sc: Option[Class[_ <: Base]] = Some(classOf[Base]) - sc match { - case Some((c: Class[_ <: Base])) => run(c) - case None => - } - } -}
\ No newline at end of file diff --git a/test/pending/pos/t2641.scala b/test/pending/pos/t2641.scala deleted file mode 100644 index fec825c4f9..0000000000 --- a/test/pending/pos/t2641.scala +++ /dev/null @@ -1,16 +0,0 @@ -import scala.collection._ -import scala.collection.generic._ - -abstract class ManagedSeqStrict[+A] - extends Traversable[A] - with GenericTraversableTemplate[A, ManagedSeqStrict] - -trait ManagedSeq[+A, +Coll] - extends ManagedSeqStrict[A] - with TraversableView[A, ManagedSeqStrict[A]] - with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A/*ERROR: too few type args*/]] -{ self => - trait Transformed[+B] extends ManagedSeq[B, Coll] with super.Transformed[B] - - trait Sliced extends Transformed[A] with super.Sliced -}
\ No newline at end of file diff --git a/test/pending/pos/t3636.scala b/test/pending/pos/t3636.scala deleted file mode 100644 index 24d18c653d..0000000000 --- a/test/pending/pos/t3636.scala +++ /dev/null @@ -1,49 +0,0 @@ -class CTxnLocal[ T ] { - def set( x: T )( implicit t: Txn ) {} - def get( implicit t: Txn ) : T = null.asInstanceOf[ T ] - def initialValue( t: Txn ) : T = null.asInstanceOf[ T ] -} - -trait Txn - -trait ProcTxn { - def ccstm: Txn -} - -trait TxnLocal[ @specialized T ] { - def apply()( implicit tx: ProcTxn ) : T - def set( v: T )( implicit tx: ProcTxn ) : Unit - def swap( v: T )( implicit tx: ProcTxn ) : T - def transform( f: T => T )( implicit tx: ProcTxn ) : Unit -} - -object TxnLocal { - def apply[ @specialized T ] : TxnLocal[ T ] = new Impl( new CTxnLocal[ T ]) - def apply[ @specialized T ]( initValue: => T ) : TxnLocal[ T ] = new Impl( new CTxnLocal[ T ] { - override def initialValue( tx: Txn ): T = initValue - }) - - private class Impl[ T ]( c: CTxnLocal[ T ]) extends TxnLocal[ T ] { - def apply()( implicit tx: ProcTxn ) : T = c.get( tx.ccstm ) - def set( v: T )( implicit tx: ProcTxn ) : Unit = c.set( v )( tx.ccstm ) - def swap( v: T )( implicit tx: ProcTxn ) : T = { - // currently not implemented in CTxnLocal - val oldV = apply - set( v ) - oldV - } - def transform( f: T => T )( implicit tx: ProcTxn ) { - set( f( apply )) - } - } -} - - -object Transition { - private val currentRef = TxnLocal[ Transition ]( Instant ) - def current( implicit tx: ProcTxn ) : Transition = currentRef() -} - -sealed abstract class Transition -case object Instant extends Transition - |