Skip to content

test: foreach enumerator coverage for mixed group + varData (#156 follow-up)#159

Merged
pedrosakuma merged 1 commit into
mainfrom
test/foreach-mixed-coverage-156-followup
Apr 25, 2026
Merged

test: foreach enumerator coverage for mixed group + varData (#156 follow-up)#159
pedrosakuma merged 1 commit into
mainfrom
test/foreach-mixed-coverage-156-followup

Conversation

@pedrosakuma
Copy link
Copy Markdown
Owner

Follow-up coverage requested after merge of #158.

Adds 3 tests in GroupForeachWithVarDataTests exercising Cross.Schema.Orders.V0.NewOrderData — a message with a simple top-level Legs group AND a top-level ClientOrderId varData. This was the only scenario in the v1.5.0 gating matrix not previously exercised by an integration test.

Validated:

  1. foreach (ref readonly var leg in reader.Legs) works correctly (independent of varData presence)
  2. reader.ReadGroups(...) still reaches the trailing varData after foreach (no shared state corruption)
  3. Empty groups + varData round-trip stays consistent

Tests-only PR. No generator changes.

…#156)

Follow-up to #156. Adds 3 integration tests using NewOrderData (simple Legs
group + top-level ClientOrderId varData) to cover the previously untested
mixed scenario: messages where the foreach API IS emitted (groups are simple)
but ReadGroups remains the only way to consume top-level varData.

- foreach iterates Legs correctly
- ReadGroups still reaches the varData after foreach (independent state)
- Empty groups + varData round-trip works

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pedrosakuma pedrosakuma merged commit e16fdf2 into main Apr 25, 2026
1 check passed
@pedrosakuma pedrosakuma deleted the test/foreach-mixed-coverage-156-followup branch April 25, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant