Lines Matching refs:mod
25 MutablePatternModifier mod(false); in testBasic() local
29 mod.setPatternInfo(&patternInfo, kUndefinedField); in testBasic()
30 mod.setPatternAttributes(UNUM_SIGN_AUTO, false, false); in testBasic()
32 mod.setSymbols(&symbols, {u"USD", status}, UNUM_UNIT_WIDTH_SHORT, nullptr, status); in testBasic()
37 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
38 assertEquals("Pattern a0b", u"a", getPrefix(mod, status)); in testBasic()
39 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
40 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false, false); in testBasic()
41 assertEquals("Pattern a0b", u"+a", getPrefix(mod, status)); in testBasic()
42 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
43 mod.setNumberProperties(SIGNUM_NEG_ZERO, StandardPlural::Form::COUNT); in testBasic()
44 assertEquals("Pattern a0b", u"-a", getPrefix(mod, status)); in testBasic()
45 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
46 mod.setNumberProperties(SIGNUM_POS_ZERO, StandardPlural::Form::COUNT); in testBasic()
47 assertEquals("Pattern a0b", u"+a", getPrefix(mod, status)); in testBasic()
48 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
49 mod.setPatternAttributes(UNUM_SIGN_EXCEPT_ZERO, false, false); in testBasic()
50 assertEquals("Pattern a0b", u"a", getPrefix(mod, status)); in testBasic()
51 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
52 mod.setNumberProperties(SIGNUM_NEG, StandardPlural::Form::COUNT); in testBasic()
53 assertEquals("Pattern a0b", u"-a", getPrefix(mod, status)); in testBasic()
54 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
55 mod.setPatternAttributes(UNUM_SIGN_NEVER, false, false); in testBasic()
56 assertEquals("Pattern a0b", u"a", getPrefix(mod, status)); in testBasic()
57 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
60 mod.setPatternAttributes(UNUM_SIGN_AUTO, false, true); in testBasic()
61 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
62 assertEquals("Pattern a0b", u"~a", getPrefix(mod, status)); in testBasic()
63 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
64 mod.setNumberProperties(SIGNUM_NEG, StandardPlural::Form::COUNT); in testBasic()
65 assertEquals("Pattern a0b", u"~-a", getPrefix(mod, status)); in testBasic()
66 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
67 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false, true); in testBasic()
68 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
69 assertEquals("Pattern a0b", u"~+a", getPrefix(mod, status)); in testBasic()
70 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
76 mod.setPatternInfo(&patternInfo2, kUndefinedField); in testBasic()
77 mod.setPatternAttributes(UNUM_SIGN_AUTO, false, false); in testBasic()
78 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
79 assertEquals("Pattern a0b;c-0d", u"a", getPrefix(mod, status)); in testBasic()
80 assertEquals("Pattern a0b;c-0d", u"b", getSuffix(mod, status)); in testBasic()
81 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false, false); in testBasic()
82 assertEquals("Pattern a0b;c-0d", u"c+", getPrefix(mod, status)); in testBasic()
83 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
84 mod.setNumberProperties(SIGNUM_NEG_ZERO, StandardPlural::Form::COUNT); in testBasic()
85 assertEquals("Pattern a0b;c-0d", u"c-", getPrefix(mod, status)); in testBasic()
86 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
87 mod.setNumberProperties(SIGNUM_POS_ZERO, StandardPlural::Form::COUNT); in testBasic()
88 assertEquals("Pattern a0b;c-0d", u"c+", getPrefix(mod, status)); in testBasic()
89 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
90 mod.setPatternAttributes(UNUM_SIGN_EXCEPT_ZERO, false, false); in testBasic()
91 assertEquals("Pattern a0b;c-0d", u"a", getPrefix(mod, status)); in testBasic()
92 assertEquals("Pattern a0b;c-0d", u"b", getSuffix(mod, status)); in testBasic()
93 mod.setNumberProperties(SIGNUM_NEG, StandardPlural::Form::COUNT); in testBasic()
94 assertEquals("Pattern a0b;c-0d", u"c-", getPrefix(mod, status)); in testBasic()
95 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
96 mod.setPatternAttributes(UNUM_SIGN_NEVER, false, false); in testBasic()
97 assertEquals("Pattern a0b;c-0d", u"a", getPrefix(mod, status)); in testBasic()
98 assertEquals("Pattern a0b;c-0d", u"b", getSuffix(mod, status)); in testBasic()
101 mod.setPatternAttributes(UNUM_SIGN_AUTO, false, true); in testBasic()
102 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
103 assertEquals("Pattern a0b;c-0d", u"c~", getPrefix(mod, status)); in testBasic()
104 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
105 mod.setNumberProperties(SIGNUM_NEG, StandardPlural::Form::COUNT); in testBasic()
106 assertEquals("Pattern a0b;c-0d", u"c~-", getPrefix(mod, status)); in testBasic()
107 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
108 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false, true); in testBasic()
109 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
110 assertEquals("Pattern a0b;c-0d", u"c~+", getPrefix(mod, status)); in testBasic()
111 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
117 MutablePatternModifier mod(false); in testPatternWithNoPlaceholder() local
121 mod.setPatternInfo(&patternInfo, kUndefinedField); in testPatternWithNoPlaceholder()
122 mod.setPatternAttributes(UNUM_SIGN_AUTO, false, false); in testPatternWithNoPlaceholder()
124 mod.setSymbols(&symbols, {u"USD", status}, UNUM_UNIT_WIDTH_SHORT, nullptr, status); in testPatternWithNoPlaceholder()
128 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testPatternWithNoPlaceholder()
134 mod.apply(nsb, 1, 4, status); in testPatternWithNoPlaceholder()
143 LocalPointer<ImmutablePatternModifier> imod(mod.createImmutable(status), status); in testPatternWithNoPlaceholder()
159 MutablePatternModifier mod(false); in testMutableEqualsImmutable() local
163 mod.setPatternInfo(&patternInfo, kUndefinedField); in testMutableEqualsImmutable()
164 mod.setPatternAttributes(UNUM_SIGN_AUTO, false, false); in testMutableEqualsImmutable()
166 mod.setSymbols(&symbols, {u"USD", status}, UNUM_UNIT_WIDTH_SHORT, nullptr, status); in testMutableEqualsImmutable()
174 mod.addToChain(µs1); in testMutableEqualsImmutable()
175 mod.processQuantity(fq, micros1, status); in testMutableEqualsImmutable()
181 LocalPointer<ImmutablePatternModifier> immutable(mod.createImmutable(status)); in testMutableEqualsImmutable()
188 mod.addToChain(µs3); in testMutableEqualsImmutable()
189 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false, false); in testMutableEqualsImmutable()
190 mod.processQuantity(fq, micros3, status); in testMutableEqualsImmutable()
198 UnicodeString PatternModifierTest::getPrefix(const MutablePatternModifier &mod, UErrorCode &status)… in getPrefix() argument
200 mod.apply(nsb, 0, 0, status); in getPrefix()
201 int32_t prefixLength = mod.getPrefixLength(); in getPrefix()
205 UnicodeString PatternModifierTest::getSuffix(const MutablePatternModifier &mod, UErrorCode &status)… in getSuffix() argument
207 mod.apply(nsb, 0, 0, status); in getSuffix()
208 int32_t prefixLength = mod.getPrefixLength(); in getSuffix()