2018-06-09 22:24:03 +02:00
|
|
|
#ifndef PASSWORDFILE_TESTS_UTILS_H
|
|
|
|
#define PASSWORDFILE_TESTS_UTILS_H
|
|
|
|
|
|
|
|
#include "../io/entry.h"
|
|
|
|
#include "../io/field.h"
|
|
|
|
|
|
|
|
#include <c++utilities/conversion/stringconversion.h>
|
|
|
|
#include <c++utilities/misc/traits.h>
|
|
|
|
|
|
|
|
#include <ostream>
|
|
|
|
|
2019-06-10 22:44:29 +02:00
|
|
|
namespace CppUtilities {
|
2018-06-09 22:24:03 +02:00
|
|
|
|
|
|
|
inline std::ostream &operator<<(std::ostream &out, const Io::Entry *entry)
|
|
|
|
{
|
2019-06-10 22:44:29 +02:00
|
|
|
return out << joinStrings(entry->path(), "/");
|
2018-06-09 22:24:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline std::ostream &operator<<(std::ostream &out, const Io::Field *field)
|
|
|
|
{
|
|
|
|
return out << field->name() << '=' << field->value();
|
|
|
|
}
|
|
|
|
|
2019-06-10 22:44:29 +02:00
|
|
|
} // namespace CppUtilities
|
2018-06-09 22:24:03 +02:00
|
|
|
|
2024-02-04 20:58:45 +01:00
|
|
|
#include <c++utilities/tests/testutils.h>
|
|
|
|
|
|
|
|
using namespace CppUtilities;
|
|
|
|
|
2018-06-09 22:24:03 +02:00
|
|
|
#endif // PASSWORDFILE_TESTS_UTILS_H
|