mbeckerle commented on a change in pull request #539:
URL: https://github.com/apache/daffodil/pull/539#discussion_r619561200



##########
File path: daffodil-core/src/test/scala/org/apache/daffodil/util/TestUtils.scala
##########
@@ -191,19 +189,33 @@ object TestUtils {
     if (isError) {
       throw new Exception(msgs)
     }
-    var p = saveAndReload(pf.onPath("/").asInstanceOf[DataProcessor])
+    val p = saveAndReload(pf.onPath("/").asInstanceOf[DataProcessor])
     val pIsError = p.isError
     if (pIsError) {
       val msgs = pf.getDiagnostics.map(_.getMessage()).mkString("\n")
       throw new Exception(msgs)
     }
+    p
+  }
+
+  def runSchemaOnRBC(testSchema: Node, data: ReadableByteChannel, areTracing: 
Boolean = false): (DFDL.ParseResult, Node) = {
+    runSchemaOnInputStream(testSchema, Channels.newInputStream(data), 
areTracing)
+  }
+
+  def runSchemaOnInputStream(testSchema: Node, is: InputStream, areTracing: 
Boolean = false): (DFDL.ParseResult, Node) = {
+    val p = compileSchema(testSchema)
+    runDataProcessorOnInputStream(p, is, areTracing)
+  }
+
+  def runDataProcessorOnInputStream(dp: DataProcessor, is: InputStream, 
areTracing: Boolean = false): (DFDL.ParseResult, Node) = {
+    var p = dp
     p = if (areTracing) {
-      p.withDebugger(builtInTracer).withDebugging(true)
-    } else p
+        p.withDebugger(builtInTracer).withDebugging(true)
+      } else p
     p = p.withValidationMode(ValidationMode.Limited)

Review comment:
       indentation off?




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to