@@ -706,8 +706,8 @@ std::string makeLongWord(size_t n) {
706706}
707707
708708TEST (Suggestion, titleEdgeCases) {
709- const std::string w64 = makeLongWord (64 );
710- const std::string w65 = makeLongWord (65 );
709+ const std::string shortOfBeingTooLong = makeLongWord (240 );
710+ const std::string tooLong = makeLongWord (241 );
711711
712712 TempZimArchiveMadeOfEmptyHtmlArticles tza (" en" , {
713713 // { path , title }
@@ -717,17 +717,17 @@ TEST(Suggestion, titleEdgeCases) {
717717 { " Without" , " " }, // No title
718718 //
719719 // Titles containing long words
720- { " toolongword1" , " Is " + w64 + " too long?" },
721- { " toolongword2" , " Is " + w65 + " too long?" },
722- { " toolongsingleword1" , w64 },
723- { " toolongsingleword2" , w65 },
720+ { " toolongword1" , " Is " + shortOfBeingTooLong + " too long?" },
721+ { " toolongword2" , " Is " + tooLong + " too long?" },
722+ { " toolongsingleword1" , shortOfBeingTooLong },
723+ { " toolongsingleword2" , tooLong },
724724
725725 // Handling of pseudo-words consisting exclusively of punctuation
726726 { " winknsmilewithouttext" , " ;-)" }, // A punctuation-only title
727727 { " winknsmilebothways" , " ;-) wink'n'smile" },
728728 { " winknsmiletheotherwayaround" , " wink'n'smile ;-)" },
729- { " smilinglongword" , " ;-) " + w65 },
730- { " winknsmilewithothernonwords" , " ~~ ;-) ~~" },
729+ { " smilinglongword" , " ;-) " + tooLong },
730+ { " winknsmilewithothernonwords" , " ~~ ;-) ~~" },
731731
732732 // Non edge cases
733733 { " Stout" , " About Rex Stout" },
@@ -755,18 +755,18 @@ TEST(Suggestion, titleEdgeCases) {
755755 );
756756
757757 EXPECT_SUGGESTED_TITLES (archive, " long" ,
758- " Is " + w65 + " too long?" ,
759- " Is " + w64 + " too long?"
758+ " Is " + tooLong + " too long?" ,
759+ " Is " + shortOfBeingTooLong + " too long?"
760760 );
761761
762762 EXPECT_SUGGESTED_TITLES (archive, " awordthatis" ,
763- w64 ,
764- " Is " + w64 + " too long?"
765- // The following results aren't included because w65 has been ignored
763+ shortOfBeingTooLong ,
764+ " Is " + shortOfBeingTooLong + " too long?"
765+ // The following results aren't included because tooLong has been ignored
766766 // during indexing:
767- // - w65
768- // - "Is " + w65 + " too long?"
769- // - ";-) " + w65
767+ // - tooLong
768+ // - "Is " + tooLong + " too long?"
769+ // - ";-) " + tooLong
770770 );
771771
772772 EXPECT_SUGGESTED_TITLES (archive, " ;-" ,
@@ -775,7 +775,7 @@ TEST(Suggestion, titleEdgeCases) {
775775 // term in the presence of anything else:
776776 // - ";-) wink'n'smile"
777777 // - "wink'n'smile ;-)"
778- // - ";-) " + w65
778+ // - ";-) " + tooLong
779779 // - "~~ ;-) ~~"
780780 );
781781
0 commit comments