Skip to content

Conversation

Karthikn-VR
Copy link

This commit adds JUnit 5 test cases for the NaivePatternSearch algorithm.

  • Verifies correct detection of multiple matches in a string
  • Covers cases where the pattern is not found
  • Tests matching at the end of the text
  • Tests when the text and pattern are equal

These tests ensure correctness and improve reliability of the algorithm.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

This commit adds JUnit 5 test cases for the NaivePatternSearch algorithm.

- Verifies correct detection of multiple matches in a string
- Covers cases where the pattern is not found
- Tests matching at the end of the text
- Tests when the text and pattern are equal

These tests ensure correctness and improve reliability of the algorithm.
@Karthikn-VR
Copy link
Author

test: add unit tests for NaivePatternSearch

@DenizAltunkapan
Copy link
Collaborator

Please fix the failing build check @Karthikn-VR

@Karthikn-VR Karthikn-VR reopened this Aug 26, 2025
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.

2 participants