jadams-tresys commented on code in PR #1610:
URL: https://github.com/apache/daffodil/pull/1610#discussion_r2683211119
##########
daffodil-core/src/test/java/org/apache/daffodil/jexample/TestAPI.java:
##########
@@ -242,6 +243,20 @@ public void testAPI1_A_Full_SavedParser() throws Exception
{
assertNotNull(parser);
}
+ // This is a duplicate of testAPII with an incorrect ProcessorFactory path
+ @Test
+ public void testAPI1_B() throws IOException, ClassNotFoundException {
+ DebuggerRunnerForAPITest customRunner = new DebuggerRunnerForAPITest();
+ Debugger debugger = Daffodil.newDaffodilDebugger(customRunner);
+
+ org.apache.daffodil.api.Compiler c = Daffodil.compiler();
+ java.io.File schemaFile = getResource("/test/api/mySchema1.dfdl.xsd");
+ ProcessorFactory pf = c.compileFile(schemaFile);
+ DataProcessor dp = pf.onPath("/something/else");
+ assertTrue(pf.isError());
Review Comment:
Checking dp.isError() definitely makes more sense to me and matches how the
Compiler API works where the compiler returns a ProcessorFactory, which can
then be checked with isError().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]