Make HardwareStates in tests with a utility function

Currently, adding a new field to `struct HardwareState` requires
modifying struct literals on over 600 lines of unit tests to add its
default value, which I believe would take roughly an hour (assuming a
good knowledge of Vim). Since I have a CL adding one field already, and
intend to add another sometime soon, this CL refactors most of those
places to use the `make_hwstate` function, which provides default values
for the fields not relevant to touch tests. This removes the need to
update touch-related unit tests when adding an irrelevant field.

Much of this CL was created using the following macro in Neovim (saved
as `b`):

    $F}%dWimake_hwstate(^[$F}d5F,cs)^[

Executed with a command something like this:

    :g/, 0, 0, 0, 0, 0.0 },\?\( \+\/\/\|\n\)/norm! @b

TEST=run all unit tests
BUG=none

Change-Id: I29ee56628e87d3ca9bec27e6a914d0cacd158905
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/2029924
Commit-Queue: Harry Cutts <hcutts@chromium.org>
Tested-by: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
21 files changed