![]() |
|
Base game test class. More...
Public Member Functions | |
| TestResultBase | AssertTrue (bool expression, string msg) |
| Asserts that a boolean expression is true. | |
| notnull TestResultBase | SetResultSuccess (bool force=false) |
| Set result indicating that the test succeeded. | |
| notnull TestResultBase | SetResultFailure (string reason, string param1="", string param2="", string param3="") |
| Set result indicating that the test failed. | |
| TestSuite | GetSuite () |
| Get suite that owns the test. | |
| void | Print (string msg, LogLevel level=LogLevel.NORMAL) |
| Prints content of variable to console/log and autotest/log. | |
| void | PrintFormat (string fmt, string param1="", string param2="", string param3="", LogLevel level=LogLevel.NORMAL) |
| Prints formated text to console/log and autotest/log. | |
| void | PrintOnce (string msg, LogLevel level=LogLevel.NORMAL) |
| Prints content of variable to console/log and autotest/log. | |
Base game test class.
Provides integration with test specific logger for improved output.
| TestResultBase SCR_AutotestCaseBase.AssertTrue | ( | bool | expression, |
| string | msg ) |
Asserts that a boolean expression is true.
Will set the test as failed with provided message otherwise. If the test is already failed the current result will be used.
| TestSuite SCR_AutotestCaseBase.GetSuite | ( | ) |
Get suite that owns the test.
| void SCR_AutotestCaseBase.Print | ( | string | msg, |
| LogLevel | level = LogLevel::NORMAL ) |
Prints content of variable to console/log and autotest/log.
Shadows global Print to force the logs to go through SCR_AutotestPrinter.
| void SCR_AutotestCaseBase.PrintFormat | ( | string | fmt, |
| string | param1 = "", | ||
| string | param2 = "", | ||
| string | param3 = "", | ||
| LogLevel | level = LogLevel::NORMAL ) |
Prints formated text to console/log and autotest/log.
Shadows global PrintFormat to force the logs to go through SCR_AutotestPrinter.
| void SCR_AutotestCaseBase.PrintOnce | ( | string | msg, |
| LogLevel | level = LogLevel::NORMAL ) |
Prints content of variable to console/log and autotest/log.
Repeated prints of the same message will be replaced with "collected" variant indicating how many times it was printed.
| notnull TestResultBase SCR_AutotestCaseBase.SetResultFailure | ( | string | reason, |
| string | param1 = "", | ||
| string | param2 = "", | ||
| string | param3 = "" ) |
Set result indicating that the test failed.
| [in] | reason | Reason for the failure, supports string interpolation. |
| [in] | param1 | String param |
| [in] | param2 | String param |
| [in] | param3 | String param |
| notnull TestResultBase SCR_AutotestCaseBase.SetResultSuccess | ( | bool | force = false | ) |
Set result indicating that the test succeeded.
If the test is already failed the current result will be used, unless force is set.
| [in] | force | Allows overriding failed result. |