More work on removing old determinism-in-driver code
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace drv {
|
||||
|
||||
void split_host_port(std::string_view target, UmmString &host, UmmString &port) {
|
||||
void split_host_port(std::string_view target, std::string &host, std::string &port) {
|
||||
size_t lastcolon = target.rfind(':');
|
||||
if (lastcolon == std::string_view::npos) {
|
||||
host = ""; port = ""; return;
|
||||
@@ -17,8 +17,8 @@ void split_host_port(std::string_view target, UmmString &host, UmmString &port)
|
||||
}
|
||||
}
|
||||
|
||||
UmmStringVec parse_control_lst(std::string_view ctrl) {
|
||||
UmmStringVec result;
|
||||
std::vector<std::string> parse_control_lst(std::string_view ctrl) {
|
||||
std::vector<std::string> result;
|
||||
while (!ctrl.empty()) {
|
||||
std::string_view line = util::sv_read_line(ctrl);
|
||||
std::string_view trimmed = util::sv_trim(line);
|
||||
@@ -34,7 +34,7 @@ UmmStringVec parse_control_lst(std::string_view ctrl) {
|
||||
|
||||
LuaDefine(unittests_driverutil, "", "some unit tests") {
|
||||
// Test split_host_port
|
||||
UmmString host, port;
|
||||
std::string host, port;
|
||||
drv::split_host_port("stanford.edu:80", host, port);
|
||||
LuaAssertStrEq(L, host, "stanford.edu");
|
||||
LuaAssertStrEq(L, port, "80");
|
||||
|
||||
Reference in New Issue
Block a user