Skip to content
Snippets Groups Projects
Unverified Commit a10a7555 authored by Alexandre Abadie's avatar Alexandre Abadie Committed by GitHub
Browse files

Merge pull request #8629 from ochristi/fix_test_atomic_dec_positive

unittests/tests-core: Fix tests in loop not being executed
parents bad08596 d7853ac8
No related branches found
No related tags found
No related merge requests found
...@@ -88,7 +88,7 @@ static void test_atomic_dec_positive(void) ...@@ -88,7 +88,7 @@ static void test_atomic_dec_positive(void)
{ {
atomic_int res = ATOMIC_VAR_INIT(99); atomic_int res = ATOMIC_VAR_INIT(99);
for (int i = 99; i < -123; --i) { for (int i = 99; i > -123; --i) {
TEST_ASSERT_EQUAL_INT(i, atomic_fetch_sub(&res, 1)); TEST_ASSERT_EQUAL_INT(i, atomic_fetch_sub(&res, 1));
TEST_ASSERT_EQUAL_INT(i - 1, atomic_load(&res)); TEST_ASSERT_EQUAL_INT(i - 1, atomic_load(&res));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment