Archiver Initial

This commit is contained in:
IlyaShurupov 2023-07-25 18:47:00 +03:00 committed by Ilya Shurupov
parent 4a5877784b
commit 31e420b311
25 changed files with 652 additions and 124 deletions

View file

@ -3,6 +3,7 @@
#include "Tests.hpp"
#include "Testing.hpp"
#include "Map.hpp"
#include "Archiver.hpp"
using namespace tp;
@ -100,17 +101,18 @@ TEST_DEF_STATIC(SaveLoad) {
map.put(i, TestClass(i));
}
TestFile file;
ArchiverExample<1024, false> write;
ArchiverExample<1024, true> read;
map.write(file);
write % map;
map.removeAll();
TEST(map.size() == 0);
file.setAddress(0);
memCopy(read.mBuff, write.mBuff, sizeof(write.mBuff));
map.read(file);
read % map;
TEST(map.size() == 10);