blob: 8fea58438e99fc9b4e827bfcd1fbb463ea04d84b [file] [log] [blame]
/*
* Copyright (C) 2016-2018 CESNET, https://photonics.cesnet.cz/
*
* Written by Jan Kundrát <jan.kundrat@cesnet.cz>
*
*/
#pragma once
#include <doctest/doctest.h>
#include <map>
#include <sstream>
#include <trompeloeil.hpp>
namespace doctest {
template <>
struct StringMaker<std::map<std::string, std::string>> {
static String convert(const std::map<std::string, std::string>& map)
{
std::ostringstream os;
os << "{" << std::endl;
for (const auto& [key, value] : map) {
os << " \"" << key << "\": \"" << value << "\"," << std::endl;
}
os << "}";
return os.str().c_str();
}
};
}