Add NodeBuffer init to FileStore format
This commit is contained in:
1
deps/ox/src/ox/fs/test/CMakeLists.txt
vendored
1
deps/ox/src/ox/fs/test/CMakeLists.txt
vendored
@@ -69,3 +69,4 @@ add_test("Test\\ FileSystem32::stripDirectories" FSTests "FileSystem32::stripDir
|
||||
add_test("Test\\ FileSystem32::ls" FSTests "FileSystem32::ls")
|
||||
|
||||
add_test("Test\\ LinkedList::insert" FSTests "LinkedList::insert")
|
||||
add_test("Test\\ NodeBuffer::readWrite" FSTests "NodeBuffer::readWrite")
|
||||
|
6
deps/ox/src/ox/fs/test/tests.cpp
vendored
6
deps/ox/src/ox/fs/test/tests.cpp
vendored
@@ -333,12 +333,12 @@ map<string, int(*)(string)> tests = {
|
||||
}
|
||||
},
|
||||
{
|
||||
"LinkedList::insert",
|
||||
"NodeBuffer::insert",
|
||||
[](string) {
|
||||
int err = 0;
|
||||
constexpr auto buffLen = 5000;
|
||||
uint8_t buff[buffLen];
|
||||
auto list = new (buff) ox::fs::LinkedList<uint32_t, ox::fs::Item>(buffLen);
|
||||
auto list = new (buff) ox::fs::NodeBuffer<uint32_t, ox::fs::FileStoreItem<uint32_t>>(buffLen);
|
||||
err |= !(list->malloc(50).valid());
|
||||
err |= !(list->firstItem().valid());
|
||||
err |= !(list->firstItem()->size() == 50);
|
||||
@@ -350,7 +350,7 @@ map<string, int(*)(string)> tests = {
|
||||
[](string) {
|
||||
constexpr auto buffLen = 5000;
|
||||
uint8_t buff[buffLen];
|
||||
auto list = new (buff) ox::fs::LinkedList<uint32_t, ox::fs::Item>(buffLen);
|
||||
auto list = new (buff) ox::fs::NodeBuffer<uint32_t, ox::fs::FileStoreItem<uint32_t>>(buffLen);
|
||||
ox::fs::FileStore32 fileStore(list, buffLen);
|
||||
ox_assert(fileStore.format() == 0, "Filestore::format failed.");
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user