Lines Matching refs:cas
319 for (TestCase cas : cases) { in testUseApproximateDoubleWhenAble() local
321 fq.setToDouble(cas.d); in testUseApproximateDoubleWhenAble()
323 fq.roundToMagnitude(-cas.maxFrac, cas.roundingMode, status); in testUseApproximateDoubleWhenAble()
325 if (cas.usesExact != fq.isExplicitExactDouble()) { in testUseApproximateDoubleWhenAble()
351 for (auto& cas : cases) { in testHardDoubleConversion() local
353 q.setToDouble(cas.input); in testHardDoubleConversion()
356 assertEquals("", cas.expectedOutput, actualOutput); in testHardDoubleConversion()
370 for (auto& cas : cases) { in testToDouble() local
371 status.setScope(cas.input); in testToDouble()
373 q.setToDecNumber({cas.input, -1}, status); in testToDouble()
375 assertEquals("Doubles should exactly equal", cas.expected, actual); in testToDouble()
455 for (const auto& cas : cases) { in testNickelRounding() local
456 …ssage = DoubleToUnicodeString(cas.input) + u" @ " + Int64ToUnicodeString(cas.magnitude) + u" / " +… in testNickelRounding()
459 dq.setToDouble(cas.input); in testNickelRounding()
460 dq.roundToNickel(cas.magnitude, cas.roundingMode, status); in testNickelRounding()
463 assertEquals(message, cas.expected, actual); in testNickelRounding()
531 for (const auto& cas : cases) { in testCompactDecimalSuppressedExponent() local
535 NumberFormatter::forSkeleton(cas.skeleton, status) in testCompactDecimalSuppressedExponent()
537 FormattedNumber fn = formatter.formatDouble(cas.input, status); in testCompactDecimalSuppressedExponent()
547 u"formatted number " + cas.skeleton + u" toString: " + cas.input, in testCompactDecimalSuppressedExponent()
548 cas.expectedString, in testCompactDecimalSuppressedExponent()
551 u"compact decimal " + cas.skeleton + u" toLong: " + cas.input, in testCompactDecimalSuppressedExponent()
552 cas.expectedLong, in testCompactDecimalSuppressedExponent()
555 u"compact decimal " + cas.skeleton + u" toDouble: " + cas.input, in testCompactDecimalSuppressedExponent()
556 cas.expectedDouble, in testCompactDecimalSuppressedExponent()
559 u"formatted number " + cas.skeleton + u" toPlainString: " + cas.input, in testCompactDecimalSuppressedExponent()
560 cas.expectedPlainString, in testCompactDecimalSuppressedExponent()
563 u"compact decimal " + cas.skeleton + u" suppressed exponent: " + cas.input, in testCompactDecimalSuppressedExponent()
564 cas.expectedSuppressedExponent, in testCompactDecimalSuppressedExponent()
569 double expectedNOperand = cas.expectedDouble; in testCompactDecimalSuppressedExponent()
570 double expectedIOperand = cas.expectedLong; in testCompactDecimalSuppressedExponent()
571 double expectedEOperand = cas.expectedSuppressedExponent; in testCompactDecimalSuppressedExponent()
577 u"compact decimal " + cas.skeleton + u" n operand: " + cas.input, in testCompactDecimalSuppressedExponent()
581 u"compact decimal " + cas.skeleton + u" i operand: " + cas.input, in testCompactDecimalSuppressedExponent()
585 u"compact decimal " + cas.skeleton + " e operand: " + cas.input, in testCompactDecimalSuppressedExponent()
615 for (const auto& cas : cases) { in testSuppressedExponentUnchangedByInitialScaling() local
616 FormattedNumber fnCompactScaled = compactScaled.formatInt(cas.input, status); in testSuppressedExponentUnchangedByInitialScaling()
621 FormattedNumber fnCompact = compactLong.formatInt(cas.input, status); in testSuppressedExponentUnchangedByInitialScaling()
629 u"formatted number " + Int64ToUnicodeString(cas.input) + " compactLong toString: ", in testSuppressedExponentUnchangedByInitialScaling()
630 cas.expectedString, in testSuppressedExponentUnchangedByInitialScaling()
633 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", n operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
634 cas.expectedNOperand, in testSuppressedExponentUnchangedByInitialScaling()
637 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", i operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
638 cas.expectedIOperand, in testSuppressedExponentUnchangedByInitialScaling()
641 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", e operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
642 cas.expectedEOperand, in testSuppressedExponentUnchangedByInitialScaling()
649 … u"decimal " + DoubleToUnicodeString(cas.input) + ", e operand for compact vs. compact scaled", in testSuppressedExponentUnchangedByInitialScaling()