diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 980edcd3304699edf9d4e4d6a656e585028e2a72 (patch) | |
tree | 139f47f3911484ae9af0eb347b1a88bd6c4bb35f /util/network/socket_ut.cpp | |
parent | b036a557f285146e5e35d4213e29a094ab907bcf (diff) | |
download | ydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network/socket_ut.cpp')
-rw-r--r-- | util/network/socket_ut.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/network/socket_ut.cpp b/util/network/socket_ut.cpp index 6b20e11f70..ff7a9e6279 100644 --- a/util/network/socket_ut.cpp +++ b/util/network/socket_ut.cpp @@ -312,29 +312,29 @@ void TPollTest::TestPollInOut() { } } - int expectedCount = 0; + int expectedCount = 0; for (size_t i = 0; i < connectedSockets.size(); ++i) { pollfd fd = {(i % 5 == 4) ? INVALID_SOCKET : static_cast<SOCKET>(*connectedSockets[i]), POLLIN | POLLOUT, 0}; fds.push_back(fd); - if (i % 5 != 4) - ++expectedCount; + if (i % 5 != 4) + ++expectedCount; } int polledCount = poll(&fds[0], fds.size(), INFTIM); - UNIT_ASSERT_EQUAL(expectedCount, polledCount); + UNIT_ASSERT_EQUAL(expectedCount, polledCount); for (size_t i = 0; i < connectedSockets.size(); ++i) { - short revents = fds[i].revents; + short revents = fds[i].revents; if (i % 5 == 0) { - UNIT_ASSERT_EQUAL(static_cast<short>(POLLRDNORM | POLLWRNORM), revents); + UNIT_ASSERT_EQUAL(static_cast<short>(POLLRDNORM | POLLWRNORM), revents); } else if (i % 5 == 1) { - UNIT_ASSERT_EQUAL(static_cast<short>(POLLOUT | POLLWRNORM), revents); + UNIT_ASSERT_EQUAL(static_cast<short>(POLLOUT | POLLWRNORM), revents); } else if (i % 5 == 2) { - UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLRDNORM | POLLWRNORM), revents); + UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLRDNORM | POLLWRNORM), revents); } else if (i % 5 == 3) { - UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLWRNORM), revents); + UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLWRNORM), revents); } else if (i % 5 == 4) { - UNIT_ASSERT_EQUAL(static_cast<short>(POLLNVAL), revents); + UNIT_ASSERT_EQUAL(static_cast<short>(POLLNVAL), revents); } } #endif |