aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/vector_ut.cpp
diff options
context:
space:
mode:
authorgleb-kov <gleb-kov@yandex-team.ru>2022-02-16 20:08:53 +0300
committergleb-kov <gleb-kov@yandex-team.ru>2022-02-16 20:08:53 +0300
commit76cbe125b7d39dca64a0de7b86eee37fd575e4df (patch)
tree07e37c2710f2e28d0703b034d5055410a8cef162 /util/generic/vector_ut.cpp
parentba7bb8654688e77fb83af2e6f9e82ef5ea10dfc5 (diff)
downloadydb-76cbe125b7d39dca64a0de7b86eee37fd575e4df.tar.gz
util unittests: replace try-catch-UNIT_ASSERT via UNIT_ASSERT_EXCEPTION
ref:f59ddae7dbb42f5fa999e6071769f709e8b80b85
Diffstat (limited to 'util/generic/vector_ut.cpp')
-rw-r--r--util/generic/vector_ut.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/util/generic/vector_ut.cpp b/util/generic/vector_ut.cpp
index 0f6b4037a0..4a9d286572 100644
--- a/util/generic/vector_ut.cpp
+++ b/util/generic/vector_ut.cpp
@@ -334,16 +334,7 @@ private:
v.at(0) = 20;
UNIT_ASSERT(cv.at(0) == 20);
- for (;;) {
- try {
- v.at(1) = 20;
- UNIT_ASSERT(false);
- } catch (std::out_of_range const&) {
- return;
- } catch (...) {
- UNIT_ASSERT(false);
- }
- }
+ UNIT_ASSERT_EXCEPTION(v.at(1) = 20, std::out_of_range);
}
void TestPointer() {