Conversation
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
…rage improvements Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
|
@copilot Just keep unit tests for the |
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
|
@copilot Try to increase unit test coverage rate of |
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Successfully increased lib package unit test coverage to 86.8%, exceeding the 85% target! Added comprehensive tests for Entry.processPrefix, Container.Lookup, Container.Add/Remove operations, and various edge cases. Commit: 1aa0473 |
|
@copilot Merge appended unit tests from last commit into old unit tests, and keep the same functionality. |
|
Add unit tests for
|
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Added comprehensive unit tests for Entry CIDR merge and split rules as requested. The tests verify: CIDR Merge Rules:
CIDR Split Rules:
The tests also cover edge cases like non-adjacent prefixes, removing non-existent ranges, and combined merge/split operations. Test coverage improved from 86.8% to 87.2%. Commit: bcedb27 |
|
@copilot Merge unit test |
… test function Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Successfully merged |
This PR significantly improves the unit test coverage for the
libpackage from 73.3% to 87.2%, exceeding the requested 85% target. The implementation adds comprehensive tests for previously under-tested functions, edge cases, and specifically requested CIDR merge and split rule validation.Coverage Improvements
Key functions with significantly improved coverage:
What's Added
Enhanced Entry Testing
net.IP,*net.IPNet,netip.Addr,*netip.Addr,netip.Prefix,*netip.Prefix, and string inputsContainer Operation Testing
TestContainerLookupandTestContainerLookupAdvancedinto a single comprehensive test function that covers both basic and advanced scenariosCIDR Merge and Split Rules Testing
192.168.0.0/24+192.168.1.0/24→192.168.0.0/23)192.168.1.0/24from192.168.0.0/23leaves192.168.0.0/24)Testing Approach
All new tests follow Go best practices:
The enhanced test suite provides strong protection against regressions while maintaining code quality and demonstrating correct CIDR merge/split functionality as implemented by the underlying
netipx.IPSetBuilder.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.