Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: device/bluetooth/bluetooth_adapter_mac_unittest.mm

Issue 2906883004: bluetooth: macOS: Removing useless |.get()| (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_mac_unittest.mm
diff --git a/device/bluetooth/bluetooth_adapter_mac_unittest.mm b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
index b330b3faf95e64f7aad86cc42dac1feeefd3f4f2..c5fc0d8468808312500c6363e04519c06d82aa4b 100644
--- a/device/bluetooth/bluetooth_adapter_mac_unittest.mm
+++ b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
@@ -69,7 +69,7 @@ class BluetoothAdapterMacTest : public testing::Test {
}
base::scoped_nsobject<MockCBPeripheral> mock_peripheral(
[[MockCBPeripheral alloc] initWithUTF8StringIdentifier:identifier]);
- return [mock_peripheral.get().peripheral retain];
+ return [[mock_peripheral peripheral] retain];
}
NSDictionary* AdvertisementData() {
@@ -100,7 +100,7 @@ class BluetoothAdapterMacTest : public testing::Test {
mock_central_manager_.reset([[MockCentralManager alloc] init]);
[mock_central_manager_ setState:desired_state];
CBCentralManager* centralManager =
- (CBCentralManager*)mock_central_manager_.get();
+ (CBCentralManager*)(mock_central_manager_.get());
ortuno 2017/05/26 16:33:02 Do we have an issue to get rid of c-style casting?
jlebel 2017/05/26 16:51:14 No, but I'm working on that one right now. I didn'
adapter_mac_->SetCentralManagerForTesting(centralManager);
return true;
}
@@ -234,7 +234,7 @@ TEST_F(BluetoothAdapterMacTest, CheckGetPeripheralHashAddress) {
return;
base::scoped_nsobject<CBPeripheral> mock_peripheral(
CreateMockPeripheral(kTestNSUUID));
- if (mock_peripheral.get() == nil)
+ if (!mock_peripheral)
return;
EXPECT_EQ(kTestHashAddress, GetHashAddress(mock_peripheral));
}
@@ -244,7 +244,7 @@ TEST_F(BluetoothAdapterMacTest, LowEnergyDeviceUpdatedNewDevice) {
return;
base::scoped_nsobject<CBPeripheral> mock_peripheral(
CreateMockPeripheral(kTestNSUUID));
- if (mock_peripheral.get() == nil)
+ if (!mock_peripheral)
return;
base::scoped_nsobject<NSDictionary> advertisement_data(AdvertisementData());
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698