-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix choice bug DAFFODIL-2259 #307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Looks good
|
||
trait ChoiceTermRuntime1Mixin { self: ChoiceTermBase => | ||
|
||
protected def alternatives: Seq[Gram] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add scala doc. The alternatives are the members of the choice group with special treatment given to some kinds of members. An invariant is that if a direct child member is an array element, the child will have been encapsulated as a sequence, so that arrays always live within sequences.
|
||
<xs:element name="e"> | ||
<xs:complexType> | ||
<xs:choice> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment here to document what this test is specifically covering, which is DAFFODIL-2259, a bug where a choice element that is an array was fooling construction of the unparser eventUnparserMap.
limitations under the License. | ||
--> | ||
|
||
<tdml:testSuite suiteName="choice" description="Tests for choice construct" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve or remove suiteName and description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Looks good. Minor suggestiong for improved test coverage
<tdml:infoset> | ||
<tdml:dfdlInfoset> | ||
<ex:e> | ||
<a>1</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sake of completeness, we should have another test where occurs twice.
Added tests for this. Also adding tests to mil-std-2045 schema that exercise the previously unused element that would have shown this bug up before. Fixed a debugger abort found while debugging the issue. DAFFODIL-2259
729cac9
to
2d3ba39
Compare
Added test for this.
Also adding tests to mil-std-2045 schema that exercise the previously
unused element that would have shown this bug up before.
DAFFODIL-2259