• Home
  • Raw
  • Download

Lines Matching refs:doAssert

52 static void doAssert(double expect, double got, const char *message);
74 doAssert(expn1, 0.5, "uprv_fmod(30.50, 15.00) failed."); in TestPUtilAPI()
78 doAssert(expn1, 1, "uprv_ceil(0.021) failed."); in TestPUtilAPI()
82 doAssert(expn1, 0, "uprv_floor(0.021) failed."); in TestPUtilAPI()
86 doAssert(expn1, 0.675, "uprv_fabs(2.02-1.345) failed."); in TestPUtilAPI()
89 doAssert(uprv_fmax(2.4, 1.2), 2.4, "uprv_fmax(2.4, 1.2) failed."); in TestPUtilAPI()
93doAssert(expn1, uprv_getNaN(), "uprv_fmax(uprv_getNaN(), 1.2) failed. when one parameter is NaN"); in TestPUtilAPI()
96 doAssert(uprv_fmin(2.4, 1.2), 1.2, "uprv_fmin(2.4, 1.2) failed."); in TestPUtilAPI()
100doAssert(expn1, uprv_getNaN(), "uprv_fmin(uprv_getNaN(), 1.2) failed. when one parameter is NaN"); in TestPUtilAPI()
103 doAssert(uprv_max(4, 2), 4, "uprv_max(4, 2) failed."); in TestPUtilAPI()
106 doAssert(uprv_min(-4, 2), -4, "uprv_min(-4, 2) failed."); in TestPUtilAPI()
109 doAssert(uprv_trunc(12.3456), 12, "uprv_trunc(12.3456) failed."); in TestPUtilAPI()
110 doAssert(uprv_trunc(12.234E2), 1223, "uprv_trunc(12.234E2) failed."); in TestPUtilAPI()
111doAssert(uprv_trunc(uprv_getNaN()), uprv_getNaN(), "uprv_trunc(uprv_getNaN()) failed. with paramet… in TestPUtilAPI()
112doAssert(uprv_trunc(uprv_getInfinity()), uprv_getInfinity(), "uprv_trunc(uprv_getInfinity()) faile… in TestPUtilAPI()
116 doAssert(uprv_pow10(4), 10000, "uprv_pow10(4) failed."); in TestPUtilAPI()
136 doAssert(FALSE, uprv_add32_overflow(INT32_MAX - 2, 1, &overflow_result), "should not overflow"); in TestPUtilAPI()
137 doAssert(INT32_MAX - 1, overflow_result, "should equal INT32_MAX - 1"); in TestPUtilAPI()
138 doAssert(FALSE, uprv_add32_overflow(INT32_MAX - 2, 2, &overflow_result), "should not overflow"); in TestPUtilAPI()
139 doAssert(INT32_MAX, overflow_result, "should equal exactly INT32_MAX"); in TestPUtilAPI()
140 doAssert(TRUE, uprv_add32_overflow(INT32_MAX - 2, 3, &overflow_result), "should overflow"); in TestPUtilAPI()
141 doAssert(FALSE, uprv_mul32_overflow(INT32_MAX / 5, 4, &overflow_result), "should not overflow"); in TestPUtilAPI()
142 doAssert(INT32_MAX / 5 * 4, overflow_result, "should equal INT32_MAX / 5 * 4"); in TestPUtilAPI()
143 doAssert(TRUE, uprv_mul32_overflow(INT32_MAX / 5, 6, &overflow_result), "should overflow"); in TestPUtilAPI()
145 doAssert(FALSE, uprv_add32_overflow(-3, -2, &overflow_result), "should not overflow"); in TestPUtilAPI()
146 doAssert(-5, overflow_result, "should equal -5"); in TestPUtilAPI()
150 doAssert(uprv_digitsAfterDecimal(value1), 3, "uprv_digitsAfterDecimal() failed."); in TestPUtilAPI()
151 doAssert(uprv_digitsAfterDecimal(1.2345E2), 2, "uprv_digitsAfterDecimal(1.2345E2) failed."); in TestPUtilAPI()
152 doAssert(uprv_digitsAfterDecimal(1.2345E-2), 6, "uprv_digitsAfterDecimal(1.2345E-2) failed."); in TestPUtilAPI()
153 doAssert(uprv_digitsAfterDecimal(1.2345E2), 2, "uprv_digitsAfterDecimal(1.2345E2) failed."); in TestPUtilAPI()
154doAssert(uprv_digitsAfterDecimal(-1.2345E-20), 24, "uprv_digitsAfterDecimal(1.2345E-20) failed."); in TestPUtilAPI()
155 doAssert(uprv_digitsAfterDecimal(1.2345E20), 0, "uprv_digitsAfterDecimal(1.2345E20) failed."); in TestPUtilAPI()
156 doAssert(uprv_digitsAfterDecimal(-0.021), 3, "uprv_digitsAfterDecimal(-0.021) failed."); in TestPUtilAPI()
157 doAssert(uprv_digitsAfterDecimal(23.0), 0, "uprv_digitsAfterDecimal(23.0) failed."); in TestPUtilAPI()
158doAssert(uprv_digitsAfterDecimal(0.022223333321), 9, "uprv_digitsAfterDecimal(0.022223333321) fail… in TestPUtilAPI()
450 static void doAssert(double got, double expect, const char *message) in doAssert() function