aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/filemap_ut.cpp
diff options
context:
space:
mode:
authorOleg Sidorkin <osidorkin@gmail.com>2022-02-10 16:49:36 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:36 +0300
commitf8f6804a3e352897afabc93afcb32081e3fca601 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/filemap_ut.cpp
parent5ce74d4fee2d42a4b86efc02dfdc704d458760e1 (diff)
downloadydb-f8f6804a3e352897afabc93afcb32081e3fca601.tar.gz
Restoring authorship annotation for Oleg Sidorkin <osidorkin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/filemap_ut.cpp')
-rw-r--r--util/system/filemap_ut.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/util/system/filemap_ut.cpp b/util/system/filemap_ut.cpp
index 91ab5026b8..73f109dc88 100644
--- a/util/system/filemap_ut.cpp
+++ b/util/system/filemap_ut.cpp
@@ -317,43 +317,43 @@ Y_UNIT_TEST_SUITE(TFileMapTest) {
}
NFs::Remove(FileName_);
}
-
+
Y_UNIT_TEST(TestMemoryMapIsWritable) {
- TFile file(FileName_, CreateAlways | WrOnly);
- file.Close();
-
- {
- TMemoryMap mappedMem(FileName_, TMemoryMap::oRdOnly);
- UNIT_ASSERT(!mappedMem.IsWritable());
- }
- {
- TMemoryMap mappedMem(FileName_, TMemoryMap::oRdWr);
- UNIT_ASSERT(mappedMem.IsWritable());
- }
+ TFile file(FileName_, CreateAlways | WrOnly);
+ file.Close();
+
+ {
+ TMemoryMap mappedMem(FileName_, TMemoryMap::oRdOnly);
+ UNIT_ASSERT(!mappedMem.IsWritable());
+ }
+ {
+ TMemoryMap mappedMem(FileName_, TMemoryMap::oRdWr);
+ UNIT_ASSERT(mappedMem.IsWritable());
+ }
NFs::Remove(FileName_);
- }
-
+ }
+
Y_UNIT_TEST(TestFileMapIsWritable) {
- TFile file(FileName_, CreateAlways | WrOnly);
- file.Close();
- {
- TMemoryMap mappedMem(FileName_, TMemoryMap::oRdOnly);
- TFileMap fileMap(mappedMem);
- UNIT_ASSERT(!fileMap.IsWritable());
- }
- {
- TMemoryMap mappedMem(FileName_, TMemoryMap::oRdWr);
- TFileMap fileMap(mappedMem);
- UNIT_ASSERT(fileMap.IsWritable());
- }
- {
- TFileMap fileMap(FileName_, TFileMap::oRdOnly);
- UNIT_ASSERT(!fileMap.IsWritable());
- }
- {
- TFileMap fileMap(FileName_, TFileMap::oRdWr);
- UNIT_ASSERT(fileMap.IsWritable());
- }
+ TFile file(FileName_, CreateAlways | WrOnly);
+ file.Close();
+ {
+ TMemoryMap mappedMem(FileName_, TMemoryMap::oRdOnly);
+ TFileMap fileMap(mappedMem);
+ UNIT_ASSERT(!fileMap.IsWritable());
+ }
+ {
+ TMemoryMap mappedMem(FileName_, TMemoryMap::oRdWr);
+ TFileMap fileMap(mappedMem);
+ UNIT_ASSERT(fileMap.IsWritable());
+ }
+ {
+ TFileMap fileMap(FileName_, TFileMap::oRdOnly);
+ UNIT_ASSERT(!fileMap.IsWritable());
+ }
+ {
+ TFileMap fileMap(FileName_, TFileMap::oRdWr);
+ UNIT_ASSERT(fileMap.IsWritable());
+ }
NFs::Remove(FileName_);
- }
+ }
};