* debug.h (test): Macro renamed from "assert".
authorKen Raeburn <raeburn@mit.edu>
Thu, 29 Apr 2004 22:47:28 +0000 (22:47 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 29 Apr 2004 22:47:28 +0000 (22:47 +0000)
* 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

src/tests/asn.1/ChangeLog
src/tests/asn.1/debug.h
src/tests/asn.1/krb5_decode_test.c
src/tests/asn.1/krb5_encode_test.c

index 6bed2ccf6670e435cee1b434c3373795c06537ce..5eab7a8996a2e855a2ca6b6e0f4ed27067a8d5f9 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * debug.h (test): Macro renamed from "assert".
+       * krb5_decode_test.c, krb5_encode_test.c: Callers updated.
+
 2003-05-18  Tom Yu  <tlyu@mit.edu>
 
        * krb5_decode_test.c (main): Add new test cases for sequence
index d0f05de1d5811bbe59e424b8614fbc80aea91876..0929962e715510eb1457380bb2a2868b36d0dea8 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <stdio.h>
 
-#define assert(pred,message)\
+#define test(pred,message)\
   if(pred) printf("OK: ");\
   else { printf("ERROR: "); error_count++; }\
   printf(message);
index c205232d9a27966d13d3697db5f442a2b335eff2..0ff934354f2519162cfb150c3e8a2918a6f22dd9 100644 (file)
@@ -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);
index 284d31b7730c561bfa80df1eab93b62984319ca5..a6f8694923b0dd7881c7f15f4c05f56906808441 100644 (file)
@@ -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;