Lines Matching refs:test
50 l_fp test = {{200}, 0}; /* exact 200.0000000000 */ in test_PositiveInteger() local
52 TEST_ASSERT_EQUAL_STRING("+200.0000000000", mfptoa(test.l_ui, test.l_uf, LFP_MAX_PRECISION)); in test_PositiveInteger()
53 TEST_ASSERT_EQUAL_STRING("+200000.0000000", mfptoms(test.l_ui, test.l_uf, LFP_MAX_PRECISION_MS)); in test_PositiveInteger()
58 l_fp test = {{-100}, 0}; /* -100 */ in test_NegativeInteger() local
60 TEST_ASSERT_EQUAL_STRING("-100.0000000000", lfptoa(&test, LFP_MAX_PRECISION)); in test_NegativeInteger()
61 TEST_ASSERT_EQUAL_STRING("-100000.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS)); in test_NegativeInteger()
66 l_fp test = {{200}, ONE_FOURTH}; /* 200.25 */ in test_PositiveIntegerWithFraction() local
68 TEST_ASSERT_EQUAL_STRING("+200.2500000000", lfptoa(&test, LFP_MAX_PRECISION)); in test_PositiveIntegerWithFraction()
69 TEST_ASSERT_EQUAL_STRING("+200250.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS)); in test_PositiveIntegerWithFraction()
74 l_fp test = {{-100}, ONE_FOURTH}; /* -99.75 */ in test_NegativeIntegerWithFraction() local
76 TEST_ASSERT_EQUAL_STRING("-99.7500000000", lfptoa(&test, LFP_MAX_PRECISION)); in test_NegativeIntegerWithFraction()
77 TEST_ASSERT_EQUAL_STRING("-99750.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS)); in test_NegativeIntegerWithFraction()
82 l_fp test = {{10}, ONE_FOURTH}; /* 10.25 */ in test_RoundingDownToInteger() local
84 TEST_ASSERT_EQUAL_STRING("+10", lfptoa(&test, 0)); in test_RoundingDownToInteger()
85 TEST_ASSERT_EQUAL_STRING("+10250", lfptoms(&test, 0)); in test_RoundingDownToInteger()
90 l_fp test = {{10}, HALF}; /* 10.5 */ in test_RoundingMiddleToInteger() local
92 TEST_ASSERT_EQUAL_STRING("+11", lfptoa(&test, 0)); in test_RoundingMiddleToInteger()
93 TEST_ASSERT_EQUAL_STRING("+10500", lfptoms(&test, 0)); in test_RoundingMiddleToInteger()
98 l_fp test = {{5}, THREE_FOURTH}; /* 5.75 */ in test_RoundingUpToInteger() local
100 TEST_ASSERT_EQUAL_STRING("+6", lfptoa(&test, 0)); in test_RoundingUpToInteger()
101 TEST_ASSERT_EQUAL_STRING("+5750", lfptoms(&test, 0)); in test_RoundingUpToInteger()
106 l_fp test = {{8}, ONE_FOURTH}; /* 8.25 */ in test_SingleDecimal() local
108 TEST_ASSERT_EQUAL_STRING("+8.3", lfptoa(&test, 1)); in test_SingleDecimal()
109 TEST_ASSERT_EQUAL_STRING("+8250.0", lfptoms(&test, 1)); in test_SingleDecimal()
114 l_fp test = {{1}, HALF_PROMILLE_UP}; /* slightly more than 1.0005 */ in test_MillisecondsRoundingUp() local
116 TEST_ASSERT_EQUAL_STRING("+1.0", lfptoa(&test, 1)); in test_MillisecondsRoundingUp()
118 TEST_ASSERT_EQUAL_STRING("+1000.5", lfptoms(&test, 1)); in test_MillisecondsRoundingUp()
119 TEST_ASSERT_EQUAL_STRING("+1001", lfptoms(&test, 0)); in test_MillisecondsRoundingUp()
124 l_fp test = {{1}, HALF_PROMILLE_DOWN}; /* slightly less than 1.0005 */ in test_MillisecondsRoundingDown() local
126 TEST_ASSERT_EQUAL_STRING("+1.0", lfptoa(&test, 1)); in test_MillisecondsRoundingDown()
128 TEST_ASSERT_EQUAL_STRING("+1000.5", lfptoms(&test, 1)); in test_MillisecondsRoundingDown()
129 TEST_ASSERT_EQUAL_STRING("+1000", lfptoms(&test, 0)); in test_MillisecondsRoundingDown()
133 l_fp test = {{3000000000UL}, 0}; in test_UnsignedInteger() local
135 TEST_ASSERT_EQUAL_STRING("3000000000.0", ulfptoa(&test, 1)); in test_UnsignedInteger()