1
1
//////////////////////////////////////////////////////////////////////////////
2
2
//////////////////////////////////////////////////////////////////////////////
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : unittestpp.h
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : unittestpp.h
7
7
// -------------------------------------------------------------------------
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
23
23
//////////////////////////////////////////////////////////////////////////////
24
24
//////////////////////////////////////////////////////////////////////////////
27
27
#define __UnitTestPP__
29
29
#include "plugin.h"
30
#include <wx/process.h>
33
37
class UnitTestPP : public IPlugin
35
39
wxEvtHandler *m_topWindow;
36
40
PipedProcess *m_proc;
38
43
UnitTestPP(IManager *manager);
41
46
//--------------------------------------------
43
48
//--------------------------------------------
44
49
virtual wxToolBar *CreateToolBar(wxWindow *parent);
45
virtual void CreatePluginMenu(wxMenu *pluginsMenu);
46
virtual void HookPopupMenu(wxMenu *menu, MenuType type);
47
virtual void UnHookPopupMenu(wxMenu *menu, MenuType type);
48
virtual void UnPlug();
50
virtual void CreatePluginMenu (wxMenu *pluginsMenu);
51
virtual void HookPopupMenu (wxMenu *menu, MenuType type);
52
virtual void UnHookPopupMenu (wxMenu *menu, MenuType type);
53
virtual void UnPlug ();
54
bool IsUnitTestProject (ProjectPtr p);
56
* @brief return list of the projects which are identified as UnitTests project
59
std::vector<ProjectPtr> GetUnitTestProjects();
51
void OnNewSimpleTest(wxCommandEvent &e);
52
void OnNewClassTest(wxCommandEvent &e);
53
void OnRunUnitTests(wxCommandEvent &e);
54
void OnRunUnitTestsUI(wxUpdateUIEvent &e);
55
void OnProcessTerminated(wxProcessEvent &e);
57
void DoCreateSimpleTest(const wxString &name, IEditor *editor);
58
void DoCreateFixtureTest(const wxString &name, const wxString &fixture, IEditor *editor);
62
void OnNewSimpleTest (wxCommandEvent &e);
63
void OnNewClassTest (wxCommandEvent &e);
64
void OnRunUnitTests (wxCommandEvent &e);
65
void OnRunUnitTestsUI (wxUpdateUIEvent &e);
66
void OnProcessTerminated (wxProcessEvent &e);
67
void DoCreateSimpleTest (const wxString &name, const wxString &projectName, const wxString &filename);
68
void DoCreateFixtureTest (const wxString &name, const wxString &fixture, const wxString &projectName, const wxString &filename);
69
IEditor* DoAddTestFile (const wxString &filename, const wxString &projectName);
70
wxFileName FindBestSourceFile (ProjectPtr proj, const wxFileName &filename);
61
wxMenu *CreateEditorPopMenu();
73
wxMenu* CreateEditorPopMenu ();
64
76
#endif //UnitTestPP