2003-05-27 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Tue, 27 May 2003 03:06:37 +0000 (03:06 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Tue, 27 May 2003 03:06:37 +0000 (03:06 +0000)
* t-data.c: Remove TEST_OUT_CB.
(main): Likewise.
* gpg/t-trustlist.c (main): Access ITEM directly.

trunk/tests/ChangeLog
trunk/tests/gpg/t-trustlist.c
trunk/tests/t-data.c

index 9848d36f3842c350561fffe7bc8017007e065f49..f31112a7f918c38c8520b4b99f578cffc1ad1ca3 100644 (file)
@@ -1,5 +1,9 @@
 2003-05-27  Marcus Brinkmann  <marcus@g10code.de>
 
+       * t-data.c: Remove TEST_OUT_CB.
+       (main): Likewise.
+       * gpg/t-trustlist.c (main): Access ITEM directly.
+
        * (t-decrypt-verify.c, t-decrypt.c, t-edit.c, t-encrypt-sign.c,
        t-encrypt-sym.c, t-sign.c, t-signers.c): Include <unistd.h>.
        (passphrase_cb): Rewritten.
index cc4bbf3d609d2abe17492f2a276086ca056935c7..d7c6bc8c569111740b17ab4eff0363f3cfe28228 100644 (file)
@@ -54,13 +54,9 @@ main (int argc, char *argv[])
   while (!(err = gpgme_op_trustlist_next (ctx, &item)))
     {
       printf ("l=%d k=%s t=%d o=%s v=%s u=%s\n",
-             gpgme_trust_item_get_int_attr (item, GPGME_ATTR_LEVEL, NULL, 0),
-             gpgme_trust_item_get_string_attr (item, GPGME_ATTR_KEYID, NULL, 0),
-             gpgme_trust_item_get_int_attr (item, GPGME_ATTR_TYPE, NULL, 0),
-             gpgme_trust_item_get_string_attr (item, GPGME_ATTR_OTRUST, NULL, 0),
-             gpgme_trust_item_get_string_attr (item, GPGME_ATTR_VALIDITY, NULL, 0),
-             gpgme_trust_item_get_string_attr (item, GPGME_ATTR_USERID, NULL, 0));
-      gpgme_trust_item_release (item);
+             item->level, item->keyid, item->type, item->owner_trust,
+             item->validity, item->name);
+      gpgme_trust_item_unref (item);
     }
   if (err != GPGME_EOF)
     fail_if_err (err);
index d23559651bc21906e99038b7819e848bde34e4fa..46c553dbadc4f1b10d37ec08e6a4e8633d1df8be 100644 (file)
@@ -67,7 +67,6 @@ typedef enum
     TEST_INOUT_MEM_FROM_FILE_PART_BY_NAME,
     TEST_INOUT_MEM_FROM_INEXISTANT_FILE_PART,
     TEST_INOUT_MEM_FROM_FILE_PART_BY_FP,
-    TEST_OUT_CB,
     TEST_END
   } round_t;
 
@@ -262,9 +261,6 @@ main (int argc, char **argv)
                                                strlen (text), strlen (text));
          }
          break;
-       case TEST_OUT_CB:
-         err = gpgme_data_new_with_read_cb (&data, read_cb, &round);
-         break;
        case TEST_END:
          return 0;
        case TEST_INITIALIZER:
@@ -275,8 +271,7 @@ main (int argc, char **argv)
       fail_if_err (err);
 
       read_test (round, data);
-      if (round != TEST_OUT_CB)
-       write_test (round, data);
+      write_test (round, data);
       gpgme_data_release (data);
     }
   return 0;