Home | History | Annotate | Download | only in intltest

Lines Matching refs:pr

355   PluralRules *pr = PluralRules::createRules(rule, status);
356 double result = pr->getUniqueKeywordValue(key);
357 delete pr;
593 LocalPointer<PluralRules> pr(PluralRules::forLocale("en", UPLURAL_TYPE_ORDINAL, errorCode));
597 UnicodeString keyword = pr->select(2.);
658 LocalPointer<PluralRules> pr(PluralRules::createRules("s: n in 1,3,4,6", status));
659 checkSelect(pr, status, __LINE__, "s", "1.0", "3.0", "4.0", "6.0", END_MARK);
660 checkSelect(pr, status, __LINE__, "other", "0.0", "2.0", "3.1", "7.0", END_MARK);
662 pr.adoptInstead(PluralRules::createRules("s: n not in 1,3,4,6", status));
663 checkSelect(pr, status, __LINE__, "other", "1.0", "3.0", "4.0", "6.0", END_MARK);
664 checkSelect(pr, status, __LINE__, "s", "0.0", "2.0", "3.1", "7.0", END_MARK);
666 pr.adoptInstead(PluralRules::createRules("r: n in 1..4, 7..10, 14 .. 17;"
668 checkSelect(pr, status, __LINE__, "r", "1.0", "3.0", "7.0", "8.0", "10.0", "14.0", "17.0", END_MARK);
669 checkSelect(pr, status, __LINE__, "s", "29.0", END_MARK);
670 checkSelect(pr, status, __LINE__, "other", "28.0", "29.1", END_MARK);
672 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 1; b: n mod 100 is 0 ", status));
673 checkSelect(pr, status, __LINE__, "a", "1", "11", "41", "101", "301.00", END_MARK);
674 checkSelect(pr, status, __LINE__, "b", "0", "100", "200.0", "300.", "1000", "1100", "110000", END_MARK);
675 checkSelect(pr, status, __LINE__, "other", "0.01", "1.01", "0.99", "2", "3", "99", "102", END_MARK);
679 pr.adoptInstead(PluralRules::createRules("a: n is 1", status));
680 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
681 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
683 pr.adoptInstead(PluralRules::createRules("a: n is 1 ", status));
684 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
685 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
687 pr.adoptInstead(PluralRules::createRules("a: n is 1;", status));
688 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
689 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
691 pr.adoptInstead(PluralRules::createRules("a: n is 1 ; ", status));
692 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
693 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
697 pr.adoptInstead(PluralRules::createRules("c: n in 5..15; b : n in 1..10 ;a:n in 10 .. 20", status));
698 checkSelect(pr, status, __LINE__, "a", "20", END_MARK);
699 checkSelect(pr, status, __LINE__, "b", "1", END_MARK);
700 checkSelect(pr, status, __LINE__, "c", "10", END_MARK);
701 checkSelect(pr, status, __LINE__, "other", "0", "21", "10.1", END_MARK);
704 pr.adoptInstead(PluralRules::createRules("a: n in 2..10; b: n within 8..15", status));
705 checkSelect(pr, status, __LINE__, "a", "2", "8", "10", END_MARK);
706 checkSelect(pr, status, __LINE__, "b", "8.01", "9.5", "11", "14.99", "15", END_MARK);
707 checkSelect(pr, status, __LINE__, "other", "1", "7.7", "15.01", "16", END_MARK);
710 pr.adoptInstead(PluralRules::createRules("a: n in 2..10 and n in 4..12 and n not in 5..7", status));
711 checkSelect(pr, status, __LINE__, "a", "4", "8", "9", "10", END_MARK);
712 checkSelect(pr, status, __LINE__, "other", "2", "3", "5", "7", "11", END_MARK);
713 pr.adoptInstead(PluralRules::createRules("a: n is 2 or n is 5 or n in 7..11 and n in 11..13", status));
714 checkSelect(pr, status, __LINE__, "a", "2", "5", "11", END_MARK);
715 checkSelect(pr, status, __LINE__, "other", "3", "4", "6", "8", "10", "12", "13", END_MARK);
726 pr.adoptInstead(PluralRules::createRules("a: i is 123", status));
727 checkSelect(pr, status, __LINE__, "a", "123", "123.0", "123.1", "0123.99", END_MARK);
728 checkSelect(pr, status, __LINE__, "other", "124", "122.0", END_MARK);
730 pr.adoptInstead(PluralRules::createRules("a: f is 120", status));
731 checkSelect(pr, status, __LINE__, "a", "1.120", "0.120", "11123.120", "0123.120", END_MARK);
732 checkSelect(pr, status, __LINE__, "other", "1.121", "122.1200", "1.12", "120", END_MARK);
734 pr.adoptInstead(PluralRules::createRules("a: t is 12", status));
735 checkSelect(pr, status, __LINE__, "a", "1.120", "0.12", "11123.12000", "0123.1200000", END_MARK);
736 checkSelect(pr, status, __LINE__, "other", "1.121", "122.1200001", "1.11", "12", END_MARK);
738 pr.adoptInstead(PluralRules::createRules("a: v is 3", status));
739 checkSelect(pr, status, __LINE__, "a", "1.120", "0.000", "11123.100", "0123.124", ".666", END_MARK);
740 checkSelect(pr, status, __LINE__, "other", "1.1212", "122.12", "1.1", "122", "0.0000", END_MARK);
742 pr.adoptInstead(PluralRules::createRules("a: v is 0 and i is 123", status));
743 checkSelect(pr, status, __LINE__, "a", "123", "123.", END_MARK);
744 checkSelect(pr, status, __LINE__, "other", "123.0", "123.1", "123.123", "0.123", END_MARK);
747 pr.adoptInstead(PluralRules::createRules("a: n is 21; n: n is 22; i: n is 23; f: n is 24;"
750 checkSelect(pr, status, __LINE__, "other", "20", "29", END_MARK);
751 checkSelect(pr, status, __LINE__, "a", "21", END_MARK);
752 checkSelect(pr, status, __LINE__, "n", "22", END_MARK);
753 checkSelect(pr, status, __LINE__, "i", "23", END_MARK);
754 checkSelect(pr, status, __LINE__, "f", "24", END_MARK);
755 checkSelect(pr, status, __LINE__, "t", "25", END_MARK);
756 checkSelect(pr, status, __LINE__, "v", "26", END_MARK);
757 checkSelect(pr, status, __LINE__, "w", "27", END_MARK);
758 checkSelect(pr, status, __LINE__, "j", "28", END_MARK);
761 pr.adoptInstead(PluralRules::createRules("not: n=31; and: n=32; or: n=33; mod: n=34;"
764 checkSelect(pr, status, __LINE__, "other", "30", "39", END_MARK);
765 checkSelect(pr, status, __LINE__, "not", "31", END_MARK);
766 checkSelect(pr, status, __LINE__, "and", "32", END_MARK);
767 checkSelect(pr, status, __LINE__, "or", "33", END_MARK);
768 checkSelect(pr, status, __LINE__, "mod", "34", END_MARK);
769 checkSelect(pr, status, __LINE__, "in", "35", END_MARK);
770 checkSelect(pr, status, __LINE__, "within", "36", END_MARK);
771 checkSelect(pr, status, __LINE__, "is", "37", END_MARK);
775 pr.adoptInstead(PluralRules::createRules("a: n is 1", status));
776 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
777 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 2", status));
778 checkSelect(pr, status, __LINE__, "a", "2", "12", "22", END_MARK);
779 pr.adoptInstead(PluralRules::createRules("a: n is not 1", status));
780 checkSelect(pr, status, __LINE__, "a", "0", "2", "3", "4", "5", END_MARK);
781 pr.adoptInstead(PluralRules::createRules("a: n mod 3 is not 1", status));
782 checkSelect(pr, status, __LINE__, "a", "0", "2", "3", "5", "6", "8", "9", END_MARK);
783 pr.adoptInstead(PluralRules::createRules("a: n in 2..5", status));
784 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
785 pr.adoptInstead(PluralRules::createRules("a: n within 2..5", status));
786 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
787 pr.adoptInstead(PluralRules::createRules("a: n not in 2..5", status));
788 checkSelect(pr, status, __LINE__, "a", "0", "1", "6", "7", "8", END_MARK);
789 pr.adoptInstead(PluralRules::createRules("a: n not within 2..5", status));
790 checkSelect(pr, status, __LINE__, "a", "0", "1", "6", "7", "8", END_MARK);
791 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2..5", status));
792 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "12", "13", "14", "15", "22", "23", "24", "25", END_MARK);
793 pr.adoptInstead(PluralRules::createRules("a: n mod 10 within 2..5", status));
794 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "12", "13", "14", "15", "22", "23", "24", "25", END_MARK);
795 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 2 and n is not 12", status));
796 checkSelect(pr, status, __LINE__, "a", "2", "22", "32", "42", END_MARK);
797 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2..3 or n mod 10 is 5", status));
798 checkSelect(pr, status, __LINE__, "a", "2", "3", "5", "12", "13", "15", "22", "23", "25", END_MARK);
799 pr.adoptInstead(PluralRules::createRules("a: n mod 10 within 2..3 or n mod 10 is 5", status));
800 checkSelect(pr, status, __LINE__, "a", "2", "3", "5", "12", "13", "15", "22", "23", "25", END_MARK);
801 pr.adoptInstead(PluralRules::createRules("a: n is 1 or n is 4 or n is 23", status));
802 checkSelect(pr
803 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 and n is not 3 and n in 1..11", status));
804 checkSelect(pr, status, __LINE__, "a", "1", "5", "7", "9", "11", END_MARK);
805 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 and n is not 3 and n within 1..11", status));
806 checkSelect(pr, status, __LINE__, "a", "1", "5", "7", "9", "11", END_MARK);
807 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 or n mod 5 is 1 and n is not 6", status));
808 checkSelect(pr, status, __LINE__, "a", "1", "3", "5", "7", "9", "11", "13", "15", "16", END_MARK);
809 pr.adoptInstead(PluralRules::createRules("a: n in 2..5; b: n in 5..8; c: n mod 2 is 1", status));
810 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
811 checkSelect(pr, status, __LINE__, "b", "6", "7", "8", END_MARK);
812 checkSelect(pr, status, __LINE__, "c", "1", "9", "11", END_MARK);
813 pr.adoptInstead(PluralRules::createRules("a: n within 2..5; b: n within 5..8; c: n mod 2 is 1", status));
814 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
815 checkSelect(pr, status, __LINE__, "b", "6", "7", "8", END_MARK);
816 checkSelect(pr, status, __LINE__, "c", "1", "9", "11", END_MARK);
817 pr.adoptInstead(PluralRules::createRules("a: n in 2, 4..6; b: n within 7..9,11..12,20", status));
818 checkSelect(pr, status, __LINE__, "a", "2", "4", "5", "6", END_MARK);
819 checkSelect(pr, status, __LINE__, "b", "7", "8", "9", "11", "12", "20", END_MARK);
820 pr.adoptInstead(PluralRules::createRules("a: n in 2..8, 12 and n not in 4..6", status));
821 checkSelect(pr, status, __LINE__, "a", "2", "3", "7", "8", "12", END_MARK);
822 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2, 3,5..7 and n is not 12", status));
823 checkSelect(pr, status, __LINE__, "a", "2", "3", "5", "6", "7", "13", "15", "16", "17", END_MARK);
824 pr.adoptInstead(PluralRules::createRules("a: n in 2..6, 3..7", status));
825 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "6", "7", END_MARK);
828 pr.adoptInstead(PluralRules::createRules("a: n = 1..8 and n!= 2,3,4,5", status));
829 checkSelect(pr, status, __LINE__, "a", "1", "6", "7", "8", END_MARK);
830 checkSelect(pr, status, __LINE__, "other", "0", "2", "3", "4", "5", "9", END_MARK);
831 pr.adoptInstead(PluralRules::createRules("a:n % 10 != 1", status));
832 checkSelect(pr, status, __LINE__, "a", "2", "6", "7", "8", END_MARK);
833 checkSelect(pr, status, __LINE__, "other", "1", "21", "211", "91", END_MARK);
896 PluralRules *pr = PluralRules::forLocale(locale, status);
902 if (pr == NULL) {
910 UnicodeString keyword = pr->select(n);
916 delete pr;
947 PluralRules *pr = PluralRules::createRules(UnicodeString(rules), status);
951 if (pr != NULL) {