Add ignoreUnexpectedValidationErrors Attribute for test suite/cases#1301
Conversation
6e5843e to
bf1b97f
Compare
stevedlawrence
left a comment
There was a problem hiding this comment.
+1 👍 minor suggestion on diagnosic, and wondering if we should deprecate or just remove the old syntax
| optExpectedValidationErrors.isDefined | ||
| && !optExpectedValidationErrors.get.exists(_.hasDiagnostics) | ||
| ) { // <tdml:validationErrors/> | ||
| false // ignore unexpected validation errors will be false if <tdml:validationErrors /> |
There was a problem hiding this comment.
Is it worth adding a System.err.println() that says something like
Use of <tdml:validationErrors /> is deprecated, use ignoreUnexpectedValidationError="false" instead.
Then eventually we can remove support for this.
Or maybe we should just remove support for it now? No tests in our regression suite use <tdml:validationErrors /> and I only see a handful of Daffodil tests use this that should be pretty straightforward to update.
There was a problem hiding this comment.
I ended up removing support for it, with a message about it being unsupported if <tdml:validationErrors/> is used
| val msg = e.getMessage() | ||
| assertTrue( | ||
| msg.contains( | ||
| "ignoreUnexpectedDiags = false and test does not expect ValidationError diagnostics" |
There was a problem hiding this comment.
Can we change the error message so this says "ignoreUnexpectedValidationErrors = false instead of "ignoreUnexpectedDiags". ignoreUnexpectedDiags is kindof an internal flag that might confuse users since it doesn't map directly to what appears in tdml files.
237f72d to
04372dc
Compare
- remove validationError asserts and shouldValidate/expectValidationError variables - remove support for <tdml:validationErrors/>, it must have at least one child - specify DiagnosticType specific message when there are unexpected diags - add/update tests DAFFODIL-2927
04372dc to
ecc0646
Compare
DAFFODIL-2927