|
Xonotic
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | _TEST_ASSERT(statement) |
| #define | ADD_FAILURE(msg) |
| Add a failure, but continue. More... | |
| #define | ASSERT_EQ(expected, actual) _TEST_ASSERT(EXPECT_EQ(expected, actual)) |
| #define | ASSERT_FALSE(condition) ASSERT_EQ(false, condition) |
| #define | ASSERT_GE(val1, val2) _TEST_ASSERT(EXPECT_GE(val1, val2)) |
| #define | ASSERT_GT(val1, val2) _TEST_ASSERT(EXPECT_GT(val1, val2)) |
| #define | ASSERT_LE(val1, val2) _TEST_ASSERT(EXPECT_LE(val1, val2)) |
| #define | ASSERT_LT(val1, val2) _TEST_ASSERT(EXPECT_LT(val1, val2)) |
| #define | ASSERT_NE(val1, val2) _TEST_ASSERT(EXPECT_NE(val1, val2)) |
| #define | ASSERT_NO_FATAL_FAILURE(statement) EXPECT_NO_FATAL_FAILURE_(statement, { ++TEST_fatal; return; }) |
| #define | ASSERT_TRUE(condition) ASSERT_EQ(true, condition) |
| #define | EXPECT_EQ(expected_, actual_) |
| #define | EXPECT_FALSE(condition) EXPECT_EQ(false, condition) |
| #define | EXPECT_GE(val1, val2) EXPECT_TRUE((val1) >= (val2)) |
| #define | EXPECT_GT(val1, val2) EXPECT_TRUE((val1) > (val2)) |
| #define | EXPECT_LE(val1, val2) EXPECT_TRUE((val1) <= (val2)) |
| #define | EXPECT_LT(val1, val2) EXPECT_TRUE((val1) < (val2)) |
| #define | EXPECT_NE(val1, val2) EXPECT_TRUE((val1) != (val2)) |
| #define | EXPECT_NO_FATAL_FAILURE(statement) EXPECT_NO_FATAL_FAILURE_(statement, { }) |
| #define | EXPECT_NO_FATAL_FAILURE_(statement, then) |
| #define | EXPECT_NO_FATAL_FAILURE__(statement, then) |
| #define | EXPECT_TRUE(condition) EXPECT_EQ(true, condition) |
| #define | FAIL(msg) _TEST_ASSERT(ADD_FAILURE(msg)) |
| Add a failure and return. More... | |
| #define | HasFatalFailure() (TEST_fatal > 0) |
| #define | SUCCEED() (TEST_ok = true) |
| Must be present at the end of a test. More... | |
| #define | TEST(suite, test) |
| Use UpperCamelCase for suite and test only. More... | |
Functions | |
| bool | RUN_ALL_TESTS () |
| bool | TEST_Run (string test) |
Variables | |
| int | TEST_failed |
| int | TEST_fatal |
| bool | TEST_ok |
| #define _TEST_ASSERT | ( | statement | ) |
| #define ADD_FAILURE | ( | msg | ) |
Add a failure, but continue.
| #define ASSERT_EQ | ( | expected, | |
| actual | |||
| ) | _TEST_ASSERT(EXPECT_EQ(expected, actual)) |
| #define ASSERT_GE | ( | val1, | |
| val2 | |||
| ) | _TEST_ASSERT(EXPECT_GE(val1, val2)) |
| #define ASSERT_GT | ( | val1, | |
| val2 | |||
| ) | _TEST_ASSERT(EXPECT_GT(val1, val2)) |
| #define ASSERT_LE | ( | val1, | |
| val2 | |||
| ) | _TEST_ASSERT(EXPECT_LE(val1, val2)) |
| #define ASSERT_LT | ( | val1, | |
| val2 | |||
| ) | _TEST_ASSERT(EXPECT_LT(val1, val2)) |
| #define ASSERT_NE | ( | val1, | |
| val2 | |||
| ) | _TEST_ASSERT(EXPECT_NE(val1, val2)) |
| #define ASSERT_NO_FATAL_FAILURE | ( | statement | ) | EXPECT_NO_FATAL_FAILURE_(statement, { ++TEST_fatal; return; }) |
| #define EXPECT_EQ | ( | expected_, | |
| actual_ | |||
| ) |
| #define EXPECT_GE | ( | val1, | |
| val2 | |||
| ) | EXPECT_TRUE((val1) >= (val2)) |
| #define EXPECT_GT | ( | val1, | |
| val2 | |||
| ) | EXPECT_TRUE((val1) > (val2)) |
| #define EXPECT_LE | ( | val1, | |
| val2 | |||
| ) | EXPECT_TRUE((val1) <= (val2)) |
| #define EXPECT_LT | ( | val1, | |
| val2 | |||
| ) | EXPECT_TRUE((val1) < (val2)) |
| #define EXPECT_NE | ( | val1, | |
| val2 | |||
| ) | EXPECT_TRUE((val1) != (val2)) |
Definition at line 52 of file test.qh.
Referenced by MX_Messages_(), MX_Sync_(), TEST(), and test_weapons_hurt().
| #define EXPECT_NO_FATAL_FAILURE | ( | statement | ) | EXPECT_NO_FATAL_FAILURE_(statement, { }) |
| #define EXPECT_NO_FATAL_FAILURE_ | ( | statement, | |
| then | |||
| ) |
| #define EXPECT_NO_FATAL_FAILURE__ | ( | statement, | |
| then | |||
| ) |
| #define FAIL | ( | msg | ) | _TEST_ASSERT(ADD_FAILURE(msg)) |
| #define HasFatalFailure | ( | ) | (TEST_fatal > 0) |
| #define TEST | ( | suite, | |
| test | |||
| ) |
Use UpperCamelCase for suite and test only.
| bool RUN_ALL_TESTS | ( | ) |
Definition at line 4 of file test.qc.
References LOG_INFO, LOG_INFOF, and TEST_RunAll_accumulated().
Referenced by GenericCommand_runtest().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 19 of file test.qc.
References callfunction(), isfunction(), LOG_INFOF, strcat(), TEST_failed, TEST_fatal, and TEST_ok.
Referenced by GenericCommand_runtest().
Here is the call graph for this function:
Here is the caller graph for this function:| int TEST_failed |
Definition at line 75 of file test.qh.
Referenced by TEST_Run().
| int TEST_fatal |
Definition at line 73 of file test.qh.
Referenced by TEST_Run().
| bool TEST_ok |
Definition at line 74 of file test.qh.
Referenced by TEST_Run().