shill: tighten up constness of PropertyStore
BUG=chromium-os:20543
TEST=unittest
Change-Id: Ifa86f82a883b3c3ec61ce10f8d82564b9a036b04
Reviewed-on: http://gerrit.chromium.org/gerrit/7901
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/device_unittest.cc b/device_unittest.cc
index a92cfed..896c3f0 100644
--- a/device_unittest.cc
+++ b/device_unittest.cc
@@ -67,8 +67,8 @@
const char DeviceTest::kDeviceAddress[] = "address";
TEST_F(DeviceTest, Contains) {
- EXPECT_TRUE(device_->store()->Contains(flimflam::kNameProperty));
- EXPECT_FALSE(device_->store()->Contains(""));
+ EXPECT_TRUE(device_->store().Contains(flimflam::kNameProperty));
+ EXPECT_FALSE(device_->store().Contains(""));
}
TEST_F(DeviceTest, GetProperties) {
@@ -77,9 +77,9 @@
{
::DBus::Error dbus_error;
bool expected = true;
- device_->store()->SetBoolProperty(flimflam::kPoweredProperty,
- expected,
- &error);
+ device_->mutable_store()->SetBoolProperty(flimflam::kPoweredProperty,
+ expected,
+ &error);
DBusAdaptor::GetProperties(device_->store(), &props, &dbus_error);
ASSERT_FALSE(props.find(flimflam::kPoweredProperty) == props.end());
EXPECT_EQ(props[flimflam::kPoweredProperty].reader().get_bool(),
@@ -96,13 +96,13 @@
TEST_F(DeviceTest, Dispatch) {
::DBus::Error error;
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(device_->store(),
+ EXPECT_TRUE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
flimflam::kPoweredProperty,
PropertyStoreTest::kBoolV,
&error));
// Ensure that an attempt to write a R/O property returns InvalidArgs error.
- EXPECT_FALSE(DBusAdaptor::DispatchOnType(device_->store(),
+ EXPECT_FALSE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
flimflam::kAddressProperty,
PropertyStoreTest::kStringV,
&error));