kunit: cleanup assertion macro internal variables
authorDaniel Latypov <dlatypov@google.com>
Thu, 27 Jan 2022 21:52:22 +0000 (13:52 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 31 Jan 2022 18:55:48 +0000 (11:55 -0700)
commitc2741453478badf571ef020d160053e8d5e1ba94
tree5229172b01762e0a8f79b4401c3baf4026872a93
parent2b6861e2372bac68861c54372f68f6016a7484fc
kunit: cleanup assertion macro internal variables

All the operands should be tagged `const`.
We're only assigning them to variables so that we can compare them (e.g.
check if left == right, etc.) and avoid evaluating expressions multiple
times.

There's no need for them to be mutable.

Also rename the helper variable `loc` to `__loc` like we do with
`__assertion` and `__strs` to avoid potential name collisions with user
code.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
include/kunit/test.h