Start on new FileStore and add test
This commit is contained in:
2
deps/ox/src/ox/fs/test/CMakeLists.txt
vendored
2
deps/ox/src/ox/fs/test/CMakeLists.txt
vendored
@@ -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")
|
||||
|
11
deps/ox/src/ox/fs/test/tests.cpp
vendored
11
deps/ox/src/ox/fs/test/tests.cpp
vendored
@@ -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;
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user