... | ... | @@ -1035,6 +1035,8 @@ sl_can_tp__config_S sl_can_tp__config = { |
|
|
|
|
|
# Code Templates
|
|
|
|
|
|
The empty lines between includes, and their order is very important. The `clang-format` will re-order `#includes` if they are not ordered correctly.
|
|
|
|
|
|
## Header File
|
|
|
```c
|
|
|
/**
|
... | ... | @@ -1046,6 +1048,10 @@ sl_can_tp__config_S sl_can_tp__config = { |
|
|
extern "C" {
|
|
|
#endif
|
|
|
|
|
|
#include <clib.h>
|
|
|
|
|
|
#include "others.h"
|
|
|
|
|
|
/*******************************************************************************
|
|
|
*
|
|
|
* D E F I N E S
|
... | ... | @@ -1077,11 +1083,14 @@ extern "C" { |
|
|
|
|
|
## Source File
|
|
|
```c
|
|
|
#include <clib>
|
|
|
#include <clib.h>
|
|
|
|
|
|
#include "sl_unit_test_facilitator.h"
|
|
|
|
|
|
#include "<layer>_<module>.h"
|
|
|
#include "<layer>_<module>_private.h"
|
|
|
#include "sl_unit_test_facilitator.h"
|
|
|
|
|
|
#include "others.h"
|
|
|
|
|
|
/*******************************************************************************
|
|
|
*
|
... | ... | @@ -1108,7 +1117,6 @@ extern "C" { |
|
|
## Private Source File
|
|
|
```c
|
|
|
#include <clib>
|
|
|
#include "sl_unit_test_facilitator.h"
|
|
|
|
|
|
/*******************************************************************************
|
|
|
*
|
... | ... | @@ -1138,14 +1146,15 @@ extern "C" { |
|
|
|
|
|
## Unity Unit-Test Source File
|
|
|
```c
|
|
|
#include "unity.h"
|
|
|
#include <clib.h>
|
|
|
|
|
|
#include "sl_unit_test_facilitator.h"
|
|
|
#include <c_libs.h>
|
|
|
#include "unity.h"
|
|
|
|
|
|
// Separate next three include groups by an empty line
|
|
|
// -- You can delete the lines starting with --
|
|
|
#include "your_module_under_test.h"
|
|
|
#include "your_module_under_test_private.h"
|
|
|
#include "module.h"
|
|
|
#include "module_private.h"
|
|
|
|
|
|
// Mock out these files
|
|
|
#include "Mocksome_module.h"
|
... | ... | |