Use TEST_ASSERT_MSG to avoid seg faulting on error. sequoia
authorNeal H. Walfield <neal@pep.foundation>
Sat, 15 Dec 2018 17:00:09 +0100
branchsequoia
changeset 319092c7a348b84f
parent 3189 3f8d3904ba8a
child 3191 53dcb2892c3f
Use TEST_ASSERT_MSG to avoid seg faulting on error.
test/src/engine_tests/TrustManipulationTests.cc
     1.1 --- a/test/src/engine_tests/TrustManipulationTests.cc	Sat Dec 15 16:59:05 2018 +0100
     1.2 +++ b/test/src/engine_tests/TrustManipulationTests.cc	Sat Dec 15 17:00:09 2018 +0100
     1.3 @@ -88,6 +88,7 @@
     1.4      cout << "Hoorah, we now do not trust key 2. (We never liked key 2 anyway.)" << endl;
     1.5      cout << "Now we call update_identity to see what gifts it gives us (should be key 1 with key 1's initial trust.)" << endl;    
     1.6      status = update_identity(session, user);
     1.7 +    TEST_ASSERT_MSG((user->fpr), "user->fpr");
     1.8      TEST_ASSERT_MSG((strcmp(user->fpr, keypair1) == 0), "strcmp(user->fpr, keypair1) == 0");
     1.9      TEST_ASSERT_MSG((user->comm_type == PEP_ct_OpenPGP_unconfirmed), "user->comm_type == PEP_ct_OpenPGP_unconfirmed");
    1.10      cout << "Yup, got key 1, and the trust status is PEP_ct_OpenPGP_unconfirmed." << endl;