Remove custom mujoco.texture format.
PiperOrigin-RevId: 960257562 Change-Id: I318c84d82576d405f0a5d8510acd5bab5f08c9af
This commit is contained in:
committed by
Copybara-Service
parent
84950fa371
commit
6fe04aa8d3
@@ -126,34 +126,6 @@ TEST_F(VfsTest, TexturePngWithVFS) {
|
||||
mj_deleteVFS(vfs.get());
|
||||
}
|
||||
|
||||
TEST_F(VfsTest, TextureCustomWithVFS) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco>
|
||||
<asset>
|
||||
<texture name="texture" file="unknown_file" type="2d"/>
|
||||
<material name="material" texture="texture"/>
|
||||
</asset>
|
||||
|
||||
<worldbody>
|
||||
<geom type="plane" material="material" size="4 4 4"/>
|
||||
</worldbody>
|
||||
</mujoco>
|
||||
)";
|
||||
|
||||
char error[1024];
|
||||
size_t error_sz = 1024;
|
||||
|
||||
// load VFS on the heap
|
||||
auto vfs = std::make_unique<mjVFS>();
|
||||
mj_defaultVFS(vfs.get());
|
||||
|
||||
// should fallback to OS filesystem
|
||||
MjModelPtr model = LoadModelFromString(xml, error, error_sz, vfs.get());
|
||||
EXPECT_THAT(model.get(), IsNull());
|
||||
EXPECT_THAT(error, HasSubstr("Error opening file"));
|
||||
mj_deleteVFS(vfs.get());
|
||||
}
|
||||
|
||||
// ------------------------ test content_type attribute ------------------------
|
||||
|
||||
using ContentTypeTest = MujocoTest;
|
||||
@@ -270,35 +242,6 @@ TEST_F(ContentTypeTest, TexturePngWithContentType) {
|
||||
mj_deleteVFS(vfs.get());
|
||||
}
|
||||
|
||||
TEST_F(ContentTypeTest, TextureCustomWithContentType) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco>
|
||||
<asset>
|
||||
<texture name="texture" content_type="image/vnd.mujoco.texture"
|
||||
file="some_file" type="2d"/>
|
||||
<material name="material" texture="texture"/>
|
||||
</asset>
|
||||
|
||||
<worldbody>
|
||||
<geom type="plane" material="material" size="4 4 4"/>
|
||||
</worldbody>
|
||||
</mujoco>
|
||||
)";
|
||||
|
||||
char error[1024];
|
||||
size_t error_sz = 1024;
|
||||
|
||||
// load VFS on the heap
|
||||
auto vfs = std::make_unique<mjVFS>();
|
||||
mj_defaultVFS(vfs.get());
|
||||
|
||||
// should try loading the file
|
||||
MjModelPtr model = LoadModelFromString(xml, error, error_sz, vfs.get());
|
||||
EXPECT_THAT(model.get(), IsNull());
|
||||
EXPECT_THAT(error, HasSubstr("Error opening file"));
|
||||
mj_deleteVFS(vfs.get());
|
||||
}
|
||||
|
||||
TEST_F(ContentTypeTest, TextureWithContentTypeError) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco>
|
||||
|
||||
Reference in New Issue
Block a user