~gerboland/unity-mir/demo-stuff-manta-osk-fix

« back to all changes in this revision

Viewing changes to tests/mock_process_controller.h

  • Committer: Gerry Boland
  • Date: 2014-02-13 23:02:39 UTC
  • mfrom: (172.1.6 unity-mir)
  • Revision ID: gerry.boland@canonical.com-20140213230239-4znuxxmv1j79odei
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it under
 
5
 * the terms of the GNU Lesser General Public License version 3, as published by
 
6
 * the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
 
9
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
 
10
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
 * Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 */
 
17
#ifndef MOCK_PROCESS_CONTROLLER_H
 
18
#define MOCK_PROCESS_CONTROLLER_H
 
19
 
 
20
#include <Unity/Application/processcontroller.h>
 
21
 
 
22
#include <gmock/gmock.h>
 
23
 
 
24
namespace testing
 
25
{
 
26
struct MockProcessController : public ProcessController
 
27
{
 
28
    MockProcessController(const QSharedPointer<ProcessController::OomController>& oomController)
 
29
        : m_oomController(oomController)
 
30
    {
 
31
    }
 
32
 
 
33
    const QSharedPointer<OomController>& oomController() const
 
34
    {
 
35
        return m_oomController;
 
36
    }
 
37
 
 
38
    MOCK_CONST_METHOD1(sigStopProcessGroupForPid, bool(pid_t));
 
39
    MOCK_CONST_METHOD1(sigContinueProcessGroupForPid, bool(pid_t));
 
40
 
 
41
    QSharedPointer<ProcessController::OomController> m_oomController;
 
42
};
 
43
}
 
44
 
 
45
#endif // MOCK_PROCESS_CONTROLLER_H