adapting tests to rating instead of color keysync
authorVolker Birk <vb@pep.foundation>
Fri, 12 Aug 2016 14:28:27 +0200
branchkeysync
changeset 10060dc1800f8b2d
parent 1004 9828752c0751
child 1007 f322a5b6bd26
adapting tests to rating instead of color
test/encrypt_for_identity_test.cc
test/message_api_test.cc
     1.1 --- a/test/encrypt_for_identity_test.cc	Thu Aug 11 21:48:26 2016 +0200
     1.2 +++ b/test/encrypt_for_identity_test.cc	Fri Aug 12 14:28:27 2016 +0200
     1.3 @@ -74,14 +74,14 @@
     1.4      message* decrypted_msg = nullptr;
     1.5      stringlist_t* keylist_used = nullptr;
     1.6  
     1.7 -    PEP_color color;
     1.8 +    PEP_rating rating;
     1.9      PEP_decrypt_flags_t flags;
    1.10  
    1.11 -    status = decrypt_message(session, encrypted_msg, &decrypted_msg, &keylist_used, &color, &flags);
    1.12 +    status = decrypt_message(session, encrypted_msg, &decrypted_msg, &keylist_used, &rating, &flags);
    1.13      assert(status == PEP_STATUS_OK);
    1.14      assert(decrypted_msg);
    1.15      assert(keylist_used);
    1.16 -    assert(color);
    1.17 +    assert(rating);
    1.18      PEP_comm_type ct = encrypted_msg->from->comm_type;
    1.19      assert(ct == PEP_ct_pEp || ct == PEP_ct_pEp_unconfirmed || ct == PEP_ct_OpenPGP || ct == PEP_ct_OpenPGP_unconfirmed );
    1.20  
     2.1 --- a/test/message_api_test.cc	Thu Aug 11 21:48:26 2016 +0200
     2.2 +++ b/test/message_api_test.cc	Fri Aug 12 14:28:27 2016 +0200
     2.3 @@ -75,14 +75,14 @@
     2.4  
     2.5      message *msg4 = nullptr;
     2.6      stringlist_t *keylist4 = nullptr;
     2.7 -    PEP_color color;
     2.8 +    PEP_rating rating;
     2.9      PEP_decrypt_flags_t flags;
    2.10      
    2.11 -    PEP_STATUS status4 = decrypt_message(session, enc_msg2, &msg4, &keylist4, &color, &flags);
    2.12 +    PEP_STATUS status4 = decrypt_message(session, enc_msg2, &msg4, &keylist4, &rating, &flags);
    2.13      assert(status4 == PEP_STATUS_OK);
    2.14      assert(msg4);
    2.15      assert(keylist4);
    2.16 -    assert(color);
    2.17 +    assert(rating);
    2.18      PEP_comm_type ct = enc_msg2->from->comm_type;
    2.19      assert(ct == PEP_ct_pEp || ct == PEP_ct_pEp_unconfirmed || ct == PEP_ct_OpenPGP || ct == PEP_ct_OpenPGP_unconfirmed );
    2.20  
    2.21 @@ -119,14 +119,14 @@
    2.22  
    2.23      message *msg6 = nullptr;
    2.24      stringlist_t *keylist5 = nullptr;
    2.25 -    PEP_color color2;
    2.26 +    PEP_rating rating2;
    2.27      PEP_decrypt_flags_t flags2;
    2.28 -    PEP_STATUS status6 = decrypt_message(session, msg5, &msg6, &keylist5, &color2, &flags2);
    2.29 +    PEP_STATUS status6 = decrypt_message(session, msg5, &msg6, &keylist5, &rating2, &flags2);
    2.30      assert(status6 == PEP_DECRYPT_NO_KEY);
    2.31      assert(msg6 == NULL);
    2.32      assert(keylist5 == NULL);
    2.33 -    assert(color2 == PEP_rating_have_no_key);
    2.34 -    cout << "color :" << color2 << "\n";
    2.35 +    assert(rating2 == PEP_rating_have_no_key);
    2.36 +    cout << "rating :" << rating2 << "\n";
    2.37      free_stringlist(keylist5);
    2.38  
    2.39      cout << "freeing messages…\n";