Start on new FileStore and add test

This commit is contained in:
2018-03-05 20:22:26 -06:00
parent cd38c961a3
commit e1305a240e
8 changed files with 258 additions and 77 deletions

View File

@@ -67,3 +67,5 @@ add_test("Test\\ FileSystem32::remove\\(string,\\ true\\)" FSTests "FileSystem32
add_test("Test\\ FileSystem32::move" FSTests "FileSystem32::move")
add_test("Test\\ FileSystem32::stripDirectories" FSTests "FileSystem32::stripDirectories")
add_test("Test\\ FileSystem32::ls" FSTests "FileSystem32::ls")
add_test("Test\\ LinkedList::insert" FSTests "LinkedList::insert")

View File

@@ -13,7 +13,7 @@
#include <string>
#include <ox/fs/fs.hpp>
#include <ox/std/std.hpp>
#include <ox/fs/filestore/linkedlist.hpp>
#include <ox/fs/filestore/filestore.hpp>
using namespace std;
using namespace ox;
@@ -330,9 +330,12 @@ map<string, int(*)(string)> tests = {
{
"LinkedList::insert",
[](string) {
ox::fs::LinkedList<uint32_t> list;
list.malloc(50);
list.firstItem();
constexpr auto buffLen = 5000;
uint8_t buff[buffLen];
auto list = new (buff) ox::fs::LinkedList<uint32_t>(buffLen);
assert(list->malloc(50).valid());
assert(list->firstItem().valid());
assert(list->firstItem()->size == 50);
return 0;
}
},