mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-11 13:09:46 +00:00
Use stock std::string conversion.
This commit is contained in:
parent
eaf8c0778d
commit
056e7dcde4
9 changed files with 22 additions and 41 deletions
|
@ -18,12 +18,6 @@
|
|||
#include "catch.hpp"
|
||||
#include "mime_split.hpp"
|
||||
|
||||
namespace {
|
||||
std::string to_string (const boost::string_ref& parRef) {
|
||||
return std::string(parRef.data(), parRef.size());
|
||||
}
|
||||
} //unnamed namespace
|
||||
|
||||
TEST_CASE ("Test the string_to_mime parser", "[mime][parser]") {
|
||||
using tawashi::SplitMime;
|
||||
using tawashi::string_to_mime;
|
||||
|
@ -42,7 +36,7 @@ TEST_CASE ("Test the string_to_mime parser", "[mime][parser]") {
|
|||
REQUIRE(split.parameters.size() == 1);
|
||||
|
||||
CHECK(split.parameters.find("charset") != split.parameters.end());
|
||||
curr_val = to_string(split.parameters.at("charset"));
|
||||
curr_val = std::string(split.parameters.at("charset"));
|
||||
CHECK(curr_val == "UTF-8");
|
||||
}
|
||||
|
||||
|
@ -58,11 +52,11 @@ TEST_CASE ("Test the string_to_mime parser", "[mime][parser]") {
|
|||
REQUIRE(split.parameters.size() == 2);
|
||||
|
||||
CHECK(split.parameters.find("filename") != split.parameters.end());
|
||||
curr_val = to_string(split.parameters.at("filename"));
|
||||
curr_val = std::string(split.parameters.at("filename"));
|
||||
CHECK(curr_val == "genome.jpeg");
|
||||
|
||||
CHECK(split.parameters.find("modification-date") != split.parameters.end());
|
||||
curr_val = to_string(split.parameters.at("modification-date"));
|
||||
curr_val = std::string(split.parameters.at("modification-date"));
|
||||
CHECK(curr_val == "Wed, 12 Feb 1997 16:29:51 -0500");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue