Skip to content
Commit b234e86c authored by Stefan Schwendeler's avatar Stefan Schwendeler Committed by Benjamin Cabé
Browse files

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: default avatarStefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
parent 42ad5797
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment