diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | c2a1af049e9deca890e9923abe64fe6c59060348 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /util/system/yassert_ut.cpp | |
parent | 1f553f46fb4f3c5eec631352cdd900a0709016af (diff) | |
download | ydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz |
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/yassert_ut.cpp')
-rw-r--r-- | util/system/yassert_ut.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/util/system/yassert_ut.cpp b/util/system/yassert_ut.cpp index c3f8cce999..ddd392666c 100644 --- a/util/system/yassert_ut.cpp +++ b/util/system/yassert_ut.cpp @@ -1,9 +1,9 @@ -#undef NDEBUG -// yassert.h must be included before all headers -#include "yassert.h" - +#undef NDEBUG +// yassert.h must be included before all headers +#include "yassert.h" + #include <library/cpp/testing/unittest/registar.h> - + Y_UNIT_TEST_SUITE(YassertTest) { Y_UNIT_TEST(TestAcsLikeFunctionCall) { if (true) { @@ -11,25 +11,25 @@ Y_UNIT_TEST_SUITE(YassertTest) { } else { Y_ASSERT(false); } - - bool var = false; + + bool var = false; if (false) { Y_ASSERT(false); } else { var = true; // this is unreachable if Y_ASSERT is "if (!cond) { ... }" } - UNIT_ASSERT(var); - } - + UNIT_ASSERT(var); + } + Y_UNIT_TEST(TestFailCompiles) { - if (false) { + if (false) { Y_FAIL("%d is a lucky number", 7); Y_FAIL(); - } - } - + } + } + Y_UNIT_TEST(TestVerify) { Y_VERIFY(true, "hi %s", "there"); Y_VERIFY(true); - } -} + } +} |