test: ftl: separate mocked functions

tags/0.1.0
S.J.R. van Schaik 7 years ago
parent 2ff1003430
commit 8e4dc856e7
  1. 26
      source/tests/ftl/mock.c
  2. 3
      source/tests/ftl/mock.h

@ -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);
}

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