[ox/fs] Add new Directory type
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
@@ -74,3 +74,5 @@ add_test("Test\\ FileSystem32::stripDirectories" FSTests "FileSystem32::stripDir
|
||||
|
||||
add_test("Test\\ NodeBuffer::insert" FSTests "NodeBuffer::insert")
|
||||
add_test("Test\\ FileStore::readWrite" FSTests "FileStore::readWrite")
|
||||
|
||||
add_test("Test\\ Directory" FSTests "Directory")
|
||||
|
14
deps/ox/src/ox/fs/test/tests.cpp
vendored
14
deps/ox/src/ox/fs/test/tests.cpp
vendored
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@@ -382,6 +383,19 @@ map<string, int(*)(string)> tests = {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
"Directory",
|
||||
[](string) {
|
||||
std::array<uint8_t, 1000> buff;
|
||||
ox::fs::Directory32 dir(buff.data(), buff.size());
|
||||
dir.init();
|
||||
dir.write("/file1", 1);
|
||||
//oxAssert(dir.find("/file1") == 1, "Could not find /file1");
|
||||
dir.write("/file3", 3);
|
||||
dir.write("/file2", 2);
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user