Lines Matching refs:fd
594 FixedDecimal fd = df->getFixedDecimal(44, status); in TestFixedDecimal() local
596 ASSERT_EQUAL(44, fd.source); in TestFixedDecimal()
597 ASSERT_EQUAL(0, fd.visibleDecimalDigitCount); in TestFixedDecimal()
601 fd = df->getFixedDecimal(123.456, status); in TestFixedDecimal()
603 ASSERT_EQUAL(3, fd.visibleDecimalDigitCount); in TestFixedDecimal()
604 ASSERT_EQUAL(456, fd.decimalDigits); in TestFixedDecimal()
605 ASSERT_EQUAL(456, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
606 ASSERT_EQUAL(123, fd.intValue); in TestFixedDecimal()
607 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
608 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
612 fd = df->getFixedDecimal(123.456, status); in TestFixedDecimal()
614 ASSERT_EQUAL(0, fd.visibleDecimalDigitCount); in TestFixedDecimal()
615 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
616 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
617 ASSERT_EQUAL(123, fd.intValue); in TestFixedDecimal()
618 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
619 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
623 fd = df->getFixedDecimal(123.01, status); in TestFixedDecimal()
625 ASSERT_EQUAL(1, fd.visibleDecimalDigitCount); in TestFixedDecimal()
626 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
627 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
628 ASSERT_EQUAL(123, fd.intValue); in TestFixedDecimal()
629 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
630 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
634 fd = df->getFixedDecimal(123.06, status); in TestFixedDecimal()
636 ASSERT_EQUAL(1, fd.visibleDecimalDigitCount); in TestFixedDecimal()
637 ASSERT_EQUAL(1, fd.decimalDigits); in TestFixedDecimal()
638 ASSERT_EQUAL(1, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
639 ASSERT_EQUAL(123, fd.intValue); in TestFixedDecimal()
640 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
641 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
645 fd = df->getFixedDecimal(123, status); in TestFixedDecimal()
647 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
648 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
649 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
650 ASSERT_EQUAL(123, fd.intValue); in TestFixedDecimal()
651 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
652 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
656 fd = df->getFixedDecimal(1.23, status); in TestFixedDecimal()
658 ASSERT_EQUAL(4, fd.visibleDecimalDigitCount); in TestFixedDecimal()
659 ASSERT_EQUAL(2300, fd.decimalDigits); in TestFixedDecimal()
660 ASSERT_EQUAL(23, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
661 ASSERT_EQUAL(1, fd.intValue); in TestFixedDecimal()
662 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
663 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
665 fd = df->getFixedDecimal(uprv_getInfinity(), status); in TestFixedDecimal()
667 ASSERT_EQUAL(TRUE, fd.isNanOrInfinity); in TestFixedDecimal()
668 fd = df->getFixedDecimal(0.0, status); in TestFixedDecimal()
669 ASSERT_EQUAL(FALSE, fd.isNanOrInfinity); in TestFixedDecimal()
670 fd = df->getFixedDecimal(uprv_getNaN(), status); in TestFixedDecimal()
671 ASSERT_EQUAL(TRUE, fd.isNanOrInfinity); in TestFixedDecimal()
681 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
683 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
684 ASSERT_EQUAL(34, fd.decimalDigits); in TestFixedDecimal()
685 ASSERT_EQUAL(34, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
686 ASSERT_EQUAL(12, fd.intValue); in TestFixedDecimal()
687 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
688 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
692 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
694 ASSERT_EQUAL(22, fd.visibleDecimalDigitCount); in TestFixedDecimal()
695 ASSERT_EQUAL(345678901234567890LL, fd.decimalDigits); in TestFixedDecimal()
696 ASSERT_EQUAL(34567890123456789LL, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
697 ASSERT_EQUAL(12, fd.intValue); in TestFixedDecimal()
698 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
699 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
704 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
706 ASSERT_EQUAL(22, fd.visibleDecimalDigitCount); in TestFixedDecimal()
707 ASSERT_EQUAL(123456789012345678LL, fd.decimalDigits); in TestFixedDecimal()
708 ASSERT_EQUAL(123456789012345678LL, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
709 ASSERT_EQUAL(345678901234567890LL, fd.intValue); in TestFixedDecimal()
710 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
711 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
716 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
718 ASSERT_EQUAL(22, fd.visibleDecimalDigitCount); in TestFixedDecimal()
719 ASSERT_EQUAL(12, fd.decimalDigits); in TestFixedDecimal()
720 ASSERT_EQUAL(12, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
721 ASSERT_EQUAL(1, fd.intValue); in TestFixedDecimal()
722 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
723 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
728 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
730 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
731 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
732 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
733 ASSERT_EQUAL(1, fd.intValue); in TestFixedDecimal()
734 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
735 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
740 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
742 ASSERT_EQUAL(22, fd.visibleDecimalDigitCount); in TestFixedDecimal()
743 ASSERT_EQUAL(12, fd.decimalDigits); in TestFixedDecimal()
744 ASSERT_EQUAL(12, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
745 ASSERT_EQUAL(1, fd.intValue); in TestFixedDecimal()
746 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
747 ASSERT_EQUAL(TRUE, fd.isNegative); in TestFixedDecimal()
752 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
754 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
755 ASSERT_EQUAL(30, fd.decimalDigits); in TestFixedDecimal()
756 ASSERT_EQUAL(3, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
757 ASSERT_EQUAL(100000000000000000LL, fd.intValue); in TestFixedDecimal()
758 ASSERT_EQUAL(FALSE, fd.hasIntegerValue); in TestFixedDecimal()
759 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
764 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
766 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
767 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
768 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
769 ASSERT_EQUAL(4503599627370496LL, fd.intValue); in TestFixedDecimal()
770 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
771 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
775 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
777 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
778 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
779 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
780 ASSERT_EQUAL(4503599627370497LL, fd.intValue); in TestFixedDecimal()
781 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
782 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
786 fd = df->getFixedDecimal(fable, status); in TestFixedDecimal()
788 ASSERT_EQUAL(2, fd.visibleDecimalDigitCount); in TestFixedDecimal()
789 ASSERT_EQUAL(0, fd.decimalDigits); in TestFixedDecimal()
790 ASSERT_EQUAL(0, fd.decimalDigitsWithoutTrailingZeros); in TestFixedDecimal()
794 if (!(fd.intValue == 223372036854775807LL || fd.intValue == 9223372036854775807LL)) { in TestFixedDecimal()
795 dataerrln("File %s, Line %d, fd.intValue = %lld", __FILE__, __LINE__, fd.intValue); in TestFixedDecimal()
797 ASSERT_EQUAL(TRUE, fd.hasIntegerValue); in TestFixedDecimal()
798 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()