From 9ff71a8b1ce582cb08730cb11eb25839441317d1 Mon Sep 17 00:00:00 2001
From: vlad-kolotvin <vlad-kolotvin@yandex-team.ru>
Date: Thu, 10 Feb 2022 16:48:20 +0300
Subject: Restoring authorship annotation for <vlad-kolotvin@yandex-team.ru>.
 Commit 2 of 2.

---
 library/cpp/coroutine/engine/coroutine_ut.cpp | 84 +++++++++++++--------------
 1 file changed, 42 insertions(+), 42 deletions(-)

(limited to 'library/cpp/coroutine/engine/coroutine_ut.cpp')

diff --git a/library/cpp/coroutine/engine/coroutine_ut.cpp b/library/cpp/coroutine/engine/coroutine_ut.cpp
index a240161405..8b372496a2 100644
--- a/library/cpp/coroutine/engine/coroutine_ut.cpp
+++ b/library/cpp/coroutine/engine/coroutine_ut.cpp
@@ -44,8 +44,8 @@ class TCoroTest: public TTestBase {
     UNIT_TEST(TestComputeCoroutineYield)
     UNIT_TEST(TestPollEngines);
     UNIT_TEST(TestUserEvent);
-    UNIT_TEST(TestPause); 
-    UNIT_TEST(TestOverrideTime); 
+    UNIT_TEST(TestPause);
+    UNIT_TEST(TestOverrideTime);
     UNIT_TEST_SUITE_END();
 
 public:
@@ -76,8 +76,8 @@ public:
     void TestComputeCoroutineYield();
     void TestPollEngines();
     void TestUserEvent();
-    void TestPause(); 
-    void TestOverrideTime(); 
+    void TestPause();
+    void TestOverrideTime();
 };
 
 void TCoroTest::TestException() {
@@ -942,23 +942,23 @@ void TCoroTest::TestPollEngines() {
     UNIT_ASSERT(defaultChecked);
 }
 
-void TCoroTest::TestPause() { 
+void TCoroTest::TestPause() {
     TContExecutor executor{1024*1024, IPollerFace::Default(), nullptr, nullptr, NCoro::NStack::EGuard::Canary, Nothing()};
- 
-    int i = 0; 
-    executor.CreateOwned([&](TCont*) { 
-        i++; 
-        executor.Pause(); 
-        i++; 
-    }, "coro"); 
- 
-    UNIT_ASSERT_EQUAL(i, 0); 
-    executor.Execute(); 
-    UNIT_ASSERT_EQUAL(i, 1); 
-    executor.Execute(); 
-    UNIT_ASSERT_EQUAL(i, 2); 
-} 
- 
+
+    int i = 0;
+    executor.CreateOwned([&](TCont*) {
+        i++;
+        executor.Pause();
+        i++;
+    }, "coro");
+
+    UNIT_ASSERT_EQUAL(i, 0);
+    executor.Execute();
+    UNIT_ASSERT_EQUAL(i, 1);
+    executor.Execute();
+    UNIT_ASSERT_EQUAL(i, 2);
+}
+
 void TCoroTest::TestUserEvent() {
     TContExecutor exec(32000);
 
@@ -981,27 +981,27 @@ void TCoroTest::TestUserEvent() {
 
     UNIT_ASSERT(event.Called);
 }
- 
-void TCoroTest::TestOverrideTime() { 
-    class TTime: public NCoro::ITime { 
-      public: 
-        TInstant Now() override { 
-            return Current; 
-        } 
- 
-        TInstant Current = TInstant::Zero(); 
-    }; 
- 
-    TTime time; 
+
+void TCoroTest::TestOverrideTime() {
+    class TTime: public NCoro::ITime {
+      public:
+        TInstant Now() override {
+            return Current;
+        }
+
+        TInstant Current = TInstant::Zero();
+    };
+
+    TTime time;
     TContExecutor executor{1024*1024, IPollerFace::Default(), nullptr, nullptr, NCoro::NStack::EGuard::Canary, Nothing(), &time};
- 
-    executor.CreateOwned([&](TCont* cont) { 
-        UNIT_ASSERT_EQUAL(cont->Executor()->Now(), TInstant::Zero()); 
-        time.Current = TInstant::Seconds(1); 
-        cont->SleepD(TInstant::Seconds(1)); 
-        UNIT_ASSERT_EQUAL(cont->Executor()->Now(), TInstant::Seconds(1)); 
-    }, "coro"); 
- 
-    executor.Execute(); 
-} 
+
+    executor.CreateOwned([&](TCont* cont) {
+        UNIT_ASSERT_EQUAL(cont->Executor()->Now(), TInstant::Zero());
+        time.Current = TInstant::Seconds(1);
+        cont->SleepD(TInstant::Seconds(1));
+        UNIT_ASSERT_EQUAL(cont->Executor()->Now(), TInstant::Seconds(1));
+    }, "coro");
+
+    executor.Execute();
+}
 UNIT_TEST_SUITE_REGISTRATION(TCoroTest);
-- 
cgit v1.2.3