From 71a2102a2df3721e0b8d0a9a5e87d01eb849dadd Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Mon, 16 Dec 2013 13:59:34 +0100 Subject: Use t- prefix instead of si- prefix for test files --- test/files/jvm/si5471.check | 2 - test/files/jvm/si5471.scala | 17 ------- test/files/jvm/t5471.check | 2 + test/files/jvm/t5471.scala | 17 +++++++ test/files/run/reify_renamed_term_si5841.check | 1 - test/files/run/reify_renamed_term_si5841.scala | 7 --- test/files/run/reify_renamed_term_t5841.check | 1 + test/files/run/reify_renamed_term_t5841.scala | 7 +++ test/files/run/si4750.check | 1 - test/files/run/si4750.scala | 7 --- test/files/run/si5045.check | 6 --- test/files/run/si5045.scala | 49 ------------------- test/files/run/t4750.check | 1 + test/files/run/t4750.scala | 7 +++ test/files/run/t5045.check | 6 +++ test/files/run/t5045.scala | 49 +++++++++++++++++++ test/files/scalacheck/si4147.scala | 68 -------------------------- test/files/scalacheck/t4147.scala | 68 ++++++++++++++++++++++++++ 18 files changed, 158 insertions(+), 158 deletions(-) delete mode 100644 test/files/jvm/si5471.check delete mode 100644 test/files/jvm/si5471.scala create mode 100644 test/files/jvm/t5471.check create mode 100644 test/files/jvm/t5471.scala delete mode 100644 test/files/run/reify_renamed_term_si5841.check delete mode 100644 test/files/run/reify_renamed_term_si5841.scala create mode 100644 test/files/run/reify_renamed_term_t5841.check create mode 100644 test/files/run/reify_renamed_term_t5841.scala delete mode 100644 test/files/run/si4750.check delete mode 100644 test/files/run/si4750.scala delete mode 100644 test/files/run/si5045.check delete mode 100644 test/files/run/si5045.scala create mode 100644 test/files/run/t4750.check create mode 100644 test/files/run/t4750.scala create mode 100644 test/files/run/t5045.check create mode 100644 test/files/run/t5045.scala delete mode 100644 test/files/scalacheck/si4147.scala create mode 100644 test/files/scalacheck/t4147.scala (limited to 'test') diff --git a/test/files/jvm/si5471.check b/test/files/jvm/si5471.check deleted file mode 100644 index bb101b641b..0000000000 --- a/test/files/jvm/si5471.check +++ /dev/null @@ -1,2 +0,0 @@ -true -true diff --git a/test/files/jvm/si5471.scala b/test/files/jvm/si5471.scala deleted file mode 100644 index 2efd869b61..0000000000 --- a/test/files/jvm/si5471.scala +++ /dev/null @@ -1,17 +0,0 @@ - -object Test { - - def main(args: Array[String]) { - import scala.math.Numeric - import scala.math.Numeric.Implicits._ - - val b = BigInt(Long.MaxValue) + 1 - - def dbl[N :Numeric](n: N) = n.toDouble - def flt[N :Numeric](n: N) = n.toFloat - - println(dbl(b) == b.toDouble) - println(flt(b) == b.toFloat) - } - -} diff --git a/test/files/jvm/t5471.check b/test/files/jvm/t5471.check new file mode 100644 index 0000000000..bb101b641b --- /dev/null +++ b/test/files/jvm/t5471.check @@ -0,0 +1,2 @@ +true +true diff --git a/test/files/jvm/t5471.scala b/test/files/jvm/t5471.scala new file mode 100644 index 0000000000..2efd869b61 --- /dev/null +++ b/test/files/jvm/t5471.scala @@ -0,0 +1,17 @@ + +object Test { + + def main(args: Array[String]) { + import scala.math.Numeric + import scala.math.Numeric.Implicits._ + + val b = BigInt(Long.MaxValue) + 1 + + def dbl[N :Numeric](n: N) = n.toDouble + def flt[N :Numeric](n: N) = n.toFloat + + println(dbl(b) == b.toDouble) + println(flt(b) == b.toFloat) + } + +} diff --git a/test/files/run/reify_renamed_term_si5841.check b/test/files/run/reify_renamed_term_si5841.check deleted file mode 100644 index 6031277b76..0000000000 --- a/test/files/run/reify_renamed_term_si5841.check +++ /dev/null @@ -1 +0,0 @@ -class scala.reflect.runtime.JavaUniverse diff --git a/test/files/run/reify_renamed_term_si5841.scala b/test/files/run/reify_renamed_term_si5841.scala deleted file mode 100644 index ef18d650bf..0000000000 --- a/test/files/run/reify_renamed_term_si5841.scala +++ /dev/null @@ -1,7 +0,0 @@ -import scala.reflect.runtime.universe._ -import scala.reflect.runtime.{universe => ru} -import scala.tools.reflect.Eval - -object Test extends App { - println(reify{ru}.eval.getClass) -} \ No newline at end of file diff --git a/test/files/run/reify_renamed_term_t5841.check b/test/files/run/reify_renamed_term_t5841.check new file mode 100644 index 0000000000..6031277b76 --- /dev/null +++ b/test/files/run/reify_renamed_term_t5841.check @@ -0,0 +1 @@ +class scala.reflect.runtime.JavaUniverse diff --git a/test/files/run/reify_renamed_term_t5841.scala b/test/files/run/reify_renamed_term_t5841.scala new file mode 100644 index 0000000000..ef18d650bf --- /dev/null +++ b/test/files/run/reify_renamed_term_t5841.scala @@ -0,0 +1,7 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{universe => ru} +import scala.tools.reflect.Eval + +object Test extends App { + println(reify{ru}.eval.getClass) +} \ No newline at end of file diff --git a/test/files/run/si4750.check b/test/files/run/si4750.check deleted file mode 100644 index bf55f70df3..0000000000 --- a/test/files/run/si4750.check +++ /dev/null @@ -1 +0,0 @@ -US$ 5.80 diff --git a/test/files/run/si4750.scala b/test/files/run/si4750.scala deleted file mode 100644 index 96d2c4fec7..0000000000 --- a/test/files/run/si4750.scala +++ /dev/null @@ -1,7 +0,0 @@ -import scala.util.matching.Regex - -object Test extends App { - val input = "CURRENCY 5.80" - println("CURRENCY".r.replaceAllIn(input, Regex quoteReplacement "US$")) -} - diff --git a/test/files/run/si5045.check b/test/files/run/si5045.check deleted file mode 100644 index 7e9c1961b7..0000000000 --- a/test/files/run/si5045.check +++ /dev/null @@ -1,6 +0,0 @@ - extract an exact match 2011-07-15 2011-07-15 - extract from middle of string 2011-07-15 2011-07-15 - extract from middle of string (P2) 2011-07-15 2011-07-15 - extract from middle of string (P3) 2011-07-15 2011-07-15 - copyright example has date Copyright 2011 Copyright 2011 - copyright example missing date No copyright No copyright diff --git a/test/files/run/si5045.scala b/test/files/run/si5045.scala deleted file mode 100644 index b0c3a4ddc4..0000000000 --- a/test/files/run/si5045.scala +++ /dev/null @@ -1,49 +0,0 @@ - -import scala.language.postfixOps - -object Test extends App { - - import scala.util.matching.{ Regex, UnanchoredRegex } - - val dateP1 = """(\d\d\d\d)-(\d\d)-(\d\d)""".r.unanchored - val dateP2 = """(\d\d\d\d)-(\d\d)-(\d\d)""" r ("year", "month", "day") unanchored - val dateP3 = new Regex("""(\d\d\d\d)-(\d\d)-(\d\d)""", "year", "month", "day") with UnanchoredRegex - - val yearStr = "2011" - val dateStr = List(yearStr,"07","15").mkString("-") - - def test(msg: String)(strs: Seq[String]): Unit = println("%40s %s".format(msg, strs mkString " ")) - - test("extract an exact match") { - val dateP1(y,m,d) = dateStr - Seq(List(y,m,d).mkString("-"), dateStr) - } - - test("extract from middle of string") { - val dateP1(y,m,d) = "Tested on "+dateStr+"." - Seq(List(y,m,d).mkString("-"), dateStr) - } - - test("extract from middle of string (P2)") { - val dateP2(y,m,d) = "Tested on "+dateStr+"." - Seq(List(y,m,d).mkString("-"), dateStr) - } - - test("extract from middle of string (P3)") { - val dateP2(y,m,d) = "Tested on "+dateStr+"." - Seq(List(y,m,d).mkString("-"), dateStr) - } - - def copyright(in: String): String = in match { - case dateP1(year, month, day) => "Copyright "+year - case _ => "No copyright" - } - - test("copyright example has date") { - Seq(copyright("Date of this document: "+dateStr), "Copyright "+yearStr) - } - - test("copyright example missing date") { - Seq(copyright("Date of this document: unknown"), "No copyright") - } -} diff --git a/test/files/run/t4750.check b/test/files/run/t4750.check new file mode 100644 index 0000000000..bf55f70df3 --- /dev/null +++ b/test/files/run/t4750.check @@ -0,0 +1 @@ +US$ 5.80 diff --git a/test/files/run/t4750.scala b/test/files/run/t4750.scala new file mode 100644 index 0000000000..96d2c4fec7 --- /dev/null +++ b/test/files/run/t4750.scala @@ -0,0 +1,7 @@ +import scala.util.matching.Regex + +object Test extends App { + val input = "CURRENCY 5.80" + println("CURRENCY".r.replaceAllIn(input, Regex quoteReplacement "US$")) +} + diff --git a/test/files/run/t5045.check b/test/files/run/t5045.check new file mode 100644 index 0000000000..7e9c1961b7 --- /dev/null +++ b/test/files/run/t5045.check @@ -0,0 +1,6 @@ + extract an exact match 2011-07-15 2011-07-15 + extract from middle of string 2011-07-15 2011-07-15 + extract from middle of string (P2) 2011-07-15 2011-07-15 + extract from middle of string (P3) 2011-07-15 2011-07-15 + copyright example has date Copyright 2011 Copyright 2011 + copyright example missing date No copyright No copyright diff --git a/test/files/run/t5045.scala b/test/files/run/t5045.scala new file mode 100644 index 0000000000..b0c3a4ddc4 --- /dev/null +++ b/test/files/run/t5045.scala @@ -0,0 +1,49 @@ + +import scala.language.postfixOps + +object Test extends App { + + import scala.util.matching.{ Regex, UnanchoredRegex } + + val dateP1 = """(\d\d\d\d)-(\d\d)-(\d\d)""".r.unanchored + val dateP2 = """(\d\d\d\d)-(\d\d)-(\d\d)""" r ("year", "month", "day") unanchored + val dateP3 = new Regex("""(\d\d\d\d)-(\d\d)-(\d\d)""", "year", "month", "day") with UnanchoredRegex + + val yearStr = "2011" + val dateStr = List(yearStr,"07","15").mkString("-") + + def test(msg: String)(strs: Seq[String]): Unit = println("%40s %s".format(msg, strs mkString " ")) + + test("extract an exact match") { + val dateP1(y,m,d) = dateStr + Seq(List(y,m,d).mkString("-"), dateStr) + } + + test("extract from middle of string") { + val dateP1(y,m,d) = "Tested on "+dateStr+"." + Seq(List(y,m,d).mkString("-"), dateStr) + } + + test("extract from middle of string (P2)") { + val dateP2(y,m,d) = "Tested on "+dateStr+"." + Seq(List(y,m,d).mkString("-"), dateStr) + } + + test("extract from middle of string (P3)") { + val dateP2(y,m,d) = "Tested on "+dateStr+"." + Seq(List(y,m,d).mkString("-"), dateStr) + } + + def copyright(in: String): String = in match { + case dateP1(year, month, day) => "Copyright "+year + case _ => "No copyright" + } + + test("copyright example has date") { + Seq(copyright("Date of this document: "+dateStr), "Copyright "+yearStr) + } + + test("copyright example missing date") { + Seq(copyright("Date of this document: unknown"), "No copyright") + } +} diff --git a/test/files/scalacheck/si4147.scala b/test/files/scalacheck/si4147.scala deleted file mode 100644 index 72f6e9afd5..0000000000 --- a/test/files/scalacheck/si4147.scala +++ /dev/null @@ -1,68 +0,0 @@ -import org.scalacheck.Prop.{forAll, throws} -import org.scalacheck.Properties -import org.scalacheck.Gen - - -import collection.mutable - - -object Test extends Properties("Mutable TreeSet") { - - val generator = Gen.listOfN(1000, Gen.chooseNum(0, 1000)) - - val denseGenerator = Gen.listOfN(1000, Gen.chooseNum(0, 200)) - - property("Insertion doesn't allow duplicates values.") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - t == s.toSet - } - } - - property("Verification of size method validity") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - for (a <- s) { - t -= a - } - t.size == 0 - } - } - - property("All inserted elements are removed") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - for (a <- s) { - t -= a - } - t == Set() - } - } - - property("Elements are sorted.") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - t.toList == s.distinct.sorted - } - } - - property("Implicit CanBuildFrom resolution succeeds as well as the \"same-result-type\" principle.") = - forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - val t2 = t.map(_ * 2) - t2.isInstanceOf[collection.mutable.TreeSet[Int]] - } - } - - property("A view doesn't expose off bounds elements") = forAll(denseGenerator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - val view = t.rangeImpl(Some(50), Some(150)) - view.filter(_ < 50) == Set[Int]() && view.filter(_ >= 150) == Set[Int]() - } - } - - property("ordering must not be null") = - throws(classOf[NullPointerException])(mutable.TreeSet.empty[Int](null)) -} diff --git a/test/files/scalacheck/t4147.scala b/test/files/scalacheck/t4147.scala new file mode 100644 index 0000000000..72f6e9afd5 --- /dev/null +++ b/test/files/scalacheck/t4147.scala @@ -0,0 +1,68 @@ +import org.scalacheck.Prop.{forAll, throws} +import org.scalacheck.Properties +import org.scalacheck.Gen + + +import collection.mutable + + +object Test extends Properties("Mutable TreeSet") { + + val generator = Gen.listOfN(1000, Gen.chooseNum(0, 1000)) + + val denseGenerator = Gen.listOfN(1000, Gen.chooseNum(0, 200)) + + property("Insertion doesn't allow duplicates values.") = forAll(generator) { (s: List[Int]) => + { + val t = mutable.TreeSet[Int](s: _*) + t == s.toSet + } + } + + property("Verification of size method validity") = forAll(generator) { (s: List[Int]) => + { + val t = mutable.TreeSet[Int](s: _*) + for (a <- s) { + t -= a + } + t.size == 0 + } + } + + property("All inserted elements are removed") = forAll(generator) { (s: List[Int]) => + { + val t = mutable.TreeSet[Int](s: _*) + for (a <- s) { + t -= a + } + t == Set() + } + } + + property("Elements are sorted.") = forAll(generator) { (s: List[Int]) => + { + val t = mutable.TreeSet[Int](s: _*) + t.toList == s.distinct.sorted + } + } + + property("Implicit CanBuildFrom resolution succeeds as well as the \"same-result-type\" principle.") = + forAll(generator) { (s: List[Int]) => + { + val t = mutable.TreeSet[Int](s: _*) + val t2 = t.map(_ * 2) + t2.isInstanceOf[collection.mutable.TreeSet[Int]] + } + } + + property("A view doesn't expose off bounds elements") = forAll(denseGenerator) { (s: List[Int]) => + { + val t = mutable.TreeSet[Int](s: _*) + val view = t.rangeImpl(Some(50), Some(150)) + view.filter(_ < 50) == Set[Int]() && view.filter(_ >= 150) == Set[Int]() + } + } + + property("ordering must not be null") = + throws(classOf[NullPointerException])(mutable.TreeSet.empty[Int](null)) +} -- cgit v1.2.3