diff options
author | eeight <eeight@yandex-team.ru> | 2022-02-10 16:46:19 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:19 +0300 |
commit | bd085aee9b4f7a0bee302ce687964ffb7098f986 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/scheme/tests | |
parent | 475c0a46f28166e83fd263badc7546377cddcabe (diff) | |
download | ydb-bd085aee9b4f7a0bee302ce687964ffb7098f986.tar.gz |
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/scheme/tests')
-rw-r--r-- | library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp | 16 | ||||
-rw-r--r-- | library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h | 18 | ||||
-rw-r--r-- | library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp | 20 |
3 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp index 2a06e29f22..55a971d9e4 100644 --- a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp +++ b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.cpp @@ -102,23 +102,23 @@ namespace NSc::NUt { TRef TVMAction::GetRef(ui32 arg) const noexcept { - return std::get<TRef>(Arg[arg]); + return std::get<TRef>(Arg[arg]); } TSrc TVMAction::GetSrc(ui32 arg) const noexcept { - return std::get<TSrc>(Arg[arg]); + return std::get<TSrc>(Arg[arg]); } TDst TVMAction::GetDst(ui32 arg) const noexcept { - return std::get<TDst>(Arg[arg]); + return std::get<TDst>(Arg[arg]); } ui32 TVMAction::GetPos(ui32 arg) const noexcept { - return std::get<TPos>(Arg[arg]).Pos; + return std::get<TPos>(Arg[arg]).Pos; } ui32 TVMAction::GetIdx(ui32 arg) const noexcept { - return std::get<TIdx>(Arg[arg]).Idx; + return std::get<TIdx>(Arg[arg]).Idx; } TStringBuf TVMAction::GetKey(ui32 arg) const noexcept { @@ -134,7 +134,7 @@ namespace NSc::NUt { } TStringBuf TVMAction::GetPath(ui32 arg) const noexcept { - return std::get<TPath>(Arg[arg]).Path; + return std::get<TPath>(Arg[arg]).Path; } @@ -143,7 +143,7 @@ namespace NSc::NUt { : Out(out) {} - bool operator()(const std::monostate&) const { + bool operator()(const std::monostate&) const { return true; } //TIdx, TPos, TRef, TSrc, TDst, TPath @@ -159,7 +159,7 @@ namespace NSc::NUt { TStringBuilder out; out << Type; for (const auto& arg : Arg) { - if (std::visit(TActionPrinter(out.Out), arg)) { + if (std::visit(TActionPrinter(out.Out), arg)) { break; } } diff --git a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h index 7db4ddeda3..9a0ddf7351 100644 --- a/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h +++ b/library/cpp/scheme/tests/fuzz_ops/lib/vm_defs.h @@ -98,11 +98,11 @@ namespace NSc::NUt { return std::move(Memory[pos]); } - [[nodiscard]] + [[nodiscard]] bool TryPushBack(); template <class T> - [[nodiscard]] + [[nodiscard]] bool TryPushBack(T&& t) { if (MayAddMoreMemory()) { Memory.emplace_back(std::forward<T>(t)); @@ -112,11 +112,11 @@ namespace NSc::NUt { } } - [[nodiscard]] + [[nodiscard]] bool TryPushFront(); template <class T> - [[nodiscard]] + [[nodiscard]] bool TryPushFront(T&& t) { if (MayAddMoreMemory()) { Pos += 1; @@ -127,16 +127,16 @@ namespace NSc::NUt { } } - [[nodiscard]] + [[nodiscard]] bool TryPopBack(); - [[nodiscard]] + [[nodiscard]] bool TryPopFront(); TString ToString() const; private: - [[nodiscard]] + [[nodiscard]] bool MayAddMoreMemory() const noexcept { return Memory.size() < MaxMemory; } @@ -223,7 +223,7 @@ namespace NSc::NUt { TString ToString() const; }; - using TArg = std::variant<std::monostate, TIdx, TPos, TRef, TSrc, TDst, TPath>; + using TArg = std::variant<std::monostate, TIdx, TPos, TRef, TSrc, TDst, TPath>; struct TVMAction { using EType = EVMAction; @@ -269,7 +269,7 @@ namespace NSc::NUt { ui32 CurrArg = 0; }; - [[nodiscard]] + [[nodiscard]] inline ui32 GetCountWidth(ui32 cnt) { return MostSignificantBit(cnt - 1) + 1; } diff --git a/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp b/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp index b464bef666..ce3786a671 100644 --- a/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp +++ b/library/cpp/scheme/tests/fuzz_ops/ut/vm_parse_ut.cpp @@ -32,14 +32,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) { UNIT_ASSERT(!ParsePos(st)); } - [[nodiscard]] + [[nodiscard]] ui32 DoTestParsePosSuccess(TVMState& st) { const auto pos = ParsePos(st); UNIT_ASSERT(pos); return pos->Pos; } - [[nodiscard]] + [[nodiscard]] ui32 DoTestParsePosSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) { TVMState st{inp, memSz, curPos}; return DoTestParsePosSuccess(st); @@ -81,14 +81,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) { UNIT_ASSERT(!ParseRef(st)); } - [[nodiscard]] + [[nodiscard]] auto DoTestParseRefSuccess(TVMState& st) { const auto ref = ParseRef(st); UNIT_ASSERT(ref); return std::make_pair(ref->Pos, ref->Type); } - [[nodiscard]] + [[nodiscard]] auto DoTestParseRefSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) { TVMState st{inp, memSz, curPos}; return DoTestParseRefSuccess(st); @@ -118,14 +118,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) { UNIT_ASSERT(!ParseSrc(st)); } - [[nodiscard]] + [[nodiscard]] auto DoTestParseSrcSuccess(TVMState& st) { const auto src = ParseSrc(st); UNIT_ASSERT(src); return std::make_pair(src->Pos, src->Type); } - [[nodiscard]] + [[nodiscard]] auto DoTestParseSrcSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) { TVMState st{inp, memSz, curPos}; return DoTestParseSrcSuccess(st); @@ -153,14 +153,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) { UNIT_ASSERT(!ParseDst(st)); } - [[nodiscard]] + [[nodiscard]] auto DoTestParseDstSuccess(TVMState& st) { const auto dst = ParseDst(st); UNIT_ASSERT(dst); return std::make_pair(dst->Pos, dst->Type); } - [[nodiscard]] + [[nodiscard]] auto DoTestParseDstSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) { TVMState st{inp, memSz, curPos}; return DoTestParseDstSuccess(st); @@ -201,14 +201,14 @@ Y_UNIT_TEST_SUITE(TestParseNextAction) { UNIT_ASSERT(!ParsePath(st)); } - [[nodiscard]] + [[nodiscard]] auto DoTestParsePathSuccess(TVMState& st) { const auto path = ParsePath(st); UNIT_ASSERT(path); return path->Path; } - [[nodiscard]] + [[nodiscard]] auto DoTestParsePathSuccess(const TStringBuf inp, const ui32 memSz, const ui32 curPos) { TVMState st{inp, memSz, curPos}; return DoTestParsePathSuccess(st); |