Lines Matching refs:occurrences

720     uint16_t occurrences = 0;
724 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
726 if (occurrences != 6)
727 errln("indexOf failed: expected to find 6 occurrences, found " + occurrences);
729 for ( occurrences = 0, startPos = 10;
731 (startPos = test1.indexOf(test2, startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
733 if (occurrences != 4)
734 errln("indexOf with starting offset failed: expected to find 4 occurrences, found " + occurrences);
737 for ( occurrences = 0, startPos = 5;
739 (startPos = test1.indexOf(test2, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 4) : 0)
741 if (occurrences != 4)
742 errln("indexOf with starting and ending offsets failed: expected to find 4 occurrences, found " + occurrences);
745 for ( startPos=0, occurrences=0;
747 (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
749 if (occurrences != 4)
750 errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
752 for ( startPos=10, occurrences=0;
754 (startPos = test3.indexOf(test4, startPos)) != -1 ? (++occurrences, startPos += 2) : 0)
756 if (occurrences != 2)
757 errln("indexOf failed: expected to find 2 occurrences, found " + occurrences);
760 for ( occurrences = 0, startPos = 0;
762 (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
764 if (occurrences != 16)
765 errln("indexOf with character failed: expected to find 16 occurrences, found " + occurrences);
767 for ( occurrences = 0, startPos = 10;
769 (startPos = test1.indexOf(testChar, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
771 if (occurrences != 12)
772 errln("indexOf with character & start offset failed: expected to find 12 occurrences, found " + occurrences);
774 for ( occurrences = 0, startPos = 5, endPos = 28;
776 (startPos = test1.indexOf(testChar, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
778 if (occurrences != 10)
779 errln("indexOf with character & start & end offsets failed: expected to find 10 occurrences, found " + occurrences);
783 for( occurrences =0, startPos=0; startPos < test3.length(); startPos +=1){
786 ++occurrences;
790 if (occurrences != 14)
791 errln((UnicodeString)"indexOf failed: expected to find 14 occurrences, found " + occurrences);
793 for ( occurrences = 0, startPos = 0;
795 (startPos = test3.indexOf(testChar32, startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
797 if (occurrences != 4)
798 errln((UnicodeString)"indexOf failed: expected to find 4 occurrences, found " + occurrences);
801 for ( occurrences = 0, startPos = 5;
803 (startPos = test3.indexOf(testChar32, startPos, endPos - startPos)) != -1 ? (++occurrences, startPos += 1) : 0)
805 if (occurrences != 3)
806 errln((UnicodeString)"indexOf with character & start & end offsets failed: expected to find 2 occurrences, found " + occurrences);
817 for ( occurrences = 0, startPos = 32;
819 (startPos = test1.lastIndexOf(test2, 5, startPos - 5)) != -1 ? ++occurrences : 0)
821 if (occurrences != 4)
822 errln("lastIndexOf with starting and ending offsets failed: expected to find 4 occurrences, found " + occurrences);
824 for ( occurrences = 0, startPos = 32;
826 (startPos = test1.lastIndexOf(testChar, 5, startPos - 5)) != -1 ? ++occurrences : 0)
828 if (occurrences != 11)
829 errln("lastIndexOf with character & start & end offsets failed: expected to find 11 occurrences, found " + occurrences);
833 for ( occurrences = 0;
835 (startPos = test3.lastIndexOf(testChar32, 5, startPos - 5)) != -1 ? ++occurrences : 0)
837 if (occurrences != 3)
838 errln((UnicodeString)"lastIndexOf with character & start & end offsets failed: expected to find 3 occurrences, found " + occurrences);
841 for ( occurrences = 0, endPos = test3.length(); endPos > 0; endPos -= 1){
845 ++occurrences;
848 if (occurrences != 18)
849 errln((UnicodeString)"indexOf failed: expected to find 18 occurrences, found " + occurrences);