aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/maybe_ut.cpp
diff options
context:
space:
mode:
authoryuraaka <yuraaka@yandex-team.ru>2022-02-10 16:47:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:05 +0300
commit4230543261d7a38ef4dc14785ae0d45f2da43704 (patch)
tree7d5099e41a66d7501887488432100e3cfc69ea72 /util/generic/maybe_ut.cpp
parent8cac63f90980b825f78cbd01f45b396297047c2c (diff)
downloadydb-4230543261d7a38ef4dc14785ae0d45f2da43704.tar.gz
Restoring authorship annotation for <yuraaka@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/maybe_ut.cpp')
-rw-r--r--util/generic/maybe_ut.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/generic/maybe_ut.cpp b/util/generic/maybe_ut.cpp
index 2c1a425c5e..289824521a 100644
--- a/util/generic/maybe_ut.cpp
+++ b/util/generic/maybe_ut.cpp
@@ -208,19 +208,19 @@ Y_UNIT_TEST_SUITE(TMaybeTest) {
TMovable o6 = MakeMaybe<TMovable>(6).GetRef();
UNIT_ASSERT_VALUES_EQUAL(o6.Flag, 6);
}
-
+
Y_UNIT_TEST(TestCast) {
- // Undefined maybe casts to undefined maybe
- TMaybe<short> shortMaybe;
- const auto undefinedMaybe = shortMaybe.Cast<long>();
- UNIT_ASSERT(!undefinedMaybe.Defined());
-
- // Defined maybe casts to defined maybe of another type
- shortMaybe = 34;
- const auto longMaybe = shortMaybe.Cast<long>();
- UNIT_ASSERT(longMaybe.Defined());
- UNIT_ASSERT_VALUES_EQUAL(34, longMaybe.GetRef());
- }
+ // Undefined maybe casts to undefined maybe
+ TMaybe<short> shortMaybe;
+ const auto undefinedMaybe = shortMaybe.Cast<long>();
+ UNIT_ASSERT(!undefinedMaybe.Defined());
+
+ // Defined maybe casts to defined maybe of another type
+ shortMaybe = 34;
+ const auto longMaybe = shortMaybe.Cast<long>();
+ UNIT_ASSERT(longMaybe.Defined());
+ UNIT_ASSERT_VALUES_EQUAL(34, longMaybe.GetRef());
+ }
Y_UNIT_TEST(TestGetOr) {
UNIT_ASSERT_VALUES_EQUAL(TMaybe<TString>().GetOrElse("xxx"), TString("xxx"));