Remember compiler options during attach.
Note: - Move compiler options into `mjsCompiler` struct. - The compiler options from the attached model are not written by mj_SaveXML. PiperOrigin-RevId: 689391440 Change-Id: I1d63c146a32f87c737b7a55b64a54b0ffe3aecc9
This commit is contained in:
committed by
Copybara-Service
parent
1043633cc3
commit
159f23e6b4
@@ -1176,7 +1176,7 @@ TEST_F(MjCJointTest, AlignFree) {
|
||||
std::array<char, 1024> err;
|
||||
mjSpec* s = mj_parseXML(xml_path.c_str(), nullptr, err.data(), err.size());
|
||||
ASSERT_THAT(s, NotNull()) << err.data();
|
||||
s->alignfree = 1; // auto-aligned free joint
|
||||
s->compiler.alignfree = 1; // auto-aligned free joint
|
||||
mjModel* m = mj_compile(s, nullptr);
|
||||
ASSERT_THAT(m, NotNull());
|
||||
|
||||
@@ -1186,7 +1186,7 @@ TEST_F(MjCJointTest, AlignFree) {
|
||||
EXPECT_EQ(m->dof_simplenum[0], 6);
|
||||
|
||||
// make unaligned model
|
||||
s->alignfree = 0; // unaligned free joint
|
||||
s->compiler.alignfree = 0; // unaligned free joint
|
||||
mjModel* m_u = mj_compile(s, nullptr);
|
||||
ASSERT_THAT(m_u, NotNull());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user