aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/unittest
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2022-10-26 02:34:32 +0300
committerpg <pg@yandex-team.com>2022-10-26 02:34:32 +0300
commitfd1bb528234f143b3eab3efffb61bfeda9947360 (patch)
tree858440535f3d0bb2f28ecdd00113b7c25d60608f /library/cpp/testing/unittest
parentd510268ad2a0e4e4247b76c65af8d943af0c9194 (diff)
downloadydb-fd1bb528234f143b3eab3efffb61bfeda9947360.tar.gz
calc current exception message once
Diffstat (limited to 'library/cpp/testing/unittest')
-rw-r--r--library/cpp/testing/unittest/registar.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h
index e3d2fec867..842535915c 100644
--- a/library/cpp/testing/unittest/registar.h
+++ b/library/cpp/testing/unittest/registar.h
@@ -609,12 +609,12 @@ public: \
UNIT_ASSERT_EXCEPTION_SATISFIES_C(A, E, \
[&_substr](const E&){ \
if (!_substr.empty()) { \
- UNIT_ASSERT_C(CurrentExceptionMessage() \
- .Contains(_substr), \
+ auto cure = CurrentExceptionMessage() ; \
+ UNIT_ASSERT_C(cure.Contains(_substr), \
"Exception message does not contain \"" \
<< _substr << "\".\n" \
<< "Exception message: " \
- << CurrentExceptionMessage()); \
+ << cure); \
} \
return true; \
}, \