Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-533

TDML Runner: More user-friendly error if expected infoset provided is empty

XMLWordPrintableJSON

      Currently, if you specify an empty infoset as the expected result (e.g. <tdml:infoset><tdml:dfdlInfoset/></tdml:infoset>), you get the following exception:

      ois/ncsa/daffodil/section06/namespaces/multi_B_01.dfdl.xsd.]
      [info] - test_multifile_choice_02b *** FAILED ***
      [info] java.lang.IndexOutOfBoundsException: 0
      [info] at scala.collection.LinearSeqOptimized$class.apply(LinearSeqOptimized.scala:51)
      [info] at scala.collection.immutable.List.apply(List.scala:76)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLInfoset.contents(TDMLRunner.scala:893)
      [info] at edu.illinois.ncsa.daffodil.tdml.Infoset.contents(TDMLRunner.scala:888)
      [info] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.verifyParseInfoset(TDMLRunner.scala:408)
      [info] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:494)
      [info] at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:372)
      [info] at edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:326)
      [info] at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:198)
      [info] at edu.illinois.ncsa.daffodil.section06.namespaces.TestNamespaces.test_multifile_choice_02b(TestNamespaces.scala:59)

      I think the TDML runner should just compare the proper result with the empty set and provide this to the user so they can adjust the expected infoset accordingly, instead of allowing them to think there is an issue with the parsing.

              Unassigned Unassigned
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: