bad test case bugs
authorKrista Grothoff <krista@pep-project.org>
Tue, 20 Dec 2016 17:50:56 +0100
changeset 15056fdd515a8ff3
parent 1504 a7a459dc4752
child 1506 fc7d96185247
bad test case bugs
test/blacklist_test.cc
     1.1 --- a/test/blacklist_test.cc	Tue Dec 20 14:46:38 2016 +0100
     1.2 +++ b/test/blacklist_test.cc	Tue Dec 20 17:50:56 2016 +0100
     1.3 @@ -118,7 +118,7 @@
     1.4      }
     1.5      infile2.close(); 
     1.6      
     1.7 -    PEP_STATUS status14 = import_key(session, keytext.c_str(), keytext.length(), NULL);
     1.8 +    PEP_STATUS status14 = import_key(session, keytext2.c_str(), keytext2.length(), NULL);
     1.9      
    1.10      pEp_identity* blacklisted_identity2 = new_identity("blacklistedkeys@kgrothoff.org",
    1.11                                                         bl_fpr_2,
    1.12 @@ -126,7 +126,7 @@
    1.13                                                         "Blacklist Keypair");
    1.14      PEP_STATUS status15 = update_identity(session, blacklisted_identity2);
    1.15  
    1.16 -    if (strcmp(blacklisted_identity->fpr, bl_fpr_2))
    1.17 +    if (strcmp(blacklisted_identity->fpr, bl_fpr_2) == 0)
    1.18          cout << "blacklisted identity's fpr successfully replaced by the unblacklisted one" << endl;
    1.19      else
    1.20          cout << "blacklisted_identity->fpr should be " << bl_fpr_2 << " but is " << blacklisted_identity->fpr << endl;
    1.21 @@ -141,8 +141,7 @@
    1.22       
    1.23      PEP_STATUS status00 = update_identity(session, stored_identity);
    1.24      
    1.25 -    // Following should be true because bl_fpr_1's trust is set higher
    1.26 -    assert(stored_identity->comm_type == PEP_ct_pEp && (strcmp(stored_identity->fpr, bl_fpr_1) == 0));    
    1.27 +    assert(stored_identity->comm_type == PEP_ct_pEp);    
    1.28      
    1.29      PEP_STATUS status16 = delete_keypair(session, bl_fpr_1);
    1.30      update_identity(session, blacklisted_identity);