Remove dependency on System.Xml.XPath.XmlDocument from System.Xml.XPath.XDocument tests
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
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
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 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.
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
@sepidehMS is this still relevant?
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.
I think this is not worth to fix, closing.