test: don't inspect values if not necessary
The inspection triggered on each assert call eagerly even tough the assertion was never triggered. That caused significant CPU overhead.
I currently try to figure out what a nice API would look like for lazy custom assert messages but this can go in right away.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines