More schema-related cleanup.

- Declare every nonzero default; make the defaults cross-check total.
- Skip default-valued attributes in the hand-written writer paths.
- Fix type facts on hand-read elements, found by the dm_control diff.

PiperOrigin-RevId: 958999733
Change-Id: I3064ccc6ae1f049c20f273abc234cd02990a8b7e
This commit is contained in:
Yuval Tassa
2026-08-04 07:04:38 -07:00
committed by Copybara-Service
parent 10793e539e
commit 574b6bd6bf
8 changed files with 885 additions and 469 deletions
+2 -2
View File
@@ -135,8 +135,8 @@ TEST_F(MujocoTest, SaveXmlShortString) {
std::array<char, 10> out;
EXPECT_THAT(mj_saveXMLString(spec, out.data(), out.size(), error.data(),
error.size()),
273);
EXPECT_STREQ(error.data(), "Output string too short, should be at least 274");
223);
EXPECT_STREQ(error.data(), "Output string too short, should be at least 224");
mj_deleteSpec(spec);
mj_deleteModel(model);