testframework.h
来自「Active Object实现动画」· C头文件 代码 · 共 36 行
H
36 行
#include <e32base.h>
#include <e32cons.h>
#include "AOExampleEngine.h"
void doTestL(CConsoleBase& aConsole);
_LIT( KExeTest,"ExeText" );
LOCAL_C int callTest()
{
CConsoleBase* console = Console::NewL( KExeTest, TSize( KConsFullScreen, KConsFullScreen ) );
CleanupStack::PushL(console);
TRAPD(error, doTestL(*console) );
if (error)
{
_LIT(KFormatFailed,"\nleave code: %d ");
console->Printf(KFormatFailed, error);
User::After(5 * 1000000);
}
CleanupStack::PopAndDestroy();
return error;
}
GLDEF_C TInt E32Main() // main function called by E32
{
__UHEAP_MARK;
CTrapCleanup* cleanup=CTrapCleanup::New();
TRAPD( error, callTest() );
__ASSERT_ALWAYS( !error, User::Panic( KExeTest, error ) );
delete cleanup;
__UHEAP_MARKEND;
return error; // and return
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?