diff options
author | Oleg Sidorkin <osidorkin@gmail.com> | 2022-02-10 16:49:36 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:36 +0300 |
commit | f8f6804a3e352897afabc93afcb32081e3fca601 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/filemap_ut.cpp | |
parent | 5ce74d4fee2d42a4b86efc02dfdc704d458760e1 (diff) | |
download | ydb-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.cpp | 70 |
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_); - } + } }; |