Home | History | Annotate | Download | only in intltest

Lines Matching defs:pr

359   PluralRules *pr = PluralRules::createRules(rule, status);
360 double result = pr->getUniqueKeywordValue(key);
361 delete pr;
597 LocalPointer<PluralRules> pr(PluralRules::forLocale("en", UPLURAL_TYPE_ORDINAL, errorCode));
601 UnicodeString keyword = pr->select(2.);
662 LocalPointer<PluralRules> pr(PluralRules::createRules("s: n in 1,3,4,6", status));
663 checkSelect(pr, status, __LINE__, "s", "1.0", "3.0", "4.0", "6.0", END_MARK);
664 checkSelect(pr, status, __LINE__, "other", "0.0", "2.0", "3.1", "7.0", END_MARK);
666 pr.adoptInstead(PluralRules::createRules("s: n not in 1,3,4,6", status));
667 checkSelect(pr, status, __LINE__, "other", "1.0", "3.0", "4.0", "6.0", END_MARK);
668 checkSelect(pr, status, __LINE__, "s", "0.0", "2.0", "3.1", "7.0", END_MARK);
670 pr.adoptInstead(PluralRules::createRules("r: n in 1..4, 7..10, 14 .. 17;"
672 checkSelect(pr, status, __LINE__, "r", "1.0", "3.0", "7.0", "8.0", "10.0", "14.0", "17.0", END_MARK);
673 checkSelect(pr, status, __LINE__, "s", "29.0", END_MARK);
674 checkSelect(pr, status, __LINE__, "other", "28.0", "29.1", END_MARK);
676 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 1; b: n mod 100 is 0 ", status));
677 checkSelect(pr, status, __LINE__, "a", "1", "11", "41", "101", "301.00", END_MARK);
678 checkSelect(pr, status, __LINE__, "b", "0", "100", "200.0", "300.", "1000", "1100", "110000", END_MARK);
679 checkSelect(pr, status, __LINE__, "other", "0.01", "1.01", "0.99", "2", "3", "99", "102", 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);
695 pr.adoptInstead(PluralRules::createRules("a: n is 1 ; ", status));
696 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
697 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
701 pr.adoptInstead(PluralRules::createRules("c: n in 5..15; b : n in 1..10 ;a:n in 10 .. 20", status));
702 checkSelect(pr, status, __LINE__, "a", "20", END_MARK);
703 checkSelect(pr, status, __LINE__, "b", "1", END_MARK);
704 checkSelect(pr, status, __LINE__, "c", "10", END_MARK);
705 checkSelect(pr, status, __LINE__, "other", "0", "21", "10.1", END_MARK);
708 pr.adoptInstead(PluralRules::createRules("a: n in 2..10; b: n within 8..15", status));
709 checkSelect(pr, status, __LINE__, "a", "2", "8", "10", END_MARK);
710 checkSelect(pr, status, __LINE__, "b", "8.01", "9.5", "11", "14.99", "15", END_MARK);
711 checkSelect(pr, status, __LINE__, "other", "1", "7.7", "15.01", "16", END_MARK);
714 pr.adoptInstead(PluralRules::createRules("a: n in 2..10 and n in 4..12 and n not in 5..7", status));
715 checkSelect(pr, status, __LINE__, "a", "4", "8", "9", "10", END_MARK);
716 checkSelect(pr, status, __LINE__, "other", "2", "3", "5", "7", "11", END_MARK);
717 pr.adoptInstead(PluralRules::createRules("a: n is 2 or n is 5 or n in 7..11 and n in 11..13", status));
718 checkSelect(pr, status, __LINE__, "a", "2", "5", "11", END_MARK);
719 checkSelect(pr, status, __LINE__, "other", "3", "4", "6", "8", "10", "12", "13", END_MARK);
730 pr.adoptInstead(PluralRules::createRules("a: i is 123", status));
731 checkSelect(pr, status, __LINE__, "a", "123", "123.0", "123.1", "0123.99", END_MARK);
732 checkSelect(pr, status, __LINE__, "other", "124", "122.0", END_MARK);
734 pr.adoptInstead(PluralRules::createRules("a: f is 120", status));
735 checkSelect(pr, status, __LINE__, "a", "1.120", "0.120", "11123.120", "0123.120", END_MARK);
736 checkSelect(pr, status, __LINE__, "other", "1.121", "122.1200", "1.12", "120", END_MARK);
738 pr.adoptInstead(PluralRules::createRules("a: t is 12", status));
739 checkSelect(pr, status, __LINE__, "a", "1.120", "0.12", "11123.12000", "0123.1200000", END_MARK);
740 checkSelect(pr, status, __LINE__, "other", "1.121", "122.1200001", "1.11", "12", END_MARK);
742 pr.adoptInstead(PluralRules::createRules("a: v is 3", status));
743 checkSelect(pr, status, __LINE__, "a", "1.120", "0.000", "11123.100", "0123.124", ".666", END_MARK);
744 checkSelect(pr, status, __LINE__, "other", "1.1212", "122.12", "1.1", "122", "0.0000", END_MARK);
746 pr.adoptInstead(PluralRules::createRules("a: v is 0 and i is 123", status));
747 checkSelect(pr, status, __LINE__, "a", "123", "123.", END_MARK);
748 checkSelect(pr, status, __LINE__, "other", "123.0", "123.1", "123.123", "0.123", END_MARK);
751 pr.adoptInstead(PluralRules::createRules("a: n is 21; n: n is 22; i: n is 23; f: n is 24;"
754 checkSelect(pr, status, __LINE__, "other", "20", "29", END_MARK);
755 checkSelect(pr, status, __LINE__, "a", "21", END_MARK);
756 checkSelect(pr, status, __LINE__, "n", "22", END_MARK);
757 checkSelect(pr, status, __LINE__, "i", "23", END_MARK);
758 checkSelect(pr, status, __LINE__, "f", "24", END_MARK);
759 checkSelect(pr, status, __LINE__, "t", "25", END_MARK);
760 checkSelect(pr, status, __LINE__, "v", "26", END_MARK);
761 checkSelect(pr, status, __LINE__, "w", "27", END_MARK);
762 checkSelect(pr, status, __LINE__, "j", "28", END_MARK);
765 pr.adoptInstead(PluralRules::createRules("not: n=31; and: n=32; or: n=33; mod: n=34;"
768 checkSelect(pr, status, __LINE__, "other", "30", "39", END_MARK);
769 checkSelect(pr, status, __LINE__, "not", "31", END_MARK);
770 checkSelect(pr, status, __LINE__, "and", "32", END_MARK);
771 checkSelect(pr, status, __LINE__, "or", "33", END_MARK);
772 checkSelect(pr, status, __LINE__, "mod", "34", END_MARK);
773 checkSelect(pr, status, __LINE__, "in", "35", END_MARK);
774 checkSelect(pr, status, __LINE__, "within", "36", END_MARK);
775 checkSelect(pr, status, __LINE__, "is", "37", END_MARK);
779 pr.adoptInstead(PluralRules::createRules("a: n is 1", status));
780 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
781 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 2", status));
782 checkSelect(pr, status, __LINE__, "a", "2", "12", "22", END_MARK);
783 pr.adoptInstead(PluralRules::createRules("a: n is not 1", status));
784 checkSelect(pr, status, __LINE__, "a", "0", "2", "3", "4", "5", END_MARK);
785 pr.adoptInstead(PluralRules::createRules("a: n mod 3 is not 1", status));
786 checkSelect(pr, status, __LINE__, "a", "0", "2", "3", "5", "6", "8", "9", END_MARK);
787 pr.adoptInstead(PluralRules::createRules("a: n in 2..5", status));
788 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
789 pr.adoptInstead(PluralRules::createRules("a: n within 2..5", status));
790 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
791 pr.adoptInstead(PluralRules::createRules("a: n not in 2..5", status));
792 checkSelect(pr, status, __LINE__, "a", "0", "1", "6", "7", "8", END_MARK);
793 pr.adoptInstead(PluralRules::createRules("a: n not within 2..5", status));
794 checkSelect(pr, status, __LINE__, "a", "0", "1", "6", "7", "8", END_MARK);
795 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2..5", status));
796 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "12", "13", "14", "15", "22", "23", "24", "25", END_MARK);
797 pr.adoptInstead(PluralRules::createRules("a: n mod 10 within 2..5", status));
798 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "12", "13", "14", "15", "22", "23", "24", "25", END_MARK);
799 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 2 and n is not 12", status));
800 checkSelect(pr, status, __LINE__, "a", "2", "22", "32", "42", END_MARK);
801 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2..3 or n mod 10 is 5", status));
802 checkSelect(pr, status, __LINE__, "a", "2", "3", "5", "12", "13", "15", "22", "23", "25", END_MARK);
803 pr.adoptInstead(PluralRules::createRules("a: n mod 10 within 2..3 or n mod 10 is 5", status));
804 checkSelect(pr
805 pr.adoptInstead(PluralRules::createRules("a: n is 1 or n is 4 or n is 23", status));
806 checkSelect(pr, status, __LINE__, "a", "1", "4", "23", END_MARK);
807 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 and n is not 3 and n in 1..11", status));
808 checkSelect(pr, status, __LINE__, "a", "1", "5", "7", "9", "11", END_MARK);
809 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 and n is not 3 and n within 1..11", status));
810 checkSelect(pr, status, __LINE__, "a", "1", "5", "7", "9", "11", END_MARK);
811 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 or n mod 5 is 1 and n is not 6", status));
812 checkSelect(pr, status, __LINE__, "a", "1", "3", "5", "7", "9", "11", "13", "15", "16", END_MARK);
813 pr.adoptInstead(PluralRules::createRules("a: n in 2..5; b: n in 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 within 2..5; b: n within 5..8; c: n mod 2 is 1", status));
818 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
819 checkSelect(pr, status, __LINE__, "b", "6", "7", "8", END_MARK);
820 checkSelect(pr, status, __LINE__, "c", "1", "9", "11", END_MARK);
821 pr.adoptInstead(PluralRules::createRules("a: n in 2, 4..6; b: n within 7..9,11..12,20", status));
822 checkSelect(pr, status, __LINE__, "a", "2", "4", "5", "6", END_MARK);
823 checkSelect(pr, status, __LINE__, "b", "7", "8", "9", "11", "12", "20", END_MARK);
824 pr.adoptInstead(PluralRules::createRules("a: n in 2..8, 12 and n not in 4..6", status));
825 checkSelect(pr, status, __LINE__, "a", "2", "3", "7", "8", "12", END_MARK);
826 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2, 3,5..7 and n is not 12", status));
827 checkSelect(pr, status, __LINE__, "a", "2", "3", "5", "6", "7", "13", "15", "16", "17", END_MARK);
828 pr.adoptInstead(PluralRules::createRules("a: n in 2..6, 3..7", status));
829 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "6", "7", END_MARK);
832 pr.adoptInstead(PluralRules::createRules("a: n = 1..8 and n!= 2,3,4,5", status));
833 checkSelect(pr, status, __LINE__, "a", "1", "6", "7", "8", END_MARK);
834 checkSelect(pr, status, __LINE__, "other", "0", "2", "3", "4", "5", "9", END_MARK);
835 pr.adoptInstead(PluralRules::createRules("a:n % 10 != 1", status));
836 checkSelect(pr, status, __LINE__, "a", "2", "6", "7", "8", END_MARK);
837 checkSelect(pr, status, __LINE__, "other", "1", "21", "211", "91", END_MARK);
900 PluralRules *pr = PluralRules::forLocale(locale, status);
906 if (pr == NULL) {
914 UnicodeString keyword = pr->select(n);
920 delete pr;
951 PluralRules *pr = PluralRules::createRules(UnicodeString(rules), status);
955 if (pr != NULL) {