2008-10-02 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 2 Oct 2008 17:59:28 +0000 (17:59 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 2 Oct 2008 17:59:28 +0000 (17:59 -0000)
* XPathNavigatorEvaluateTests.cs : corrected couple of misconception
  in the tests.

* XslTransformTests.cs : removed extra NotDotNet.

svn path=/branches/atsushi-200810/mcs/; revision=114689

mcs/class/System.XML/Test/System.Xml.XPath/ChangeLog
mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorEvaluateTests.cs
mcs/class/System.XML/Test/System.Xml.Xsl/ChangeLog
mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs

index 3ee89b5f264b9574d746882605b304b374434b5a..831d4b3e07fdfb9d93a81e18321cda8c8101a0c2 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-02  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XPathNavigatorEvaluateTests.cs : corrected couple of misconception
+         in the tests.
+
 2008-04-02  Atsushi Enomoto <atsushi@ximian.com>
 
        * XPathEditableNavigatorTests.cs : added test for bug #376210.
index 0d8f70aa9f1882cfe6749d7ab7379282950fa0e1..359ba7197acc7c52c736506d98c86d1679a1cea4 100644 (file)
@@ -47,18 +47,20 @@ namespace MonoTests.System.Xml
 
                // Testing Core Funcetion Library functions defined at: http://www.w3.org/TR/xpath#corelib
                [Test]
-#if NET_2_0
+#if !NET_2_0
                // .NET 2.0 is fixed for last() to return 1 for the
-               // initial context position. We should follow the fix.
-               [Category ("NotWorking")]
+               // initial context position. Someone thinks we should follow
+               // the fix, but in reality we should just discard this
+               // pointless test. The positional value under those conditions
+               // does not make any sense.
                [Category ("NotDotNet")]
 #endif
                public void CoreFunctionNodeSetLast ()
                {
                        expression = navigator.Compile("last()");
                        iterator = navigator.Select("/foo");
-                       AssertEquals ("0", navigator.Evaluate ("last()").ToString());
-                       AssertEquals ("0", navigator.Evaluate (expression, null).ToString ());
+                       AssertEquals ("1", navigator.Evaluate ("last()").ToString());
+                       AssertEquals ("1", navigator.Evaluate (expression, null).ToString ());
                        AssertEquals ("1", navigator.Evaluate (expression, iterator).ToString ());
                        iterator = navigator.Select("/foo/*");
                        AssertEquals ("4", navigator.Evaluate (expression, iterator).ToString ());
@@ -67,18 +69,21 @@ namespace MonoTests.System.Xml
                }
 
                [Test]
-#if NET_2_0
+#if !NET_2_0
                // .NET 2.0 is fixed for position() to return 1 for the
-               // initial context position. We should follow the fix.
-               [Category ("NotWorking")]
+               // initial context position. Someone thinks we should follow
+               // the fix, but in reality we should just discard this
+               // pointless test. The positional value under those conditions
+               // does not make any sense.
+//             [Category ("NotWorking")]
                [Category ("NotDotNet")]
 #endif
                public void CoreFunctionNodeSetPosition ()
                {
                        expression = navigator.Compile("position()");
                        iterator = navigator.Select("/foo");
-                       AssertEquals ("#1", "0", navigator.Evaluate ("position()").ToString ());
-                       AssertEquals ("#2", "0", navigator.Evaluate (expression, null).ToString ());
+                       AssertEquals ("#1", "1", navigator.Evaluate ("position()").ToString ());
+                       AssertEquals ("#2", "1", navigator.Evaluate (expression, null).ToString ());
                        AssertEquals ("#3", "0", navigator.Evaluate (expression, iterator).ToString ());
                        iterator = navigator.Select("/foo/*");
                        AssertEquals ("#4", "0", navigator.Evaluate (expression, iterator).ToString ());
index 725f3a2f62c3f767196c1483d5a73262dd76d85a..87c24749b157b81d6e48fa122597cde09f69f2dd 100644 (file)
@@ -1,3 +1,7 @@
+2008-10-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XslTransformTests.cs : removed extra NotDotNet.
+
 2008-06-04  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XslTransformTests.cs : added test for bug #378239.
index cc2ab563bd0920ae3abc2339283c420393e5db34..60ac63792765beb2fcae7409df79cce2f498a291 100644 (file)
@@ -2243,6 +2243,7 @@ World";
 
                [Test] // reverse case of #349375
                [Category ("NotWorking")]
+//             [Category ("NotDotNet")]
                public void PreserveWhitespace2 ()
                {
                        XslCompiledTransform xslt = new XslCompiledTransform ();
@@ -2291,7 +2292,8 @@ World";
     </p>
   </l0>
 </root>")), null, sw);
-                       Assert.AreEqual (@"<y><t yes-one-node="""">1</t><t not-node=""""></t></y>", sw.ToString ());
+//                     Assert.AreEqual (@"<y><t yes-one-node="""">1</t><t not-node=""""></t></y>", sw.ToString ());
+                       Assert.AreEqual ("\r\n  \r\n    <y><t yes-one-node=\"\">1</t><t not-node=\"\"></t></y>\r\n  \r\n", sw.ToString ());
                }
 
                [Test]