diff options
author | Oleg Sidorkin <osidorkin@gmail.com> | 2022-02-10 16:49:36 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:36 +0300 |
commit | f8f6804a3e352897afabc93afcb32081e3fca601 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/scheme/tests/fuzz_ops | |
parent | 5ce74d4fee2d42a4b86efc02dfdc704d458760e1 (diff) | |
download | ydb-f8f6804a3e352897afabc93afcb32081e3fca601.tar.gz |
Restoring authorship annotation for Oleg Sidorkin <osidorkin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/scheme/tests/fuzz_ops')
-rw-r--r-- | library/cpp/scheme/tests/fuzz_ops/lib/fuzz_ops.cpp | 6 | ||||
-rw-r--r-- | library/cpp/scheme/tests/fuzz_ops/lib/vm_apply.cpp | 38 |
2 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/scheme/tests/fuzz_ops/lib/fuzz_ops.cpp b/library/cpp/scheme/tests/fuzz_ops/lib/fuzz_ops.cpp index a100d3a631..8a7facba24 100644 --- a/library/cpp/scheme/tests/fuzz_ops/lib/fuzz_ops.cpp +++ b/library/cpp/scheme/tests/fuzz_ops/lib/fuzz_ops.cpp @@ -29,9 +29,9 @@ namespace NSc::NUt { if (!ApplyNextAction(st, *act)) { break; } - if (!NSc::TValue::DefaultValue().IsNull()) { - std::terminate(); - } + if (!NSc::TValue::DefaultValue().IsNull()) { + std::terminate(); + } } } } diff --git a/library/cpp/scheme/tests/fuzz_ops/lib/vm_apply.cpp b/library/cpp/scheme/tests/fuzz_ops/lib/vm_apply.cpp index 563187f9f4..ada7b8854f 100644 --- a/library/cpp/scheme/tests/fuzz_ops/lib/vm_apply.cpp +++ b/library/cpp/scheme/tests/fuzz_ops/lib/vm_apply.cpp @@ -77,22 +77,22 @@ namespace NSc::NUt { Y_FAIL(); \ } -#define Y_GEN_PTR_OP(op, arg, st, act) \ - if (auto* r = (op)) { \ - switch (act.GetRef(arg).Type) { \ - case TRef::T_CREATE_BACK: \ - Y_GEN_TRY_OP(st.TryPushBack(*r)) \ - break; \ - case TRef::T_CREATE_FRONT: \ - Y_GEN_TRY_OP(st.TryPushFront(*r)) \ - break; \ - case TRef::T_REF__POS: \ - st.LRef(act.GetRef(arg).Pos) = *r; \ - break; \ - default: \ - Y_FAIL(); \ - } \ - } +#define Y_GEN_PTR_OP(op, arg, st, act) \ + if (auto* r = (op)) { \ + switch (act.GetRef(arg).Type) { \ + case TRef::T_CREATE_BACK: \ + Y_GEN_TRY_OP(st.TryPushBack(*r)) \ + break; \ + case TRef::T_CREATE_FRONT: \ + Y_GEN_TRY_OP(st.TryPushFront(*r)) \ + break; \ + case TRef::T_REF__POS: \ + st.LRef(act.GetRef(arg).Pos) = *r; \ + break; \ + default: \ + Y_FAIL(); \ + } \ + } bool ApplyNextAction(TVMState& st, TVMAction act) { switch (act.Type) { @@ -228,7 +228,7 @@ namespace NSc::NUt { return true; case VMA_ARRAY_GET_NO_ADD__IDX_REF: - Y_GEN_PTR_OP(st.Current().GetNoAdd(act.GetIdx(0)), 1, st, act); + Y_GEN_PTR_OP(st.Current().GetNoAdd(act.GetIdx(0)), 1, st, act); return true; case VMA_DICT_CLEAR: @@ -260,7 +260,7 @@ namespace NSc::NUt { return true; case VMA_DICT_GET_NO_ADD__IDX_REF: - Y_GEN_PTR_OP(st.Current().GetNoAdd(act.GetKey(0)), 1, st, act); + Y_GEN_PTR_OP(st.Current().GetNoAdd(act.GetKey(0)), 1, st, act); return true; case VMA_MERGE_UPDATE__POS: @@ -288,7 +288,7 @@ namespace NSc::NUt { return true; case VMA_SELECT_OR_ADD__PATH_REF: - Y_GEN_PTR_OP(st.Current().TrySelectOrAdd(act.GetPath(0)), 1, st, act); + Y_GEN_PTR_OP(st.Current().TrySelectOrAdd(act.GetPath(0)), 1, st, act); return true; case VMA_SELECT_AND_DELETE__PATH_REF: |