From 7e5186a20e6a2419ebe9b2a086c7bd16e2500cd7 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Thu, 11 Apr 2024 12:43:09 +0200 Subject: [PATCH] .autotest --- autotest/FileMapping/FileMapping.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/autotest/FileMapping/FileMapping.cpp b/autotest/FileMapping/FileMapping.cpp index cb43b3e3b..76227eba7 100644 --- a/autotest/FileMapping/FileMapping.cpp +++ b/autotest/FileMapping/FileMapping.cpp @@ -37,6 +37,19 @@ CONSOLE_APP_MAIN ASSERT(*m.Map(i, 1) == test[i]); } + { + FileMapping m; + m.Open(path, FileStream::READWRITE); + byte *h = m.Map(); + h[3] = 'X'; + h[4] = 'Y'; + } + + test.Set(3, 'X'); + test.Set(4, 'Y'); + + ASSERT(LoadFile(path) == test); + DeleteFile(path); LOG("============ OK");