[Repo Assist] test: add integration tests for DUCasesGenerator output#278
Merged
7sharp9 merged 1 commit intoApr 16, 2026
Merged
Conversation
Tests cover the generated Currency module in TestDus namespace: - toString: all 5 cases (CAD, PLN, EUR, USD, Custom _) - fromString: parsing known/unknown strings - toTag: integer ordinals for all cases - predicates: isCAD, isCustom (true/false cases) 33 existing tests still pass; 19 new tests added (52 total). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
23 tasks
There was a problem hiding this comment.
Pull request overview
Adds integration-level assertions for the generated TestDus.Currency module to ensure DUCasesGenerator output (string conversion, parsing, tags, and predicates) is exercised by the test suite, improving confidence for recent/ongoing generator refactors.
Changes:
- Add a new
testList "DU Cases"under the existing"basic tests"suite. - Assert behavior of generated
toString,fromString,toTag, and selected predicate functions for theCurrencyDU.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Adds 19 integration tests covering the output of
DUCasesGenerator— a generator that previously had zero direct tests in the suite.Root Cause
The
DUCasesGeneratoris one of three core generators (alongsideFieldsGeneratorandLensesGenerator), yet the test suite had no assertions verifying its output. The generatedTestDus.Currencymodule (containingtoString,fromString,toTag, and five predicate functions) was compiled and linked into every test run but never exercised.This matters now because PR #268 (
getCaseIdenthelper) and PR #277 (generateModulesWithAttrmigration) both modifyDUCasesGenerator. Tests that directly exercise the generator's output give reviewers and CI confidence that these refactoring PRs do not change observable behaviour.Changes
test/Myriad.IntegrationPluginTests/Tests.fstestList "DU Cases"inside"basic tests"The new test list covers the existing
TestDus.Currencymodule (generated fromInput.Currencyvia the[(Generator.DuCases "dus")]attribute):toString— all 5 cases:CAD,PLN,EUR,USD,Custom _fromString— parsing each known string;Nonefor unknown inputtoTag— integer ordinals 0–4 for all casespredicates—isCAD(true/false),isCustom(true/false)No production code is changed.
Test Status
dotnet build test/Myriad.IntegrationPluginTests -c Release)dotnet run --project test/Myriad.IntegrationPluginTests -c Release -- --summary)