Browse Source

Restoring authorship annotation for <nikkon@yandex-team.ru>. Commit 2 of 2.

nikkon 3 years ago
parent
commit
74f244adb5
2 changed files with 30 additions and 30 deletions
  1. 29 29
      library/cpp/getopt/ut/last_getopt_ut.cpp
  2. 1 1
      util/draft/datetime.cpp

+ 29 - 29
library/cpp/getopt/ut/last_getopt_ut.cpp

@@ -125,13 +125,13 @@ struct TOptsParserTester {
     }
 };
 
-namespace { 
+namespace {
     bool gSimpleFlag = false;
-    void SimpleHander(void) { 
-        gSimpleFlag = true; 
-    } 
-} 
- 
+    void SimpleHander(void) {
+        gSimpleFlag = true;
+    }
+}
+
 Y_UNIT_TEST_SUITE(TLastGetoptTests) {
     Y_UNIT_TEST(TestEqual) {
         TOptsNoDefault opts;
@@ -738,36 +738,36 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) {
     }
 
     Y_UNIT_TEST(TestEasySetup) {
-        TEasySetup opts; 
-        bool flag = false; 
+        TEasySetup opts;
+        bool flag = false;
         opts('v', "version", "print version information")('a', "abstract", "some abstract param", true)('b', "buffer", "SIZE", "some param with argument")('c', "count", "SIZE", "some param with required argument")('t', "true", HandlerStoreTrue(&flag), "Some arg with handler")("global", SimpleHander, "Another arg with handler");
- 
-        { 
-            gSimpleFlag = false; 
+
+        {
+            gSimpleFlag = false;
             TOptsParseResultTestWrapper r(&opts, V({"cmd", "--abstract"}));
-            UNIT_ASSERT(!flag); 
-            UNIT_ASSERT(!gSimpleFlag); 
-        } 
- 
-        { 
+            UNIT_ASSERT(!flag);
+            UNIT_ASSERT(!gSimpleFlag);
+        }
+
+        {
             TOptsParseResultTestWrapper r(&opts, V({"cmd", "--abstract", "--global", "-t"}));
-            UNIT_ASSERT(flag); 
-            UNIT_ASSERT(gSimpleFlag); 
-        } 
- 
-        { 
+            UNIT_ASSERT(flag);
+            UNIT_ASSERT(gSimpleFlag);
+        }
+
+        {
             UNIT_ASSERT_EXCEPTION(
                 TOptsParseResultTestWrapper(&opts, V({"cmd", "--true"})),
                 TUsageException);
-        } 
- 
-        { 
+        }
+
+        {
             TOptsParseResultTestWrapper r(&opts, V({"cmd", "--abstract", "--buffer=512"}));
-            UNIT_ASSERT(r.Has('b')); 
-            UNIT_ASSERT_VALUES_EQUAL(r.Get('b', 0), "512"); 
-        } 
-    } 
- 
+            UNIT_ASSERT(r.Has('b'));
+            UNIT_ASSERT_VALUES_EQUAL(r.Get('b', 0), "512");
+        }
+    }
+
     Y_UNIT_TEST(TestTOptsParseResultException) {
         // verify that TOptsParseResultException actually throws a TUsageException instead of exit()
         // not using wrapper here because it can hide bugs (see review #243810 and r2737774)

+ 1 - 1
util/draft/datetime.cpp

@@ -45,7 +45,7 @@ namespace NDatetime {
             ::localtime_r(&t, &tt);
 #ifndef _win_
             GMTOff = tt.tm_gmtoff;
-#else 
+#else
             TIME_ZONE_INFORMATION tz;
             switch (GetTimeZoneInformation(&tz)) {
                 case TIME_ZONE_ID_UNKNOWN: