1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/sys_atomic_utils_unittests: Extend test coverage

This commit is contained in:
Marian Buschsieweke 2021-11-23 14:24:15 +01:00
parent 78ded2dd08
commit c360b13e60
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -51,6 +51,10 @@ static void test_load_store(void)
uint64_t u64 = 42;
atomic_store_u64(&u64, 0x1337133713371337);
TEST_ASSERT_EQUAL_INT(atomic_load_u64(&u64), 0x1337133713371337);
void *ptr = NULL;
atomic_store_ptr(&ptr, &u64);
TEST_ASSERT(atomic_load_ptr(&ptr) == (void *)&u64);
}
static void test_fetch_op_u8(fetch_op_u8_t atomic_op, fetch_op_u8_t op)