From ab048599502848c49d9b237cc58740be78557b15 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Mon, 29 Jun 2020 22:25:25 +0200 Subject: [PATCH] text output in test --- test/test_passphrase_cache.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_passphrase_cache.cc b/test/test_passphrase_cache.cc index f46587b..e6626f7 100644 --- a/test/test_passphrase_cache.cc +++ b/test/test_passphrase_cache.cc @@ -3,6 +3,7 @@ #include #include "passphrase_cache.hh" +#include "status_to_string.hh" extern "C" { PEP_STATUS api_test1(PEP_SESSION session, const char *str, char *bytes, int n, ::stringlist_t *sl) @@ -60,10 +61,10 @@ int main() } catch (std::underflow_error&) { } - std::cout << "two times PEP_STATUS_OK (0), one time PEP_WRONG_PASSPHRASE (2561) \n"; + std::cout << "two times PEP_STATUS_OK (0), one time PEP_WRONG_PASSPHRASE (2561)\n"; do { status = pEp::PassphraseCache::messageToSend(cache, session); - std::cout << status << "\n"; + std::cout << pEp::status_to_string(status) << " (" << status << ")\n"; } while (status == PEP_STATUS_OK); sleep(2);