本文整理匯總了C++中TestApp::Run方法的典型用法代碼示例。如果您正苦於以下問題:C++ TestApp::Run方法的具體用法?C++ TestApp::Run怎麽用?C++ TestApp::Run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TestApp
的用法示例。
在下文中一共展示了TestApp::Run方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: main
int main( int argc, char* argv[] )
{
TestApp* pcTest = new TestApp();
pcTest->Run();
return( 0 );
}
示例2: _tWinMain
INT WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE, LPTSTR, INT)
{
TestApp app;
app.Setup(hInst);
return app.Run();
}
示例3: main
// main function
int main()
{
setlocale(LC_ALL, "");
TestApp *app = TestApp::Instance();
app->Run();
return 0;
}
示例4: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
TestApp* tApp = new TestApp(hInstance);
if(!tApp->Init())
return 1;
return tApp->Run();
}
示例5: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
TestApp app;
app.Initialize();
app.Run();
app.Finalize();
return 0;
}
示例6: message
// main
int
main(int argc, char **argv)
{
// find app file and get signature from resources
char path[B_PATH_NAME_LENGTH];
status_t error = get_app_path(path);
char signature[B_MIME_TYPE_LENGTH];
if (error == B_OK) {
// init app file
BFile file;
error = file.SetTo(path, B_READ_ONLY);
// get signature
BString signatureString;
if (error == B_OK) {
if (file.ReadAttrString("signature", &signatureString) == B_OK
&& signatureString.Length() > 0) {
strcpy(signature, signatureString.String());
} else
strcpy(signature, kDefaultTestAppSignature);
} else
printf("ERROR: Couldn't init app file: %s\n", strerror(error));
} else
printf("ERROR: Couldn't get app ref: %s\n", strerror(error));
// create the app
TestApp *app = NULL;
if (error == B_OK) {
app = new TestApp(signature);
// unitTesterMessenger = BMessenger(kUnitTesterSignature);
error = init_unit_tester_messenger();
if (error != B_OK)
printf("ERROR: Couldn't init messenger: %s\n", strerror(error));
// send started message
BMessage message(MSG_STARTED);
message.AddString("path", path);
unitTesterMessenger.SendMessage(&message);
// send main() args message
BMessage argsMessage(MSG_MAIN_ARGS);
argsMessage.AddInt32("argc", argc);
for (int i = 0; i < argc; i++)
argsMessage.AddString("argv", argv[i]);
unitTesterMessenger.SendMessage(&argsMessage);
// run the app
app->Run();
delete app;
// send terminated message
unitTesterMessenger.SendMessage(MSG_TERMINATED);
}
return 0;
}
示例7: Run
void Test::Run()
{
m_result = true;
try
{
TestApp* app = new TestApp;
Punk::Config cfg;
cfg.gpu_config.view_width = 800;
cfg.gpu_config.view_height = 600;
app->Init(cfg);
System::Mouse::Instance()->LockInWindow(false);
app->Run();
delete app;
}
catch(System::PunkException& e)
{
out_error() << e.ToString() << std::endl;
m_result = false;
}
catch(...)
{
m_result = false;
}
}