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); 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); 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); 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); in testBasic()
56 assertEquals("Pattern a0b", u"a", getPrefix(mod, status)); in testBasic()
57 assertEquals("Pattern a0b", u"b", getSuffix(mod, status)); in testBasic()
63 mod.setPatternInfo(&patternInfo2, kUndefinedField); in testBasic()
64 mod.setPatternAttributes(UNUM_SIGN_AUTO, false); in testBasic()
65 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testBasic()
66 assertEquals("Pattern a0b;c-0d", u"a", getPrefix(mod, status)); in testBasic()
67 assertEquals("Pattern a0b;c-0d", u"b", getSuffix(mod, status)); in testBasic()
68 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false); in testBasic()
69 assertEquals("Pattern a0b;c-0d", u"c+", getPrefix(mod, status)); in testBasic()
70 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
71 mod.setNumberProperties(SIGNUM_NEG_ZERO, StandardPlural::Form::COUNT); in testBasic()
72 assertEquals("Pattern a0b;c-0d", u"c-", getPrefix(mod, status)); in testBasic()
73 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
74 mod.setNumberProperties(SIGNUM_POS_ZERO, StandardPlural::Form::COUNT); in testBasic()
75 assertEquals("Pattern a0b;c-0d", u"c+", getPrefix(mod, status)); in testBasic()
76 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
77 mod.setPatternAttributes(UNUM_SIGN_EXCEPT_ZERO, false); in testBasic()
78 assertEquals("Pattern a0b;c-0d", u"a", getPrefix(mod, status)); in testBasic()
79 assertEquals("Pattern a0b;c-0d", u"b", getSuffix(mod, status)); in testBasic()
80 mod.setNumberProperties(SIGNUM_NEG, StandardPlural::Form::COUNT); in testBasic()
81 assertEquals("Pattern a0b;c-0d", u"c-", getPrefix(mod, status)); in testBasic()
82 assertEquals("Pattern a0b;c-0d", u"d", getSuffix(mod, status)); in testBasic()
83 mod.setPatternAttributes(UNUM_SIGN_NEVER, false); in testBasic()
84 assertEquals("Pattern a0b;c-0d", u"a", getPrefix(mod, status)); in testBasic()
85 assertEquals("Pattern a0b;c-0d", u"b", getSuffix(mod, status)); in testBasic()
91 MutablePatternModifier mod(false); in testPatternWithNoPlaceholder() local
95 mod.setPatternInfo(&patternInfo, kUndefinedField); in testPatternWithNoPlaceholder()
96 mod.setPatternAttributes(UNUM_SIGN_AUTO, false); in testPatternWithNoPlaceholder()
98 mod.setSymbols(&symbols, {u"USD", status}, UNUM_UNIT_WIDTH_SHORT, nullptr, status); in testPatternWithNoPlaceholder()
102 mod.setNumberProperties(SIGNUM_POS, StandardPlural::Form::COUNT); in testPatternWithNoPlaceholder()
108 mod.apply(nsb, 1, 4, status); in testPatternWithNoPlaceholder()
117 LocalPointer<ImmutablePatternModifier> imod(mod.createImmutable(status), status); in testPatternWithNoPlaceholder()
133 MutablePatternModifier mod(false); in testMutableEqualsImmutable() local
137 mod.setPatternInfo(&patternInfo, kUndefinedField); in testMutableEqualsImmutable()
138 mod.setPatternAttributes(UNUM_SIGN_AUTO, false); in testMutableEqualsImmutable()
140 mod.setSymbols(&symbols, {u"USD", status}, UNUM_UNIT_WIDTH_SHORT, nullptr, status); in testMutableEqualsImmutable()
148 mod.addToChain(µs1); in testMutableEqualsImmutable()
149 mod.processQuantity(fq, micros1, status); in testMutableEqualsImmutable()
155 LocalPointer<ImmutablePatternModifier> immutable(mod.createImmutable(status)); in testMutableEqualsImmutable()
162 mod.addToChain(µs3); in testMutableEqualsImmutable()
163 mod.setPatternAttributes(UNUM_SIGN_ALWAYS, false); in testMutableEqualsImmutable()
164 mod.processQuantity(fq, micros3, status); in testMutableEqualsImmutable()
172 UnicodeString PatternModifierTest::getPrefix(const MutablePatternModifier &mod, UErrorCode &status)… in getPrefix() argument
174 mod.apply(nsb, 0, 0, status); in getPrefix()
175 int32_t prefixLength = mod.getPrefixLength(); in getPrefix()
179 UnicodeString PatternModifierTest::getSuffix(const MutablePatternModifier &mod, UErrorCode &status)… in getSuffix() argument
181 mod.apply(nsb, 0, 0, status); in getSuffix()
182 int32_t prefixLength = mod.getPrefixLength(); in getSuffix()