18 lines
740 B
C++
18 lines
740 B
C++
#ifndef TEST_COMMON_H
|
|
#define TEST_COMMON_H
|
|
#include "Log.h"
|
|
#include "VReturnCode.h"
|
|
#include <iostream>
|
|
const std::string TEST_REPORT_TIPS = "[ FAILURE ]"; //
|
|
class ITestCommon
|
|
{
|
|
public:
|
|
ITestCommon() = default;
|
|
virtual ~ITestCommon() = default;
|
|
static std::shared_ptr<ITestCommon> &GetInstance(std::shared_ptr<ITestCommon> *impl = nullptr);
|
|
virtual RETURN_CODE Init() { return VReturnCode::NewCode(VReturnCodeDefine::NOT_OK_VIRTUAL_FUNCTION); }
|
|
virtual RETURN_CODE UnInit() { return VReturnCode::NewCode(VReturnCodeDefine::NOT_OK_VIRTUAL_FUNCTION); }
|
|
virtual void IUsleep(unsigned long timeMs);
|
|
void WaitForTestFinish(unsigned int waitingTimeOut, bool (*ifFinished)(void *ctx), void *ctx = nullptr);
|
|
};
|
|
#endif |