tests: add check on sizeof() operator
This commit is contained in:
parent
9091d714b2
commit
51e02017d9
@ -64,6 +64,7 @@ const char* test_platform__global_h()
|
||||
const char* test_platform__compiler()
|
||||
{
|
||||
/* Check that initialization with { 0 } works as expected */
|
||||
{
|
||||
const gmio_transfer_t trsf_null_bracket0 = { 0 };
|
||||
gmio_transfer_t trsf_null_memset0;
|
||||
|
||||
@ -78,6 +79,13 @@ const char* test_platform__compiler()
|
||||
UTEST_ASSERT(sizeof(gmio_transfer_t) >= (sizeof(gmio_stream_t)
|
||||
+ sizeof(gmio_buffer_t)
|
||||
+ sizeof(gmio_task_iface_t)));
|
||||
}
|
||||
|
||||
/* Check sizeof() operator with fixed-size arrays */
|
||||
{
|
||||
uint8_t buff[4 * 1024]; /* 4KB */
|
||||
UTEST_ASSERT(sizeof(buff) == 4 * 1024);
|
||||
}
|
||||
|
||||
/* gmio doesn't support platforms where NULL != 0 */
|
||||
UTEST_ASSERT(NULL == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user