aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/reflection-valueclasses-magic.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-13 12:08:27 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-13 12:08:27 +0200
commit73a93505c432b410ae39fb3c4d6168b2e49832ce (patch)
tree53d45141a7b93682bea6430b0fb6ab28c3c3fad3 /tests/pending/run/reflection-valueclasses-magic.scala
parent89bacb9c25a58454ff1878e67f7ea07ffc8c269f (diff)
downloaddotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.gz
dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.bz2
dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.zip
Running rewrite tool on run tests.
Diffstat (limited to 'tests/pending/run/reflection-valueclasses-magic.scala')
-rw-r--r--tests/pending/run/reflection-valueclasses-magic.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pending/run/reflection-valueclasses-magic.scala b/tests/pending/run/reflection-valueclasses-magic.scala
index 366b5fe27..e045b882f 100644
--- a/tests/pending/run/reflection-valueclasses-magic.scala
+++ b/tests/pending/run/reflection-valueclasses-magic.scala
@@ -32,7 +32,7 @@ object Test extends App {
else throw new Exception(s"not supported: value = $value, tpe = $tpe")
}
- def test[T: ClassTag](tpe: Type, receiver: T, method: String, args: Any*) {
+ def test[T: ClassTag](tpe: Type, receiver: T, method: String, args: Any*): Unit = {
def wrap[T](op: => T) =
try {
var result = op.asInstanceOf[AnyRef]
@@ -52,14 +52,14 @@ object Test extends App {
wrap(cm.reflect(receiver).reflectMethod(testee)(convertedArgs: _*))
})
}
- def header(tpe: Type) {
+ def header(tpe: Type): Unit = {
println(s"============\n$tpe")
println("it's important to print the list of Byte's members")
println("if some of them change (possibly, adding and/or removing magic symbols), we must update this test")
tpe.members.toList.sortBy(key).foreach(sym => println(key(sym)))
}
- def testNumeric[T: ClassTag](tpe: Type, value: T) {
+ def testNumeric[T: ClassTag](tpe: Type, value: T): Unit = {
header(tpe)
List("toByte", "toShort", "toChar", "toInt", "toLong", "toFloat", "toDouble") foreach (meth => test(tpe, value, meth))
test(tpe, value, "==", 2)
@@ -75,7 +75,7 @@ object Test extends App {
test(tpe, value, "%", 2)
}
- def testIntegral[T: ClassTag](tpe: Type, value: T) {
+ def testIntegral[T: ClassTag](tpe: Type, value: T): Unit = {
testNumeric(tpe, value)
test(tpe, value, "unary_~")
test(tpe, value, "unary_+")
@@ -88,7 +88,7 @@ object Test extends App {
test(tpe, value, "^", 2)
}
- def testBoolean() {
+ def testBoolean(): Unit = {
header(typeOf[Boolean])
test(typeOf[Boolean], true, "unary_!")
test(typeOf[Boolean], true, "==", true)
@@ -100,7 +100,7 @@ object Test extends App {
test(typeOf[Boolean], true, "^", true)
}
- def testUnit() {
+ def testUnit(): Unit = {
header(typeOf[Unit])
}
@@ -113,4 +113,4 @@ object Test extends App {
testNumeric(typeOf[Double], 2.toDouble)
testBoolean()
testUnit()
-} \ No newline at end of file
+}