runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Remove dependency on System.Xml.XPath.XmlDocument from System.Xml.XPath.XDocument tests

Open krwq opened this issue 11 years ago • 7 comments

Currently the test is comparing two different implementations of XPath - one of them is assumed "good" as there are currently no known bugs to it. I will remove the dependency once it is no longer needed although it is helpful right now since XPath.XDocument has few bugs for investigation and it has proven to be helpful for me (there are few behavioral differences between implementations which we cannot remove now because of compat and that other implementation is helping figure out if this is known compat issue or a code/test defect).

Please remove this dependency once the bugs are fixed.

Related issues: https://github.com/dotnet/corefx/issues/641 https://github.com/dotnet/corefx/issues/284 https://github.com/dotnet/corefx/issues/17

krwq avatar Feb 20 '15 01:02 krwq

That would require rewriting some tests as the tests were initially not meant for XDocument implementation of XPath.

Differences:

  • Attributes/Namespaces are sorted in XDocument implementation
  • Whitespace nodes (Whitespace, SignificantWhitespace) as treated as Text nodes in XDocument implementation

krwq avatar Apr 21 '15 20:04 krwq

That would require rewriting all the test - single testing project is actually better but would need some work to make it more useful (maybe some more customizable comparer).

We need to investigate if there are any tests to be ported

krwq avatar Aug 10 '16 16:08 krwq

@krwq where does this code live? I'm looking at https://github.com/dotnet/corefx/tree/master/src/System.Xml.XPath.XDocument and all I see are pretty empty solutions. If you can fire me off the path to the class and the test proj I'll give it a shot implementing the new tests.

mikega avatar Oct 22 '16 23:10 mikega

Hi @mikega, Thanks for interest in here! Sorry I haven't noticed your question before. If you are still interested, the code was moved to System.Private.Xml/Xml.Linq: https://github.com/dotnet/corefx/tree/master/src/System.Private.Xml/tests/XPath/XmlDocument https://github.com/dotnet/corefx/tree/master/src/System.Private.Xml.Linq/tests/XPath/XDocument

krwq avatar Nov 09 '16 05:11 krwq

@sepidehMS is this still relevant?

danmoseley avatar Feb 27 '17 22:02 danmoseley

Yes, this dependency still exists and the tests need to be re-written so they would not just compare the XPath implementations of XDocument and XmlDocument.

sepidehkh avatar Mar 08 '17 19:03 sepidehkh

I think this is not worth to fix, closing.

krwq avatar Mar 02 '18 00:03 krwq