Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
test.qc
Go to the documentation of this file.
1
#include "
test.qh
"
2
3
int
TEST_RunAll_accumulated
(
int
init);
4
bool
RUN_ALL_TESTS
()
5
{
6
int
f =
TEST_RunAll_accumulated
(0);
7
if
(f)
8
{
9
LOG_HELPF
(
"%d tests failed"
, f);
10
return
true
;
11
}
12
else
13
{
14
LOG_HELP
(
"All tests OK"
);
15
return
false
;
16
}
17
}
18
19
bool
TEST_Run
(
string
s)
20
{
21
LOG_HELPF
(
"%s: testing..."
, s);
22
TEST_failed
= 0;
23
TEST_fatal
= 0;
24
TEST_ok
=
false
;
25
string
fn =
strcat
(
"_TEST_"
, s);
26
if
(
isfunction
(fn))
27
callfunction
(fn);
28
if
(
TEST_failed
> 0)
29
{
30
LOG_HELPF
(
"%s: %d items failed."
, s,
TEST_failed
);
31
return
false
;
32
}
33
else
if
(!
TEST_ok
)
34
{
35
LOG_HELPF
(
"%s: did not complete."
, s);
36
return
false
;
37
}
38
return
true
;
39
}
LOG_HELP
#define LOG_HELP(...)
Definition
log.qh:83
LOG_HELPF
#define LOG_HELPF(...)
Definition
log.qh:84
callfunction
void callfunction(...)
isfunction
float isfunction(string function_name)
strcat
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
TEST_RunAll_accumulated
int TEST_RunAll_accumulated(int init)
RUN_ALL_TESTS
bool RUN_ALL_TESTS()
Definition
test.qc:4
TEST_Run
bool TEST_Run(string s)
Definition
test.qc:19
test.qh
TEST_failed
int TEST_failed
Definition
test.qh:76
TEST_ok
bool TEST_ok
Definition
test.qh:75
TEST_fatal
int TEST_fatal
Definition
test.qh:74
lib
test.qc
Generated on
for Xonotic QuakeC by
1.16.1