Skip to content

Add edge-case coverage for merge sort - #147

Open
codingkiddo wants to merge 1 commit into
spring-projects:mainfrom
codingkiddo:test/merge-sort-test-cases
Open

Add edge-case coverage for merge sort#147
codingkiddo wants to merge 1 commit into
spring-projects:mainfrom
codingkiddo:test/merge-sort-test-cases

Conversation

@codingkiddo

Copy link
Copy Markdown

Summary

Add additional edge-case coverage for the MergeSort example.

Changes

  • Add coverage for the smallest non-trivial recursive input with two elements in reverse order.
  • Verify sorting with Integer.MIN_VALUE and Integer.MAX_VALUE.
  • Add a deterministic 10,000-element randomized test and compare the result with Arrays.sort.

Testing

Ran:

mvn -f agents/reflection/pom.xml \
  -Dtest=ResultFromAgentTest \
  test

and:

mvn -f agents/reflection/pom.xml test

All tests pass.

Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>
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