Lines Matching full:occurrences
707 uint16_t occurrences = 0;
711 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
713 if (occurrences != 6)
714 errln(UnicodeString("indexOf failed: expected to find 6 occurrences, found ") + occurrences);
716 for ( occurrences = 0, startPos = 10;
718 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
720 if (occurrences != 4)
722 "expected to find 4 occurrences, found ") + occurrences);
725 for ( occurrences = 0, startPos = 5;
727 (startPos = test1.indexOf(test2, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
729 if (occurrences != 4)
731 "expected to find 4 occurrences, found ") + occurrences);
734 for ( startPos=0, occurrences=0;
736 (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
738 if (occurrences != 4)
739 errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
741 for ( startPos=10, occurrences=0;
743 (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
745 if (occurrences != 2)
746 errln(UnicodeString("indexOf failed: expected to find 2 occurrences, found ") + occurrences);
749 for ( occurrences = 0, startPos = 0;
751 (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
753 if (occurrences != 16)
755 "expected to find 16 occurrences, found ") + occurrences);
757 for ( occurrences = 0, startPos = 10;
759 (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
761 if (occurrences != 12)
763 "expected to find 12 occurrences, found ") + occurrences);
765 for ( occurrences = 0, startPos = 5, endPos = 28;
767 (startPos = test1.indexOf(testChar, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
769 if (occurrences != 10)
771 "expected to find 10 occurrences, found ") + occurrences);
775 occurrences =0, startPos=0; startPos < test3.length(); startPos +=1){
778 ++occurrences;
782 if (occurrences != 14)
783 errln((UnicodeString)"indexOf failed: expected to find 14 occurrences, found " + occurrences);
785 for ( occurrences = 0, startPos = 0;
787 (startPos = test3.indexOf(testChar32, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
789 if (occurrences != 4)
790 errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
793 for ( occurrences = 0, startPos = 5;
795 (startPos = test3.indexOf(testChar32, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
797 if (occurrences != 3)
798 errln((UnicodeString)"indexOf with character & start & end offsets failed: expected to find 2 occurrences, found " + occurrences);
809 for ( occurrences = 0, startPos = 32;
811 (startPos = test1.lastIndexOf(test2, 5, startPos - 5)) != -1 ? ++occurrences : 0)
813 if (occurrences != 4)
815 "expected to find 4 occurrences, found ") + occurrences);
817 for ( occurrences = 0, startPos = 32;
819 (startPos = test1.lastIndexOf(testChar, 5, startPos - 5)) != -1 ? ++occurrences : 0)
821 if (occurrences != 11)
823 "expected to find 11 occurrences, found ") + occurrences);
827 for ( occurrences = 0;
829 (startPos = test3.lastIndexOf(testChar32, 5, startPos - 5)) != -1 ? ++occurrences : 0)
831 if (occurrences != 3)
832 errln((UnicodeString)"lastIndexOf with character & start & end offsets failed: expected to find 3 occurrences, found " + occurrences);
835 for ( occurrences = 0, endPos = test3.length(); endPos > 0; endPos -= 1){
839 ++occurrences;
842 if (occurrences != 18)
843 errln((UnicodeString)"indexOf failed: expected to find 18 occurrences, found " + occurrences);