more fixes for compilation fun googletest
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 27 Aug 2019 11:04:53 +0200
branchgoogletest
changeset 40197dc58e7bdee6
parent 4016 9884f49e0f1f
child 4020 b35a96178dfd
more fixes for compilation fun
test/Makefile
test/src/BloblistTest.cc
test/src/CheckRenewedExpiredKeyTrustStatusTest.cc
test/src/CrashdumpTest.cc
test/src/DecryptAttachPrivateKeyUntrustedTest.cc
test/src/DeleteKeyTest.cc
test/src/EncryptForIdentityTest.cc
test/src/HeaderKeyImportTest.cc
test/src/I18nTest.cc
test/src/IdentityListTest.cc
test/src/KeyAttachmentTest.cc
test/src/KeyResetMessageTest.cc
test/src/LookupTest.cc
test/src/MimeTest.cc
test/src/StringlistTest.cc
test/src/VerifyTest.cc
     1.1 --- a/test/Makefile	Mon Aug 26 21:00:57 2019 +0200
     1.2 +++ b/test/Makefile	Tue Aug 27 11:04:53 2019 +0200
     1.3 @@ -7,7 +7,7 @@
     1.4  
     1.5  include ../Makefile.conf
     1.6  
     1.7 -GTEST_DIR:=googletest/googletest
     1.8 +GTEST_DIR:=googletest
     1.9  SRCS:=$(wildcard src/*.cc) $(wildcard src/*/*.cc)
    1.10  OBJS:=$(addsuffix .o,$(basename $(SRCS)))
    1.11  DEPS:=$(OBJS:.o=.d)
     2.1 --- a/test/src/BloblistTest.cc	Mon Aug 26 21:00:57 2019 +0200
     2.2 +++ b/test/src/BloblistTest.cc	Tue Aug 27 11:04:53 2019 +0200
     2.3 @@ -66,12 +66,12 @@
     2.4      cout << "duping one-element bloblist...\n";
     2.5  
     2.6      bloblist_t* new_bl = bloblist_dup(bl1);
     2.7 -    ASSERT_NE((new_bl), nullptr);
     2.8 -    ASSERT_TRUE((test_bloblist_node_equals(bl1, new_bl)), "test_bloblist_node_equals(bl1);
     2.9 -    ASSERT_EQ((new_bl->next , NULL));
    2.10 -    ASSERT_NE((bl1->value , new_bl->value));
    2.11 -    ASSERT_NE((bl1->mime_type , new_bl->mime_type || !(bl1->mime_type || new_bl->mime_type)));
    2.12 -    ASSERT_NE((bl1->filename , new_bl->filename || !(bl1->filename || new_bl->filename)));
    2.13 +    ASSERT_NE(new_bl, nullptr);
    2.14 +    ASSERT_TRUE(test_bloblist_node_equals(bl1, new_bl));
    2.15 +    ASSERT_EQ(new_bl->next , nullptr);
    2.16 +    ASSERT_NE(bl1->value , new_bl->value);
    2.17 +    ASSERT_TRUE(bl1->mime_type != new_bl->mime_type || !(bl1->mime_type || new_bl->mime_type));
    2.18 +    ASSERT_TRUE(bl1->filename != new_bl->filename || !(bl1->filename || new_bl->filename));
    2.19      cout << "one-element bloblist duplicated.\n\n";
    2.20  
    2.21      cout << "freeing bloblist...\n";
    2.22 @@ -92,16 +92,16 @@
    2.23      p = new_bl;
    2.24  
    2.25      for (i = 0; i < 4; i++) {
    2.26 -        ASSERT_NE((p), nullptr);
    2.27 +        ASSERT_NE(p, nullptr);
    2.28  
    2.29 -        ASSERT_TRUE((test_bloblist_node_equals(p, bl_arr[i])), "test_bloblist_node_equals(p);
    2.30 -        ASSERT_NE((p->value , bl_arr[i]->value));
    2.31 -        ASSERT_NE((p->mime_type , bl_arr[i]->mime_type || !(p->mime_type || bl_arr[i]->mime_type)));
    2.32 -        ASSERT_NE((p->filename , bl_arr[i]->filename || !(p->filename || bl_arr[i]->filename)));
    2.33 +        ASSERT_TRUE(test_bloblist_node_equals(p, bl_arr[i]));
    2.34 +        ASSERT_TRUE(p->value != bl_arr[i]->value);
    2.35 +        ASSERT_TRUE(p->mime_type != bl_arr[i]->mime_type || !(p->mime_type || bl_arr[i]->mime_type));
    2.36 +        ASSERT_TRUE(p->filename != bl_arr[i]->filename || !(p->filename || bl_arr[i]->filename));
    2.37  
    2.38          p = p->next;
    2.39      }
    2.40 -    ASSERT_EQ((p , NULL));
    2.41 +    ASSERT_EQ(p , nullptr);
    2.42  
    2.43      cout << "\nduplicating four-element list...\n\n";
    2.44      bloblist_t* duplist = bloblist_dup(new_bl);
    2.45 @@ -110,15 +110,15 @@
    2.46      bloblist_t* dup_p = duplist;
    2.47  
    2.48      while (dup_p) {
    2.49 -        ASSERT_TRUE((test_bloblist_node_equals(p, dup_p)), "test_bloblist_node_equals(p);
    2.50 -        ASSERT_NE((p , dup_p));
    2.51 -        ASSERT_NE((p->value , dup_p->value));
    2.52 -        ASSERT_NE((p->mime_type , dup_p->mime_type || !(p->mime_type || dup_p->mime_type)));
    2.53 -        ASSERT_NE((p->filename , dup_p->filename || !(p->filename || dup_p->filename)));
    2.54 +        ASSERT_TRUE(test_bloblist_node_equals(p, dup_p));
    2.55 +        ASSERT_NE(p , dup_p);
    2.56 +        ASSERT_TRUE(p->value != dup_p->value);
    2.57 +        ASSERT_TRUE(p->mime_type != dup_p->mime_type || !(p->mime_type || dup_p->mime_type));
    2.58 +        ASSERT_TRUE(p->filename != dup_p->filename || !(p->filename || dup_p->filename));
    2.59  
    2.60          dup_p = dup_p->next;
    2.61          p = p->next;
    2.62 -        ASSERT_EQ(((p == NULL) == (dup_p , NULL)));
    2.63 +        ASSERT_TRUE((p == NULL) == (dup_p == NULL));
    2.64      }
    2.65      cout << "\nfour-element bloblist successfully duplicated.\n\n";
    2.66  
     3.1 --- a/test/src/CheckRenewedExpiredKeyTrustStatusTest.cc	Mon Aug 26 21:00:57 2019 +0200
     3.2 +++ b/test/src/CheckRenewedExpiredKeyTrustStatusTest.cc	Tue Aug 27 11:04:53 2019 +0200
     3.3 @@ -240,7 +240,7 @@
     3.4      bool pEp_user = false;
     3.5      status = is_pEp_user(session, expired_inquisitor, &pEp_user);
     3.6      ASSERT_EQ(status, PEP_STATUS_OK);
     3.7 -    ASSERT_NE(pEp_user, nullptr);
     3.8 +    ASSERT_TRUE(pEp_user);
     3.9  
    3.10      // Ok, so I want to make sure we make an entry, so I'll try to decrypt the message WITH
    3.11      // the expired key:
    3.12 @@ -307,7 +307,7 @@
    3.13      bool pEp_user = false;
    3.14      status = is_pEp_user(session, expired_inquisitor, &pEp_user);
    3.15      ASSERT_EQ(status , PEP_STATUS_OK);
    3.16 -    ASSERT_NE(pEp_user, nullptr);
    3.17 +    ASSERT_TRUE(pEp_user);
    3.18  
    3.19      // Ok, now update_identity - we'll discover it's expired
    3.20      status = update_identity(session, expired_inquisitor);
     4.1 --- a/test/src/CrashdumpTest.cc	Mon Aug 26 21:00:57 2019 +0200
     4.2 +++ b/test/src/CrashdumpTest.cc	Tue Aug 27 11:04:53 2019 +0200
     4.3 @@ -10,7 +10,7 @@
     4.4  
     4.5  
     4.6  #include "Engine.h"
     4.7 -
     4.8 +#include "test_util.h"
     4.9  #include <gtest/gtest.h>
    4.10  
    4.11  
     5.1 --- a/test/src/DecryptAttachPrivateKeyUntrustedTest.cc	Mon Aug 26 21:00:57 2019 +0200
     5.2 +++ b/test/src/DecryptAttachPrivateKeyUntrustedTest.cc	Tue Aug 27 11:04:53 2019 +0200
     5.3 @@ -136,14 +136,14 @@
     5.4      status = set_own_key(session, main_me, fpr_main_me);
     5.5      ASSERT_EQ(status, PEP_STATUS_OK);
     5.6  
     5.7 -    ASSERT_EQ((strcmp(main_me->fpr, fpr_main_me), 0), "strcmp(main_me->fpr);
     5.8 +    ASSERT_STREQ(main_me->fpr, fpr_main_me);
     5.9      cout << "Done!" << endl << endl;
    5.10  
    5.11      cout << "Setting up sender identities and resetting key trust." << endl;
    5.12      cout << "Same address, same user_id - address: " << main_addr << ", user_id: " << own_uid << ", fpr: " << fpr_same_addr_same_uid << endl;
    5.13      same_addr_same_uid = new_identity(main_addr, fpr_same_addr_same_uid, own_uid, "PrivateKey Import Test");
    5.14      ASSERT_EQ(status == PEP_STATUS_OK || status, PEP_CANNOT_FIND_IDENTITY);
    5.15 -    ASSERT_NE(((same_addr_same_uid->comm_type & PEP_ct_confirmed) , PEP_ct_confirmed));
    5.16 +    ASSERT_NE(same_addr_same_uid->comm_type & PEP_ct_confirmed, PEP_ct_confirmed);
    5.17  
    5.18      status = key_reset_trust(session, same_addr_same_uid);
    5.19  
     6.1 --- a/test/src/DeleteKeyTest.cc	Mon Aug 26 21:00:57 2019 +0200
     6.2 +++ b/test/src/DeleteKeyTest.cc	Tue Aug 27 11:04:53 2019 +0200
     6.3 @@ -10,19 +10,11 @@
     6.4  #include "test_util.h"
     6.5  
     6.6  
     6.7 -
     6.8 -const string DeleteKeyTests::alice_user_id = PEP_OWN_USERID;
     6.9 -const string DeleteKeyTests::bob_user_id = "BobId";
    6.10 -const string DeleteKeyTests::carol_user_id = "carolId";
    6.11 -const string DeleteKeyTests::dave_user_id = "DaveId";
    6.12 -const string DeleteKeyTests::erin_user_id = "ErinErinErin";
    6.13 -const string DeleteKeyTests::fenris_user_id = "BadWolf";
    6.14 -
    6.15 -
    6.16  #include "Engine.h"
    6.17  
    6.18  #include <gtest/gtest.h>
    6.19  
    6.20 +using namespace std;
    6.21  
    6.22  namespace {
    6.23  
    6.24 @@ -32,6 +24,20 @@
    6.25              Engine* engine;
    6.26              PEP_SESSION session;
    6.27  
    6.28 +            const char* alice_fpr = "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97";
    6.29 +            const char* bob_fpr = "BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39";
    6.30 +            const char* carol_fpr = "8DD4F5827B45839E9ACCA94687BDDFFB42A85A42";
    6.31 +            const char* dave_fpr = "E8AC9779A2D13A15D8D55C84B049F489BB5BCCF6";
    6.32 +            const char* erin_fpr = "1B0E197E8AE66277B8A024B9AEA69F509F8D7CBA";
    6.33 +            const char* fenris_fpr = "0969FA229DF21C832A64A04711B1B9804F3D2900";
    6.34 +
    6.35 +            const string alice_user_id = PEP_OWN_USERID;
    6.36 +            const string bob_user_id = "BobId";
    6.37 +            const string carol_user_id = "carolId";
    6.38 +            const string dave_user_id = "DaveId";
    6.39 +            const string erin_user_id = "ErinErinErin";
    6.40 +            const string fenris_user_id = "BadWolf";
    6.41 +
    6.42          protected:
    6.43              // You can remove any or all of the following functions if its body
    6.44              // is empty.
     7.1 --- a/test/src/EncryptForIdentityTest.cc	Mon Aug 26 21:00:57 2019 +0200
     7.2 +++ b/test/src/EncryptForIdentityTest.cc	Tue Aug 27 11:04:53 2019 +0200
     7.3 @@ -189,11 +189,11 @@
     7.4      for (stringlist_t* kl4 = keylist_used; kl4 && kl4->value; kl4 = kl4->next, i++)
     7.5      {
     7.6          if (i == 0) {
     7.7 -            ASSERT_EQ((strcasecmp("",kl4->value), 0), "strcasecmp(\"\");
     7.8 +            ASSERT_STRCASEEQ("",kl4->value);
     7.9          }
    7.10          else {
    7.11              cout << "\t " << kl4->value << endl;
    7.12 -            ASSERT_EQ((strcasecmp("4ABE3AAF59AC32CFE4F86500A9411D176FF00E97", kl4->value), 0), "strcasecmp(\"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97\");
    7.13 +            ASSERT_STRCASEEQ("4ABE3AAF59AC32CFE4F86500A9411D176FF00E97", kl4->value);
    7.14              cout << "Encrypted for Alice! Yay! It worked!" << endl;
    7.15          }
    7.16          ASSERT_LT(i , 2);
     8.1 --- a/test/src/HeaderKeyImportTest.cc	Mon Aug 26 21:00:57 2019 +0200
     8.2 +++ b/test/src/HeaderKeyImportTest.cc	Tue Aug 27 11:04:53 2019 +0200
     8.3 @@ -125,7 +125,7 @@
     8.4  }
     8.5  
     8.6  TEST_F(HeaderKeyImportTest, base_64_minimal_padded_2) {
     8.7 -    ASSERT_EQ(verify_base_64_test("TQ, ", "M"));
     8.8 +    ASSERT_TRUE(verify_base_64_test("TQ==", "M"));
     8.9  }
    8.10  
    8.11  TEST_F(HeaderKeyImportTest, base_64_minimal_unpadded_1) {
    8.12 @@ -145,7 +145,7 @@
    8.13  }
    8.14  
    8.15  TEST_F(HeaderKeyImportTest, base_64_minimal_leading_whitespace_padded_2) {
    8.16 -    ASSERT_EQ(verify_base_64_test("\nTQ, ", "M"));
    8.17 +    ASSERT_TRUE(verify_base_64_test("\nTQ==", "M"));
    8.18  }
    8.19  
    8.20  TEST_F(HeaderKeyImportTest, base_64_minimal_leading_whitespace_unpadded_1) {
    8.21 @@ -164,7 +164,7 @@
    8.22  }
    8.23  
    8.24  TEST_F(HeaderKeyImportTest, base_64_minimal_trailing_whitespace_padded_2) {
    8.25 -    ASSERT_EQ(verify_base_64_test("TQ, \n \t", "M"));
    8.26 +    ASSERT_TRUE(verify_base_64_test("TQ==                 \n \t", "M"));
    8.27  }
    8.28  
    8.29  TEST_F(HeaderKeyImportTest, base_64_minimal_trailing_whitespace_unpadded_1) {
    8.30 @@ -184,7 +184,7 @@
    8.31  }
    8.32  
    8.33  TEST_F(HeaderKeyImportTest, base_64_minimal_internal_whitespace_padded_2) {
    8.34 -    ASSERT_EQ(verify_base_64_test("T  Q, ", "M"));
    8.35 +    ASSERT_TRUE(verify_base_64_test("T  Q==", "M"));
    8.36  }
    8.37  
    8.38  TEST_F(HeaderKeyImportTest, base_64_minimal_internal_whitespace_unpadded_1) {
     9.1 --- a/test/src/I18nTest.cc	Mon Aug 26 21:00:57 2019 +0200
     9.2 +++ b/test/src/I18nTest.cc	Tue Aug 27 11:04:53 2019 +0200
     9.3 @@ -8,7 +8,7 @@
     9.4  
     9.5  #include "pEpEngine.h"
     9.6  
     9.7 -
     9.8 +#include "test_util.h"
     9.9  
    9.10  #include "Engine.h"
    9.11  
    10.1 --- a/test/src/IdentityListTest.cc	Mon Aug 26 21:00:57 2019 +0200
    10.2 +++ b/test/src/IdentityListTest.cc	Tue Aug 27 11:04:53 2019 +0200
    10.3 @@ -25,14 +25,14 @@
    10.4      class IdentityListTest : public ::testing::Test {
    10.5          protected:    
    10.6              int test_identity_equals(pEp_identity* val1, pEp_identity* val2) {
    10.7 -                ASSERT_NE(val1, nullptr);
    10.8 -                ASSERT_NE(val2, nullptr);
    10.9 -                ASSERT_NE(val1->address, nullptr);
   10.10 -                ASSERT_NE(val2->address, nullptr);
   10.11 -                ASSERT_NE(val1->fpr, nullptr);
   10.12 -                ASSERT_NE(val2->fpr, nullptr);
   10.13 -                ASSERT_NE(val1->username, nullptr);
   10.14 -                ASSERT_NE(val2->username, nullptr);
   10.15 +                assert(val1 != nullptr);
   10.16 +                assert(val2 != nullptr);
   10.17 +                assert(val1->address != nullptr);
   10.18 +                assert(val2->address != nullptr);
   10.19 +                assert(val1->fpr != nullptr);
   10.20 +                assert(val2->fpr != nullptr);
   10.21 +                assert(val1->username != nullptr);
   10.22 +                assert(val2->username != nullptr);
   10.23                  return((strcmp(val1->address, val2->address) == 0) && (strcmp(val1->fpr, val2->fpr) == 0)
   10.24                      && (strcmp(val1->username, val2->username) == 0) && (val1->comm_type == val2->comm_type)
   10.25                      && (val1->lang[0] == val2->lang[0]) && (val1->lang[1] == val2->lang[1])
   10.26 @@ -91,7 +91,7 @@
   10.27      identity_list* idlist = new_identity_list(new_id);
   10.28      ASSERT_NE(idlist->ident, nullptr);
   10.29      ASSERT_TRUE(test_identity_equals(id1, idlist->ident));
   10.30 -    ASSERT_EQ(idlist->next , NULL);
   10.31 +    ASSERT_EQ(idlist->next, nullptr);
   10.32      cout << "one-element identity_list created, next element is NULL\n\n";
   10.33  
   10.34      cout << "duplicating one-element list...\n";
   10.35 @@ -99,7 +99,7 @@
   10.36      pEp_identity* srcid = idlist->ident;
   10.37      pEp_identity* dstid = duplist->ident;
   10.38      ASSERT_NE(dstid, nullptr);
   10.39 -    ASSERT_TRUE(test_identity_equals(srcid, dstid), "test_identity_equals(srcid);
   10.40 +    ASSERT_TRUE(test_identity_equals(srcid, dstid));
   10.41      ASSERT_NE(srcid->address, dstid->address);   // test deep copies
   10.42      ASSERT_NE(srcid->fpr, dstid->fpr);
   10.43      ASSERT_NE(srcid->username, dstid->username);
   10.44 @@ -136,7 +136,7 @@
   10.45  
   10.46          p = p->next;
   10.47      }
   10.48 -    ASSERT_EQ(p , NULL);
   10.49 +    ASSERT_EQ(p , nullptr);
   10.50  
   10.51      cout << "\nduplicating four-element list...\n\n";
   10.52      duplist = identity_list_dup(idlist);
    11.1 --- a/test/src/KeyAttachmentTest.cc	Mon Aug 26 21:00:57 2019 +0200
    11.2 +++ b/test/src/KeyAttachmentTest.cc	Tue Aug 27 11:04:53 2019 +0200
    11.3 @@ -65,6 +65,11 @@
    11.4                  session = engine->session;
    11.5  
    11.6                  // Engine is up. Keep on truckin'
    11.7 +                ASSERT_TRUE(slurp_and_import_key(session, "test_keys/pub/inquisitor-0xA4728718_renewed_pub.asc"));
    11.8 +                ASSERT_TRUE(slurp_and_import_key(session, "test_keys/priv/inquisitor-0xA4728718_renewed_priv.asc"));
    11.9 +                // accidentally encrypted the encrypted attachment to alice - this really doesn't matter here tbh
   11.10 +                ASSERT_TRUE(slurp_and_import_key(session, "test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc"));
   11.11 +                ASSERT_TRUE(slurp_and_import_key(session, "test_keys/priv/pep-test-alice-0x6FF00E97_priv.asc"));                
   11.12              }
   11.13  
   11.14              void TearDown() override {
   11.15 @@ -87,15 +92,6 @@
   11.16  }  // namespace
   11.17  
   11.18  
   11.19 -void KeyAttachmentTests::setup() {
   11.20 -    EngineTestIndividualSuite::setup();
   11.21 -    assert(slurp_and_import_key(session, "test_keys/pub/inquisitor-0xA4728718_renewed_pub.asc"));
   11.22 -    assert(slurp_and_import_key(session, "test_keys/priv/inquisitor-0xA4728718_renewed_priv.asc"));
   11.23 -    // accidentally encrypted the encrypted attachment to alice - this really doesn't matter here tbh
   11.24 -    assert(slurp_and_import_key(session, "test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc"));
   11.25 -    assert(slurp_and_import_key(session, "test_keys/priv/pep-test-alice-0x6FF00E97_priv.asc"));
   11.26 -}
   11.27 -
   11.28  TEST_F(KeyAttachmentTest, check_key_attach_inline) {
   11.29      string msg = slurp("test_mails/Inline PGP test.eml");
   11.30      message* enc_msg = NULL;
   11.31 @@ -336,12 +332,8 @@
   11.32          ASSERT_NE(curr_att->filename, nullptr);
   11.33          ASSERT_NE(curr_att->mime_type, nullptr);
   11.34          cout << (*it).first << endl;
   11.35 -        TEST_ASSERT_MSG(strcmp(curr_att->filename,
   11.36 -                               (*it).first.c_str()) == 0,
   11.37 -                        curr_att->filename);
   11.38 -        TEST_ASSERT_MSG(strcmp(curr_att->mime_type,
   11.39 -                                (*it).second.c_str()) == 0,
   11.40 -                        curr_att->mime_type);
   11.41 +        ASSERT_STREQ(curr_att->filename, (*it).first.c_str());
   11.42 +        ASSERT_STREQ(curr_att->mime_type, (*it).second.c_str());
   11.43          it++;
   11.44          curr_att = curr_att->next;
   11.45      }
   11.46 @@ -580,12 +572,8 @@
   11.47          ASSERT_NE(curr_att, nullptr);
   11.48          ASSERT_NE(curr_att->filename, nullptr);
   11.49          ASSERT_NE(curr_att->mime_type, nullptr);
   11.50 -        TEST_ASSERT_MSG(strcmp(curr_att->filename,
   11.51 -                               (*it).first.c_str()) == 0,
   11.52 -                        curr_att->filename);
   11.53 -        TEST_ASSERT_MSG(strcmp(curr_att->mime_type,
   11.54 -                                (*it).second.c_str()) == 0,
   11.55 -                        curr_att->mime_type);
   11.56 +        ASSERT_STREQ(curr_att->filename, (*it).first.c_str());
   11.57 +        ASSERT_STREQ(curr_att->mime_type, (*it).second.c_str());
   11.58          it++;
   11.59          curr_att = curr_att->next;
   11.60      }
    12.1 --- a/test/src/KeyResetMessageTest.cc	Mon Aug 26 21:00:57 2019 +0200
    12.2 +++ b/test/src/KeyResetMessageTest.cc	Tue Aug 27 11:04:53 2019 +0200
    12.3 @@ -487,7 +487,7 @@
    12.4      pEp_identity* from_ident = new_identity("pep.test.alice@pep-project.org", NULL, PEP_OWN_USERID, NULL);
    12.5      PEP_STATUS status = myself(session, from_ident);
    12.6      ASSERT_EQ(status , PEP_STATUS_OK);
    12.7 -    ASSERT_NE(from_ident->fpr);
    12.8 +    ASSERT_NE(from_ident->fpr, nullptr);
    12.9      ASSERT_STRCASEEQ(from_ident->fpr, alice_fpr);
   12.10      ASSERT_TRUE(from_ident->me);
   12.11  
    13.1 --- a/test/src/LookupTest.cc	Mon Aug 26 21:00:57 2019 +0200
    13.2 +++ b/test/src/LookupTest.cc	Tue Aug 27 11:04:53 2019 +0200
    13.3 @@ -129,8 +129,9 @@
    13.4          ASSERT_EQ(status , PEP_STATUS_OK);
    13.5  
    13.6          // We should always get the same fingerprint.
    13.7 -        ASSERT_NE((hans->fpr), nullptr);
    13.8 -        ASSERT_STREQ(hans->fpr);
    13.9 +        ASSERT_NE(hans->fpr, nullptr);
   13.10 +        // Doublecheck FIXME (autogen)
   13.11 +        ASSERT_STREQ(hans->fpr, fpr);
   13.12  
   13.13          // We don't compare hans->username or hans->user_id in case
   13.14          // the engine doesn't have the same concept of equality (as of
   13.15 @@ -141,7 +142,7 @@
   13.16  
   13.17          // We should get the address that we looked up; no
   13.18          // normalization is done.
   13.19 -        ASSERT_EQ((strcmp(hans->address, address) , 0), "strcmp(hans->address);
   13.20 +        ASSERT_STREQ(hans->address, address);
   13.21  
   13.22          ASSERT_FALSE(hans->me);
   13.23          ASSERT_EQ(hans->comm_type , PEP_ct_OpenPGP_unconfirmed);
    14.1 --- a/test/src/MimeTest.cc	Mon Aug 26 21:00:57 2019 +0200
    14.2 +++ b/test/src/MimeTest.cc	Tue Aug 27 11:04:53 2019 +0200
    14.3 @@ -148,7 +148,7 @@
    14.4      cout << "encoding message…\n";
    14.5      char *result2;
    14.6      PEP_STATUS status2 = mime_encode_message(msg2, false, &result2);
    14.7 -    ASSERT_NE(result), nullptr);
    14.8 +    ASSERT_NE(result, nullptr);
    14.9      ASSERT_EQ(status2, PEP_STATUS_OK);
   14.10  
   14.11      cout << "result:\n";
    15.1 --- a/test/src/StringlistTest.cc	Mon Aug 26 21:00:57 2019 +0200
    15.2 +++ b/test/src/StringlistTest.cc	Tue Aug 27 11:04:53 2019 +0200
    15.3 @@ -158,7 +158,7 @@
    15.4      src = new_stringlist(str0);
    15.5      ASSERT_NE(src, nullptr);
    15.6      dst = stringlist_dup(src);
    15.7 -    ASSERT_STREQ(dst->value, str0;
    15.8 +    ASSERT_STREQ(dst->value, str0);
    15.9      cout << "Value: " << src->value;
   15.10      ASSERT_EQ(dst->next , nullptr);
   15.11      cout << "one-element stringlist duped, next element is NULL\n";
    16.1 --- a/test/src/VerifyTest.cc	Mon Aug 26 21:00:57 2019 +0200
    16.2 +++ b/test/src/VerifyTest.cc	Tue Aug 27 11:04:53 2019 +0200
    16.3 @@ -301,5 +301,4 @@
    16.4      // No signer.
    16.5      ASSERT_STREQ(keylist->value, "");
    16.6      ASSERT_NE( keylist->next, nullptr);
    16.7 -#endif
    16.8  }