Does the .NET 10 TestRunner work out of the box?

Added by Martin Honnen over 1 year ago

The Saxon resources for .NET in the CS samples contain various classes for a test runner/driver, I wonder whether they are supposed to work out of the box or should compile.

When I pull the sources into a .NET framework project where Saxon HE 10.8 has been added from a NuGet I get many error/warnings, in particular in Environment.cs where it seems it is ambiguous whether any reference to Resource or/and ResourceCollection in the code refers the .NET or the Java class/interface of that name (it uses using Saxon.Api; and there is and but it also does using net.sf.saxon.lib; and there is and

Before I get lost too deeply trying to understand that, is that code used in your tests of Saxon HE .NET? Does it work as it appears in the resources download and/or how it appears in the repository?

Replies (2)

RE: Does the .NET 10 TestRunner work out of the box? - Added by Michael Kay over 1 year ago

I'll take a look at it when I get to a Windows machine.

RE: Does the .NET 10 TestRunner work out of the box? - Added by Martin Honnen over 1 year ago

I made some progress, I think all Resource and ResourceCollection in the Environment.cs need to refer to the net.sf.saxon.lib ones, not the .NET ones.

But there are other oddities, the document of the .NET processor says in about the SchemaManager property that it is null for a non schema-aware processor and the test driver seems to try to exploit that test to decide whether to validate input documents.

However, in my tests with Saxon 10.8 .NET HE, the SchemaManager on the .NET side is not null, its underlying fields/properties are, but I had to try to comment out code using such checks so that no attempt to use non available document validation was done.

I think there is one bug in, it tries to create a .NET Uri but I think it needs to do obj = new;, to create a Java URL.

I then managed to get the Xslt30TestSuiteDriver to run, it seems you have to rename its Mainxxx method to Main to to that.

To run the whole test suite without crashing, I had to comment out two accumulator test cases (test-case name="accumulator-080" and accumulator-080s), otherwise Saxon would crash the test suite run with a stack overflow exception.


    Please register to reply