Source code for the Trusted Boot Module.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
tbm-mcu/source/tests/main.c

41 lines
715 B

#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <cmocka.h>
#include <bitops.h>
#include <flash.h>
#include <ftl.h>
#include <macros.h>
size_t __wrap_flash_read(struct flash_dev *dev, uint32_t addr,
void *data, size_t len) __attribute__((used));
size_t __wrap_flash_read(struct flash_dev *dev, uint32_t addr,
void *data, size_t len)
{
(void)dev;
check_expected(addr);
check_expected(len);
memcpy(data, mock_ptr_type(void *), len);
return mock_type(size_t);
}
int test_find_block_div(void);
int test_read_page_desc(void);
int main(void)
{
int count = 0;
count += test_find_block_div();
count += test_read_page_desc();
return count;
}