diff options
author | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-01-12 21:48:02 +0100 |
---|---|---|
committer | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-01-12 21:48:02 +0100 |
commit | 25da86a228a3ae7aecaacdfd094812d53209aece (patch) | |
tree | 87e549fe01f964e80c56a3ff5331eadfbe9091a5 /test/files/run/xml-attribute.scala | |
parent | ccb590c0378819011640a58b822fbdeb938144dc (diff) | |
download | scala-25da86a228a3ae7aecaacdfd094812d53209aece.tar.gz scala-25da86a228a3ae7aecaacdfd094812d53209aece.tar.bz2 scala-25da86a228a3ae7aecaacdfd094812d53209aece.zip |
Cleanup after "Fixed equality and string representation of xml attributes with null value"
This commit reverts the following two commits:
5f2568e36b87d183fd4e4442d5c304db628846c4 - "Revert "Accept prefixed xml attributes with null value"
b00002f9049c034510438881b4a4449d73fe2f54 - "Disabling some scaladoc tests."
and fixes a scaladoc test broken by:
4787f883604d1344257c0b40c15790c3dde477f2 - "Fixed equality and string representation of xml attributes with null value"
Diffstat (limited to 'test/files/run/xml-attribute.scala')
-rw-r--r-- | test/files/run/xml-attribute.scala | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/test/files/run/xml-attribute.scala b/test/files/run/xml-attribute.scala index 2b83f70b22..8b261acc94 100644 --- a/test/files/run/xml-attribute.scala +++ b/test/files/run/xml-attribute.scala @@ -5,10 +5,29 @@ object Test { val noAttr = <t/> val attrNull = <t a={ null: String }/> val attrNone = <t a={ None: Option[Seq[Node]] }/> + val preAttrNull = <t p:a={ null: String }/> + val preAttrNone = <t p:a={ None: Option[Seq[Node]] }/> assert(noAttr == attrNull) assert(noAttr == attrNone) - assert(noAttr.toString() == "<t></t>") - assert(attrNull.toString() == "<t></t>") - assert(attrNone.toString() == "<t></t>") + 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) + + val xml1 = <t b="1" d="2"/> + val xml2 = <t a={ null: String } p:a={ null: String } b="1" c={ null: String } d="2"/> + val xml3 = <t b="1" c={ null: String } d="2" a={ null: String } p:a={ null: String }/> + 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) } } |