From 2ee9e59b353536a601cdf71ea14223ee3fff471b Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Sun, 25 Nov 2007 20:43:41 +0000 Subject: fixed namespace printing bug - props to DPP who... fixed namespace printing bug - props to DPP who found and reported it. --- test/files/jvm/xml02.scala | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'test/files/jvm') diff --git a/test/files/jvm/xml02.scala b/test/files/jvm/xml02.scala index 143d125a7f..2eabaf1fbc 100644 --- a/test/files/jvm/xml02.scala +++ b/test/files/jvm/xml02.scala @@ -15,7 +15,7 @@ object Test extends TestConsoleMain { val bx = - class XmlEx extends TestCase("attributes") with Assert { + object XmlEx extends TestCase("attributes") with Assert { override def runTest = { assertTrue("@one", ax \ "@foo" == "bar") // uses NodeSeq.view! @@ -27,7 +27,7 @@ object Test extends TestConsoleMain { } } - class XmlPat extends TestCase("patterns") with Assert { + object XmlPat extends TestCase("patterns") with Assert { override def runTest = { assertTrue( match { case => true; case _ => false; }) assertTrue( match { case => true; case _ => false; }); @@ -36,8 +36,15 @@ object Test extends TestConsoleMain { } } + object DodgyNamespace extends TestCase("DodgyNamespace") with Assert { + override def runTest = { + val x = + assertTrue(x.toString.contains("xmlns:dog=\"http://dog.com\"")); + } + } def suite = new TestSuite( - new XmlEx, - new XmlPat + XmlEx, + XmlPat, + DodgyNamespace ) } -- cgit v1.2.3