diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/libs/libunwind/ut | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/libs/libunwind/ut')
-rw-r--r-- | contrib/libs/libunwind/ut/libunwind_ut.cpp | 29 | ||||
-rw-r--r-- | contrib/libs/libunwind/ut/ya.make | 11 |
2 files changed, 40 insertions, 0 deletions
diff --git a/contrib/libs/libunwind/ut/libunwind_ut.cpp b/contrib/libs/libunwind/ut/libunwind_ut.cpp new file mode 100644 index 0000000000..93767c50c8 --- /dev/null +++ b/contrib/libs/libunwind/ut/libunwind_ut.cpp @@ -0,0 +1,29 @@ +#include <library/cpp/testing/unittest/registar.h> + +#include <util/system/compiler.h> + +#include <exception> +#include <vector> + +Y_NO_INLINE void Except(int arg, ...) { + (void)arg; + throw std::exception(); +} + +Y_UNIT_TEST_SUITE(LibunwindSuite) { + static void Y_NO_INLINE DoTestVarargs() { + std::vector<int> v; + v.push_back(0); + Except(0x11, 0x22, 0x33, 0x44, 0xAA, 0xBB, 0xCC, 0xDD); + } + + Y_UNIT_TEST(TestVarargs) { + try { + DoTestVarargs(); + } catch (const std::exception& e) { + return; + } + + UNIT_FAIL("Should not be here"); + } +} diff --git a/contrib/libs/libunwind/ut/ya.make b/contrib/libs/libunwind/ut/ya.make new file mode 100644 index 0000000000..a608aee8a4 --- /dev/null +++ b/contrib/libs/libunwind/ut/ya.make @@ -0,0 +1,11 @@ +UNITTEST() + +WITHOUT_LICENSE_TEXTS() + +OWNER(somov) + +SRCS( + libunwind_ut.cpp +) + +END() |