[ox/fs] Move large test allocations to heap
This commit is contained in:
parent
8e82ba2f2e
commit
a204aa8c48
5
deps/ox/src/ox/fs/test/tests.cpp
vendored
5
deps/ox/src/ox/fs/test/tests.cpp
vendored
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <array>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -170,7 +169,7 @@ map<string, int(*)(string)> tests = {
|
|||||||
{
|
{
|
||||||
"Directory",
|
"Directory",
|
||||||
[](string) {
|
[](string) {
|
||||||
std::array<uint8_t, 5000> fsBuff;
|
std::vector<uint8_t> fsBuff(5000);
|
||||||
ox::FileStore32::format(fsBuff.data(), fsBuff.size());
|
ox::FileStore32::format(fsBuff.data(), fsBuff.size());
|
||||||
ox::FileStore32 fileStore(fsBuff.data(), fsBuff.size());
|
ox::FileStore32 fileStore(fsBuff.data(), fsBuff.size());
|
||||||
auto dir = ox_malloca(1000, ox::Directory32, fileStore, 100);
|
auto dir = ox_malloca(1000, ox::Directory32, fileStore, 100);
|
||||||
@ -197,7 +196,7 @@ map<string, int(*)(string)> tests = {
|
|||||||
{
|
{
|
||||||
"FileSystem",
|
"FileSystem",
|
||||||
[](string) {
|
[](string) {
|
||||||
std::array<uint8_t, 5000> fsBuff;
|
std::vector<uint8_t> fsBuff(5000);
|
||||||
oxTrace("ox::fs::test::FileSystem") << "format";
|
oxTrace("ox::fs::test::FileSystem") << "format";
|
||||||
oxAssert(ox::FileSystem32::format(fsBuff.data(), fsBuff.size()), "FileSystem format failed");
|
oxAssert(ox::FileSystem32::format(fsBuff.data(), fsBuff.size()), "FileSystem format failed");
|
||||||
ox::FileSystem32 fs(ox::FileStore32(fsBuff.data(), fsBuff.size()));
|
ox::FileSystem32 fs(ox::FileStore32(fsBuff.data(), fsBuff.size()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user