aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Hillegeer <nicolas@hillegeer.com>2014-07-12 14:56:04 +0200
committerNicolas Hillegeer <nicolas@hillegeer.com>2014-07-16 19:05:35 +0200
commit109c70dc60b763362923549beeef312324fefba4 (patch)
treed38c653f84a83209f16afce8e9545f58763a4cd0
parent0564f781ab27aa7b419543f7867da6e761e179c5 (diff)
downloadrneovim-109c70dc60b763362923549beeef312324fefba4.tar.gz
rneovim-109c70dc60b763362923549beeef312324fefba4.tar.bz2
rneovim-109c70dc60b763362923549beeef312324fefba4.zip
test/preprocess: always declare EXTERN
Unit tests never need to declare globals, only access them. In the main code base this is handled by including "vim.h". If a file wants to declare globals (in the case of neovim that's only main.c), it #define's EXTERN and includes "vim.h". Otherwise, a file just includes "vim.h" (that's the majority case). Since we want to be able to run unit tests without including "vim.h", we predefine "EXTERN" to mean extern. That way, we don't have to include "vim.h".
-rw-r--r--test/unit/preprocess.moon2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/preprocess.moon b/test/unit/preprocess.moon
index aa74b8ce24..cb734da2f7 100644
--- a/test/unit/preprocess.moon
+++ b/test/unit/preprocess.moon
@@ -85,6 +85,8 @@ class Gcc
'-D "__asm(ARGS)="',
'-D "__asm__(ARGS)="',
'-D "__inline__="',
+ '-D "EXTERN=extern"',
+ '-D "INIT(...)="',
'-D_GNU_SOURCE',
'-DINCLUDE_GENERATED_DECLARATIONS'
}