aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/mapped_file/ut/mapped_file_ut.cpp
blob: 1f40de11a31ad896f095cd3c3d95bf03f3210960 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <library/cpp/deprecated/mapped_file/mapped_file.h>
#include <library/cpp/testing/unittest/registar.h>
 
#include <util/system/fs.h>

Y_UNIT_TEST_SUITE(TMappedFileTest) {
    static const char* FileName_("./mappped_file");
    Y_UNIT_TEST(TestFileMapEmpty) {
        TFile file(FileName_, CreateAlways | WrOnly);
        file.Close();

        TMappedFile map;
        map.init(FileName_);
        map.getData(0);

        NFs::Remove(FileName_);
    }
};