Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AutotestPrinter Class Reference

Protected Member Functions

void PrintTestSuitePrelude (TestSuite suite)
void PrintTestSuiteEpilogue (TestSuite suite)
void Log (string msg, LogLevel level=LogLevel.NORMAL, bool forceFileWrite=false, bool consoleLog=true)
 Should be used in tests instead of global Print. Forwards test output to separate file.
void LogOnce (string msg, LogLevel level=LogLevel.NORMAL)
 Prevents duplicate printing of the same message. Intended to be used with messages printed many times a second.
void LogTestCaseResult (TestBase test)

Protected Attributes

bool m_bLogVerbose
ref FileHandle m_LogFile
ref map< typename, ref array< string > > m_mLogBuffer = new map<typename, ref array<string>>()
string m_sLogOnceLastMsg
int m_iLogOnceLastMsgCount

Detailed Description

Specialized logging class for tests. Outputs logs to console and also buffers them for later output to autotest log file. Should be used instead of Print and PrintFormat inside the SCR_AutotestSuite and SCR_AutotestCase classes.

Definition at line 6 of file SCR_AutotestPrinter.c.

Member Function Documentation

◆ Log()

void SCR_AutotestPrinter::Log ( string msg,
LogLevel level = LogLevel.NORMAL,
bool forceFileWrite = false,
bool consoleLog = true )
inlineprotected

Should be used in tests instead of global Print. Forwards test output to separate file.

Definition at line 36 of file SCR_AutotestPrinter.c.

◆ LogOnce()

void SCR_AutotestPrinter::LogOnce ( string msg,
LogLevel level = LogLevel.NORMAL )
inlineprotected

Prevents duplicate printing of the same message. Intended to be used with messages printed many times a second.

Definition at line 74 of file SCR_AutotestPrinter.c.

◆ LogTestCaseResult()

void SCR_AutotestPrinter::LogTestCaseResult ( TestBase test)
inlineprotected

Writes test result to console and autotest log files. If test is failed or verbose logging is enabled will additionaly print test log output for debugging.

Definition at line 99 of file SCR_AutotestPrinter.c.

◆ PrintTestSuiteEpilogue()

void SCR_AutotestPrinter::PrintTestSuiteEpilogue ( TestSuite suite)
inlineprotected

Definition at line 28 of file SCR_AutotestPrinter.c.

◆ PrintTestSuitePrelude()

void SCR_AutotestPrinter::PrintTestSuitePrelude ( TestSuite suite)
inlineprotected

Definition at line 20 of file SCR_AutotestPrinter.c.

Member Data Documentation

◆ m_bLogVerbose

bool SCR_AutotestPrinter::m_bLogVerbose
protected

Definition at line 11 of file SCR_AutotestPrinter.c.

◆ m_iLogOnceLastMsgCount

int SCR_AutotestPrinter::m_iLogOnceLastMsgCount
protected

Definition at line 17 of file SCR_AutotestPrinter.c.

◆ m_LogFile

ref FileHandle SCR_AutotestPrinter::m_LogFile
protected

Definition at line 12 of file SCR_AutotestPrinter.c.

◆ m_mLogBuffer

ref map<typename, ref array<string> > SCR_AutotestPrinter::m_mLogBuffer = new map<typename, ref array<string>>()
protected

Definition at line 14 of file SCR_AutotestPrinter.c.

◆ m_sLogOnceLastMsg

string SCR_AutotestPrinter::m_sLogOnceLastMsg
protected

Definition at line 16 of file SCR_AutotestPrinter.c.


The documentation for this class was generated from the following file: