Lines Matching refs:td

115     struct testdata *td = &tbl[idx];
118 atime.data = (unsigned char*)td->data;
120 atime.type = td->type;
123 if (!TEST_int_eq(ASN1_TIME_check(&atime), td->check_result)) {
127 if (td->check_result == 0)
130 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(&atime, td->t), 0)) {
131 TEST_info("ASN1_TIME_cmp_time_t(%s vs %ld) compare failed", atime.data, (long)td->t);
147 } else if (!((td->cmp_result == 0 && TEST_true((day == 0 && sec == 0))) ||
148 (td->cmp_result == -1 && TEST_true((day < 0 || sec < 0))) ||
149 (td->cmp_result == 1 && TEST_true((day > 0 || sec > 0))))) {
154 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(&atime, gtime_t), td->cmp_result)) {
159 ptime = ASN1_TIME_set(NULL, td->t);
161 TEST_info("ASN1_TIME_set(%ld) failed", (long)td->t);
165 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(ptime, td->t), 0)) {
167 (long)td->t, td->data, ptime->data);
170 if (!TEST_int_eq(ptime->type, td->expected_type)) {
171 TEST_info("ASN1_TIME_set(%ld) unexpected type", (long)td->t);
185 if (!TEST_int_eq(ASN1_TIME_set_string(ptime, td->data), td->check_result)) {
186 TEST_info("ASN1_TIME_set_string_gmt(%s) failed", td->data);
189 if (!TEST_int_eq(ASN1_TIME_normalize(ptime), td->check_result)) {
190 TEST_info("ASN1_TIME_normalize(%s) failed", td->data);
193 if (!TEST_int_eq(ptime->type, td->expected_type)) {
194 TEST_info("ASN1_TIME_set_string_gmt(%s) unexpected type", td->data);
199 TEST_info("ASN1_TIME_diff(day=%d, sec=%d, %s) after ASN1_TIME_set_string_gmt() failed", day, sec, td->data);
202 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(ptime, gtime_t), td->cmp_result)) {
203 TEST_info("ASN1_TIME_cmp_time_t(%s) after ASN1_TIME_set_string_gnt() to baseline bad comparison", td->data);
217 if (!TEST_int_eq(ASN1_TIME_set_string(ptime, td->data), td->check_result)) {
218 TEST_info("ASN1_TIME_set_string(%s) failed", td->data);
223 TEST_info("ASN1_TIME_diff(day=%d, sec=%d, %s) after ASN1_TIME_set_string() failed", day, sec, td->data);
226 if (!TEST_int_eq(ASN1_TIME_cmp_time_t(ptime, gtime_t), td->cmp_result)) {
227 TEST_info("ASN1_TIME_cmp_time_t(%s) after ASN1_TIME_set_string() to baseline bad comparison", td->data);
235 if (td->type == V_ASN1_UTCTIME) {
237 if (td->convert_result == 1 && !TEST_ptr(ptime)) {
240 } else if (td->convert_result == 0 && !TEST_ptr_null(ptime)) {
244 if (ptime != NULL && !TEST_int_eq(ASN1_TIME_cmp_time_t(ptime, td->t), 0)) {
318 struct compare_testdata *td = &tbl_compare_testdata[idx];
320 return TEST_int_eq(ASN1_TIME_compare(&td->t1, &td->t2), td->result);