From bcadfbac06557383ee6d266bb92331d6fb1e9599 Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 27 Aug 2015 09:40:54 +1000 Subject: [PATCH] Move test to /lib --- qcsrc/client/progs.src | 1 - qcsrc/common/command/generic.qc | 1 - qcsrc/lib/_all.inc | 1 + qcsrc/{common => lib}/test.qc | 9 +-------- qcsrc/{common => lib}/test.qh | 2 ++ qcsrc/menu/menu.qh | 1 - qcsrc/menu/progs.src | 1 - qcsrc/server/mutators/mutators_include.qc | 1 - qcsrc/server/progs.src | 1 - 9 files changed, 4 insertions(+), 14 deletions(-) rename qcsrc/{common => lib}/test.qc (81%) rename qcsrc/{common => lib}/test.qh (87%) diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src index 3c6ccc1c6..1b5471b94 100644 --- a/qcsrc/client/progs.src +++ b/qcsrc/client/progs.src @@ -52,7 +52,6 @@ weapons/projectile.qc // TODO ../common/physics.qc ../common/playerstats.qc ../common/p2mathlib.qc -../common/test.qc ../common/util.qc ../common/viewloc.qc diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index d12cc064e..14bc58947 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -5,7 +5,6 @@ #include "rpn.qh" #include "../mapinfo.qh" -#include "../test.qh" #ifndef MENUQC #include "../notifications.qh" diff --git a/qcsrc/lib/_all.inc b/qcsrc/lib/_all.inc index 1e7b85f48..5a55b538b 100644 --- a/qcsrc/lib/_all.inc +++ b/qcsrc/lib/_all.inc @@ -7,4 +7,5 @@ #include "OO.qh" #include "Progname.qh" #include "Registry.qh" +#include "test.qc" #include "urllib.qc" diff --git a/qcsrc/common/test.qc b/qcsrc/lib/test.qc similarity index 81% rename from qcsrc/common/test.qc rename to qcsrc/lib/test.qc index 966553b27..04f9f68fe 100644 --- a/qcsrc/common/test.qc +++ b/qcsrc/lib/test.qc @@ -1,11 +1,4 @@ -#if defined(CSQC) - #include "../dpdefs/csprogsdefs.qh" - #include "test.qh" -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../dpdefs/dpextensions.qh" - #include "test.qh" -#endif +#include "test.qh" float TEST_failed; float TEST_ok; diff --git a/qcsrc/common/test.qh b/qcsrc/lib/test.qh similarity index 87% rename from qcsrc/common/test.qh rename to qcsrc/lib/test.qh index edc2f5bf3..d1f5357a5 100644 --- a/qcsrc/common/test.qh +++ b/qcsrc/lib/test.qh @@ -1,6 +1,8 @@ #ifndef TEST_H #define TEST_H +#include "../common/util.qh" + #define TEST_Check(cond) do { if(!(cond)) TEST_Fail(#cond); } while(0) void TEST_OK(); diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index 020a65a20..e4f594f71 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -9,7 +9,6 @@ #include "xonotic/util.qh" #include "../common/constants.qh" -#include "../common/test.qh" #include "../common/util.qh" #define localcmd cmd diff --git a/qcsrc/menu/progs.src b/qcsrc/menu/progs.src index 4192c6991..600e326a3 100644 --- a/qcsrc/menu/progs.src +++ b/qcsrc/menu/progs.src @@ -20,7 +20,6 @@ xonotic/util.qc ../common/campaign_setup.qc ../common/mapinfo.qc ../common/playerstats.qc -../common/test.qc ../common/util.qc ../common/items/all.qc diff --git a/qcsrc/server/mutators/mutators_include.qc b/qcsrc/server/mutators/mutators_include.qc index a703fdc19..c5b1ce2ca 100644 --- a/qcsrc/server/mutators/mutators_include.qc +++ b/qcsrc/server/mutators/mutators_include.qc @@ -14,7 +14,6 @@ #include "../../common/util.qh" #include "../../common/nades.qh" #include "../../common/buffs.qh" - #include "../../common/test.qh" #include "../../common/command/markup.qh" #include "../../common/command/rpn.qh" #include "../../common/command/generic.qh" diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index 0cf64cae3..61ec76196 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -99,7 +99,6 @@ weapons/weaponsystem.qc ../common/physics.qc ../common/playerstats.qc ../common/p2mathlib.qc -../common/test.qc ../common/viewloc.qc ../common/triggers/include.qc ../common/util.qc -- 2.39.2