summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAntonio Cunei <antonio.cunei@epfl.ch>2011-04-20 12:16:52 +0000
committerAntonio Cunei <antonio.cunei@epfl.ch>2011-04-20 12:16:52 +0000
commite5ad9c55f8a7a97aa7c36a057078db2031f468e8 (patch)
tree85ec520f743d57148ca2bd9b5c777832e4281e1e /test
parent7c3ec209bc28f83f008bad4d126293bcbb867113 (diff)
downloadscala-e5ad9c55f8a7a97aa7c36a057078db2031f468e8.tar.gz
scala-e5ad9c55f8a7a97aa7c36a057078db2031f468e8.tar.bz2
scala-e5ad9c55f8a7a97aa7c36a057078db2031f468e8.zip
Fixing an incomplete svnmerge; first, revert to...
Fixing an incomplete svnmerge; first, revert to r24726.
Diffstat (limited to 'test')
-rw-r--r--test/disabled/scalacheck/HashTrieSplit.scala47
-rw-r--r--test/files/jvm/JavaInteraction.check (renamed from test/disabled/jvm/JavaInteraction.check)0
-rw-r--r--test/files/jvm/JavaInteraction.scala (renamed from test/disabled/jvm/JavaInteraction.scala)0
-rw-r--r--test/files/jvm/ticket4283/AbstractFoo.java5
-rw-r--r--test/files/jvm/ticket4283/ScalaBipp.scala5
-rw-r--r--test/files/jvm/ticket4283/Test.scala4
-rwxr-xr-xtest/files/neg/t3115.scala2
-rw-r--r--test/files/neg/t3774.check4
-rw-r--r--test/files/pos/spec-List.scala2
-rw-r--r--test/files/pos/t2799.scala2
-rw-r--r--test/files/pos/t4402/A.scala3
-rw-r--r--test/files/pos/t4402/Bar.java7
-rw-r--r--test/files/pos/t4402/Foo.java8
-rw-r--r--test/files/presentation/simple-tests.check (renamed from test/disabled/presentation/simple-tests.check)0
-rw-r--r--test/files/presentation/simple-tests.javaopts (renamed from test/disabled/presentation/simple-tests.javaopts)0
-rw-r--r--test/files/presentation/simple-tests.opts (renamed from test/disabled/presentation/simple-tests.opts)0
-rw-r--r--test/files/run/pc-conversions.scala13
-rw-r--r--test/files/run/t4459.scala12
-rw-r--r--test/files/scalacheck/HashTrieSplit.scala4
-rw-r--r--test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala6
-rw-r--r--test/files/scalacheck/parallel-collections/pc.scala10
-rw-r--r--test/pending/run/t4283/AbstractFoo.java6
-rw-r--r--test/pending/run/t4283/IllegalAccess.scala17
-rw-r--r--test/pending/run/t4283/ScalaBipp.scala5
-rw-r--r--test/scaladoc/resources/Trac4471.scala9
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala40
26 files changed, 24 insertions, 187 deletions
diff --git a/test/disabled/scalacheck/HashTrieSplit.scala b/test/disabled/scalacheck/HashTrieSplit.scala
deleted file mode 100644
index 6b20efe12b..0000000000
--- a/test/disabled/scalacheck/HashTrieSplit.scala
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-import collection._
-
-
-
-
-// checks whether hash tries split their iterators correctly
-// even after some elements have been traversed
-object Test {
- def main(args: Array[String]) {
- doesSplitOk
- }
-
- def doesSplitOk = {
- val sz = 2000
- var ht = new parallel.immutable.ParHashMap[Int, Int]
- // println("creating trie")
- for (i <- 0 until sz) ht += ((i + sz, i))
- // println("created trie")
- for (n <- 0 until (sz - 1)) {
- // println("---------> n = " + n)
- val pit = ht.parallelIterator
- val pit2 = ht.parallelIterator
- var i = 0
- while (i < n) {
- pit.next
- pit2.next
- i += 1
- }
- // println("splitting")
- val pits = pit.split
- val fst = pits(0).toSet
- val snd = pits(1).toSet
- val orig = pit2.toSet
- if (orig.size != (fst.size + snd.size) || orig != (fst ++ snd)) {
- println("Original: " + orig)
- println("First: " + fst)
- println("Second: " + snd)
- assert(false)
- }
- }
- }
-}
diff --git a/test/disabled/jvm/JavaInteraction.check b/test/files/jvm/JavaInteraction.check
index fb9d3cdd8c..fb9d3cdd8c 100644
--- a/test/disabled/jvm/JavaInteraction.check
+++ b/test/files/jvm/JavaInteraction.check
diff --git a/test/disabled/jvm/JavaInteraction.scala b/test/files/jvm/JavaInteraction.scala
index 26fbc17e58..26fbc17e58 100644
--- a/test/disabled/jvm/JavaInteraction.scala
+++ b/test/files/jvm/JavaInteraction.scala
diff --git a/test/files/jvm/ticket4283/AbstractFoo.java b/test/files/jvm/ticket4283/AbstractFoo.java
deleted file mode 100644
index 74f3827fe3..0000000000
--- a/test/files/jvm/ticket4283/AbstractFoo.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package test;
-
-/* package private */ class AbstractFoo {
- public int t;
-}
diff --git a/test/files/jvm/ticket4283/ScalaBipp.scala b/test/files/jvm/ticket4283/ScalaBipp.scala
deleted file mode 100644
index 36dea9f4de..0000000000
--- a/test/files/jvm/ticket4283/ScalaBipp.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-package test
-
-class ScalaBipp extends AbstractFoo {
- def make: Option[ScalaBipp] = Option(this)
-}
diff --git a/test/files/jvm/ticket4283/Test.scala b/test/files/jvm/ticket4283/Test.scala
deleted file mode 100644
index 9bbfaab928..0000000000
--- a/test/files/jvm/ticket4283/Test.scala
+++ /dev/null
@@ -1,4 +0,0 @@
-
-object Test extends App {
- val x = (new test.ScalaBipp).make.get.t // java.lang.IllegalAccessError: tried to access class test.AbstractFoo from class other.IllegalAccess$
-}
diff --git a/test/files/neg/t3115.scala b/test/files/neg/t3115.scala
index 3888085593..4aeeb4063e 100755
--- a/test/files/neg/t3115.scala
+++ b/test/files/neg/t3115.scala
@@ -1,5 +1,5 @@
object sc {
- @deprecated("", "2.8.0") object Math
+ @deprecated("") object Math
}
object Test {
diff --git a/test/files/neg/t3774.check b/test/files/neg/t3774.check
index ea35c50541..59c63c4ee8 100644
--- a/test/files/neg/t3774.check
+++ b/test/files/neg/t3774.check
@@ -1,6 +1,6 @@
t3774.scala:4: error: overloaded method value ++ with alternatives:
- [B1 >: List[Int]](xs: scala.collection.GenTraversableOnce[((Int, Int), B1)])scala.collection.immutable.Map[(Int, Int),B1] <and>
- [B >: ((Int, Int), List[Int]),That](that: scala.collection.GenTraversableOnce[B])(implicit bf: scala.collection.generic.CanBuildFrom[scala.collection.immutable.Map[(Int, Int),List[Int]],B,That])That
+ [B1 >: List[Int]](xs: scala.collection.TraversableOnce[((Int, Int), B1)])scala.collection.immutable.Map[(Int, Int),B1] <and>
+ [B >: ((Int, Int), List[Int]),That](that: scala.collection.TraversableOnce[B])(implicit bf: scala.collection.generic.CanBuildFrom[scala.collection.immutable.Map[(Int, Int),List[Int]],B,That])That
cannot be applied to (scala.collection.immutable.IndexedSeq[((Int, Int), scala.collection.immutable.Range.Inclusive)])
Map[(Int,Int),List[Int]]() ++ (for(x <- 0 to 1 ; y <- 0 to 1) yield {(x,y)-> (0 to 1)})
^
diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala
index 04ab7d1543..e3055f3051 100644
--- a/test/files/pos/spec-List.scala
+++ b/test/files/pos/spec-List.scala
@@ -144,7 +144,7 @@ sealed trait List[@specialized +A] extends LinearSeq[A]
/** Create a new list which contains all elements of this list
* followed by all elements of Traversable `that'
*/
- override def ++[B >: A, That](xs: GenTraversableOnce[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = {
+ override def ++[B >: A, That](xs: TraversableOnce[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = {
val b = bf(this)
if (b.isInstanceOf[ListBuffer[_]]) (this ::: xs.toList).asInstanceOf[That]
else super.++(xs)
diff --git a/test/files/pos/t2799.scala b/test/files/pos/t2799.scala
index 7710cce26c..fe93c0e301 100644
--- a/test/files/pos/t2799.scala
+++ b/test/files/pos/t2799.scala
@@ -1 +1 @@
-@deprecated("hi mom", "") case class Bob ()
+@deprecated("hi mom") case class Bob ()
diff --git a/test/files/pos/t4402/A.scala b/test/files/pos/t4402/A.scala
deleted file mode 100644
index f43f0865f0..0000000000
--- a/test/files/pos/t4402/A.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package ohmy
-
-class A extends other.Bar
diff --git a/test/files/pos/t4402/Bar.java b/test/files/pos/t4402/Bar.java
deleted file mode 100644
index edc00a5fd1..0000000000
--- a/test/files/pos/t4402/Bar.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package other;
-
-public class Bar extends test.Foo {
- void createMeSth(test.Foo.Inner aaa) {
- aaa.hello();
- }
-}
diff --git a/test/files/pos/t4402/Foo.java b/test/files/pos/t4402/Foo.java
deleted file mode 100644
index 585a5e0a2c..0000000000
--- a/test/files/pos/t4402/Foo.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package test;
-
-public abstract class Foo {
- protected interface Inner {
- public void hello();
- }
-}
-
diff --git a/test/disabled/presentation/simple-tests.check b/test/files/presentation/simple-tests.check
index b90dfce77c..b90dfce77c 100644
--- a/test/disabled/presentation/simple-tests.check
+++ b/test/files/presentation/simple-tests.check
diff --git a/test/disabled/presentation/simple-tests.javaopts b/test/files/presentation/simple-tests.javaopts
index 4af888f9c2..4af888f9c2 100644
--- a/test/disabled/presentation/simple-tests.javaopts
+++ b/test/files/presentation/simple-tests.javaopts
diff --git a/test/disabled/presentation/simple-tests.opts b/test/files/presentation/simple-tests.opts
index 8529bbf1a0..8529bbf1a0 100644
--- a/test/disabled/presentation/simple-tests.opts
+++ b/test/files/presentation/simple-tests.opts
diff --git a/test/files/run/pc-conversions.scala b/test/files/run/pc-conversions.scala
index 6be0f99355..3121d82944 100644
--- a/test/files/run/pc-conversions.scala
+++ b/test/files/run/pc-conversions.scala
@@ -7,7 +7,7 @@ import collection._
object Test {
def main(args: Array[String]) {
- testConversions
+ // disabled
}
def testConversions {
@@ -49,18 +49,13 @@ object Test {
assertToPar(parallel.immutable.ParHashSet(1 -> 3))
assertToParWoMap(immutable.Range(1, 10, 2))
-
- // seq and par again conversions)
- assertSeqPar(parallel.mutable.ParArray(1, 2, 3))
}
- def assertSeqPar[T](pc: parallel.ParIterable[T]) = pc.seq.par == pc
-
def assertSeq[T](pc: parallel.ParIterable[T]) = assert(pc.seq == pc)
- def assertPar[T, P <: Parallel](xs: GenIterable[T]) = assert(xs == xs.par)
+ def assertPar[T, P <: Parallel](xs: Iterable[T]) = assert(xs == xs.par)
- def assertToPar[K, V](xs: GenTraversable[(K, V)]) {
+ def assertToPar[K, V](xs: Traversable[(K, V)]) {
xs match {
case _: Seq[_] =>
assert(xs.toIterable.par == xs)
@@ -78,7 +73,7 @@ object Test {
assert(xs.par.toMap == xs.toMap)
}
- def assertToParWoMap[T](xs: GenSeq[T]) {
+ def assertToParWoMap[T](xs: Seq[T]) {
assert(xs.toIterable.par == xs.toIterable)
assert(xs.par.toIterable == xs.toIterable)
diff --git a/test/files/run/t4459.scala b/test/files/run/t4459.scala
deleted file mode 100644
index 6e1b871cbe..0000000000
--- a/test/files/run/t4459.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-import collection._
-
-object Test {
- def main(args: Array[String]) {
- for (i <- 0 until 2000) {
- foo((0 until 10000).toSeq.par)
- }
- }
-
- def foo(arg: GenSeq[_]): String = arg.map(x => x).mkString(",")
-}
-
diff --git a/test/files/scalacheck/HashTrieSplit.scala b/test/files/scalacheck/HashTrieSplit.scala
index e959a3d535..6b20efe12b 100644
--- a/test/files/scalacheck/HashTrieSplit.scala
+++ b/test/files/scalacheck/HashTrieSplit.scala
@@ -23,8 +23,8 @@ object Test {
// println("created trie")
for (n <- 0 until (sz - 1)) {
// println("---------> n = " + n)
- val pit = ht.splitter
- val pit2 = ht.splitter
+ val pit = ht.parallelIterator
+ val pit2 = ht.parallelIterator
var i = 0
while (i < n) {
pit.next
diff --git a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala
index ac3493e56c..744d22f05c 100644
--- a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala
+++ b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala
@@ -71,11 +71,11 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
(inst, fromTraversable(inst), modif)
}
- def areEqual(t1: GenTraversable[T], t2: GenTraversable[T]) = if (hasStrictOrder) {
+ def areEqual(t1: Traversable[T], t2: Traversable[T]) = if (hasStrictOrder) {
t1 == t2 && t2 == t1
} else (t1, t2) match { // it is slightly delicate what `equal` means if the order is not strict
- case (m1: GenMap[_, _], m2: GenMap[_, _]) => m1 == m2 && m2 == m1
- case (i1: GenIterable[_], i2: GenIterable[_]) =>
+ case (m1: Map[_, _], m2: Map[_, _]) => m1 == m2 && m2 == m1
+ case (i1: Iterable[_], i2: Iterable[_]) =>
val i1s = i1.toSet
val i2s = i2.toSet
i1s == i2s && i2s == i1s
diff --git a/test/files/scalacheck/parallel-collections/pc.scala b/test/files/scalacheck/parallel-collections/pc.scala
index 103b5e2993..4be7b0ec4d 100644
--- a/test/files/scalacheck/parallel-collections/pc.scala
+++ b/test/files/scalacheck/parallel-collections/pc.scala
@@ -30,6 +30,16 @@ class ParCollProperties extends Properties("Parallel collections") {
// parallel vectors
include(immutable.IntParallelVectorCheck)
+
+ /* Views */
+
+ // parallel array views
+
+ // parallel immutable hash map views
+
+ // parallel mutable hash map views
+
+ // parallel vector views
}
diff --git a/test/pending/run/t4283/AbstractFoo.java b/test/pending/run/t4283/AbstractFoo.java
deleted file mode 100644
index 0403271b74..0000000000
--- a/test/pending/run/t4283/AbstractFoo.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package test;
-
-/* package private */ class AbstractFoo {
- public int t = 1;
- public int f() { return 2; }
-} \ No newline at end of file
diff --git a/test/pending/run/t4283/IllegalAccess.scala b/test/pending/run/t4283/IllegalAccess.scala
deleted file mode 100644
index 12de7e4649..0000000000
--- a/test/pending/run/t4283/IllegalAccess.scala
+++ /dev/null
@@ -1,17 +0,0 @@
-package other
-
-object IllegalAccess {
- def main(args: Array[String]) {
- val x = (new test.ScalaBipp).make.get.asInstanceOf[test.ScalaBipp].f()
- println(x)
- val y = (new test.ScalaBipp).make.get.f()
- println(y)
- val u = (new test.ScalaBipp).make.get.asInstanceOf[test.ScalaBipp].t
- println(u)
- val v = (new test.ScalaBipp).make.get.t
- println(v)
- val sb: test.ScalaBipp = (new test.ScalaBipp).make.get
- val z = sb.t
- println(z)
- }
-}
diff --git a/test/pending/run/t4283/ScalaBipp.scala b/test/pending/run/t4283/ScalaBipp.scala
deleted file mode 100644
index 36dea9f4de..0000000000
--- a/test/pending/run/t4283/ScalaBipp.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-package test
-
-class ScalaBipp extends AbstractFoo {
- def make: Option[ScalaBipp] = Option(this)
-}
diff --git a/test/scaladoc/resources/Trac4471.scala b/test/scaladoc/resources/Trac4471.scala
deleted file mode 100644
index 2a22887c0d..0000000000
--- a/test/scaladoc/resources/Trac4471.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-class A {
- @deprecated def foo = 123
- @deprecated def bar = 456
-}
-
-class B {
- def foo = 123
- @deprecated def bar = 456
-}
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index cb31df3fb2..c0a3f1ad95 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -24,7 +24,6 @@ object Test extends Properties("HtmlFactory") {
import scala.tools.nsc.doc.{DocFactory, Settings}
import scala.tools.nsc.doc.model.IndexModelFactory
import scala.tools.nsc.doc.html.HtmlFactory
- import scala.tools.nsc.doc.html.page.ReferenceIndex
def getClasspath = {
// these things can be tricky
@@ -60,23 +59,6 @@ object Test extends Properties("HtmlFactory") {
result
}
- def createReferenceIndex(basename: String) = {
- createFactory.makeUniverse(List("test/scaladoc/resources/"+basename)) match {
- case Some(universe) => {
- val index = IndexModelFactory.makeIndex(universe)
- val pages = index.firstLetterIndex.map({
- case (key, value) => {
- val page = new ReferenceIndex(key, index, universe)
- page.absoluteLinkTo(page.path) -> page.body
- }
- })
- Some(pages)
- }
- case _ =>
- None
- }
- }
-
def createTemplate(scala: String) = {
val html = scala.stripSuffix(".scala") + ".html"
createTemplates(scala)(html)
@@ -284,26 +266,4 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
-
- property("Trac #4452") = {
- createTemplate("Trac4452.scala") match {
- case node: scala.xml.Node =>
- ! node.toString.contains(">*")
- case _ => false
- }
- }
-
- property("Trac #4471") = {
- createReferenceIndex("Trac4471.scala") match {
- case Some(pages) =>
- (pages.get("index/index-f.html") match {
- case Some(node) => node.toString.contains(">A</a></strike>")
- case _ => false
- }) && (pages.get("index/index-b.html") match {
- case Some(node) => node.toString.contains(">bar</strike>")
- case _ => false
- })
- case _ => false
- }
- }
}