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

Complex type with length not equal to children length (parent < children)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: s10
    • Component/s: None
    • Labels:
      None

      Description

      While testing DFDL-568 which focused on cases where the parent length was greater than the overall length of its children, I added a test case where the length of the parent was less than the overall length of its children to see what would happen. I expected it to fail, and currently it does, but it does not give an appropriate error message.

      Currently, it gives the following error message:
      [info] - test_ExplicitLengthChildLengthMoreParent_Chars *** FAILED ***
      [info] edu.illinois.ncsa.daffodil.exceptions.Abort: Invariant broken.
      [info] edu.illinois.ncsa.daffodil.exceptions.Assert$.abort(Assert.scala:87)
      [info] edu.illinois.ncsa.daffodil.exceptions.Assert$.invariant(Assert.scala:115)
      [info] edu.illinois.ncsa.daffodil.processors.SpecifiedLengthParserBase.parse(SpecifiedLength.scala:167)
      [info] edu.illinois.ncsa.daffodil.processors.SpecifiedLengthExplicitCharactersFixedParser$$anonfun$parse$6.apply(SpecifiedLength.scala:333)
      [info] at edu.illinois.ncsa.daffodil.exceptions.Assert$.abort(Assert.scala:87)
      [info] at edu.illinois.ncsa.daffodil.exceptions.Assert$.invariant(Assert.scala:115)
      [info] at edu.illinois.ncsa.daffodil.processors.SpecifiedLengthParserBase.parse(SpecifiedLength.scala:167)
      [info] at edu.illinois.ncsa.daffodil.processors.SpecifiedLengthExplicitCharactersFixedParser$$anonfun$parse$6.apply(SpecifiedLength.scala:333)
      [info] at edu.illinois.ncsa.daffodil.processors.SpecifiedLengthExplicitCharactersFixedParser$$anonfun$parse$6.apply(SpecifiedLength.scala:322)
      [info] at edu.illinois.ncsa.daffodil.processors.WithParseErrorThrowing$class.withParseErrorThrowing(Parser.scala:220)
      [info] at edu.illinois.ncsa.daffodil.processors.SpecifiedLengthParserBase.withParseErrorThrowing(SpecifiedLength.scala:149)
      [info] at edu.illinois.ncsa.daffodil.processors.SpecifiedLengthExplicitCharactersFixedParser.parse(SpecifiedLength.scala:322)
      [info] at edu.illinois.ncsa.daffodil.processors.Parser.parse1(Parser.scala:132)
      [info] at edu.illinois.ncsa.daffodil.processors.SeqCompParser$$anonfun$parse$3.apply(Parser.scala:319)
      [info] ...

      The test (test_ExplicitLengthChildLengthMoreParent_Chars) has been added to daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section12/lengthKind/TestLengthKindExplicitDebug.scala

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              jchab Jessie Chab
              Reporter:
              jadams Joshua Adams
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks