Copy UIDs during mj_copySpec.

This will produce the same mjSpec signature after a deep copy.

PiperOrigin-RevId: 743538018
Change-Id: Ic0f5b06a00e8883cb92dc98159db3bea02cb7a36
This commit is contained in:
Alessio Quaglino
2025-04-03 06:28:05 -07:00
committed by Copybara-Service
parent 54f132f3f0
commit 8941f56e86
3 changed files with 7 additions and 4 deletions
+3
View File
@@ -538,6 +538,9 @@ TEST_F(PluginTest, RecompileCompare) {
// copy spec
mjSpec* s_copy = mj_copySpec(s);
// compare signature
EXPECT_EQ(s->element->signature, s_copy->element->signature) << xml;
// compile twice and compare
mjModel* m_old = mj_compile(s, nullptr);