Fix: patch unit_test.h to use dead template for test bodies
This commit is contained in:
parent
547aadcebe
commit
752d9e2c7b
1 changed files with 15 additions and 0 deletions
15
patches/0002-suppress-unit-tests.patch
Normal file
15
patches/0002-suppress-unit-tests.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- a/unit_test.h
|
||||
+++ b/unit_test.h
|
||||
@@ -53,9 +53,10 @@
|
||||
|
||||
#else
|
||||
|
||||
+// Dead template: body parsed but never instantiated → never compiled
|
||||
#define TEST_BEGIN__(text, file, line) \
|
||||
- namespace UnitTest##line { \
|
||||
- static void Test() {
|
||||
+ namespace DeadTest##line { \
|
||||
+ template<bool _dummy=false> static void Test() {
|
||||
|
||||
#define TEST_END \
|
||||
} \
|
||||
Loading…
Add table
Add a link
Reference in a new issue