shill: more unit test changes for ppp dongle support
This time, we focus on PPPDevice. We add a couple more constraints
to the ParseIPConfiguration test.
While there: we modify the interface for ParseIPConfiguration.
Previously, the target IPConfig::Properties object was supplied
as an out parameter. Now, the method returns an IPConfig::Properties
object instead.
This was motivated by the new part of the ParseIPConfiguration
test, where the behavior depended on whether or not I passed
ParseIPConfiguration a fresh IPConfig::Properties object. The
new interface avoids that gotcha.
BUG=chromium:246826
TEST=unit tests (old+new)
Change-Id: Icf6dbd0e31623a228779439b23a42970d9b85042
Reviewed-on: https://gerrit.chromium.org/gerrit/64294
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
diff --git a/ppp_device.h b/ppp_device.h
index becc484..44fbaa3 100644
--- a/ppp_device.h
+++ b/ppp_device.h
@@ -54,10 +54,9 @@
FRIEND_TEST(PPPDeviceTest, GetInterfaceName);
FRIEND_TEST(PPPDeviceTest, ParseIPConfiguration);
- static void ParseIPConfiguration(
+ static IPConfig::Properties ParseIPConfiguration(
const std::string &link_name,
- const std::map<std::string, std::string> &configuration,
- IPConfig::Properties *properties);
+ const std::map<std::string, std::string> &configuration);
DISALLOW_COPY_AND_ASSIGN(PPPDevice);
};