Skip to content

Commit

Permalink
Move unit tests from ./tests to ./tests/unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
ubruhin committed Jul 29, 2018
1 parent ff39e67 commit 8c7ec77
Show file tree
Hide file tree
Showing 30 changed files with 105 additions and 94 deletions.
7 changes: 5 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unit/Integration Tests
# LibrePCB Tests

This directory contains unit/integration tests (as qmake projects) for all static libraries. Google Mock (gmock) is used as testing framework.
This directory contains tests for LibrePCB. Purpose of subdirectories:

- `data`: Data files (for example LibrePCB projects) used for the tests.
- `unittests`: Unit/integration tests for all static libraries of LibrePCB.
95 changes: 3 additions & 92 deletions tests/tests.pro
Original file line number Diff line number Diff line change
@@ -1,93 +1,4 @@
#-------------------------------------------------
#
# Project created 2014-08-02
#
#-------------------------------------------------

TEMPLATE = app
TARGET = tests

# Use common project definitions
include(../common.pri)

# Set preprocessor defines
DEFINES += TEST_DATA_DIR=\\\"$${PWD}/data\\\"

QT += core widgets network printsupport xml opengl sql concurrent

CONFIG += console
CONFIG -= app_bundle

LIBS += \
-L$${DESTDIR} \
-lgoogletest \
-llibrepcbeagleimport \
-llibrepcbworkspace \
-llibrepcbproject \
-llibrepcblibrary \ # Note: The order of the libraries is very important for the linker!
-llibrepcbcommon \ # Another order could end up in "undefined reference" errors!
-lsexpresso \
-lclipper \
-lparseagle -lquazip -lz

INCLUDEPATH += \
../libs/googletest/googletest/include \
../libs/googletest/googlemock/include \
../libs/parseagle \
../libs/quazip \
../libs \

DEPENDPATH += \
../libs/librepcb/eagleimport \
../libs/librepcb/workspace \
../libs/librepcb/project \
../libs/librepcb/library \
../libs/librepcb/common \
../libs/parseagle \
../libs/quazip \
../libs/sexpresso \
../libs/clipper \

PRE_TARGETDEPS += \
$${DESTDIR}/libgoogletest.a \
$${DESTDIR}/liblibrepcbeagleimport.a \
$${DESTDIR}/liblibrepcbworkspace.a \
$${DESTDIR}/liblibrepcbproject.a \
$${DESTDIR}/liblibrepcblibrary.a \
$${DESTDIR}/liblibrepcbcommon.a \
$${DESTDIR}/libquazip.a \
$${DESTDIR}/libsexpresso.a \
$${DESTDIR}/libclipper.a \

SOURCES += \
common/applicationtest.cpp \
common/attributes/attributesubstitutortest.cpp \
common/directorylocktest.cpp \
common/filedownloadtest.cpp \
common/fileio/serializableobjectlisttest.cpp \
common/filepathtest.cpp \
common/networkrequesttest.cpp \
common/pointtest.cpp \
common/ratiotest.cpp \
common/scopeguardtest.cpp \
common/sqlitedatabasetest.cpp \
common/systeminfotest.cpp \
common/toolboxtest.cpp \
common/uuidtest.cpp \
common/versiontest.cpp \
eagleimport/deviceconvertertest.cpp \
eagleimport/devicesetconvertertest.cpp \
eagleimport/packageconvertertest.cpp \
eagleimport/symbolconvertertest.cpp \
main.cpp \
project/boards/boardplanefragmentsbuildertest.cpp \
project/projecttest.cpp \
workspace/workspacetest.cpp \

HEADERS += \
common/attributes/attributeproviderdummy.h \
common/fileio/serializableobjectmock.h \
common/networkrequestbasesignalreceiver.h \

FORMS += \
TEMPLATE = subdirs

SUBDIRS = \
unittests \
4 changes: 4 additions & 0 deletions tests/unittests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Unit/Integration Tests

This directory contains unit/integration tests for all static libraries.
Google Test (gtest) is used as testing framework.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
93 changes: 93 additions & 0 deletions tests/unittests/unittests.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#-------------------------------------------------
#
# Project created 2014-08-02
#
#-------------------------------------------------

TEMPLATE = app
TARGET = tests

# Use common project definitions
include(../../common.pri)

# Set preprocessor defines
DEFINES += TEST_DATA_DIR=\\\"$${PWD}/../data\\\"

QT += core widgets network printsupport xml opengl sql concurrent

CONFIG += console
CONFIG -= app_bundle

LIBS += \
-L$${DESTDIR} \
-lgoogletest \
-llibrepcbeagleimport \
-llibrepcbworkspace \
-llibrepcbproject \
-llibrepcblibrary \ # Note: The order of the libraries is very important for the linker!
-llibrepcbcommon \ # Another order could end up in "undefined reference" errors!
-lsexpresso \
-lclipper \
-lparseagle -lquazip -lz

INCLUDEPATH += \
../../libs/googletest/googletest/include \
../../libs/googletest/googlemock/include \
../../libs/parseagle \
../../libs/quazip \
../../libs \

DEPENDPATH += \
../../libs/librepcb/eagleimport \
../../libs/librepcb/workspace \
../../libs/librepcb/project \
../../libs/librepcb/library \
../../libs/librepcb/common \
../../libs/parseagle \
../../libs/quazip \
../../libs/sexpresso \
../../libs/clipper \

PRE_TARGETDEPS += \
$${DESTDIR}/libgoogletest.a \
$${DESTDIR}/liblibrepcbeagleimport.a \
$${DESTDIR}/liblibrepcbworkspace.a \
$${DESTDIR}/liblibrepcbproject.a \
$${DESTDIR}/liblibrepcblibrary.a \
$${DESTDIR}/liblibrepcbcommon.a \
$${DESTDIR}/libquazip.a \
$${DESTDIR}/libsexpresso.a \
$${DESTDIR}/libclipper.a \

SOURCES += \
common/applicationtest.cpp \
common/attributes/attributesubstitutortest.cpp \
common/directorylocktest.cpp \
common/filedownloadtest.cpp \
common/fileio/serializableobjectlisttest.cpp \
common/filepathtest.cpp \
common/networkrequesttest.cpp \
common/pointtest.cpp \
common/ratiotest.cpp \
common/scopeguardtest.cpp \
common/sqlitedatabasetest.cpp \
common/systeminfotest.cpp \
common/toolboxtest.cpp \
common/uuidtest.cpp \
common/versiontest.cpp \
eagleimport/deviceconvertertest.cpp \
eagleimport/devicesetconvertertest.cpp \
eagleimport/packageconvertertest.cpp \
eagleimport/symbolconvertertest.cpp \
main.cpp \
project/boards/boardplanefragmentsbuildertest.cpp \
project/projecttest.cpp \
workspace/workspacetest.cpp \

HEADERS += \
common/attributes/attributeproviderdummy.h \
common/fileio/serializableobjectmock.h \
common/networkrequestbasesignalreceiver.h \

FORMS += \

File renamed without changes.

0 comments on commit 8c7ec77

Please sign in to comment.