This page talks about the TDML files and what different parts mean:

  https://daffodil.apache.org/tdml/

The "Negative Tests: Expecting Errors/Warnings" section talks a bit
about what it looks for. But essentially when you have something like this:

<tdml:errors>
  <tdml:error>Foo</tdml:error>
  <tdml:error>Bar</tdml:error>
</tdml:errors>

Then each of the strings "Foo" and "Bar" must appear in some diagnostic
somewhere, ignoreing case. Specifically, the code is here:

https://github.com/apache/daffodil/blob/master/daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala#L1529-L1568

So that function gathers up all the actual diagnostics and all the
expected diagnostic from the tdml:error tags, and for every expected
diagnostic snippet defined in the TDML file, it checks to see if it
appeared in any actual diagnostic message.

We could have made the requirement that all expected exactly match the
actual diags, but we found diagnostics changed too frequently, so we
instead only require snippets to exist.


On 3/16/21 10:35 AM, Regis Thomas wrote:
> Is there any documentation for how Daffodil uses TDML?  I am looking for 
> where in the code the text to compare to a diagnostic message comes from.  In 
> particular I am looking for where the expected diagnostic text for 
> daffodil-test/src/test/scala/section06/entities/TestEntities.scala - 
> test_emptyStringEntityTermInExpressionDelimited_01() is in the code.  If I 
> try to go to the implementation for the function in Inellij, I get the 
> message "no implementation found".
> 
> Regis Thomas
> Nteligen, LLC
> 6716 Alexander Bell Drive,
> Suite 120
> Columbia, MD 20146
> (240) 864-5042 x126
> [email protected]
> 
> 

Reply via email to