Skip to content

kcms/tablet: Start adding tests for the calibration tool

Joshua Goins requested to merge work/redstrate/calibration-tests into master

This is quite a math-heavy class, so it would be nice to start testing if it spits out the values we expect.

This makes a few changes:

  • Changes the layout of CalibrationTool to not hold a reference to InputDevice, but take it as a function argument as needed. This is mostly to facilitate easier test writing.
  • Document all of the public functions of CalibrationTool
  • Add a new test under tst_calibrationtool for ensuring it generates an identity matrix under perfect conditions.

This should also make it easier to write more tests in the future for this tool.

Merge request reports

Loading