From: Ken Raeburn Date: Thu, 29 Apr 2004 22:47:28 +0000 (+0000) Subject: * debug.h (test): Macro renamed from "assert". X-Git-Tag: krb5-1.4-beta1~462 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3b41673de094ebcfa1fb69bd400e7d22b6000ac4;p=krb5.git * debug.h (test): Macro renamed from "assert". * krb5_decode_test.c, krb5_encode_test.c: Callers updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16283 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/asn.1/ChangeLog b/src/tests/asn.1/ChangeLog index 6bed2ccf6..5eab7a899 100644 --- a/src/tests/asn.1/ChangeLog +++ b/src/tests/asn.1/ChangeLog @@ -1,3 +1,8 @@ +2004-04-29 Ken Raeburn + + * debug.h (test): Macro renamed from "assert". + * krb5_decode_test.c, krb5_encode_test.c: Callers updated. + 2003-05-18 Tom Yu * krb5_decode_test.c (main): Add new test cases for sequence diff --git a/src/tests/asn.1/debug.h b/src/tests/asn.1/debug.h index d0f05de1d..0929962e7 100644 --- a/src/tests/asn.1/debug.h +++ b/src/tests/asn.1/debug.h @@ -12,7 +12,7 @@ #include -#define assert(pred,message)\ +#define test(pred,message)\ if(pred) printf("OK: ");\ else { printf("ERROR: "); error_count++; }\ printf(message); diff --git a/src/tests/asn.1/krb5_decode_test.c b/src/tests/asn.1/krb5_decode_test.c index c205232d9..0ff934354 100644 --- a/src/tests/asn.1/krb5_decode_test.c +++ b/src/tests/asn.1/krb5_decode_test.c @@ -48,7 +48,7 @@ int main(argc, argv) com_err("krb5_decode_test", retval, "while decoding %s", typestring);\ error_count++;\ }\ - assert(comparator(&ref,var),typestring);\ + test(comparator(&ref,var),typestring);\ printf("%s\n",description);\ krb5_free_data_contents(test_context, &code);\ cleanup(test_context, var); @@ -693,7 +693,7 @@ int main(argc, argv) } retval = decode_krb5_authdata(&code,&var); if(retval) com_err("decoding authorization_data",retval,""); - assert(ktest_equal_authorization_data(ref,var),"authorization_data\n") + test(ktest_equal_authorization_data(ref,var),"authorization_data\n") krb5_free_data_contents(test_context, &code); krb5_free_authdata(test_context, var); ktest_destroy_authorization_data(&ref); @@ -731,7 +731,7 @@ int main(argc, argv) } retval = decode_krb5_padata_sequence(&code,&var); if(retval) com_err("decoding padata_sequence",retval,""); - assert(ktest_equal_sequence_of_pa_data(ref,var),"pa_data\n"); + test(ktest_equal_sequence_of_pa_data(ref,var),"pa_data\n"); krb5_free_pa_data(test_context, var); krb5_free_data_contents(test_context, &code); ktest_destroy_pa_data_array(&ref); @@ -753,7 +753,7 @@ int main(argc, argv) } retval = decode_krb5_padata_sequence(&code,&var); if(retval) com_err("decoding padata_sequence (empty)",retval,""); - assert(ktest_equal_sequence_of_pa_data(ref,var),"pa_data (empty)\n"); + test(ktest_equal_sequence_of_pa_data(ref,var),"pa_data (empty)\n"); krb5_free_pa_data(test_context, var); krb5_free_data_contents(test_context, &code); ktest_destroy_pa_data_array(&ref); @@ -789,7 +789,7 @@ int main(argc, argv) if(retval){ com_err("krb5_decode_test", retval, "while decoding etype_info"); } - assert(ktest_equal_etype_info(ref,var),"etype_info\n"); + test(ktest_equal_etype_info(ref,var),"etype_info\n"); ktest_destroy_etype_info(var); ktest_destroy_etype_info_entry(ref[2]); ref[2] = 0; @@ -807,7 +807,7 @@ int main(argc, argv) com_err("krb5_decode_test", retval, "while decoding etype_info (only one)"); } - assert(ktest_equal_etype_info(ref,var),"etype_info (only one)\n"); + test(ktest_equal_etype_info(ref,var),"etype_info (only one)\n"); ktest_destroy_etype_info(var); ktest_destroy_etype_info_entry(ref[0]); ref[0] = 0; @@ -824,7 +824,7 @@ int main(argc, argv) com_err("krb5_decode_test", retval, "while decoding etype_info (no info)"); } - assert(ktest_equal_etype_info(ref,var),"etype_info (no info)\n"); + test(ktest_equal_etype_info(ref,var),"etype_info (no info)\n"); krb5_free_data_contents(test_context, &code); ktest_destroy_etype_info(var); diff --git a/src/tests/asn.1/krb5_encode_test.c b/src/tests/asn.1/krb5_encode_test.c index 284d31b77..a6f869492 100644 --- a/src/tests/asn.1/krb5_encode_test.c +++ b/src/tests/asn.1/krb5_encode_test.c @@ -212,7 +212,7 @@ main(argc, argv) setup(kdcr,kdc_rep,"kdc_rep",ktest_make_sample_kdc_rep); /* kdcr.msg_type = KRB5_TGS_REP; - assert(encode_krb5_as_rep(&kdcr,&code) == KRB5_BADMSGTYPE, + test(encode_krb5_as_rep(&kdcr,&code) == KRB5_BADMSGTYPE, "encode_krb5_as_rep type check\n"); ktest_destroy_data(&code);*/ @@ -233,7 +233,7 @@ main(argc, argv) setup(kdcr,kdc_rep,"kdc_rep",ktest_make_sample_kdc_rep); /* kdcr.msg_type = KRB5_AS_REP; - assert(encode_krb5_tgs_rep(&kdcr,&code) == KRB5_BADMSGTYPE, + test(encode_krb5_tgs_rep(&kdcr,&code) == KRB5_BADMSGTYPE, "encode_krb5_tgs_rep type check\n");*/ kdcr.msg_type = KRB5_TGS_REP;