Skip to content

Define the supported boundaries of LongestCommonSubstring - #72

Open
hotasourav8-sketch wants to merge 1 commit into
S-AI-Projects:masterfrom
hotasourav8-sketch:student/e26b07f0855/R45-T022
Open

hotasourav8-sketch wants to merge 1 commit into
S-AI-Projects:masterfrom
hotasourav8-sketch:student/e26b07f0855/R45-T022

Conversation

@hotasourav8-sketch

Copy link
Copy Markdown

Description
This PR defines and verifies the supported boundary conditions of LongestCommonSubstring.longestCommonSubstring(). It guarantees robust handling of null, empty, single-character, fully-identical, disjoint, start/end anchored, and large scale boundary inputs.

Related Issue
Fixes: #22

Type of Change
● Tests

Changes Made

  • Added LongestCommonSubstringBoundaryTest.java with boundary test categories B1 through B10.
  • Verified null safety guards (both null, either null).
  • Verified empty string transitions and single-character matches/mismatches.
  • Verified anchored matches at start and end boundaries.
  • Tested large input execution (5,000 chars) with preemptive timeout bounds.

Screenshots / Recordings
N/A (Backend / Unit test changes only)

Testing
Executed JUnit 5 test suite:
mvn test -Dtest=LongestCommonSubstringBoundaryTest

Checklist
● I have tested my changes locally.
● I have added or updated tests, if needed.
● I have updated documentation, if needed.
● I have followed the project's coding guidelines.
● I have run the relevant tests and checks.
● I have addressed previous review feedback, if applicable.

Additional Notes
Tests verify time complexity remains within practical bounds for inputs up to 5,000 characters.

Define and verify the supported boundary conditions: null inputs, empty
strings, single characters, identical strings, disjoint strings, matches
at start/end positions, substring containment, and large-input stress tests.

Fixes: S-AI-Projects#22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant