Lines Matching refs:doAssert
49 static void doAssert(double expect, double got, const char *message);
71 doAssert(expn1, 0.5, "uprv_fmod(30.50, 15.00) failed."); in TestPUtilAPI()
75 doAssert(expn1, 1, "uprv_ceil(0.021) failed."); in TestPUtilAPI()
79 doAssert(expn1, 0, "uprv_floor(0.021) failed."); in TestPUtilAPI()
83 doAssert(expn1, 0.675, "uprv_fabs(2.02-1.345) failed."); in TestPUtilAPI()
86 doAssert(uprv_fmax(2.4, 1.2), 2.4, "uprv_fmax(2.4, 1.2) failed."); in TestPUtilAPI()
90 … doAssert(expn1, uprv_getNaN(), "uprv_fmax(uprv_getNaN(), 1.2) failed. when one parameter is NaN"); in TestPUtilAPI()
93 doAssert(uprv_fmin(2.4, 1.2), 1.2, "uprv_fmin(2.4, 1.2) failed."); in TestPUtilAPI()
97 … doAssert(expn1, uprv_getNaN(), "uprv_fmin(uprv_getNaN(), 1.2) failed. when one parameter is NaN"); in TestPUtilAPI()
100 doAssert(uprv_max(4, 2), 4, "uprv_max(4, 2) failed."); in TestPUtilAPI()
103 doAssert(uprv_min(-4, 2), -4, "uprv_min(-4, 2) failed."); in TestPUtilAPI()
106 doAssert(uprv_trunc(12.3456), 12, "uprv_trunc(12.3456) failed."); in TestPUtilAPI()
107 doAssert(uprv_trunc(12.234E2), 1223, "uprv_trunc(12.234E2) failed."); in TestPUtilAPI()
108 …doAssert(uprv_trunc(uprv_getNaN()), uprv_getNaN(), "uprv_trunc(uprv_getNaN()) failed. with paramet… in TestPUtilAPI()
109 …doAssert(uprv_trunc(uprv_getInfinity()), uprv_getInfinity(), "uprv_trunc(uprv_getInfinity()) faile… in TestPUtilAPI()
113 doAssert(uprv_pow10(4), 10000, "uprv_pow10(4) failed."); in TestPUtilAPI()
133 doAssert(FALSE, uprv_add32_overflow(INT32_MAX - 2, 1, &overflow_result), "should not overflow"); in TestPUtilAPI()
134 doAssert(INT32_MAX - 1, overflow_result, "should equal INT32_MAX - 1"); in TestPUtilAPI()
135 doAssert(FALSE, uprv_add32_overflow(INT32_MAX - 2, 2, &overflow_result), "should not overflow"); in TestPUtilAPI()
136 doAssert(INT32_MAX, overflow_result, "should equal exactly INT32_MAX"); in TestPUtilAPI()
137 doAssert(TRUE, uprv_add32_overflow(INT32_MAX - 2, 3, &overflow_result), "should overflow"); in TestPUtilAPI()
138 doAssert(FALSE, uprv_mul32_overflow(INT32_MAX / 5, 4, &overflow_result), "should not overflow"); in TestPUtilAPI()
139 doAssert(INT32_MAX / 5 * 4, overflow_result, "should equal INT32_MAX / 5 * 4"); in TestPUtilAPI()
140 doAssert(TRUE, uprv_mul32_overflow(INT32_MAX / 5, 6, &overflow_result), "should overflow"); in TestPUtilAPI()
142 doAssert(FALSE, uprv_add32_overflow(-3, -2, &overflow_result), "should not overflow"); in TestPUtilAPI()
143 doAssert(-5, overflow_result, "should equal -5"); in TestPUtilAPI()
147 doAssert(uprv_digitsAfterDecimal(value1), 3, "uprv_digitsAfterDecimal() failed."); in TestPUtilAPI()
148 doAssert(uprv_digitsAfterDecimal(1.2345E2), 2, "uprv_digitsAfterDecimal(1.2345E2) failed."); in TestPUtilAPI()
149 doAssert(uprv_digitsAfterDecimal(1.2345E-2), 6, "uprv_digitsAfterDecimal(1.2345E-2) failed."); in TestPUtilAPI()
150 doAssert(uprv_digitsAfterDecimal(1.2345E2), 2, "uprv_digitsAfterDecimal(1.2345E2) failed."); in TestPUtilAPI()
151 … doAssert(uprv_digitsAfterDecimal(-1.2345E-20), 24, "uprv_digitsAfterDecimal(1.2345E-20) failed."); in TestPUtilAPI()
152 doAssert(uprv_digitsAfterDecimal(1.2345E20), 0, "uprv_digitsAfterDecimal(1.2345E20) failed."); in TestPUtilAPI()
153 doAssert(uprv_digitsAfterDecimal(-0.021), 3, "uprv_digitsAfterDecimal(-0.021) failed."); in TestPUtilAPI()
154 doAssert(uprv_digitsAfterDecimal(23.0), 0, "uprv_digitsAfterDecimal(23.0) failed."); in TestPUtilAPI()
155 …doAssert(uprv_digitsAfterDecimal(0.022223333321), 9, "uprv_digitsAfterDecimal(0.022223333321) fail… in TestPUtilAPI()
436 static void doAssert(double got, double expect, const char *message) in doAssert() function