Merge pull request #2409 from maximevtush:main

PiperOrigin-RevId: 724879879
Change-Id: I5e65c1892d7160690f6f1d5ae7ddab5f7d46d02b
This commit is contained in:
Copybara-Service
2025-02-09 03:37:37 -08:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1408,7 +1408,7 @@ TEST_F(XMLWriterTest, WriteReadCompare) {
// ---------------- test CopyBack functionality (decompiler) ------------------ // ---------------- test CopyBack functionality (decompiler) ------------------
using DecompilerTest = MujocoTest; using DecompilerTest = MujocoTest;
TEST_F(DecompilerTest, SavesStatitics) { TEST_F(DecompilerTest, SavesStatistics) {
static constexpr char xml[] = R"( static constexpr char xml[] = R"(
<mujoco> <mujoco>
<statistic meansize="2" extent="3" center="4 5 6" meanmass="7" meaninertia="8"/> <statistic meansize="2" extent="3" center="4 5 6" meanmass="7" meaninertia="8"/>
@@ -1432,7 +1432,7 @@ TEST_F(DecompilerTest, SavesStatitics) {
mj_deleteModel(model); mj_deleteModel(model);
} }
TEST_F(DecompilerTest, DoesntSaveInferredStatitics) { TEST_F(DecompilerTest, DoesntSaveInferredStatistics) {
static constexpr char xml[] = R"( static constexpr char xml[] = R"(
<mujoco> <mujoco>
<worldbody> <worldbody>
+2 -2
View File
@@ -53,7 +53,7 @@ namespace Mujoco {
CopyAttributesOverwriteExisting(defaultAncestor, aggregateDefaults); CopyAttributesOverwriteExisting(defaultAncestor, aggregateDefaults);
} }
} }
// Add the merged attribiutes to the node, without overwriting the existing values. // Add the merged attributes to the node, without overwriting the existing values.
CopyAttributes(aggregateDefaults, element); CopyAttributes(aggregateDefaults, element);
} }
@@ -83,7 +83,7 @@ namespace Mujoco {
while (element != null) { while (element != null) {
var className = element.GetStringAttribute("childclass", string.Empty); var className = element.GetStringAttribute("childclass", string.Empty);
if (element == modifiedElement) { if (element == modifiedElement) {
// "class" attribute does not partcipate in building of the inheritance tree, and so we're // "class" attribute does not participate in building of the inheritance tree, and so we're
// only considering it if it's defined on the very element we're trying to modify. // only considering it if it's defined on the very element we're trying to modify.
className = element.GetStringAttribute("class", className); className = element.GetStringAttribute("class", className);
} }