• Home
  • Raw
  • Download

Lines Matching refs:itemPtr

1098     const ParseCurrencyItem * itemPtr;  in TestParseCurrency()  local
1099 for (itemPtr = parseCurrencyItems; itemPtr->locale != NULL; ++itemPtr) { in TestParseCurrency()
1108 unum = unum_open(UNUM_CURRENCY, NULL, 0, itemPtr->locale, NULL, &status); in TestParseCurrency()
1110 const UChar * currStr = itemPtr->currStr; in TestParseCurrency()
1114 …if (status != itemPtr->parsDoubExpectErr || parsePos != itemPtr->parsDoubExpectPos || parseVal != in TestParseCurrency()
1116 itemPtr->locale, itemPtr->descrip, in TestParseCurrency()
1117 … u_errorName(itemPtr->parsDoubExpectErr), itemPtr->parsDoubExpectPos, itemPtr->parsDoubExpectVal, in TestParseCurrency()
1125 …if (status != itemPtr->parsCurrExpectErr || parsePos != itemPtr->parsCurrExpectPos || parseVal != in TestParseCurrency()
1126 strncmp(parseCurrB, itemPtr->parsCurrExpectCurr, 4) != 0) { in TestParseCurrency()
1128 itemPtr->locale, itemPtr->descrip, in TestParseCurrency()
1129 …u_errorName(itemPtr->parsCurrExpectErr), itemPtr->parsCurrExpectPos, itemPtr->parsCurrExpectVal, i… in TestParseCurrency()
1134 …err("unexpected error in unum_open UNUM_CURRENCY for locale %s: '%s'\n", itemPtr->locale, u_errorN… in TestParseCurrency()
1137 if (itemPtr->plurStr != NULL) { in TestParseCurrency()
1139 unum = unum_open(UNUM_CURRENCY_PLURAL, NULL, 0, itemPtr->locale, NULL, &status); in TestParseCurrency()
1143 parseVal = unum_parseDouble(unum, itemPtr->plurStr, -1, &parsePos, &status); in TestParseCurrency()
1144 … if (status != itemPtr->parsDoubExpectErr || parseVal != itemPtr->parsDoubExpectVal) { in TestParseCurrency()
1146 itemPtr->locale, itemPtr->descrip, in TestParseCurrency()
1147 u_errorName(itemPtr->parsDoubExpectErr), itemPtr->parsDoubExpectVal, in TestParseCurrency()
1153 … parseVal = unum_parseDoubleCurrency(unum, itemPtr->plurStr, -1, &parsePos, parseCurr, &status); in TestParseCurrency()
1155 … if (status != itemPtr->parsCurrExpectErr || parseVal != itemPtr->parsCurrExpectVal || in TestParseCurrency()
1156 strncmp(parseCurrB, itemPtr->parsCurrExpectCurr, 4) != 0) { in TestParseCurrency()
1158 itemPtr->locale, itemPtr->descrip, in TestParseCurrency()
1159 … u_errorName(itemPtr->parsCurrExpectErr), itemPtr->parsCurrExpectVal, itemPtr->parsCurrExpectCurr, in TestParseCurrency()
1164 …expected error in unum_open UNUM_CURRENCY_PLURAL for locale %s: '%s'\n", itemPtr->locale, u_errorN… in TestParseCurrency()
2496 const NumSysTestItem * itemPtr; in TestUNumberingSystem() local
2502 for (itemPtr = numSysTestItems; itemPtr->locale != NULL; itemPtr++) { in TestUNumberingSystem()
2504 unumsys = unumsys_open(itemPtr->locale, &status); in TestUNumberingSystem()
2510 …if ( uprv_strcmp(numsys, itemPtr->numsys) != 0 || radix != itemPtr->radix || !isAlgorithmic != !it… in TestUNumberingSystem()
2512itemPtr->locale, itemPtr->numsys, itemPtr->radix, itemPtr->isAlgorithmic, numsys, radix, isAlgorit… in TestUNumberingSystem()
2516 if ( U_FAILURE(status) || u_strcmp(ubuf, itemPtr->description) != 0 ) { in TestUNumberingSystem()
2521 …log_data_err("unumsys_open for locale %s fails with status %s\n", itemPtr->locale, myErrorName(sta… in TestUNumberingSystem()
2670 const TestContextItem* itemPtr; in TestContext() local
2689 for (itemPtr = tcItems; itemPtr->locale != NULL; itemPtr++) { in TestContext()
2694 unum = unum_open(itemPtr->style, NULL, 0, itemPtr->locale, NULL, &status); in TestContext()
2697 itemPtr->locale, (int)itemPtr->style, myErrorName(status)); in TestContext()
2700 unum_setContext(unum, itemPtr->context, &status); in TestContext()
2704itemPtr->locale, (int)itemPtr->style, (int)itemPtr->context, myErrorName(status)); in TestContext()
2707 int32_t ulenExp = u_unescape(itemPtr->expectedResult, ubufExpected, kUBufMax); in TestContext()
2712 itemPtr->locale, (int)itemPtr->style, (int)itemPtr->context, ulenExp, in TestContext()
2713 itemPtr->expectedResult, ulenRes, bbuf); in TestContext()
3127 const FormatForFieldsItem * itemPtr; in TestFormatForFields() local
3128 for (itemPtr = fffItems; itemPtr->locale != NULL; itemPtr++) { in TestFormatForFields()
3131 unum = (itemPtr->style == UNUM_PATTERN_DECIMAL)? in TestFormatForFields()
3132 unum_open(itemPtr->style, patNoFields, -1, itemPtr->locale, NULL, &status): in TestFormatForFields()
3133 unum_open(itemPtr->style, NULL, 0, itemPtr->locale, NULL, &status); in TestFormatForFields()
3135 … for locale %s, style %d: status %s (Are you missing data?)\n", itemPtr->locale, itemPtr->style, u… in TestFormatForFields()
3138 …int32_t ulen = unum_formatDoubleForFields(unum, itemPtr->value, ubuf, kUBufSize, fpositer, &status… in TestFormatForFields()
3140 …matDoubleForFields fails for locale %s, style %d: status %s\n", itemPtr->locale, itemPtr->style, u… in TestFormatForFields()
3144 for (fptr = itemPtr->expectedFields; true; fptr++) { in TestFormatForFields()
3149itemPtr->locale, aescstrdup(ubuf, ulen), fptr->field, fptr->beginPos, fptr->endPos, field, beginPo… in TestFormatForFields()
3152itemPtr->locale, aescstrdup(ubuf, ulen), field, beginPos, endPos); in TestFormatForFields()
3216 const ParseCaseItem* itemPtr; in TestParseCases() local
3217 for (itemPtr = parseCaseItems; itemPtr->locale != NULL; itemPtr++) { in TestParseCases()
3219 UNumberFormat* unumDec = unum_open(UNUM_DECIMAL, NULL, 0, itemPtr->locale, NULL, &status); in TestParseCases()
3221 …log_data_err("unum_open UNUM_DECIMAL fails for locale %s: %s\n", itemPtr->locale, u_errorName(stat… in TestParseCases()
3227 unum_setAttribute(unumDec, UNUM_LENIENT_PARSE, itemPtr->lenient); in TestParseCases()
3228 unum_setAttribute(unumDec, UNUM_PARSE_INT_ONLY, itemPtr->intOnly); in TestParseCases()
3232 intValue = unum_parse(unumDec, itemPtr->text, -1, &parsePos, &status); in TestParseCases()
3233 …if (status != itemPtr->intStatus || parsePos != itemPtr->intPos || intValue != itemPtr->intValue) { in TestParseCases()
3235 u_austrcpy(btext, itemPtr->text); in TestParseCases()
3237 itemPtr->locale, btext, itemPtr->lenient, itemPtr->intOnly, in TestParseCases()
3238 u_errorName(itemPtr->intStatus), itemPtr->intPos, itemPtr->intValue, in TestParseCases()
3244 doubValue = unum_parseDouble(unumDec, itemPtr->text, -1, &parsePos, &status); in TestParseCases()
3245 …if (status != itemPtr->doubStatus || parsePos != itemPtr->doubPos || doubValue != itemPtr->doubVal… in TestParseCases()
3247 u_austrcpy(btext, itemPtr->text); in TestParseCases()
3249 itemPtr->locale, btext, itemPtr->lenient, itemPtr->intOnly, in TestParseCases()
3250 u_errorName(itemPtr->doubStatus), itemPtr->doubPos, itemPtr->doubValue, in TestParseCases()
3257 dclen = unum_parseDecimal(unumDec, itemPtr->text, -1, &parsePos, decstr, 32, &status); in TestParseCases()
3259 …if (status != itemPtr->decStatus || parsePos != itemPtr->decPos || uprv_strcmp(decstr,itemPtr->dec… in TestParseCases()
3261 u_austrcpy(btext, itemPtr->text); in TestParseCases()
3263 itemPtr->locale, btext, itemPtr->lenient, itemPtr->intOnly, in TestParseCases()
3264 u_errorName(itemPtr->decStatus), itemPtr->decPos, itemPtr->decString, in TestParseCases()
3342 const SetMaxFracAndRoundIncrItem* itemPtr; in TestSetMaxFracAndRoundIncr() local
3343 for (itemPtr = maxFracAndRoundIncrItems; itemPtr->descrip != NULL; itemPtr++) { in TestSetMaxFracAndRoundIncr()
3349 UNumberFormat* unf = unum_open(itemPtr->style, NULL, 0, itemPtr->locale, NULL, &status); in TestSetMaxFracAndRoundIncr()
3351 …log_data_err("locale %s: unum_open style %d fails with %s\n", itemPtr->locale, itemPtr->style, u_e… in TestSetMaxFracAndRoundIncr()
3355 unum_setAttribute(unf, UNUM_MIN_INTEGER_DIGITS, itemPtr->minInt); in TestSetMaxFracAndRoundIncr()
3356 unum_setAttribute(unf, UNUM_MIN_FRACTION_DIGITS, itemPtr->minFrac); in TestSetMaxFracAndRoundIncr()
3357 unum_setAttribute(unf, UNUM_MAX_FRACTION_DIGITS, itemPtr->maxFrac); in TestSetMaxFracAndRoundIncr()
3358 unum_setDoubleAttribute(unf, UNUM_ROUNDING_INCREMENT, itemPtr->roundIncr); in TestSetMaxFracAndRoundIncr()
3360 …UBool roundIncrUsed = (itemPtr->roundIncr != 0.0 && !ignoreRoundingIncrement(itemPtr->roundIncr, i… in TestSetMaxFracAndRoundIncr()
3363 if (minInt != itemPtr->minInt) { in TestSetMaxFracAndRoundIncr()
3365 itemPtr->descrip, itemPtr->minInt, minInt); in TestSetMaxFracAndRoundIncr()
3368 if (minFrac != itemPtr->minFrac) { in TestSetMaxFracAndRoundIncr()
3370 itemPtr->descrip, itemPtr->minFrac, minFrac); in TestSetMaxFracAndRoundIncr()
3375 int32_t expMaxFrac = (roundIncrUsed)? itemPtr->minFrac: itemPtr->maxFrac; in TestSetMaxFracAndRoundIncr()
3378 itemPtr->descrip, expMaxFrac, maxFrac); in TestSetMaxFracAndRoundIncr()
3382 double expRoundIncr = (roundIncrUsed)? itemPtr->roundIncr: 0.0; in TestSetMaxFracAndRoundIncr()
3385 itemPtr->descrip, expRoundIncr, roundIncr); in TestSetMaxFracAndRoundIncr()
3392 … log_err("test %s: unum_toPattern fails with %s\n", itemPtr->descrip, u_errorName(status)); in TestSetMaxFracAndRoundIncr()
3393 } else if (u_strcmp(ubuf,itemPtr->expPattern)!=0) { in TestSetMaxFracAndRoundIncr()
3394 u_austrcpy(bbufe, itemPtr->expPattern); in TestSetMaxFracAndRoundIncr()
3396 … log_err("test %s: unum_toPattern expect \"%s\", get \"%s\"\n", itemPtr->descrip, bbufe, bbufg); in TestSetMaxFracAndRoundIncr()
3400 ulen = unum_formatDouble(unf, itemPtr->valueToFmt, ubuf, kUBufMax, NULL, &status); in TestSetMaxFracAndRoundIncr()
3402 … log_err("test %s: unum_formatDouble fails with %s\n", itemPtr->descrip, u_errorName(status)); in TestSetMaxFracAndRoundIncr()
3403 } else if (u_strcmp(ubuf,itemPtr->expFormat)!=0) { in TestSetMaxFracAndRoundIncr()
3404 u_austrcpy(bbufe, itemPtr->expFormat); in TestSetMaxFracAndRoundIncr()
3406 … log_err("test %s: unum_formatDouble expect \"%s\", get \"%s\"\n", itemPtr->descrip, bbufe, bbufg); in TestSetMaxFracAndRoundIncr()