aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/unittest/checks.cpp
diff options
context:
space:
mode:
authoraosipenko <aosipenko@yandex-team.ru>2022-02-10 16:48:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:08 +0300
commit948fd24d47d4b3b7815aaef1686aea00ef3f4288 (patch)
tree8ad4c39c2a5f8b341bc02e3b0c5e8f26c40373cb /library/cpp/testing/unittest/checks.cpp
parentd2eb4aae699fa2f6901bf32d22eec019c8f29838 (diff)
downloadydb-948fd24d47d4b3b7815aaef1686aea00ef3f4288.tar.gz
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/testing/unittest/checks.cpp')
-rw-r--r--library/cpp/testing/unittest/checks.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/testing/unittest/checks.cpp b/library/cpp/testing/unittest/checks.cpp
index c5712ae9d2..2fbbde6ceb 100644
--- a/library/cpp/testing/unittest/checks.cpp
+++ b/library/cpp/testing/unittest/checks.cpp
@@ -1,31 +1,31 @@
#include <util/generic/string.h>
#include <util/string/type.h>
-
+
bool CheckExceptionMessage(const char* msg, TString& err) {
- static const char* badMsg[] = {
+ static const char* badMsg[] = {
// Операция успешно завершена [cp1251]
"\xce\xef\xe5\xf0\xe0\xf6\xe8\xff\x20\xf3\xf1\xef\xe5\xf8\xed\xee\x20\xe7\xe0\xe2\xe5\xf0\xf8\xe5\xed\xe0",
- "The operation completed successfully",
+ "The operation completed successfully",
"No error"};
-
- err.clear();
-
+
+ err.clear();
+
if (msg == nullptr) {
- err = "Error message is null";
- return false;
- }
-
- if (IsSpace(msg)) {
- err = "Error message is empty";
- return false;
- }
-
+ err = "Error message is null";
+ return false;
+ }
+
+ if (IsSpace(msg)) {
+ err = "Error message is empty";
+ return false;
+ }
+
for (auto& i : badMsg) {
if (strstr(msg, i) != nullptr) {
err = "Invalid error message: " + TString(msg);
- return false;
- }
- }
-
- return true;
-}
+ return false;
+ }
+ }
+
+ return true;
+}