Add comprehensive test coverage for four CodeFix modules - #1389
Closed
github-actions[bot] wants to merge 1 commit into
Closed
Add comprehensive test coverage for four CodeFix modules#1389github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…ecKeyword, ChangeEqualsInFieldTypeToColon, and ChangePrefixNegationToInfixSubtraction codefixes - AddMissingFunKeyword: Enhanced from 1 to 7 test cases (6 new tests) - Added tests for multiple parameters, nested expressions, complex bodies, tuple parameters, and piping contexts - AddMissingRecKeyword: Enhanced from 1 to 6 test cases (5 new tests) - Added tests for pattern matching, complex expressions, type annotations, and three-way mutual recursion - ChangeEqualsInFieldTypeToColon: Enhanced from 2 to 8 test cases (6 new tests) - Added tests for complex types, generics, options, tuples, functions, and nested records - ChangePrefixNegationToInfixSubtraction: Enhanced from 1 to 7 test cases (6 new tests) - Added tests for arithmetic expressions, array indexing, function calls, and nested contexts Total: 23 new comprehensive test cases added to improve coverage of these CodeFix modules. These modules previously had minimal test coverage with only 1-2 test cases each.
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.
Summary
This PR significantly improves test coverage for four CodeFix modules that previously had minimal testing (1-2 test cases each). Added 23 new comprehensive test cases to provide thorough coverage of various scenarios and edge cases.
CodeFix Modules Enhanced
1. AddMissingFunKeyword (1 → 7 test cases, +6 new)
Original Coverage: Only tested basic
x -> ...lambda syntaxEnhanced Coverage:
x y z -> ...(a, b) -> ...2. AddMissingRecKeyword (1 → 6 test cases, +5 new)
Original Coverage: Only tested simple mutual recursion
Enhanced Coverage:
3. ChangeEqualsInFieldTypeToColon (2 → 8 test cases, +6 new)
Original Coverage: Basic single-line and multi-line record fields
Enhanced Coverage:
list<string>'Tint optionint * intstring -> int4. ChangePrefixNegationToInfixSubtraction (1 → 7 test cases, +6 new)
Original Coverage: Only tested list slicing scenario
Enhanced Coverage:
x + y -5a * b + c -10 / 2arr.[index..lastIndex -1]List.take (count -2)Impact
Test Quality
All new tests follow the existing patterns and conventions:
Validation
✅ Build passes successfully with
dotnet build -c Release✅ All tests follow existing patterns and conventions
✅ No coverage files included in commit (verified)
This enhancement addresses the identified gaps from the Daily Test Coverage Improvement analysis and provides solid foundation for these CodeFix modules.