Parcourir la source

Add extern support for file-scope variables in testsupport.h

Andrea Shepard il y a 10 ans
Parent
commit
4e4a760491
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/common/testsupport.h

+ 2 - 0
src/common/testsupport.h

@@ -6,8 +6,10 @@
 
 #ifdef TOR_UNIT_TESTS
 #define STATIC
+#define EXTERN(type, name) extern type name;
 #else
 #define STATIC static
+#define EXTERN(type, name)
 #endif
 
 /** Quick and dirty macros to implement test mocking.