diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-10-12 21:30:34 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-10-12 21:30:34 +0300 |
commit | dfc6285db4909717009cbed6243209586b3581e8 (patch) | |
tree | 1340dc822c728ddad8433b761d77e15ba0dea84a /test | |
parent | 54c006f378fb7d903054d50f70035acb4b84121d (diff) |
Fix issue0009 which had been refactored to match Windows, and does not work on POSIX.
Diffstat (limited to 'test')
-rw-r--r-- | test/tests/issue0009.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tests/issue0009.cpp b/test/tests/issue0009.cpp index ac06e445..4b17b9fe 100644 --- a/test/tests/issue0009.cpp +++ b/test/tests/issue0009.cpp @@ -31,8 +31,18 @@ static inline void TestIssue09a() fh.truncate(1).value(); auto sh = llfio::section_handle::section(fh).value(); sh.truncate(1ULL << 40ULL).value(); +#ifdef _WIN32 auto mh = llfio::map_handle::map(sh, 1ULL << 35ULL).value(); auto *addr1 = mh.address(); +#else + auto mh = llfio::map_handle::map(sh, 1ULL << 40ULL).value(); + auto *addr1 = mh.address(); + mh.truncate(1ULL << 35ULL).value(); + { + auto *addr0 = mh.address(); + BOOST_CHECK(addr1 == addr0); + } +#endif mh.truncate(1ULL << 36ULL).value(); { auto *addr2 = mh.address(); |