aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt
diff options
context:
space:
mode:
authoryoda <yoda@yandex-team.ru>2022-02-10 16:50:00 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:00 +0300
commit86ac2045bfe9733d3396425a6ecade74c11ac489 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/getopt
parentddd64736134d6d92b80a934c8cf8228944ee4236 (diff)
downloadydb-86ac2045bfe9733d3396425a6ecade74c11ac489.tar.gz
Restoring authorship annotation for <yoda@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt')
-rw-r--r--library/cpp/getopt/small/last_getopt_support.h4
-rw-r--r--library/cpp/getopt/ut/last_getopt_ut.cpp28
2 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/getopt/small/last_getopt_support.h b/library/cpp/getopt/small/last_getopt_support.h
index 48ae33b23ac..17bed3e614e 100644
--- a/library/cpp/getopt/small/last_getopt_support.h
+++ b/library/cpp/getopt/small/last_getopt_support.h
@@ -111,7 +111,7 @@ namespace NLastGetopt {
private:
TpTarget* Target_;
const TpFunc Func_;
-
+
public:
TStoreMappedResultFunctor(TpTarget* target, const TpFunc& func)
: Target_(target)
@@ -123,7 +123,7 @@ namespace NLastGetopt {
*Target_ = Func_(val);
}
};
-
+
template <typename T, typename TpVal = T>
class TStoreValueFunctor {
T* Target;
diff --git a/library/cpp/getopt/ut/last_getopt_ut.cpp b/library/cpp/getopt/ut/last_getopt_ut.cpp
index 57e5d7dc3f1..c99a1d053d1 100644
--- a/library/cpp/getopt/ut/last_getopt_ut.cpp
+++ b/library/cpp/getopt/ut/last_getopt_ut.cpp
@@ -437,23 +437,23 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) {
}
Y_UNIT_TEST(TestStoreValue) {
- int a = 0, b = 0;
- size_t c = 0;
- EHasArg e = NO_ARGUMENT;
-
+ int a = 0, b = 0;
+ size_t c = 0;
+ EHasArg e = NO_ARGUMENT;
+
TOptsNoDefault opts;
- opts.AddLongOption('a', "alpha").NoArgument().StoreValue(&a, 42);
- opts.AddLongOption('b', "beta").NoArgument().StoreValue(&b, 24);
- opts.AddLongOption('e', "enum").NoArgument().StoreValue(&e, REQUIRED_ARGUMENT).StoreValue(&c, 12345);
-
+ opts.AddLongOption('a', "alpha").NoArgument().StoreValue(&a, 42);
+ opts.AddLongOption('b', "beta").NoArgument().StoreValue(&b, 24);
+ opts.AddLongOption('e', "enum").NoArgument().StoreValue(&e, REQUIRED_ARGUMENT).StoreValue(&c, 12345);
+
TOptsParseResultTestWrapper r(&opts, V({"cmd", "-a", "-e"}));
-
- UNIT_ASSERT_VALUES_EQUAL(42, a);
- UNIT_ASSERT_VALUES_EQUAL(0, b);
- UNIT_ASSERT(e == REQUIRED_ARGUMENT);
+
+ UNIT_ASSERT_VALUES_EQUAL(42, a);
+ UNIT_ASSERT_VALUES_EQUAL(0, b);
+ UNIT_ASSERT(e == REQUIRED_ARGUMENT);
UNIT_ASSERT_VALUES_EQUAL(12345u, c);
- }
-
+ }
+
Y_UNIT_TEST(TestSetFlag) {
bool a = false, b = true, c = false, d = true;