Browse Source

Move DefaultTransform definition to transform.cpp, so it can be shared

7.0
Roberto Fernandez Bautista 3 years ago
parent
commit
355e817302
  1. 4
      common/transform.cpp
  2. 3
      eeschema/eeschema.cpp
  3. 34
      qa/mocks/eeschema/mock_eeschema.cpp
  4. 1
      qa/unittests/eeschema/CMakeLists.txt

4
common/transform.cpp

@ -29,6 +29,10 @@
#include <math/util.h> // for KiROUND
#include <math/box2.h>
// a transform matrix, to display symbols in lib editor
TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );
bool TRANSFORM::operator==( const TRANSFORM& aTransform ) const
{
return ( x1 == aTransform.x1 &&

3
eeschema/eeschema.cpp

@ -66,9 +66,6 @@
// The main sheet of the project
SCH_SHEET* g_RootSheet = nullptr;
// a transform matrix, to display symbols in lib editor
TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );
namespace SCH {

34
qa/mocks/eeschema/mock_eeschema.cpp

@ -1,34 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file common_mocks.cpp
* @brief Mock objects for unit tests
*/
#include <transform.h>
// a transform matrix, to display components in lib editor
TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );

1
qa/unittests/eeschema/CMakeLists.txt

@ -51,7 +51,6 @@ include_directories(
set( QA_EESCHEMA_SRCS
# need the mock Pgm for many functions
${CMAKE_SOURCE_DIR}/qa/mocks/kicad/common_mocks.cpp
${CMAKE_SOURCE_DIR}/qa/mocks/eeschema/mock_eeschema.cpp
eeschema_test_utils.cpp
uuid_test_utils.cpp

Loading…
Cancel
Save