summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/unreachable/Test.scala2
-rw-r--r--test/files/neg/t3995.scala2
-rw-r--r--test/files/neg/t8237-default.scala2
-rw-r--r--test/files/neg/t8463.scala2
-rw-r--r--test/files/pos/SI-4012-b.scala2
-rw-r--r--test/files/pos/delambdafy-patterns.scala2
-rw-r--r--test/files/pos/t7200b.scala2
-rw-r--r--test/files/run/deeps.scala2
-rw-r--r--test/files/run/finally.scala2
-rw-r--r--test/files/run/iq.scala2
-rw-r--r--test/files/run/names-defaults.scala2
-rw-r--r--test/files/run/nullable-lazyvals.scala2
-rw-r--r--test/files/run/t6240-universe-code-gen.scala4
-rw-r--r--test/files/run/t7582.check5
-rw-r--r--test/files/run/t7582/InlineHolder.scala3
-rw-r--r--test/files/run/t7582b.check5
-rw-r--r--test/files/run/t7582b/InlineHolder.scala3
-rw-r--r--test/files/run/t8601-closure-elim.scala2
-rw-r--r--test/files/run/t8708_b/Test_2.scala2
-rw-r--r--test/files/run/t9359.check18
-rw-r--r--test/files/run/t9359/A_1.java19
-rw-r--r--test/files/run/t9359/B_2.java19
-rw-r--r--test/files/run/t9359/Test_2.scala28
-rw-r--r--test/files/specialized/constant_lambda.scala2
-rw-r--r--test/scaladoc/run/groups.scala2
25 files changed, 108 insertions, 28 deletions
diff --git a/test/files/jvm/unreachable/Test.scala b/test/files/jvm/unreachable/Test.scala
index 3f520eb106..4c0fcb2ae8 100644
--- a/test/files/jvm/unreachable/Test.scala
+++ b/test/files/jvm/unreachable/Test.scala
@@ -6,7 +6,7 @@ import scala.collection.JavaConverters._
object Test extends BytecodeTest {
def show: Unit = {
val classNode = loadClassNode("Foo_1")
- // Foo_1 is full of unreachable code which if not elimintated
+ // Foo_1 is full of unreachable code which if not eliminated
// will result in NOPs as can be confirmed by adding -Ydisable-unreachable-prevention
// to Foo_1.flags
for (methodNode <- classNode.methods.asScala) {
diff --git a/test/files/neg/t3995.scala b/test/files/neg/t3995.scala
index b03617ac86..c79f2a5865 100644
--- a/test/files/neg/t3995.scala
+++ b/test/files/neg/t3995.scala
@@ -27,6 +27,6 @@ object Test {
// can be accessed with unambiguous stable prefixes, the implicits infos
// which are members of these companion objects."
//
- // The skolem is stable, but it doen't seem much good to us
+ // The skolem is stable, but it does not seem much good to us
(new Lift).apply("")
}
diff --git a/test/files/neg/t8237-default.scala b/test/files/neg/t8237-default.scala
index f695aa523f..a4370046bd 100644
--- a/test/files/neg/t8237-default.scala
+++ b/test/files/neg/t8237-default.scala
@@ -1,4 +1,4 @@
-// This test case was extracte from `names-defaults-neg.scala`
+// This test case was extracted from `names-defaults-neg.scala`
// It pinpoints an improvement an error message that results from
// a type inference failure
object Test extends App {
diff --git a/test/files/neg/t8463.scala b/test/files/neg/t8463.scala
index 7c954fd834..1337f8bece 100644
--- a/test/files/neg/t8463.scala
+++ b/test/files/neg/t8463.scala
@@ -7,7 +7,7 @@ object Test {
/* If SI-8230 is fixed, and `viewExists` is changed to no longer leak
ambiguity errors, you might expect the check file for this test to
- change as folloes:
+ change as follows:
@@ -1,18 +1,10 @@
-t8463.scala:5: error: no type parameters for method apply: (activity:
diff --git a/test/files/pos/SI-4012-b.scala b/test/files/pos/SI-4012-b.scala
index 6bc8592766..f6d84963e4 100644
--- a/test/files/pos/SI-4012-b.scala
+++ b/test/files/pos/SI-4012-b.scala
@@ -6,7 +6,7 @@ object Sub extends Super[Int] {
// it is expected that super[Super].superb crashes, since
// specialization does parent class rewiring, and the super
// of Sub becomes Super$mcII$sp and not Super. But I consider
- // this normal behavior -- if you want, I can modify duplicatiors
+ // this normal behavior -- if you want, I can modify duplicators
// to make this work, but I consider it's best to keep this
// let the user know Super is not the superclass anymore.
// super[Super].superb - Vlad
diff --git a/test/files/pos/delambdafy-patterns.scala b/test/files/pos/delambdafy-patterns.scala
index 95d498629b..ca9eaa67e3 100644
--- a/test/files/pos/delambdafy-patterns.scala
+++ b/test/files/pos/delambdafy-patterns.scala
@@ -2,7 +2,7 @@ class DelambdafyPatterns {
def bar: Unit = ()
def wildcardPatternInTryCatch: Unit => Unit = (x: Unit) =>
// patterns in try..catch are preserved so we need to be
- // careful when it comes to free variable detction
+ // careful when it comes to free variable detection
// in particular a is _not_ free variable, also the
// `_` identifier has no symbol attached to it
try bar catch {
diff --git a/test/files/pos/t7200b.scala b/test/files/pos/t7200b.scala
index 9d579c6ef9..59be898fd0 100644
--- a/test/files/pos/t7200b.scala
+++ b/test/files/pos/t7200b.scala
@@ -10,7 +10,7 @@ trait Foo {
object O extends Foo {
def coflatMap[A <: T](f: A) = {
val f2 = coflatMap(f) // inferred in 2.9.2 / 2.10.0 as [Nothing]
- f2.t // so this does't type check.
+ f2.t // so this fails to type check.
f2
}
}
diff --git a/test/files/run/deeps.scala b/test/files/run/deeps.scala
index 6049cc6024..1546112ed5 100644
--- a/test/files/run/deeps.scala
+++ b/test/files/run/deeps.scala
@@ -3,7 +3,7 @@
//############################################################################
//############################################################################
-// need to revisit array equqality
+// need to revisit array equality
object Test {
def testEquals1 {
diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala
index 2c01edaaef..b66354ca03 100644
--- a/test/files/run/finally.scala
+++ b/test/files/run/finally.scala
@@ -93,7 +93,7 @@ object Test extends App {
}
}
- // nested finallies with return value
+ // nested finally blocks with return value
def nestedFinalies: Int =
try {
try {
diff --git a/test/files/run/iq.scala b/test/files/run/iq.scala
index 1eb1d40e37..0ccf67a2e9 100644
--- a/test/files/run/iq.scala
+++ b/test/files/run/iq.scala
@@ -69,7 +69,7 @@ object iq {
val (_, q7) = q6.dequeue
//val q8 = q7 + 10 + 11 //deprecated
val q8 = q7.enqueue(10).enqueue(11)
- /* Test dequeu
+ /* Test dequeue
* Expected: q8: Queue(2,3,4,5,6,7,8,9,10,11)
*/
Console.println("q8: " + q8)
diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala
index b7ed490cbc..c364425ec9 100644
--- a/test/files/run/names-defaults.scala
+++ b/test/files/run/names-defaults.scala
@@ -86,7 +86,7 @@ object Test extends App {
def f(a: Object) = "first"
val f: String => String = a => "second"
}
- println(t5.f(new Sub1())) // firsst
+ println(t5.f(new Sub1())) // first
println(t5.f("dfklj")) // second
object t6 {
diff --git a/test/files/run/nullable-lazyvals.scala b/test/files/run/nullable-lazyvals.scala
index c201e74e75..be5d82f3a7 100644
--- a/test/files/run/nullable-lazyvals.scala
+++ b/test/files/run/nullable-lazyvals.scala
@@ -24,7 +24,7 @@ object Test extends App {
// test that try-finally does not generated a liftedTry
// helper. This would already fail the first part of the test,
- // but this check will help diganose it (if the single access to a
+ // but this check will help diagnose it (if the single access to a
// private field does not happen directly in the lazy val, it won't
// be nulled).
for (f <- foo.getClass.getDeclaredMethods) {
diff --git a/test/files/run/t6240-universe-code-gen.scala b/test/files/run/t6240-universe-code-gen.scala
index 9f7061ee1b..60e1f76b54 100644
--- a/test/files/run/t6240-universe-code-gen.scala
+++ b/test/files/run/t6240-universe-code-gen.scala
@@ -13,8 +13,8 @@ object Test extends App {
(sym.isMethod && sym.asMethod.isLazy)
|| sym.isModule
)
- val forcables = tp.members.sorted.filter(isLazyAccessorOrObject)
- forcables.map {
+ val forceables = tp.members.sorted.filter(isLazyAccessorOrObject)
+ forceables.map {
sym =>
val path = s"$prefix.${sym.name}"
" " + (
diff --git a/test/files/run/t7582.check b/test/files/run/t7582.check
index 2a11210000..0cfbf08886 100644
--- a/test/files/run/t7582.check
+++ b/test/files/run/t7582.check
@@ -1,6 +1 @@
-#partest !-Ybackend:GenBCode
-warning: there was one inliner warning; re-run with -Yinline-warnings for details
-#partest -Ybackend:GenBCode
-warning: there was one inliner warning; re-run with -Yopt-warnings for details
-#partest
2
diff --git a/test/files/run/t7582/InlineHolder.scala b/test/files/run/t7582/InlineHolder.scala
index a18b9effaa..3cbf233ce1 100644
--- a/test/files/run/t7582/InlineHolder.scala
+++ b/test/files/run/t7582/InlineHolder.scala
@@ -1,3 +1,6 @@
+/*
+ * filter: inliner warning; re-run with
+ */
package p1 {
object InlineHolder {
@inline def inlinable = p1.PackageProtectedJava.protectedMethod() + 1
diff --git a/test/files/run/t7582b.check b/test/files/run/t7582b.check
index 2a11210000..0cfbf08886 100644
--- a/test/files/run/t7582b.check
+++ b/test/files/run/t7582b.check
@@ -1,6 +1 @@
-#partest !-Ybackend:GenBCode
-warning: there was one inliner warning; re-run with -Yinline-warnings for details
-#partest -Ybackend:GenBCode
-warning: there was one inliner warning; re-run with -Yopt-warnings for details
-#partest
2
diff --git a/test/files/run/t7582b/InlineHolder.scala b/test/files/run/t7582b/InlineHolder.scala
index a18b9effaa..3cbf233ce1 100644
--- a/test/files/run/t7582b/InlineHolder.scala
+++ b/test/files/run/t7582b/InlineHolder.scala
@@ -1,3 +1,6 @@
+/*
+ * filter: inliner warning; re-run with
+ */
package p1 {
object InlineHolder {
@inline def inlinable = p1.PackageProtectedJava.protectedMethod() + 1
diff --git a/test/files/run/t8601-closure-elim.scala b/test/files/run/t8601-closure-elim.scala
index 2c5b03af77..ebeb16e0c7 100644
--- a/test/files/run/t8601-closure-elim.scala
+++ b/test/files/run/t8601-closure-elim.scala
@@ -11,7 +11,7 @@ object Test extends BytecodeTest {
val classNode = loadClassNode("Foo")
val methodNode = getMethod(classNode, "b")
val ops = methodNode.instructions.iterator.asScala.map(_.getOpcode).toList
- assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminiated
+ assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminated
}
test("b")
}
diff --git a/test/files/run/t8708_b/Test_2.scala b/test/files/run/t8708_b/Test_2.scala
index c978490609..fae3c677ec 100644
--- a/test/files/run/t8708_b/Test_2.scala
+++ b/test/files/run/t8708_b/Test_2.scala
@@ -13,7 +13,7 @@ object Test extends DirectTest {
val c = g.rootMirror.getRequiredClass("p.C")
println(c.info.decls)
val t = c.info.member(g.newTypeName("T"))
- // this test ensrues that the <local child> dummy class symbol is not entered in the
+ // this test ensures that the <local child> dummy class symbol is not entered in the
// scope of trait T during unpickling.
println(t.info.decls)
})
diff --git a/test/files/run/t9359.check b/test/files/run/t9359.check
new file mode 100644
index 0000000000..8dcfe4f60a
--- /dev/null
+++ b/test/files/run/t9359.check
@@ -0,0 +1,18 @@
+ // access flags 0x4009
+ public static enum INNERCLASS A_1$A1N A_1 A1N
+
+ // access flags 0x4409
+ public static abstract enum INNERCLASS A_1$A1N_ABSTRACT A_1 A1N_ABSTRACT
+
+ // access flags 0x4019
+ public final static enum INNERCLASS A_1$A1N_FINAL A_1 A1N_FINAL
+
+ // access flags 0x4009
+ public static enum INNERCLASS B_2$A1N B_2 A1N
+
+ // access flags 0x4409
+ public static abstract enum INNERCLASS B_2$A1N_ABSTRACT B_2 A1N_ABSTRACT
+
+ // access flags 0x4019
+ public final static enum INNERCLASS B_2$A1N_FINAL B_2 A1N_FINAL
+
diff --git a/test/files/run/t9359/A_1.java b/test/files/run/t9359/A_1.java
new file mode 100644
index 0000000000..3ac82ed55f
--- /dev/null
+++ b/test/files/run/t9359/A_1.java
@@ -0,0 +1,19 @@
+public class A_1 {
+ // nested final
+ public static enum A1N_FINAL {
+ A1N_FINAL_VAL
+ }
+
+ // nested, non-final
+ public enum A1N {
+ A1N_VAL { } // value has a body, so a class extending A1N is generated
+ }
+
+ // nested, non-final, abstract
+ public enum A1N_ABSTRACT {
+ A1N_ABSTRACT_VAL {
+ void foo() { return; }
+ };
+ abstract void foo(); // abstract member makes the enum class abstract
+ }
+}
diff --git a/test/files/run/t9359/B_2.java b/test/files/run/t9359/B_2.java
new file mode 100644
index 0000000000..d824facda9
--- /dev/null
+++ b/test/files/run/t9359/B_2.java
@@ -0,0 +1,19 @@
+public class B_2 {
+ // nested final
+ public enum A1N_FINAL {
+ A1N_FINAL_VAL
+ }
+
+ // nested, non-final
+ public enum A1N {
+ A1N_VAL { } // value has a body, so a class extending A1N is generated
+ }
+
+ // nested, non-final, abstract
+ public enum A1N_ABSTRACT {
+ A1N_ABSTRACT_VAL {
+ void foo() { return; }
+ };
+ abstract void foo(); // abstract member makes the enum class abstract
+ }
+}
diff --git a/test/files/run/t9359/Test_2.scala b/test/files/run/t9359/Test_2.scala
new file mode 100644
index 0000000000..869c51b619
--- /dev/null
+++ b/test/files/run/t9359/Test_2.scala
@@ -0,0 +1,28 @@
+import scala.tools.partest.BytecodeTest
+import scala.tools.asm
+import asm.tree.{ClassNode, InnerClassNode}
+import asm.{Opcodes => Flags}
+import scala.collection.JavaConverters._
+
+class C {
+ def f1: A_1.A1N_FINAL = A_1.A1N_FINAL.A1N_FINAL_VAL
+ def f2: A_1.A1N = A_1.A1N.A1N_VAL
+ def f3: A_1.A1N_ABSTRACT = A_1.A1N_ABSTRACT.A1N_ABSTRACT_VAL
+
+ def f4: B_2.A1N_FINAL = B_2.A1N_FINAL.A1N_FINAL_VAL
+ def f5: B_2.A1N = B_2.A1N.A1N_VAL
+ def f6: B_2.A1N_ABSTRACT = B_2.A1N_ABSTRACT.A1N_ABSTRACT_VAL
+}
+
+object Test extends BytecodeTest {
+ def tost(n: InnerClassNode) = {
+ val t = new asm.util.Textifier
+ t.visitInnerClass(n.name, n.outerName, n.innerName, n.access)
+ t.getText.get(0);
+ }
+ def show(): Unit = {
+ for (n <- loadClassNode("C").innerClasses.asScala.toList.sortBy(_.name)) {
+ println(tost(n))
+ }
+ }
+}
diff --git a/test/files/specialized/constant_lambda.scala b/test/files/specialized/constant_lambda.scala
index bb9a97403e..7c5358ce10 100644
--- a/test/files/specialized/constant_lambda.scala
+++ b/test/files/specialized/constant_lambda.scala
@@ -1,4 +1,4 @@
-// during development of late delmabdafying there was a problem where
+// during development of late delambdafying there was a problem where
// specialization would undo some of the work done in uncurry if the body of the
// lambda had a constant type. That would result in a compiler crash as
// when the delambdafy phase got a tree shape it didn't understand
diff --git a/test/scaladoc/run/groups.scala b/test/scaladoc/run/groups.scala
index c9e4a8679b..ad5cca89b8 100644
--- a/test/scaladoc/run/groups.scala
+++ b/test/scaladoc/run/groups.scala
@@ -38,7 +38,7 @@ object Test extends ScaladocModelTest {
* @groupdesc C Group C is introduced by B
*/
trait B {
- /** baz descriptopn
+ /** baz description
* @group C */
def baz = 3
}