Lines Matching refs:occurrences

709     uint16_t occurrences = 0;
713 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
715 if (occurrences != 6)
716 errln(UnicodeString("indexOf failed: expected to find 6 occurrences, found ") + occurrences);
718 for ( occurrences = 0, startPos = 10;
720 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
722 if (occurrences != 4)
724 "expected to find 4 occurrences, found ") + occurrences);
727 for ( occurrences = 0, startPos = 5;
729 (startPos = test1.indexOf(test2, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
731 if (occurrences != 4)
733 "expected to find 4 occurrences, found ") + occurrences);
736 for ( startPos=0, occurrences=0;
738 (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
740 if (occurrences != 4)
741 errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
743 for ( startPos=10, occurrences=0;
745 (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
747 if (occurrences != 2)
748 errln(UnicodeString("indexOf failed: expected to find 2 occurrences, found ") + occurrences);
751 for ( occurrences = 0, startPos = 0;
753 (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
755 if (occurrences != 16)
757 "expected to find 16 occurrences, found ") + occurrences);
759 for ( occurrences = 0, startPos = 10;
761 (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
763 if (occurrences != 12)
765 "expected to find 12 occurrences, found ") + occurrences);
767 for ( occurrences = 0, startPos = 5, endPos = 28;
769 (startPos = test1.indexOf(testChar, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
771 if (occurrences != 10)
773 "expected to find 10 occurrences, found ") + occurrences);
777 for( occurrences =0, startPos=0; startPos < test3.length(); startPos +=1){
780 ++occurrences;
784 if (occurrences != 14)
785 errln((UnicodeString)"indexOf failed: expected to find 14 occurrences, found " + occurrences);
787 for ( occurrences = 0, startPos = 0;
789 (startPos = test3.indexOf(testChar32, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
791 if (occurrences != 4)
792 errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
795 for ( occurrences = 0, startPos = 5;
797 (startPos = test3.indexOf(testChar32, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
799 if (occurrences != 3)
800 errln((UnicodeString)"indexOf with character & start & end offsets failed: expected to find 2 occurrences, found " + occurrences);
811 for ( occurrences = 0, startPos = 32;
813 (startPos = test1.lastIndexOf(test2, 5, startPos - 5)) != -1 ? ++occurrences : 0)
815 if (occurrences != 4)
817 "expected to find 4 occurrences, found ") + occurrences);
819 for ( occurrences = 0, startPos = 32;
821 (startPos = test1.lastIndexOf(testChar, 5, startPos - 5)) != -1 ? ++occurrences : 0)
823 if (occurrences != 11)
825 "expected to find 11 occurrences, found ") + occurrences);
829 for ( occurrences = 0;
831 (startPos = test3.lastIndexOf(testChar32, 5, startPos - 5)) != -1 ? ++occurrences : 0)
833 if (occurrences != 3)
834 errln((UnicodeString)"lastIndexOf with character & start & end offsets failed: expected to find 3 occurrences, found " + occurrences);
837 for ( occurrences = 0, endPos = test3.length(); endPos > 0; endPos -= 1){
841 ++occurrences;
844 if (occurrences != 18)
845 errln((UnicodeString)"indexOf failed: expected to find 18 occurrences, found " + occurrences);