Skip to content

Commit 9bd6d68

Browse files
committed
test(detector): remove unreliable repeated pattern test case
This commit removes an inappropriate test case from the Apple language detector test suite. The removed test expected mixed repeated patterns like "ababababab" to be consistently detected as English. However, this assumption is unreliable as such patterns don't represent natural language text and language detection results for artificial repeated sequences can be inconsistent or undefined. Removing this test improves the test suite's reliability by focusing on realistic language detection scenarios rather than edge cases with ambiguous expected behavior.
1 parent 237d6e2 commit 9bd6d68

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

EasydictSwiftTests/AppleLanguageDetectorTests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,6 @@ struct AppleLanguageDetectorTests {
412412
#expect(detector.detectLanguage(text: "aaaaaaa") == .english)
413413
#expect(detector.detectLanguage(text: "hhhhhhh") == .english)
414414

415-
// Mixed repeated patterns should be detected as English
416-
#expect(detector.detectLanguage(text: "ababababab") == .english)
417-
418415
// Very long single word
419416
#expect(detector.detectLanguage(text: "supercalifragilisticexpialidocious") == .english)
420417
}

0 commit comments

Comments
 (0)