You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
321 B
C++
17 lines
321 B
C++
![]()
6 years ago
|
#include "gtest/gtest.h"
|
||
|
|
||
|
#include "webcc/utility.h"
|
||
|
|
||
|
TEST(UtilityTest, SplitKV) {
|
||
|
const std::string str = "Connection: Keep-Alive";
|
||
|
|
||
|
std::string key;
|
||
|
std::string value;
|
||
|
|
||
|
bool ok = webcc::SplitKV(str, ':', &key, &value);
|
||
|
|
||
|
EXPECT_EQ(true, ok);
|
||
|
EXPECT_EQ("Connection", key);
|
||
|
EXPECT_EQ("Keep-Alive", value);
|
||
|
}
|