Home | History | Annotate | Download | only in intltest

Lines Matching defs:tuple

69         const NumberFormatTestTuple &tuple,
73 const NumberFormatTestTuple &tuple,
77 const NumberFormatTestTuple &tuple,
81 const NumberFormatTestTuple &tuple,
137 const NumberFormatTestTuple &tuple,
140 if (tuple.minIntegerDigitsFlag) {
141 fmt.setMinimumIntegerDigits(tuple.minIntegerDigits);
143 if (tuple.maxIntegerDigitsFlag) {
144 fmt.setMaximumIntegerDigits(tuple.maxIntegerDigits);
146 if (tuple.minFractionDigitsFlag) {
147 fmt.setMinimumFractionDigits(tuple.minFractionDigits);
149 if (tuple.maxFractionDigitsFlag) {
150 fmt.setMaximumFractionDigits(tuple.maxFractionDigits);
152 if (tuple.currencyFlag) {
154 UnicodeString currency(tuple.currency);
161 if (tuple.minGroupingDigitsFlag) {
162 fmt.setMinimumGroupingDigits(tuple.minGroupingDigits);
164 if (tuple.useSigDigitsFlag) {
165 fmt.setSignificantDigitsUsed(tuple.useSigDigits != 0);
167 if (tuple.minSigDigitsFlag) {
168 fmt.setMinimumSignificantDigits(tuple.minSigDigits);
170 if (tuple.maxSigDigitsFlag) {
171 fmt.setMaximumSignificantDigits(tuple.maxSigDigits);
173 if (tuple.useGroupingFlag) {
174 fmt.setGroupingUsed(tuple.useGrouping != 0);
176 if (tuple.multiplierFlag) {
177 fmt.setMultiplier(tuple.multiplier);
179 if (tuple.roundingIncrementFlag) {
180 fmt.setRoundingIncrement(tuple.roundingIncrement);
182 if (tuple.formatWidthFlag) {
183 fmt.setFormatWidth(tuple.formatWidth);
185 if (tuple.padCharacterFlag) {
186 fmt.setPadCharacter(tuple.padCharacter);
188 if (tuple.useScientificFlag) {
189 fmt.setScientificNotation(tuple.useScientific != 0);
191 if (tuple.groupingFlag) {
192 fmt.setGroupingSize(tuple.grouping);
194 if (tuple.grouping2Flag) {
195 fmt.setSecondaryGroupingSize(tuple.grouping2);
197 if (tuple.roundingModeFlag) {
198 fmt.setRoundingMode(tuple.roundingMode);
200 if (tuple.currencyUsageFlag) {
202 fmt.setCurrencyUsage(tuple.currencyUsage, &status);
207 if (tuple.minimumExponentDigitsFlag) {
208 fmt.setMinimumExponentDigits(tuple.minimumExponentDigits);
210 if (tuple.exponentSignAlwaysShownFlag) {
211 fmt.setExponentSignAlwaysShown(tuple.exponentSignAlwaysShown != 0);
213 if (tuple.decimalSeparatorAlwaysShownFlag) {
215 tuple.decimalSeparatorAlwaysShown != 0);
217 if (tuple.padPositionFlag) {
218 fmt.setPadPosition(tuple.padPosition);
220 if (tuple.positivePrefixFlag) {
221 fmt.setPositivePrefix(tuple.positivePrefix);
223 if (tuple.positiveSuffixFlag) {
224 fmt.setPositiveSuffix(tuple.positiveSuffix);
226 if (tuple.negativePrefixFlag) {
227 fmt.setNegativePrefix(tuple.negativePrefix);
229 if (tuple.negativeSuffixFlag) {
230 fmt.setNegativeSuffix(tuple.negativeSuffix);
232 if (tuple.localizedPatternFlag) {
234 fmt.applyLocalizedPattern(tuple.localizedPattern, status);
239 fmt.setLenient(NFTT_GET_FIELD(tuple, lenient, 1) != 0);
240 if (tuple.parseIntegerOnlyFlag) {
241 fmt.setParseIntegerOnly(tuple.parseIntegerOnly != 0);
243 if (tuple.decimalPatternMatchRequiredFlag) {
245 tuple.decimalPatternMatchRequired != 0);
247 if (tuple.parseNoExponentFlag) {
251 tuple.parseNoExponent,
257 if (tuple.parseCaseSensitiveFlag) {
287 const NumberFormatTestTuple &tuple,
294 NFTT_GET_FIELD(tuple, locale, en),
295 NFTT_GET_FIELD(tuple, pattern, "0"),
300 const NumberFormatTestTuple &tuple,
306 LocalPointer<DecimalFormat> fmtPtr(newDecimalFormat(tuple, status));
311 adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
316 strToDigitList(tuple.format, digitList, status);
324 if (appendTo != tuple.output) {
326 UnicodeString("Expected: ") + tuple.output + ", got: " + appendTo);
338 if (appendTo != tuple.output) {
340 UnicodeString("double Expected: ") + tuple.output + ", got: " + appendTo);
353 if (appendTo != tuple.output) {
355 UnicodeString("int64 Expected: ") + tuple.output + ", got: " + appendTo);
364 const NumberFormatTestTuple &tuple,
370 LocalPointer<DecimalFormat> fmtPtr(newDecimalFormat(tuple, status));
375 adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
379 if (tuple.toPatternFlag) {
382 if (actual != tuple.toPattern) {
384 UnicodeString("Expected: ") + tuple.toPattern + ", got: " + actual + ". ");
387 if (tuple.toLocalizedPatternFlag) {
390 if (actual != tuple.toLocalizedPattern) {
392 UnicodeString("Expected: ") + tuple.toLocalizedPattern + ", got: " + actual + ". ");
399 const NumberFormatTestTuple &tuple,
405 LocalPointer<DecimalFormat> fmtPtr(newDecimalFormat(tuple, status));
410 adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
416 fmtPtr->parse(tuple.parse, result, ppos);
423 if (tuple.output == "fail") {
427 if (tuple.output == "NaN") {
433 } else if (tuple.output == "Inf") {
439 } else if (tuple.output == "-Inf") {
447 strToDigitList(tuple.output, expected, status);
453 appendErrorMessage.append(UnicodeString("Expected: ") + tuple.output + ", but got: " + resultStr + " (" + ppos.getIndex() + ":" + ppos.getErrorIndex() + ")");
460 const NumberFormatTestTuple &tuple,
466 LocalPointer<DecimalFormat> fmtPtr(newDecimalFormat(tuple, status));
471 adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
477 fmtPtr->parseCurrency(tuple.parse, ppos));
486 if (tuple.output == "fail") {
491 strToDigitList(tuple.output, expected, status);
497 appendErrorMessage.append(UnicodeString("Expected: ") + tuple.output + ", but got: " + resultStr + " (" + ppos.getIndex() + ":" + ppos.getErrorIndex() + ")");
500 if (currStr != tuple.outputCurrency) {
502 "Expected currency: ") + tuple.outputCurrency + ", got: " + currStr + ". ");
8280 NumberFormatTestTuple tuple;
8283 tuple.setField(
8287 tuple.setField(
8291 tuple.setField(
8300 assertEquals("", "en", tuple.locale.getName());
8301 assertEquals("", "#,##0.00", tuple.pattern);
8302 assertEquals("", -10, tuple.minIntegerDigits);
8303 assertTrue("", tuple.localeFlag);
8304 assertTrue("", tuple.patternFlag);
8305 assertTrue("", tuple.minIntegerDigitsFlag);
8306 assertFalse("", tuple.formatFlag);
8312 tuple.toString(appendTo));
8314 tuple.clear();
8319 tuple.toString(appendTo));
8320 tuple.setField(
8328 tuple.setField(