TestCases - HebiRobotics/hebi-hrdf GitHub Wiki

Test cases

Here are some examples for some unit tests to handle some of the common and edge cases; more should be added!

Fundamental

  • parsing of various matrices (tab delineated, multiple space delineated, spaces before first number, wrong number of elements, not-actually-a-valid-rotation, etc)
  • parsing of various vectors (see matrix formatting cases)
  • check default values for com, output, etc. on rigid bodies
  • check that mass/com "offsets" work properly: they offset by the correct amount, but don't affect other properties.
  • check that mass/com "overrides" work properly: they offset by the correct amount, but don't affect other properties.
  • create example library -- one for each kit -- and assert that the computed output positions and center of mass positions match for a vector of zero positions, as well as assorted random joint angles. Only test non-tree kits.

Tree support

Allowed cases:

  • parsing of empty <output> elements should not fail
  • Mixed index/non-index usage of <output> element children for different parents, as long as there is consistency in each single parent
  • <output> contains a chain of model elements.
  • <output> contains a child element with multiple <output> elements (allowed)
  • Check parts of the "example library" above that contain trees.

Error cases:

  • The number of <output> elements exceeds the allowed number for a built in type
⚠️ **GitHub.com Fallback** ⚠️