tests: net: lib: lwm2m: detects no-operation setter and getter functions
Test case `test_set_bulk` and `test_get_set` test the LwM2m getter and
setter function by
- init a buffer with some value
- calling lwm2m_set_... with buffer as parameter
- calling lwm2_get_... by letting `get` write-back into the same
buffer(!)
- compare the buffer with the init value
That implementation can't recognize a no-operation getter function.
This change adds some C macro magic for both test cases where
an `out` buffer for setter and an `in` buffer for getter functions
exists. The buffers are checked before use for inequality to avoid
any unexpected pass.
Signed-off-by:
Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
Loading
Please sign in to comment