aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-09-18 04:56:49 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-09-18 05:05:50 +0300
commit04143505e98a1991b1607eccc47ce3cf2e1c7ea4 (patch)
tree25c7803ebc8291ae05dcad153047af6305cf1272 /library
parent5a4233d13d50077ee5c28693039395901d23c73d (diff)
downloadydb-04143505e98a1991b1607eccc47ce3cf2e1c7ea4.tar.gz
Intermediate changes
commit_hash:3ef81205ed4cf9360829f834baa07c2fbf69b999
Diffstat (limited to 'library')
-rw-r--r--library/cpp/yt/misc/unittests/non_null_ptr_ut.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/library/cpp/yt/misc/unittests/non_null_ptr_ut.cpp b/library/cpp/yt/misc/unittests/non_null_ptr_ut.cpp
index a6903edc40..8396e403ab 100644
--- a/library/cpp/yt/misc/unittests/non_null_ptr_ut.cpp
+++ b/library/cpp/yt/misc/unittests/non_null_ptr_ut.cpp
@@ -7,16 +7,18 @@ namespace {
////////////////////////////////////////////////////////////////////////////////
-enum EFuncResult {
+enum class EFuncResult
+{
Base,
ConstBase,
Derived,
ConstDerived,
};
-enum EBinaryFuncResult {
- Ok,
- NotOk,
+enum class EBinaryFuncResult
+{
+ OK,
+ NotOK,
};
struct TBase
@@ -48,22 +50,22 @@ EFuncResult Foo(TNonNullPtr<const TDerived> /*derived*/)
[[maybe_unused]] EBinaryFuncResult Foo(int* /*derived*/)
{
- return EBinaryFuncResult::NotOk;
+ return EBinaryFuncResult::NotOK;
}
EBinaryFuncResult Foo(TNonNullPtr<int> /*derived*/)
{
- return EBinaryFuncResult::Ok;
+ return EBinaryFuncResult::OK;
}
EBinaryFuncResult Bar(TNonNullPtr<const int> /*arg*/)
{
- return EBinaryFuncResult::Ok;
+ return EBinaryFuncResult::OK;
}
EBinaryFuncResult Baz(TNonNullPtr<int> /*arg*/)
{
- return EBinaryFuncResult::Ok;
+ return EBinaryFuncResult::OK;
}
TEST(TNonNullPtrTest, Simple)
@@ -79,21 +81,21 @@ TEST(TNonNullPtrTest, Simple)
EXPECT_EQ(EFuncResult::ConstBase, Foo(GetPtr(constBase)));
int i{};
- EXPECT_EQ(EBinaryFuncResult::Ok, Foo(GetPtr(i)));
+ EXPECT_EQ(EBinaryFuncResult::OK, Foo(GetPtr(i)));
}
TEST(TNonNullPtrTest, CastToConst)
{
int i{};
- EXPECT_EQ(EBinaryFuncResult::Ok, Bar(GetPtr(i)));
+ EXPECT_EQ(EBinaryFuncResult::OK, Bar(GetPtr(i)));
}
TEST(TNonNullPtrTest, ConstructionFromRawPointer)
{
int i{};
- EXPECT_EQ(EBinaryFuncResult::Ok, Baz(&i));
+ EXPECT_EQ(EBinaryFuncResult::OK, Baz(&i));
}
////////////////////////////////////////////////////////////////////////////////