test: ftl: separate mocked functions

This commit is contained in:
S.J.R. van Schaik 2017-09-19 18:45:37 +02:00
parent 2ff1003430
commit 8e4dc856e7
2 changed files with 29 additions and 0 deletions

26
source/tests/ftl/mock.c Normal file
View file

@ -0,0 +1,26 @@
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <cmocka.h>
#include <ftl.h>
int __wrap_prepare_head(struct ftl_map *map)
{
(void)map;
return mock_type(int);
}
int __wrap_write_page_desc(struct ftl_map *map,
struct ftl_page_desc *page_desc)
{
check_expected_ptr(map);
check_expected_ptr(page_desc);
return mock_type(int);
}

3
source/tests/ftl/mock.h Normal file
View file

@ -0,0 +1,3 @@
#pragma once
int __wrap_prepare_head(struct ftl_map *map);