Add mjmDef to C API.
PiperOrigin-RevId: 607310534 Change-Id: I530f32c8fd4340dc1006585259a5e05cb4aa62b8
This commit is contained in:
committed by
Copybara-Service
parent
6f958bc404
commit
414a67640a
@@ -437,6 +437,31 @@ TEST_F(XMLReaderTest, InvalidDoubleOrientation) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(XMLReaderTest, RepeatedDefaultName) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco>
|
||||
<default>
|
||||
<default class="sphere">
|
||||
<geom type="sphere" size="1"/>
|
||||
</default>
|
||||
<default class="sphere">
|
||||
<geom type="capsule" size="1 1"/>
|
||||
</default>
|
||||
</default>
|
||||
<worldbody>
|
||||
<body>
|
||||
<geom class="sphere"/>
|
||||
</body>
|
||||
</worldbody>
|
||||
</mujoco>
|
||||
)";
|
||||
std::array<char, 1024> error;
|
||||
mjModel* model = LoadModelFromString(xml, error.data(), error.size());
|
||||
ASSERT_THAT(model, IsNull()) << error.data();
|
||||
EXPECT_THAT(error.data(), HasSubstr("repeated default class name"));
|
||||
}
|
||||
|
||||
// ------------------------ test including -------------------------------------
|
||||
|
||||
TEST_F(XMLReaderTest, IncludeTest) {
|
||||
|
||||
Reference in New Issue
Block a user