Added template sub-directory for mocks
This commit is contained in:
parent
478a7cd0a6
commit
1d3dc7d572
3 changed files with 50 additions and 0 deletions
18
.template_files/mock_module/CMakeLists.txt
Normal file
18
.template_files/mock_module/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# File: tests/shared/mocks/module_name/CMakeLists.txt
|
||||
|
||||
# TEST_RUNNER
|
||||
add_library(module_name STATIC
|
||||
module_name.cpp
|
||||
)
|
||||
|
||||
target_include_directories(module_name PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
#Next comes the shared and non-module specific test depencencies.
|
||||
#${CMAKE_SOURCE_DIR}/tests/shared/mocks/
|
||||
#${CMAKE_SOURCE_DIR}/tests/shared/fakes/
|
||||
#${CMAKE_SOURCE_DIR}/tests/shared/stubs/
|
||||
)
|
||||
|
||||
target_link_libraries(module_name
|
||||
${CPPUTEST_LIBRARIES}
|
||||
)
|
||||
3
.template_files/mock_module/module_name.c
Normal file
3
.template_files/mock_module/module_name.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include "module_name.h"
|
||||
|
||||
|
||||
29
.template_files/mock_module/module_name.h
Normal file
29
.template_files/mock_module/module_name.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* @brief Module description
|
||||
* @details This file is an <Purpose here>
|
||||
* @author Jake G
|
||||
* @date todays_date
|
||||
* @copyright None
|
||||
* @file module_name.h
|
||||
*/
|
||||
|
||||
//#pragma once
|
||||
#ifndef module_name
|
||||
#define module_name
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif //module_name
|
||||
Loading…
Add table
Reference in a new issue