summaryrefslogtreecommitdiff
path: root/test/junit/scala
diff options
context:
space:
mode:
authormpociecha <michal.pociecha@gmail.com>2014-12-13 16:57:54 +0100
committermpociecha <michal.pociecha@gmail.com>2014-12-14 12:44:58 +0100
commit549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc (patch)
treee3e40e3559e0f80f5dbed5b935937ab198d45e74 /test/junit/scala
parentd9f623db0ff1d20040939fbb9e15d4d4e5887c75 (diff)
downloadscala-549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc.tar.gz
scala-549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc.tar.bz2
scala-549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc.zip
Fix many typos in docs and comments
This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
Diffstat (limited to 'test/junit/scala')
-rw-r--r--test/junit/scala/collection/TraversableOnceTest.scala8
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala2
-rw-r--r--test/junit/scala/tools/nsc/symtab/StdNamesTest.scala2
3 files changed, 6 insertions, 6 deletions
diff --git a/test/junit/scala/collection/TraversableOnceTest.scala b/test/junit/scala/collection/TraversableOnceTest.scala
index 56d8312336..196174c199 100644
--- a/test/junit/scala/collection/TraversableOnceTest.scala
+++ b/test/junit/scala/collection/TraversableOnceTest.scala
@@ -43,8 +43,8 @@ class TraversableOnceTest {
def testReturnTheFirstMatch() = {
val d = List(1, 2, 3, 4, 5, 6, 7, 8)
def f(x: Int) = x % 3;
- assert(d.maxBy(f) == 2, "If multiple elements evaluted to the largest value, maxBy should return the first one.")
- assert(d.minBy(f) == 3, "If multiple elements evaluted to the largest value, minBy should return the first one.")
+ assert(d.maxBy(f) == 2, "If multiple elements evaluated to the largest value, maxBy should return the first one.")
+ assert(d.minBy(f) == 3, "If multiple elements evaluated to the largest value, minBy should return the first one.")
}
// Make sure it evaluates f no more than list.length times.
@@ -56,7 +56,7 @@ class TraversableOnceTest {
evaluatedCountOfMaxBy += 1
x * 10
})
- assert(evaluatedCountOfMaxBy == list.length, s"maxBy: should evaluate f only ${list.length} times, but it evaluted $evaluatedCountOfMaxBy times.")
+ assert(evaluatedCountOfMaxBy == list.length, s"maxBy: should evaluate f only ${list.length} times, but it evaluated $evaluatedCountOfMaxBy times.")
var evaluatedCountOfMinBy = 0
@@ -64,7 +64,7 @@ class TraversableOnceTest {
evaluatedCountOfMinBy += 1
x * 10
})
- assert(evaluatedCountOfMinBy == list.length, s"minBy: should evaluate f only ${list.length} times, but it evaluted $evaluatedCountOfMinBy times.")
+ assert(evaluatedCountOfMinBy == list.length, s"minBy: should evaluate f only ${list.length} times, but it evaluated $evaluatedCountOfMinBy times.")
}
}
diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala
index 5b0f0f238a..5430e33d6c 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala
@@ -74,7 +74,7 @@ class MethodLevelOpts {
""".stripMargin
val m = singleMethod(methodOptCompiler)(code)
assertTrue(m.handlers.length == 2)
- assertSameCode(m.instructions.dropNonOp, // drop line numbers and lables that are only used by line numbers
+ assertSameCode(m.instructions.dropNonOp, // drop line numbers and labels that are only used by line numbers
// one single label left :-)
List(Op(ICONST_1), VarOp(ISTORE, 2), Jump(GOTO, Label(20)), Op(POP), Op(ICONST_2), VarOp(ISTORE, 2), Jump(GOTO, Label(20)), VarOp(ASTORE, 3), Op(ICONST_2), Op(IRETURN), Label(20), Op(ICONST_2), Op(IRETURN))
diff --git a/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala b/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala
index 524d2e45e0..91f94e09b6 100644
--- a/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala
+++ b/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala
@@ -19,7 +19,7 @@ class StdNamesTest {
}
@Test
- def testNewTermNameNegativeLenght(): Unit = {
+ def testNewTermNameNegativeLength(): Unit = {
assertEquals(nme.EMPTY, newTermName("foo".toCharArray, 0, -1))
assertEquals(nme.EMPTY, newTermName("foo".toCharArray, 0, 0))
}