summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2013-01-08 01:36:55 +0900
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2013-01-16 21:51:54 +0900
commit831bffda674f48af1d5ea4cd8bc54014fa7b1e88 (patch)
treed45e7a037c08f5876b5da2ac596899525de32015
parent6f3ea77870ab5e17805ef0fc338c251e87870b8c (diff)
downloadscala-831bffda674f48af1d5ea4cd8bc54014fa7b1e88.tar.gz
scala-831bffda674f48af1d5ea4cd8bc54014fa7b1e88.tar.bz2
scala-831bffda674f48af1d5ea4cd8bc54014fa7b1e88.zip
SI-6017 Scaladoc's Index should be case-sensitive
-rwxr-xr-xsrc/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala2
-rw-r--r--test/scaladoc/run/SI-6017.scala27
2 files changed, 28 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
index 10e2f23142..4ee6daf73e 100755
--- a/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
@@ -20,7 +20,7 @@ object IndexModelFactory {
/* Owner template ordering */
implicit def orderingSet = math.Ordering.String.on { x: MemberEntity => x.name.toLowerCase }
/* symbol name ordering */
- implicit def orderingMap = math.Ordering.String.on { x: String => x.toLowerCase }
+ implicit def orderingMap = math.Ordering.String
def addMember(d: MemberEntity) = {
val firstLetter = {
diff --git a/test/scaladoc/run/SI-6017.scala b/test/scaladoc/run/SI-6017.scala
new file mode 100644
index 0000000000..8ab64d6aba
--- /dev/null
+++ b/test/scaladoc/run/SI-6017.scala
@@ -0,0 +1,27 @@
+import scala.tools.nsc.doc
+import scala.tools.nsc.doc.model._
+import scala.tools.nsc.doc.html.page.{Index, ReferenceIndex}
+import scala.tools.partest.ScaladocModelTest
+
+object Test extends ScaladocModelTest {
+ override def scaladocSettings = ""
+ override def code = """
+ class STAR
+ class Star
+ """
+
+ def testModel(rootPackage: Package) {
+ model match {
+ case Some(universe) => {
+ val index = IndexModelFactory.makeIndex(universe)
+ // Because "STAR" and "Star" are different
+ assert(index.firstLetterIndex('s').keys.toSeq.length == 2)
+
+ val indexPage = new Index(universe, index)
+ // Because both are starting with "s"
+ assert(indexPage.letters.length == 1)
+ }
+ case _ => assert(false)
+ }
+ }
+}