📄 guitestresult.h
字号:
#ifndef CPPUNIT_GUITESTRESULT_H
#define CPPUNIT_GUITESTRESULT_H
#include <afxmt.h>
#ifndef TESTRESULT_H
#include "TestResult.h"
#endif
class TestRunnerDlg;
class GUITestResult : public TestResult
{
public:
GUITestResult (TestRunnerDlg *runner);
~GUITestResult ();
void addError (Test *test, CppUnitException *e);
void addFailure (Test *test, CppUnitException *e);
void endTest (Test *test);
void stop ();
protected:
class LightweightSynchronizationObject : public TestResult::SynchronizationObject
{
CCriticalSection m_syncObject;
public:
void lock () { m_syncObject.Lock (); }
void unlock () { m_syncObject.Unlock (); }
};
private:
TestRunnerDlg *m_runner;
};
// Construct with lightweight synchronization
inline GUITestResult::GUITestResult (TestRunnerDlg *runner)
: m_runner (runner) { setSynchronizationObject (new LightweightSynchronizationObject ()); }
// Destructor
inline GUITestResult::~GUITestResult ()
{}
// Override without protection to prevent deadlock
inline void GUITestResult::stop ()
{ m_stop = true; }
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -