diff --git a/test/framework/utils.cc b/test/framework/utils.cc index 49a4d63..c9df5e7 100644 --- a/test/framework/utils.cc +++ b/test/framework/utils.cc @@ -3,6 +3,8 @@ #include "utils.hh" +#include + #include #include "../../src/Adapter.hh" @@ -13,6 +15,25 @@ using namespace pEp; namespace pEp { namespace Test { + namespace Log { + void logH1(string msg) + { + char decoration{ '=' }; + cout << endl + << endl + << std::string(30, decoration) << ' ' << msg << ' ' + << std::string(30, decoration) << endl; + } + + void logH2(string msg) + { + char decoration{ '-' }; + cout << endl + << std::string(10, decoration) << ' ' << msg << ' ' + << std::string(10, decoration) << endl; + } + } // namespace Log + namespace Utils { string identity_to_string(::pEp_identity* ident, bool full, int indent) { @@ -65,7 +86,7 @@ namespace pEp { builder << endl; builder << std::string(indent, '\t') << "[" << endl; indent++; - for (::identity_list * curr = idl; curr != nullptr; curr = curr->next) { + for (::identity_list* curr = idl; curr != nullptr; curr = curr->next) { builder << identity_to_string(curr->ident, full, indent) << endl; } indent--; diff --git a/test/framework/utils.hh b/test/framework/utils.hh index 3fe514e..ccbc7a9 100644 --- a/test/framework/utils.hh +++ b/test/framework/utils.hh @@ -11,6 +11,10 @@ namespace pEp { namespace Test { + namespace Log { + void logH1(std::string msg); + void logH2(std::string msg); + } namespace Utils { std::string identity_to_string(::pEp_identity* ident, bool full = true, int indent = 0); std::string identitylist_to_string(::identity_list * idl, bool full = true, int indent = 0);