diff options
Diffstat (limited to 'test/files/jvm/xml02.scala')
-rw-r--r-- | test/files/jvm/xml02.scala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/files/jvm/xml02.scala b/test/files/jvm/xml02.scala index 0cbeb27ce2..11f77cc90f 100644 --- a/test/files/jvm/xml02.scala +++ b/test/files/jvm/xml02.scala @@ -18,10 +18,10 @@ object Test extends TestConsoleMain { object XmlEx extends TestCase("attributes") with Assert { override def runTest = { - assertTrue("@one", ax \ "@foo" == "bar") // uses NodeSeq.view! - assertTrue("@two", ax \ "@foo" == xml.Text("bar")) // dto. - assertTrue("@three", bx \ "@foo" == "bar&x") // dto. - assertTrue ("@four", (bx \ "@foo") sameElements List(xml.Text("bar&x"))) + assertTrue("@one", (ax \ "@foo") xml_== "bar") // uses NodeSeq.view! + assertTrue("@two", (ax \ "@foo") xml_== xml.Text("bar")) // dto. + assertTrue("@three", (bx \ "@foo") xml_== "bar&x") // dto. + assertTrue ("@four", (bx \ "@foo") xml_sameElements List(xml.Text("bar&x"))) assertEquals("@five", "<hello foo=\"bar&x\"></hello>", bx.toString) } } @@ -29,8 +29,8 @@ object Test extends TestConsoleMain { object XmlEy extends TestCase("attributes with namespace") with Assert { override def runTest = { val z = ax \ "@{the namespace from outer space}foo" - assertTrue("@six", ax \ "@{the namespace from outer space}foo" == "baz") - assertTrue("@eight", cx \ "@{the namespace from outer space}foo" == "baz") + assertTrue("@six", (ax \ "@{the namespace from outer space}foo") xml_== "baz") + assertTrue("@eight", (cx \ "@{the namespace from outer space}foo") xml_== "baz") try { ax \ "@" @@ -58,8 +58,8 @@ object Test extends TestConsoleMain { override def runTest = { assertTrue(<hello/> match { case <hello/> => true; case _ => false; }) assertTrue(<x:ga xmlns:x="z"/> match { case <x:ga/> => true; case _ => false; }); - assertTrue(Utility.trim(cx) match { case n @ <hello>crazy text world</hello> if n \ "@foo" == "bar" => true; }) - assertTrue(Utility.trim(cx) match { case n @ <z:hello>crazy text world</z:hello> if n \ "@foo" == "bar" => true; }) + assertTrue(Utility.trim(cx) match { case n @ <hello>crazy text world</hello> if (n \ "@foo") xml_== "bar" => true; }) + assertTrue(Utility.trim(cx) match { case n @ <z:hello>crazy text world</z:hello> if (n \ "@foo") xml_== "bar" => true; }) } } |