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
commit69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/testing/unittest/checks.cpp
parent948fd24d47d4b3b7815aaef1686aea00ef3f4288 (diff)
downloadydb-69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f.tar.gz
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 2 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 2fbbde6ceb..c5712ae9d2 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;
+}