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:
Ioannis Glaropoulos 2019-09-20 18:21:43 +02:00
commit 44f3b79b6f

View file

@ -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)