../common/physics.qc
../common/playerstats.qc
../common/p2mathlib.qc
-../common/test.qc
../common/util.qc
../common/viewloc.qc
#include "rpn.qh"
#include "../mapinfo.qh"
-#include "../test.qh"
#ifndef MENUQC
#include "../notifications.qh"
+++ /dev/null
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "test.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
- #include "../dpdefs/dpextensions.qh"
- #include "test.qh"
-#endif
-
-float TEST_failed;
-float TEST_ok;
-
-void TEST_Fail(string cond)
-{
- printf("Assertion failed: ", cond);
- //backtrace();
- ++TEST_failed;
-}
-
-void TEST_OK()
-{
- TEST_ok = true;
-}
-
-float TEST_RunAll()
-{
- int f = 0;
- float n = numentityfields();
- for(int i = 0; i < n; ++i)
- {
- string name = entityfieldname(i);
- if(substring(name, 0, 6) == "_TEST_")
- if(!TEST_Run(substring(name, 6, -1)))
- ++f;
- }
- if(f)
- {
- printf("%d tests failed\n", f);
- return 1;
- }
- else
- {
- printf("All tests OK\n", f);
- return 0;
- }
-}
-
-float TEST_Run(string s)
-{
- printf("%s: testing...\n", s);
- TEST_failed = TEST_ok = 0;
- callfunction(strcat("_TEST_", s));
- if(TEST_failed > 0)
- {
- printf("%s: %d items failed.\n", s, TEST_failed);
- return 0;
- }
- else if(!TEST_ok)
- {
- printf("%s: did not complete.\n", s);
- return 0;
- }
- return 1;
-}
+++ /dev/null
-#ifndef TEST_H
-#define TEST_H
-
-#define TEST_Check(cond) do { if(!(cond)) TEST_Fail(#cond); } while(0)
-
-void TEST_OK();
-void TEST_Fail(string cond);
-
-float TEST_RunAll();
-float TEST_Run(string test);
-#endif
#include "OO.qh"
#include "Progname.qh"
#include "Registry.qh"
+#include "test.qc"
#include "urllib.qc"
--- /dev/null
+#include "test.qh"
+
+float TEST_failed;
+float TEST_ok;
+
+void TEST_Fail(string cond)
+{
+ printf("Assertion failed: ", cond);
+ //backtrace();
+ ++TEST_failed;
+}
+
+void TEST_OK()
+{
+ TEST_ok = true;
+}
+
+float TEST_RunAll()
+{
+ int f = 0;
+ float n = numentityfields();
+ for(int i = 0; i < n; ++i)
+ {
+ string name = entityfieldname(i);
+ if(substring(name, 0, 6) == "_TEST_")
+ if(!TEST_Run(substring(name, 6, -1)))
+ ++f;
+ }
+ if(f)
+ {
+ printf("%d tests failed\n", f);
+ return 1;
+ }
+ else
+ {
+ printf("All tests OK\n", f);
+ return 0;
+ }
+}
+
+float TEST_Run(string s)
+{
+ printf("%s: testing...\n", s);
+ TEST_failed = TEST_ok = 0;
+ callfunction(strcat("_TEST_", s));
+ if(TEST_failed > 0)
+ {
+ printf("%s: %d items failed.\n", s, TEST_failed);
+ return 0;
+ }
+ else if(!TEST_ok)
+ {
+ printf("%s: did not complete.\n", s);
+ return 0;
+ }
+ return 1;
+}
--- /dev/null
+#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();
+void TEST_Fail(string cond);
+
+float TEST_RunAll();
+float TEST_Run(string test);
+#endif
#include "xonotic/util.qh"
#include "../common/constants.qh"
-#include "../common/test.qh"
#include "../common/util.qh"
#define localcmd cmd
../common/campaign_setup.qc
../common/mapinfo.qc
../common/playerstats.qc
-../common/test.qc
../common/util.qc
../common/items/all.qc
#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"
../common/physics.qc
../common/playerstats.qc
../common/p2mathlib.qc
-../common/test.qc
../common/viewloc.qc
../common/triggers/include.qc
../common/util.qc