Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c86120fb authored by Yi Kong's avatar Yi Kong Committed by android-build-merger
Browse files

Remove unused lambda captures am: 5ca756ea am: 68f6e996

am: dcf35ca8

Change-Id: I025a2f240cb6f4278bece0f1b3c91dbfcdffa0fc
parents 1a8f5c35 dcf35ca8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ class AsyncFdWatcherSocketTest : public ::testing::Test {
      int connection_fd = AcceptConnection(fd);
      ALOGD("%s: Conn_watcher fd = %d", __func__, fd);

      conn_watcher_.ConfigureTimeout(std::chrono::seconds(0), [this]() {
      conn_watcher_.ConfigureTimeout(std::chrono::seconds(0), []() {
        bool connection_timeout_cleared = false;
        ASSERT_TRUE(connection_timeout_cleared);
      });
@@ -117,7 +117,7 @@ class AsyncFdWatcherSocketTest : public ::testing::Test {
      // Time out if it takes longer than a second.
      SetTimeout(std::chrono::seconds(1));
    });
    conn_watcher_.ConfigureTimeout(std::chrono::seconds(1), [this]() {
    conn_watcher_.ConfigureTimeout(std::chrono::seconds(1), []() {
      bool connection_timeout = true;
      ASSERT_FALSE(connection_timeout);
    });
@@ -207,7 +207,7 @@ TEST_F(AsyncFdWatcherSocketTest, Connect) {
  });

  // Fail if the client doesn't connect within 1 second.
  conn_watcher.ConfigureTimeout(std::chrono::seconds(1), [this]() {
  conn_watcher.ConfigureTimeout(std::chrono::seconds(1), []() {
    bool connection_timeout = true;
    ASSERT_FALSE(connection_timeout);
  });
@@ -231,7 +231,7 @@ TEST_F(AsyncFdWatcherSocketTest, TimedOutConnect) {

  // Set the timeout flag after 100ms.
  conn_watcher.ConfigureTimeout(std::chrono::milliseconds(100),
                                [this, timeout_ptr]() { *timeout_ptr = true; });
                                [timeout_ptr]() { *timeout_ptr = true; });
  EXPECT_FALSE(timed_out);
  sleep(1);
  EXPECT_TRUE(timed_out);
@@ -254,7 +254,7 @@ TEST_F(AsyncFdWatcherSocketTest, TimedOutSchedulesTimeout) {
  // Set a timeout flag in each callback.
  conn_watcher.ConfigureTimeout(
      std::chrono::milliseconds(500),
      [this, &conn_watcher, &timed_out, &timed_out2]() {
      [&conn_watcher, &timed_out, &timed_out2]() {
        timed_out = true;
        conn_watcher.ConfigureTimeout(std::chrono::seconds(1),
                                      [&timed_out2]() { timed_out2 = true; });
@@ -298,7 +298,7 @@ TEST_F(AsyncFdWatcherSocketTest, WatchTwoFileDescriptors) {
  });

  // Fail if the test doesn't pass within 3 seconds
  watcher.ConfigureTimeout(std::chrono::seconds(3), [this]() {
  watcher.ConfigureTimeout(std::chrono::seconds(3), []() {
    bool connection_timeout = true;
    ASSERT_FALSE(connection_timeout);
  });