~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

Viewing changes to UnitTestCPP/unittestpp.h

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-02-10 02:27:55 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210022755-m5692nfc1t5uf1w9
Tags: 1.0.2759+dfsg-0ubuntu1
* New upstream release (LP: #327216).
* debian/patches/series, debian/patches/00_fix-ia64-build.patch:
  + Dropped, applied upstream already.
* debian/patches/02_fix-desktop.patch,
  debian/patches/03_fix-sh.patch:
  + Refreshed to patch cleanly.
* debian/rules:
  + Make get-orig-source honour UPSTREAM_VERSION if set.
* debian/ctags-le.1,
  debian/codelite_indexer.1,
  debian/codelite.manpages:
  + Dropped ctags-le manpage, since ctags-le was replaced by
    codelite_indexer.
  + Added codelite_indexer manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////////
2
2
//////////////////////////////////////////////////////////////////////////////
3
3
//
4
 
// copyright            : (C) 2008 by Eran Ifrah                            
5
 
// file name            : unittestpp.h              
6
 
//                                                                          
 
4
// copyright            : (C) 2008 by Eran Ifrah
 
5
// file name            : unittestpp.h
 
6
//
7
7
// -------------------------------------------------------------------------
8
 
// A                                                                        
9
 
//              _____           _      _     _ _                            
10
 
//             /  __ \         | |    | |   (_) |                           
11
 
//             | /  \/ ___   __| | ___| |    _| |_ ___                      
12
 
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )                     
13
 
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/                     
14
 
//              \____/\___/ \__,_|\___\_____/_|\__\___|                     
15
 
//                                                                          
16
 
//                                                  F i l e                 
17
 
//                                                                          
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.                                   
22
 
//                                                                          
 
8
// A
 
9
//              _____           _      _     _ _
 
10
//             /  __ \         | |    | |   (_) |
 
11
//             | /  \/ ___   __| | ___| |    _| |_ ___
 
12
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )
 
13
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/
 
14
//              \____/\___/ \__,_|\___\_____/_|\__\___|
 
15
//
 
16
//                                                  F i l e
 
17
//
 
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.
 
22
//
23
23
//////////////////////////////////////////////////////////////////////////////
24
24
//////////////////////////////////////////////////////////////////////////////
25
25
 
27
27
#define __UnitTestPP__
28
28
 
29
29
#include "plugin.h"
 
30
#include <wx/process.h>
 
31
#include "project.h"
 
32
#include <vector>
30
33
 
31
34
class wxMenuItem;
 
35
class PipedProcess;
32
36
 
33
37
class UnitTestPP : public IPlugin
34
38
{
35
39
        wxEvtHandler *m_topWindow;
36
40
        PipedProcess *m_proc;
 
41
 
37
42
public:
38
43
        UnitTestPP(IManager *manager);
39
44
        ~UnitTestPP();
40
 
        
 
45
 
41
46
        //--------------------------------------------
42
47
        //Abstract methods
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();
49
 
        
 
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);
 
55
        /**
 
56
         * @brief return list of the projects which are identified as UnitTests project
 
57
         * @return
 
58
         */
 
59
        std::vector<ProjectPtr> GetUnitTestProjects();
 
60
 
50
61
protected:
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);
56
 
        
57
 
        void DoCreateSimpleTest(const wxString &name, IEditor *editor);
58
 
        void DoCreateFixtureTest(const wxString &name, const wxString &fixture, IEditor *editor);
59
 
        
 
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);
 
71
 
60
72
private:
61
 
        wxMenu *CreateEditorPopMenu();
 
73
        wxMenu*    CreateEditorPopMenu ();
62
74
};
63
75
 
64
76
#endif //UnitTestPP
65