KiCad PCB EDA Suite
Loading...
Searching...
No Matches
mock_kiface_base.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, you may find one here:
18
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
* or you may search the http://www.gnu.org website for the version 2 license,
20
* or you may write to the Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#pragma once
25
#include <
qa_utils/wx_utils/unit_test_utils.h
>
26
#include <
kiface_base.h
>
27
#include <config.h>
28
29
// Suppress a warning that the mock methods don't override the base class methods because
30
// turtlemocks doesn't seem to provide a way to actually annotate the methods with override.
31
#ifdef HAVE_WINCONSISTENT_MISSING_OVERRIDE
32
_Pragma(
"GCC diagnostic push"
) \
33
_Pragma(
"GCC diagnostic ignored \"-Winconsistent-missing-override\""
)
34
#endif
35
36
MOCK_BASE_CLASS
( MOCK_KIFACE_BASE,
KIFACE_BASE
)
37
{
38
MOCK_KIFACE_BASE() :
KIFACE_BASE
(
"common_test"
,
KIWAY::KIWAY_FACE_COUNT
) {};
39
virtual
~MOCK_KIFACE_BASE() {};
40
41
MOCK_METHOD(
OnKifaceStart
, 2,
bool
(
PGM_BASE
*,
int
) );
42
MOCK_METHOD(
OnKifaceEnd
, 0,
void
() );
43
MOCK_METHOD(
CreateKiWindow
, 4, wxWindow*( wxWindow*,
int
,
KIWAY
*,
int
) );
44
MOCK_METHOD(
IfaceOrAddress
, 1,
void
*(
int
) );
45
};
46
47
#ifdef HAVE_WINCONSISTENT_MISSING_OVERRIDE
48
_Pragma(
"GCC diagnostic pop"
)
49
#endif
OnKifaceStart
bool OnKifaceStart(PGM_BASE *aProgram, int aCtlBits) override
Definition:
test_app_main.cpp:6
IfaceOrAddress
void * IfaceOrAddress(int aDataId) override
Return a pointer to the requested object.
Definition:
bitmap2cmp_main.cpp:20
CreateKiWindow
wxWindow * CreateKiWindow(wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
Definition:
bitmap2cmp_main.cpp:2
KIFACE_BASE
A KIFACE implementation.
Definition:
kiface_base.h:39
KIWAY
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition:
kiway.h:279
KIWAY::KIWAY_FACE_COUNT
@ KIWAY_FACE_COUNT
Definition:
kiway.h:295
PGM_BASE
Container for data for KiCad programs.
Definition:
pgm_base.h:99
OnKifaceEnd
void OnKifaceEnd() override
Definition:
test_app_main.cpp:11
kiface_base.h
MOCK_BASE_CLASS
MOCK_BASE_CLASS(MOCK_KIFACE_BASE, KIFACE_BASE)
Definition:
mock_kiface_base.h:36
unit_test_utils.h
src
qa
mocks
include
mock_kiface_base.h
Generated on Thu Sep 28 2023 00:04:42 for KiCad PCB EDA Suite by
1.9.5