Lines Matching refs:cas
324 for (const TestCase& cas : cases) { in testUseApproximateDoubleWhenAble() local
326 fq.setToDouble(cas.d); in testUseApproximateDoubleWhenAble()
328 fq.roundToMagnitude(-cas.maxFrac, cas.roundingMode, status); in testUseApproximateDoubleWhenAble()
330 if (cas.usesExact != fq.isExplicitExactDouble()) { in testUseApproximateDoubleWhenAble()
356 for (auto& cas : cases) { in testHardDoubleConversion() local
358 q.setToDouble(cas.input); in testHardDoubleConversion()
361 assertEquals("", cas.expectedOutput, actualOutput); in testHardDoubleConversion()
413 for (auto& cas : cases) { in testToDouble() local
414 status.setScope(cas.input); in testToDouble()
416 q.setToDecNumber({cas.input, -1}, status); in testToDouble()
418 assertEquals("Doubles should exactly equal", cas.expected, actual); in testToDouble()
507 for (const auto& cas : cases) { in testNickelRounding() local
508 …ssage = DoubleToUnicodeString(cas.input) + u" @ " + Int64ToUnicodeString(cas.magnitude) + u" / " +… in testNickelRounding()
511 dq.setToDouble(cas.input); in testNickelRounding()
512 dq.roundToNickel(cas.magnitude, cas.roundingMode, status); in testNickelRounding()
515 assertEquals(message, cas.expected, actual); in testNickelRounding()
586 for (const auto& cas : cases) { in testScientificAndCompactSuppressedExponent() local
590 NumberFormatter::forSkeleton(cas.skeleton, status) in testScientificAndCompactSuppressedExponent()
592 FormattedNumber fn = formatter.formatDouble(cas.input, status); in testScientificAndCompactSuppressedExponent()
603 u"formatted number " + cas.skeleton + u" toString: " + cas.input, in testScientificAndCompactSuppressedExponent()
604 cas.expectedString, in testScientificAndCompactSuppressedExponent()
607 u"formatted number " + cas.skeleton + u" toLong: " + cas.input, in testScientificAndCompactSuppressedExponent()
608 cas.expectedLong, in testScientificAndCompactSuppressedExponent()
611 u"formatted number " + cas.skeleton + u" toDouble: " + cas.input, in testScientificAndCompactSuppressedExponent()
612 cas.expectedDouble, in testScientificAndCompactSuppressedExponent()
615 u"formatted number " + cas.skeleton + u" toPlainString: " + cas.input, in testScientificAndCompactSuppressedExponent()
616 cas.expectedPlainString, in testScientificAndCompactSuppressedExponent()
619 … u"formatted number " + cas.skeleton + u" suppressed scientific exponent: " + cas.input, in testScientificAndCompactSuppressedExponent()
620 cas.expectedSuppressedScientificExponent, in testScientificAndCompactSuppressedExponent()
623 u"formatted number " + cas.skeleton + u" suppressed compact exponent: " + cas.input, in testScientificAndCompactSuppressedExponent()
624 cas.expectedSuppressedCompactExponent, in testScientificAndCompactSuppressedExponent()
629 double expectedNOperand = cas.expectedDouble; in testScientificAndCompactSuppressedExponent()
630 double expectedIOperand = static_cast<double>(cas.expectedLong); in testScientificAndCompactSuppressedExponent()
631 double expectedEOperand = cas.expectedSuppressedScientificExponent; in testScientificAndCompactSuppressedExponent()
632 double expectedCOperand = cas.expectedSuppressedCompactExponent; in testScientificAndCompactSuppressedExponent()
639 u"formatted number " + cas.skeleton + u" n operand: " + cas.input, in testScientificAndCompactSuppressedExponent()
643 u"formatted number " + cas.skeleton + u" i operand: " + cas.input, in testScientificAndCompactSuppressedExponent()
647 u"formatted number " + cas.skeleton + " e operand: " + cas.input, in testScientificAndCompactSuppressedExponent()
651 u"formatted number " + cas.skeleton + " c operand: " + cas.input, in testScientificAndCompactSuppressedExponent()
683 for (const auto& cas : cases) { in testSuppressedExponentUnchangedByInitialScaling() local
684 FormattedNumber fnCompactScaled = compactScaled.formatInt(cas.input, status); in testSuppressedExponentUnchangedByInitialScaling()
689 FormattedNumber fnCompact = compactLong.formatInt(cas.input, status); in testSuppressedExponentUnchangedByInitialScaling()
698 u"formatted number " + Int64ToUnicodeString(cas.input) + " compactLong toString: ", in testSuppressedExponentUnchangedByInitialScaling()
699 cas.expectedString, in testSuppressedExponentUnchangedByInitialScaling()
702 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", n operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
703 cas.expectedNOperand, in testSuppressedExponentUnchangedByInitialScaling()
706 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", i operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
707 cas.expectedIOperand, in testSuppressedExponentUnchangedByInitialScaling()
710 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", e operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
711 cas.expectedEOperand, in testSuppressedExponentUnchangedByInitialScaling()
714 u"compact decimal " + DoubleToUnicodeString(cas.input) + ", c operand vs. expected", in testSuppressedExponentUnchangedByInitialScaling()
715 cas.expectedCOperand, in testSuppressedExponentUnchangedByInitialScaling()
722 … u"decimal " + DoubleToUnicodeString(cas.input) + ", c operand for compact vs. compact scaled", in testSuppressedExponentUnchangedByInitialScaling()
754 for (const auto& cas : cases) { in testDecimalQuantityParseFormatRoundTrip() local
755 UnicodeString numberString = cas.numberString; in testDecimalQuantityParseFormatRoundTrip()