示例#1
0
TEST(UriTest, UriConstructor) {
    auto uri_str = std::string("http://localhost:8888/redfish/v1");

    URI uri = URI(uri_str);

    EXPECT_EQ(uri_str, uri.to_string());
}
示例#2
0
TEST(UriTest, ReplaceHostUriPart) {
    auto uri_str = std::string("http://localhost:8888/redfish/v1");

    URI uri = URI(uri_str);
    uri.set_host("192.168.0.1");
    EXPECT_EQ("http://192.168.0.1:8888/redfish/v1", uri.to_string());
}
示例#3
0
文件: uri.cpp 项目: AnnikaH/IncludeOS
bool operator < (const URI& lhs, const URI& rhs) noexcept {
  return lhs.to_string() < rhs.to_string();
}