diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-16 22:10:25 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-16 22:10:25 -0300 |
commit | 21fd453ed9c2052e8b35755ae20e2f4f9a028b20 (patch) | |
tree | 2091e2050f635f078ceb871659198c3f71a6c6f9 /Project/main.cpp | |
parent | 8869bd97ec059ecebc89529b10b736f8fab9c001 (diff) | |
download | PSP.git-21fd453ed9c2052e8b35755ae20e2f4f9a028b20.tar.gz PSP.git-21fd453ed9c2052e8b35755ae20e2f4f9a028b20.tar.xz PSP.git-21fd453ed9c2052e8b35755ae20e2f4f9a028b20.zip |
PSP-UFU automated test
Diffstat (limited to 'Project/main.cpp')
-rw-r--r-- | Project/main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Project/main.cpp b/Project/main.cpp index e064ab5..a9bf579 100644 --- a/Project/main.cpp +++ b/Project/main.cpp @@ -133,13 +133,14 @@ class MainApp : public wxApp //cmdLineParser.SetDesc(cmdLineDesc); cmdLineParser.AddParam("", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); cmdLineParser.AddSwitch("t", "test", "Run PSP-UFU tests"); + + bool test = false; if(cmdLineParser.Parse() == 0) { wxCmdLineArgs args = cmdLineParser.GetArguments(); for(auto it = args.begin(), itEnd = args.end(); it != itEnd; ++it) { if(it->GetKind() == wxCMD_LINE_PARAM) { openFilePath = it->GetStrVal();} else if(it->GetShortName() == "t") { - wxMessageOutput::Get()->Printf("Test OK!"); - exit(0); + test = true; } } } @@ -149,6 +150,10 @@ class MainApp : public wxApp mainFrame->SetIcon(wxICON(aaaaprogicon)); #endif SetTopWindow(mainFrame); + if(test) { + GetTopWindow()->Show(); + exit(mainFrame->RunPSPTest()); + } return GetTopWindow()->Show(); } |