[ox/fs] Add more logging to mkdir test
This commit is contained in:
parent
d97247ffe0
commit
61f77767bf
1
deps/ox/src/ox/fs/test/CMakeLists.txt
vendored
1
deps/ox/src/ox/fs/test/CMakeLists.txt
vendored
@ -77,3 +77,4 @@ add_test("Test\\ NodeBuffer::insert" FSTests "NodeBuffer::insert")
|
|||||||
add_test("Test\\ FileStore::readWrite" FSTests "FileStore::readWrite")
|
add_test("Test\\ FileStore::readWrite" FSTests "FileStore::readWrite")
|
||||||
|
|
||||||
add_test("Test\\ Directory" FSTests "Directory")
|
add_test("Test\\ Directory" FSTests "Directory")
|
||||||
|
add_test("Test\\ FileSystem" FSTests "FileSystem")
|
||||||
|
17
deps/ox/src/ox/fs/test/tests.cpp
vendored
17
deps/ox/src/ox/fs/test/tests.cpp
vendored
@ -19,6 +19,7 @@
|
|||||||
#include <ox/std/std.hpp>
|
#include <ox/std/std.hpp>
|
||||||
#include <ox/fs/filestore/filestore.hpp>
|
#include <ox/fs/filestore/filestore.hpp>
|
||||||
#include <ox/fs/filestore/filestoretemplate.hpp>
|
#include <ox/fs/filestore/filestoretemplate.hpp>
|
||||||
|
#include <ox/fs/filesystem2/filesystem.hpp>
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -401,6 +402,22 @@ map<string, int(*)(string)> tests = {
|
|||||||
oxTrace("ox::fs::test::Directory") << "write 3";
|
oxTrace("ox::fs::test::Directory") << "write 3";
|
||||||
oxAssert(dir->write("/file2", 2) == 0, "Directory write of file2 failed");
|
oxAssert(dir->write("/file2", 2) == 0, "Directory write of file2 failed");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"FileSystem",
|
||||||
|
[](string) {
|
||||||
|
std::array<uint8_t, 5000> fsBuff;
|
||||||
|
ox::fs::FileStore32 fileStore(fsBuff.data(), fsBuff.size());
|
||||||
|
ox::fs::FileSystem32 fs(&fileStore);
|
||||||
|
|
||||||
|
oxTrace("ox::fs::test::FileSystem") << "format";
|
||||||
|
oxAssert(fs.format(), "FileSystem format failed");
|
||||||
|
|
||||||
|
oxTrace("ox::fs::test::FileSystem") << "mkdir";
|
||||||
|
oxAssert(fs.mkdir("/l1d1", true) == 0, "mkdir failed");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user