Created
February 7, 2020 21:44
-
-
Save Forty-Bot/b71ecf8551d155b7651a43a16c8b5d3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "foo.h" | |
| /* Other code */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "foo.h" | |
| TEST_STATIC int foo(int x) | |
| { | |
| /* ... */ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef FOO_H | |
| #define FOO_H | |
| #include "test.h" | |
| TEST_STATIC int foo(int x); | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef TEST_H | |
| #define TEST_H | |
| /* Declare something static, unless we are doing unit tests */ | |
| #ifdef CONFIG_UNIT_TEST | |
| #define TEST_STATIC | |
| #else | |
| #define TEST_STATIC static | |
| #endif | |
| #endif /* TEST_H */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment