diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-07-17 09:27:29 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-08-27 10:26:21 -0700 |
commit | 9c50dd52743b7ff4de19548669dfa7e7a0304034 (patch) | |
tree | 8b0044529b3106ea84bca046dc5710fada708cce /test/files/jvm/xmlattr.scala | |
parent | 7817efe2468480317965fc5baece52be392f0f7a (diff) | |
download | scala-9c50dd52743b7ff4de19548669dfa7e7a0304034.tar.gz scala-9c50dd52743b7ff4de19548669dfa7e7a0304034.tar.bz2 scala-9c50dd52743b7ff4de19548669dfa7e7a0304034.zip |
Prepare removal of scala-xml, scala-parser-combinators
Every test deleted here has found its way to the respective
repositories of scala-xml and scala-parser-combinators,
where they will continue to be tested with partest.
The modified tests became independent of these modules,
as they should've been from the start.
Diffstat (limited to 'test/files/jvm/xmlattr.scala')
-rw-r--r-- | test/files/jvm/xmlattr.scala | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/test/files/jvm/xmlattr.scala b/test/files/jvm/xmlattr.scala deleted file mode 100644 index 6423268ba7..0000000000 --- a/test/files/jvm/xmlattr.scala +++ /dev/null @@ -1,70 +0,0 @@ -import xml.{ NodeSeq, Null, Text, UnprefixedAttribute } - -object Test { - - def main(args: Array[String]) { - UnprefixedAttributeTest() - AttributeWithOptionTest() - AttributeOutputTest() - AttributeOperatorTest() - } - - object UnprefixedAttributeTest { - def apply() { - val x = new UnprefixedAttribute("foo","bar", Null) - println(Some(Text("bar")) == x.get("foo")) - println(Text("bar") == x("foo")) - println(None == x.get("no_foo")) - println(null == x("no_foo")) - - val y = x.remove("foo") - println(Null == y) - - val z = new UnprefixedAttribute("foo", null:NodeSeq, x) - println(None == z.get("foo")) - - var appended = x append x append x append x - var len = 0; while (appended ne Null) { - appended = appended.next - len = len + 1 - } - println("removal of duplicates for unprefixed attributes in append = " + len) - } - } - - object AttributeWithOptionTest { - def apply() { - val x = new UnprefixedAttribute("foo", Some(Text("bar")), Null) - - println(Some(Text("bar")) == x.get("foo")) - println(Text("bar") == x("foo")) - println(None == x.get("no_foo")) - println(null == x("no_foo")) - - val attr1 = Some(Text("foo value")) - val attr2 = None - val y = <b foo={attr1} bar={attr2} /> - println(Some(Text("foo value")) == y.attributes.get("foo")); - println(Text("foo value") == y.attributes("foo")) - println(None == y.attributes.get("bar")) - println(null == y.attributes("bar")) - - val z = new UnprefixedAttribute("foo", None, x) - println(None == z.get("foo")) - } - } - - object AttributeOutputTest { - def apply() { - println(<b x="&"/>) - println(<b x={"&"}/>) - } - } - - object AttributeOperatorTest { - def apply() { - val xml = <foo bar="apple" /> - assert(xml \@ "bar" == "apple") - } - } -} |