From 8e4dc856e7c03726ff180a6a0086b1be76cc56cf Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Tue, 19 Sep 2017 18:45:37 +0200 Subject: [PATCH] test: ftl: separate mocked functions --- source/tests/ftl/mock.c | 26 ++++++++++++++++++++++++++ source/tests/ftl/mock.h | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 source/tests/ftl/mock.c create mode 100644 source/tests/ftl/mock.h diff --git a/source/tests/ftl/mock.c b/source/tests/ftl/mock.c new file mode 100644 index 0000000..8813708 --- /dev/null +++ b/source/tests/ftl/mock.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include + +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); +} diff --git a/source/tests/ftl/mock.h b/source/tests/ftl/mock.h new file mode 100644 index 0000000..08f258f --- /dev/null +++ b/source/tests/ftl/mock.h @@ -0,0 +1,3 @@ +#pragma once + +int __wrap_prepare_head(struct ftl_map *map);