Speeduino
Loading...
Searching...
No Matches
Macros
unit_testing.h File Reference

Unit testability support. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TESTABLE_STATIC   static
 Mark an entity as having static (internal) linkage, unless a unit test is in progress - then the entity is given external linkage so the test can access it.
 
#define TESTABLE_INLINE_STATIC   static inline
 Mark an entity as having static (internal) linkage & inlined, unless a unit test is in progress - then the entity is given external linkage so the test can access it.
 

Detailed Description

Unit testability support.

Macro Definition Documentation

◆ TESTABLE_INLINE_STATIC

#define TESTABLE_INLINE_STATIC   static inline

Mark an entity as having static (internal) linkage & inlined, unless a unit test is in progress - then the entity is given external linkage so the test can access it.

Most useful for translation unit scoped functions. I.e. "static inline" within a CPP file

◆ TESTABLE_STATIC

#define TESTABLE_STATIC   static

Mark an entity as having static (internal) linkage, unless a unit test is in progress - then the entity is given external linkage so the test can access it.

Most useful for translation unit scoped variables. I.e. static within a CPP file