aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/error_ut.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/system/error_ut.cpp
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/error_ut.cpp')
-rw-r--r--util/system/error_ut.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/util/system/error_ut.cpp b/util/system/error_ut.cpp
index 0370ddaea9..763b0dddb7 100644
--- a/util/system/error_ut.cpp
+++ b/util/system/error_ut.cpp
@@ -1,41 +1,41 @@
-#include "error.h"
-
+#include "error.h"
+
#include <library/cpp/testing/unittest/registar.h>
-
+
#include <util/generic/ylimits.h>
-
+
#ifdef _win_
- #include "winint.h"
+ #include "winint.h"
#else
- #include <fcntl.h>
+ #include <fcntl.h>
#endif
-class TSysErrorTest: public TTestBase {
- UNIT_TEST_SUITE(TSysErrorTest);
- UNIT_TEST(TestErrorCode)
- UNIT_TEST(TestErrorMessage)
- UNIT_TEST_SUITE_END();
-
-private:
- inline void TestErrorCode() {
- GenFailure();
-
- UNIT_ASSERT(LastSystemError() != 0);
- }
-
- inline void TestErrorMessage() {
- GenFailure();
-
- UNIT_ASSERT(*LastSystemErrorText() != 0);
- }
-
- inline void GenFailure() {
+class TSysErrorTest: public TTestBase {
+ UNIT_TEST_SUITE(TSysErrorTest);
+ UNIT_TEST(TestErrorCode)
+ UNIT_TEST(TestErrorMessage)
+ UNIT_TEST_SUITE_END();
+
+private:
+ inline void TestErrorCode() {
+ GenFailure();
+
+ UNIT_ASSERT(LastSystemError() != 0);
+ }
+
+ inline void TestErrorMessage() {
+ GenFailure();
+
+ UNIT_ASSERT(*LastSystemErrorText() != 0);
+ }
+
+ inline void GenFailure() {
#ifdef _win_
- SetLastError(3);
+ SetLastError(3);
#else
- UNIT_ASSERT(open("/non-existent", O_RDONLY) < 0);
+ UNIT_ASSERT(open("/non-existent", O_RDONLY) < 0);
#endif
- }
-};
-
-UNIT_TEST_SUITE_REGISTRATION(TSysErrorTest);
+ }
+};
+
+UNIT_TEST_SUITE_REGISTRATION(TSysErrorTest);