summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-15 07:59:57 -0800
committerPaul Phillips <paulp@improving.org>2012-01-15 07:59:57 -0800
commitac11155b3fae83e7977b58514ea10ca2a0c46a84 (patch)
tree5411d44ffad57a42adad6dcaaf122085e47f51f9 /test
parent710f78e41a35614988d6548cb76d8504d9b0985e (diff)
parentde8d7ae5f35938d85b0e9ba27a4b4000f000b76e (diff)
downloadscala-ac11155b3fae83e7977b58514ea10ca2a0c46a84.tar.gz
scala-ac11155b3fae83e7977b58514ea10ca2a0c46a84.tar.bz2
scala-ac11155b3fae83e7977b58514ea10ca2a0c46a84.zip
Merge remote-tracking branch 'origin/develop'
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/serialization.check4
-rw-r--r--test/files/run/xml-attribute.check12
-rw-r--r--test/files/run/xml-attribute.scala24
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala2
4 files changed, 29 insertions, 13 deletions
diff --git a/test/files/jvm/serialization.check b/test/files/jvm/serialization.check
index bc56387f81..f58f763a76 100644
--- a/test/files/jvm/serialization.check
+++ b/test/files/jvm/serialization.check
@@ -206,7 +206,7 @@ x equals y: true, y equals x: true
x = <html>
<body>
- <table cellspacing="0" cellpadding="2">
+ <table cellpadding="2" cellspacing="0">
<tr>
<th>Last Name</th>
<th>First Name</th>
@@ -226,7 +226,7 @@ x = <html>
</html>
y = <html>
<body>
- <table cellspacing="0" cellpadding="2">
+ <table cellpadding="2" cellspacing="0">
<tr>
<th>Last Name</th>
<th>First Name</th>
diff --git a/test/files/run/xml-attribute.check b/test/files/run/xml-attribute.check
new file mode 100644
index 0000000000..3ae2034684
--- /dev/null
+++ b/test/files/run/xml-attribute.check
@@ -0,0 +1,12 @@
+<t></t>
+<t></t>
+<t></t>
+<t></t>
+<t></t>
+<t b="1" d="2"></t>
+<t b="1" d="2"></t>
+<t b="1" d="2"></t>
+<t a="1" d="2"></t>
+<t b="1" d="2"></t>
+<t a="1" b="2" c="3"></t>
+<t g="1" e="2" p:a="3" f:e="4" mgruhu:ji="5"></t> \ No newline at end of file
diff --git a/test/files/run/xml-attribute.scala b/test/files/run/xml-attribute.scala
index 8b261acc94..eb3956c41b 100644
--- a/test/files/run/xml-attribute.scala
+++ b/test/files/run/xml-attribute.scala
@@ -12,12 +12,11 @@ object Test {
assert(noAttr == preAttrNull)
assert(noAttr == preAttrNone)
- val noAttrStr = "<t></t>"
- assert(noAttr.toString() == noAttrStr)
- assert(attrNull.toString() == noAttrStr)
- assert(attrNone.toString() == noAttrStr)
- assert(preAttrNull.toString() == noAttrStr)
- assert(preAttrNone.toString() == noAttrStr)
+ println(noAttr)
+ println(attrNull)
+ println(attrNone)
+ println(preAttrNull)
+ println(preAttrNone)
val xml1 = <t b="1" d="2"/>
val xml2 = <t a={ null: String } p:a={ null: String } b="1" c={ null: String } d="2"/>
@@ -25,9 +24,14 @@ object Test {
assert(xml1 == xml2)
assert(xml1 == xml3)
- val xml1Str = "<t d=\"2\" b=\"1\"></t>"
- assert(xml1.toString() == xml1Str)
- assert(xml2.toString() == xml1Str)
- assert(xml3.toString() == xml1Str)
+ println(xml1)
+ println(xml2)
+ println(xml3)
+
+ // Check if attribute order is retained
+ println(<t a="1" d="2"/>)
+ println(<t b="1" d="2"/>)
+ println(<t a="1" b="2" c="3"/>)
+ println(<t g="1" e="2" p:a="3" f:e="4" mgruhu:ji="5"/>)
}
}
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index d03094d0ab..e2687dd510 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -192,7 +192,7 @@ object Test extends Properties("HtmlFactory") {
val html = node.toString
html.contains("<span title=\"gt4s: $plus$colon\" class=\"name\">+:</span>") &&
html.contains("<span title=\"gt4s: $minus$colon\" class=\"name\">-:</span>") &&
- html.contains("""<span class="params">(<span name="n">n: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>""")
+ html.contains("""<span class="params">(<span name="n">n: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>""")
}
case _ => false
}