Remove mj_makeEmptyFileVFS in favor of mj_addBufferVFS from MuJoCo codebases.
build / windows-2022 (push) Has been cancelled
build / macos-12 (push) Has been cancelled
build / ubuntu-20.04-clang-10 (push) Has been cancelled
build / ubuntu-20.04-clang-11 (push) Has been cancelled
build / ubuntu-20.04-clang-12 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-22.04-gcc-9 (push) Has been cancelled
build / windows-2022 (push) Has been cancelled
build / macos-12 (push) Has been cancelled
build / ubuntu-20.04-clang-10 (push) Has been cancelled
build / ubuntu-20.04-clang-11 (push) Has been cancelled
build / ubuntu-20.04-clang-12 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-22.04-gcc-9 (push) Has been cancelled
PiperOrigin-RevId: 639824744 Change-Id: I7746c71b0be88a61e76c4622d605356701881563
This commit is contained in:
committed by
Copybara-Service
parent
2830a4071f
commit
ba93a9b5d6
@@ -363,9 +363,7 @@ TEST_F(ContentTypeTest, TextureLoadPng) {
|
||||
// load VFS on the heap
|
||||
auto vfs = std::make_unique<mjVFS>();
|
||||
mj_defaultVFS(vfs.get());
|
||||
mj_makeEmptyFileVFS(vfs.get(), filename, 105);
|
||||
int i = mj_findFileVFS(vfs.get(), filename);
|
||||
memcpy(vfs->filedata[i], tiny, tiny_sz);
|
||||
mj_addBufferVFS(vfs.get(), filename, tiny, tiny_sz);
|
||||
|
||||
// loading the file should be successful
|
||||
mjModel* model = LoadModelFromString(xml, error, error_sz, vfs.get());
|
||||
|
||||
@@ -554,14 +554,9 @@ TEST_F(XMLReaderTest, IncludeTest) {
|
||||
auto vfs = std::make_unique<mjVFS>();
|
||||
mj_defaultVFS(vfs.get());
|
||||
|
||||
mj_makeEmptyFileVFS(vfs.get(), "model1.xml", sizeof(xml1));
|
||||
std::memcpy(vfs->filedata[vfs->nfile - 1], xml1, sizeof(xml1));
|
||||
|
||||
mj_makeEmptyFileVFS(vfs.get(), "model2.xml", sizeof(xml2));
|
||||
std::memcpy(vfs->filedata[vfs->nfile - 1], xml2, sizeof(xml2));
|
||||
|
||||
mj_makeEmptyFileVFS(vfs.get(), "model3.xml", sizeof(xml3));
|
||||
std::memcpy(vfs->filedata[vfs->nfile - 1], xml3, sizeof(xml3));
|
||||
mj_addBufferVFS(vfs.get(), "model1.xml", xml1, sizeof(xml1));
|
||||
mj_addBufferVFS(vfs.get(), "model2.xml", xml2, sizeof(xml2));
|
||||
mj_addBufferVFS(vfs.get(), "model3.xml", xml3, sizeof(xml3));
|
||||
|
||||
std::array<char, 1024> error;
|
||||
mjModel* model = LoadModelFromString(xml, error.data(),
|
||||
@@ -606,8 +601,7 @@ TEST_F(XMLReaderTest, IncludeSameFileTest) {
|
||||
auto vfs = std::make_unique<mjVFS>();
|
||||
mj_defaultVFS(vfs.get());
|
||||
|
||||
mj_makeEmptyFileVFS(vfs.get(), "model1.xml", sizeof(xml1));
|
||||
std::memcpy(vfs->filedata[vfs->nfile - 1], xml1, sizeof(xml1));
|
||||
mj_addBufferVFS(vfs.get(), "model1.xml", xml1, sizeof(xml1));
|
||||
|
||||
std::array<char, 1024> error;
|
||||
mjModel* model = LoadModelFromString(xml, error.data(), error.size(),
|
||||
|
||||
Reference in New Issue
Block a user