Alternative implementation of parseMimetypeCounter()

This commit is contained in:
Veloman Yunkan
2020-10-29 14:11:27 +04:00
parent ed32e16db2
commit 0f8fe1f63f
2 changed files with 57 additions and 42 deletions

View File

@ -116,6 +116,10 @@ TEST(ParseCounterTest, wrongType)
std::string counterStr = "text/html=foo";
ASSERT_EQ(parse(counterStr), empty) << counterStr;
}
{
std::string counterStr = "text/html=123foo";
ASSERT_EQ(parse(counterStr), empty) << counterStr;
}
{
std::string counterStr = "text/html=50;foo";
CounterType counterMap = {{"text/html", 50}};