Home | History | Annotate | Download | only in intltest

Lines Matching refs:pr

357   PluralRules *pr = PluralRules::createRules(rule, status);
358 double result = pr->getUniqueKeywordValue(key);
359 delete pr;
595 LocalPointer<PluralRules> pr(PluralRules::forLocale("en", UPLURAL_TYPE_ORDINAL, errorCode));
599 UnicodeString keyword = pr->select(2.);
660 LocalPointer<PluralRules> pr(PluralRules::createRules("s: n in 1,3,4,6", status));
661 checkSelect(pr, status, __LINE__, "s", "1.0", "3.0", "4.0", "6.0", END_MARK);
662 checkSelect(pr, status, __LINE__, "other", "0.0", "2.0", "3.1", "7.0", END_MARK);
664 pr.adoptInstead(PluralRules::createRules("s: n not in 1,3,4,6", status));
665 checkSelect(pr, status, __LINE__, "other", "1.0", "3.0", "4.0", "6.0", END_MARK);
666 checkSelect(pr, status, __LINE__, "s", "0.0", "2.0", "3.1", "7.0", END_MARK);
668 pr.adoptInstead(PluralRules::createRules("r: n in 1..4, 7..10, 14 .. 17;"
670 checkSelect(pr, status, __LINE__, "r", "1.0", "3.0", "7.0", "8.0", "10.0", "14.0", "17.0", END_MARK);
671 checkSelect(pr, status, __LINE__, "s", "29.0", END_MARK);
672 checkSelect(pr, status, __LINE__, "other", "28.0", "29.1", END_MARK);
674 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 1; b: n mod 100 is 0 ", status));
675 checkSelect(pr, status, __LINE__, "a", "1", "11", "41", "101", "301.00", END_MARK);
676 checkSelect(pr, status, __LINE__, "b", "0", "100", "200.0", "300.", "1000", "1100", "110000", END_MARK);
677 checkSelect(pr, status, __LINE__, "other", "0.01", "1.01", "0.99", "2", "3", "99", "102", END_MARK);
681 pr.adoptInstead(PluralRules::createRules("a: n is 1", status));
682 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
683 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
685 pr.adoptInstead(PluralRules::createRules("a: n is 1 ", status));
686 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
687 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
689 pr.adoptInstead(PluralRules::createRules("a: n is 1;", status));
690 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
691 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
693 pr.adoptInstead(PluralRules::createRules("a: n is 1 ; ", status));
694 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
695 checkSelect(pr, status, __LINE__, "other", "2", END_MARK);
699 pr.adoptInstead(PluralRules::createRules("c: n in 5..15; b : n in 1..10 ;a:n in 10 .. 20", status));
700 checkSelect(pr, status, __LINE__, "a", "20", END_MARK);
701 checkSelect(pr, status, __LINE__, "b", "1", END_MARK);
702 checkSelect(pr, status, __LINE__, "c", "10", END_MARK);
703 checkSelect(pr, status, __LINE__, "other", "0", "21", "10.1", END_MARK);
706 pr.adoptInstead(PluralRules::createRules("a: n in 2..10; b: n within 8..15", status));
707 checkSelect(pr, status, __LINE__, "a", "2", "8", "10", END_MARK);
708 checkSelect(pr, status, __LINE__, "b", "8.01", "9.5", "11", "14.99", "15", END_MARK);
709 checkSelect(pr, status, __LINE__, "other", "1", "7.7", "15.01", "16", END_MARK);
712 pr.adoptInstead(PluralRules::createRules("a: n in 2..10 and n in 4..12 and n not in 5..7", status));
713 checkSelect(pr, status, __LINE__, "a", "4", "8", "9", "10", END_MARK);
714 checkSelect(pr, status, __LINE__, "other", "2", "3", "5", "7", "11", END_MARK);
715 pr.adoptInstead(PluralRules::createRules("a: n is 2 or n is 5 or n in 7..11 and n in 11..13", status));
716 checkSelect(pr, status, __LINE__, "a", "2", "5", "11", END_MARK);
717 checkSelect(pr, status, __LINE__, "other", "3", "4", "6", "8", "10", "12", "13", END_MARK);
728 pr.adoptInstead(PluralRules::createRules("a: i is 123", status));
729 checkSelect(pr, status, __LINE__, "a", "123", "123.0", "123.1", "0123.99", END_MARK);
730 checkSelect(pr, status, __LINE__, "other", "124", "122.0", END_MARK);
732 pr.adoptInstead(PluralRules::createRules("a: f is 120", status));
733 checkSelect(pr, status, __LINE__, "a", "1.120", "0.120", "11123.120", "0123.120", END_MARK);
734 checkSelect(pr, status, __LINE__, "other", "1.121", "122.1200", "1.12", "120", END_MARK);
736 pr.adoptInstead(PluralRules::createRules("a: t is 12", status));
737 checkSelect(pr, status, __LINE__, "a", "1.120", "0.12", "11123.12000", "0123.1200000", END_MARK);
738 checkSelect(pr, status, __LINE__, "other", "1.121", "122.1200001", "1.11", "12", END_MARK);
740 pr.adoptInstead(PluralRules::createRules("a: v is 3", status));
741 checkSelect(pr, status, __LINE__, "a", "1.120", "0.000", "11123.100", "0123.124", ".666", END_MARK);
742 checkSelect(pr, status, __LINE__, "other", "1.1212", "122.12", "1.1", "122", "0.0000", END_MARK);
744 pr.adoptInstead(PluralRules::createRules("a: v is 0 and i is 123", status));
745 checkSelect(pr, status, __LINE__, "a", "123", "123.", END_MARK);
746 checkSelect(pr, status, __LINE__, "other", "123.0", "123.1", "123.123", "0.123", END_MARK);
749 pr.adoptInstead(PluralRules::createRules("a: n is 21; n: n is 22; i: n is 23; f: n is 24;"
752 checkSelect(pr, status, __LINE__, "other", "20", "29", END_MARK);
753 checkSelect(pr, status, __LINE__, "a", "21", END_MARK);
754 checkSelect(pr, status, __LINE__, "n", "22", END_MARK);
755 checkSelect(pr, status, __LINE__, "i", "23", END_MARK);
756 checkSelect(pr, status, __LINE__, "f", "24", END_MARK);
757 checkSelect(pr, status, __LINE__, "t", "25", END_MARK);
758 checkSelect(pr, status, __LINE__, "v", "26", END_MARK);
759 checkSelect(pr, status, __LINE__, "w", "27", END_MARK);
760 checkSelect(pr, status, __LINE__, "j", "28", END_MARK);
763 pr.adoptInstead(PluralRules::createRules("not: n=31; and: n=32; or: n=33; mod: n=34;"
766 checkSelect(pr, status, __LINE__, "other", "30", "39", END_MARK);
767 checkSelect(pr, status, __LINE__, "not", "31", END_MARK);
768 checkSelect(pr, status, __LINE__, "and", "32", END_MARK);
769 checkSelect(pr, status, __LINE__, "or", "33", END_MARK);
770 checkSelect(pr, status, __LINE__, "mod", "34", END_MARK);
771 checkSelect(pr, status, __LINE__, "in", "35", END_MARK);
772 checkSelect(pr, status, __LINE__, "within", "36", END_MARK);
773 checkSelect(pr, status, __LINE__, "is", "37", END_MARK);
777 pr.adoptInstead(PluralRules::createRules("a: n is 1", status));
778 checkSelect(pr, status, __LINE__, "a", "1", END_MARK);
779 pr.adoptInstead(PluralRules::createRules("a: n mod 10 is 2", status));
780 checkSelect(pr, status, __LINE__, "a", "2", "12", "22", END_MARK);
781 pr.adoptInstead(PluralRules::createRules("a: n is not 1", status));
782 checkSelect(pr, status, __LINE__, "a", "0", "2", "3", "4", "5", END_MARK);
783 pr.adoptInstead(PluralRules::createRules("a: n mod 3 is not 1", status));
784 checkSelect(pr, status, __LINE__, "a", "0", "2", "3", "5", "6", "8", "9", END_MARK);
785 pr.adoptInstead(PluralRules::createRules("a: n in 2..5", status));
786 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
787 pr.adoptInstead(PluralRules::createRules("a: n within 2..5", status));
788 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
789 pr.adoptInstead(PluralRules::createRules("a: n not in 2..5", status));
790 checkSelect(pr, status, __LINE__, "a", "0", "1", "6", "7", "8", END_MARK);
791 pr.adoptInstead(PluralRules::createRules("a: n not within 2..5", status));
792 checkSelect(pr, status, __LINE__, "a", "0", "1", "6", "7", "8", END_MARK);
793 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 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 within 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 is 2 and n is not 12", status));
798 checkSelect(pr, status, __LINE__, "a", "2", "22", "32", "42", END_MARK);
799 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 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 mod 10 within 2..3 or n mod 10 is 5", status));
802 checkSelect(pr
803 pr.adoptInstead(PluralRules::createRules("a: n is 1 or n is 4 or n is 23", status));
804 checkSelect(pr, status, __LINE__, "a", "1", "4", "23", END_MARK);
805 pr.adoptInstead(PluralRules::createRules("a: n mod 2 is 1 and n is not 3 and n in 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 and n is not 3 and n within 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 or n mod 5 is 1 and n is not 6", status));
810 checkSelect(pr, status, __LINE__, "a", "1", "3", "5", "7", "9", "11", "13", "15", "16", END_MARK);
811 pr.adoptInstead(PluralRules::createRules("a: n in 2..5; b: n in 5..8; c: n mod 2 is 1", status));
812 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
813 checkSelect(pr, status, __LINE__, "b", "6", "7", "8", END_MARK);
814 checkSelect(pr, status, __LINE__, "c", "1", "9", "11", END_MARK);
815 pr.adoptInstead(PluralRules::createRules("a: n within 2..5; b: n within 5..8; c: n mod 2 is 1", status));
816 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", END_MARK);
817 checkSelect(pr, status, __LINE__, "b", "6", "7", "8", END_MARK);
818 checkSelect(pr, status, __LINE__, "c", "1", "9", "11", END_MARK);
819 pr.adoptInstead(PluralRules::createRules("a: n in 2, 4..6; b: n within 7..9,11..12,20", status));
820 checkSelect(pr, status, __LINE__, "a", "2", "4", "5", "6", END_MARK);
821 checkSelect(pr, status, __LINE__, "b", "7", "8", "9", "11", "12", "20", END_MARK);
822 pr.adoptInstead(PluralRules::createRules("a: n in 2..8, 12 and n not in 4..6", status));
823 checkSelect(pr, status, __LINE__, "a", "2", "3", "7", "8", "12", END_MARK);
824 pr.adoptInstead(PluralRules::createRules("a: n mod 10 in 2, 3,5..7 and n is not 12", status));
825 checkSelect(pr, status, __LINE__, "a", "2", "3", "5", "6", "7", "13", "15", "16", "17", END_MARK);
826 pr.adoptInstead(PluralRules::createRules("a: n in 2..6, 3..7", status));
827 checkSelect(pr, status, __LINE__, "a", "2", "3", "4", "5", "6", "7", END_MARK);
830 pr.adoptInstead(PluralRules::createRules("a: n = 1..8 and n!= 2,3,4,5", status));
831 checkSelect(pr, status, __LINE__, "a", "1", "6", "7", "8", END_MARK);
832 checkSelect(pr, status, __LINE__, "other", "0", "2", "3", "4", "5", "9", END_MARK);
833 pr.adoptInstead(PluralRules::createRules("a:n % 10 != 1", status));
834 checkSelect(pr, status, __LINE__, "a", "2", "6", "7", "8", END_MARK);
835 checkSelect(pr, status, __LINE__, "other", "1", "21", "211", "91", END_MARK);
898 PluralRules *pr = PluralRules::forLocale(locale, status);
904 if (pr == NULL) {
912 UnicodeString keyword = pr->select(n);
918 delete pr;
949 PluralRules *pr = PluralRules::createRules(UnicodeString(rules), status);
953 if (pr != NULL) {