summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Kong2017-05-05 15:35:50 -0500
committerYi Kong2017-05-05 15:35:50 -0500
commit5ca756ea1f0d629939f0f916ba30252eeed431e5 (patch)
treef91ef68705338856a27d7b2e23b9fb1569d55a29
parent8b4c1e458997ed8c8b9bc97e4af4d4c3675c7c80 (diff)
downloadplatform-hardware-interfaces-5ca756ea1f0d629939f0f916ba30252eeed431e5.tar.gz
platform-hardware-interfaces-5ca756ea1f0d629939f0f916ba30252eeed431e5.tar.xz
platform-hardware-interfaces-5ca756ea1f0d629939f0f916ba30252eeed431e5.zip
Remove unused lambda captures
Test: build Bug: 37752547 Change-Id: I339baf849c7aef97dd319377026564dedd0cc568
-rw-r--r--bluetooth/1.0/default/test/async_fd_watcher_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
index dfc50a35..ee7d8d13 100644
--- a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
+++ b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
@@ -105,7 +105,7 @@ class AsyncFdWatcherSocketTest : public ::testing::Test {
105 int connection_fd = AcceptConnection(fd); 105 int connection_fd = AcceptConnection(fd);
106 ALOGD("%s: Conn_watcher fd = %d", __func__, fd); 106 ALOGD("%s: Conn_watcher fd = %d", __func__, fd);
107 107
108 conn_watcher_.ConfigureTimeout(std::chrono::seconds(0), [this]() { 108 conn_watcher_.ConfigureTimeout(std::chrono::seconds(0), []() {
109 bool connection_timeout_cleared = false; 109 bool connection_timeout_cleared = false;
110 ASSERT_TRUE(connection_timeout_cleared); 110 ASSERT_TRUE(connection_timeout_cleared);
111 }); 111 });
@@ -117,7 +117,7 @@ class AsyncFdWatcherSocketTest : public ::testing::Test {
117 // Time out if it takes longer than a second. 117 // Time out if it takes longer than a second.
118 SetTimeout(std::chrono::seconds(1)); 118 SetTimeout(std::chrono::seconds(1));
119 }); 119 });
120 conn_watcher_.ConfigureTimeout(std::chrono::seconds(1), [this]() { 120 conn_watcher_.ConfigureTimeout(std::chrono::seconds(1), []() {
121 bool connection_timeout = true; 121 bool connection_timeout = true;
122 ASSERT_FALSE(connection_timeout); 122 ASSERT_FALSE(connection_timeout);
123 }); 123 });
@@ -207,7 +207,7 @@ TEST_F(AsyncFdWatcherSocketTest, Connect) {
207 }); 207 });
208 208
209 // Fail if the client doesn't connect within 1 second. 209 // Fail if the client doesn't connect within 1 second.
210 conn_watcher.ConfigureTimeout(std::chrono::seconds(1), [this]() { 210 conn_watcher.ConfigureTimeout(std::chrono::seconds(1), []() {
211 bool connection_timeout = true; 211 bool connection_timeout = true;
212 ASSERT_FALSE(connection_timeout); 212 ASSERT_FALSE(connection_timeout);
213 }); 213 });
@@ -231,7 +231,7 @@ TEST_F(AsyncFdWatcherSocketTest, TimedOutConnect) {
231 231
232 // Set the timeout flag after 100ms. 232 // Set the timeout flag after 100ms.
233 conn_watcher.ConfigureTimeout(std::chrono::milliseconds(100), 233 conn_watcher.ConfigureTimeout(std::chrono::milliseconds(100),
234 [this, timeout_ptr]() { *timeout_ptr = true; }); 234 [timeout_ptr]() { *timeout_ptr = true; });
235 EXPECT_FALSE(timed_out); 235 EXPECT_FALSE(timed_out);
236 sleep(1); 236 sleep(1);
237 EXPECT_TRUE(timed_out); 237 EXPECT_TRUE(timed_out);
@@ -254,7 +254,7 @@ TEST_F(AsyncFdWatcherSocketTest, TimedOutSchedulesTimeout) {
254 // Set a timeout flag in each callback. 254 // Set a timeout flag in each callback.
255 conn_watcher.ConfigureTimeout( 255 conn_watcher.ConfigureTimeout(
256 std::chrono::milliseconds(500), 256 std::chrono::milliseconds(500),
257 [this, &conn_watcher, &timed_out, &timed_out2]() { 257 [&conn_watcher, &timed_out, &timed_out2]() {
258 timed_out = true; 258 timed_out = true;
259 conn_watcher.ConfigureTimeout(std::chrono::seconds(1), 259 conn_watcher.ConfigureTimeout(std::chrono::seconds(1),
260 [&timed_out2]() { timed_out2 = true; }); 260 [&timed_out2]() { timed_out2 = true; });
@@ -298,7 +298,7 @@ TEST_F(AsyncFdWatcherSocketTest, WatchTwoFileDescriptors) {
298 }); 298 });
299 299
300 // Fail if the test doesn't pass within 3 seconds 300 // Fail if the test doesn't pass within 3 seconds
301 watcher.ConfigureTimeout(std::chrono::seconds(3), [this]() { 301 watcher.ConfigureTimeout(std::chrono::seconds(3), []() {
302 bool connection_timeout = true; 302 bool connection_timeout = true;
303 ASSERT_FALSE(connection_timeout); 303 ASSERT_FALSE(connection_timeout);
304 }); 304 });