tests: arch: arm: fix bug in z_assert expression
The commit fixes two assert expressions in the test, which evaluate the return value of _swap(.) function and the value of the thread's swap return variable. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
be2eb2a19f
commit
44f3b79b6f
1 changed files with 6 additions and 4 deletions
|
@ -476,10 +476,12 @@ void test_arm_thread_swap(void)
|
|||
|
||||
#if !defined(CONFIG_NO_OPTIMIZATIONS)
|
||||
/* The thread is now swapped-back in. */
|
||||
zassert_true(_current->arch.swap_return_value = SWAP_RETVAL,
|
||||
"Swap value not set as expected\n");
|
||||
zassert_true(_current->arch.swap_return_value = swap_return_val,
|
||||
"Swap value not returned as expected\n");
|
||||
zassert_equal(_current->arch.swap_return_value, SWAP_RETVAL,
|
||||
"Swap value not set as expected: 0x%x (0x%x)\n",
|
||||
_current->arch.swap_return_value, SWAP_RETVAL);
|
||||
zassert_equal(_current->arch.swap_return_value, ztest_swap_return_val,
|
||||
"Swap value not returned as expected 0x%x (0x%x)\n",
|
||||
_current->arch.swap_return_value, ztest_swap_return_val);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue