added empty test subproject

This commit is contained in:
Andrei Yankovich 2019-07-09 13:59:03 +03:00
parent 3d3e0ebda4
commit c40a931677
13 changed files with 147 additions and 41 deletions

15
GMP.pri
View File

@ -5,17 +5,4 @@
# of this license document, but changing it is not allowed.
#
!isEmpty(Qt_GMP_LIB):error("GMP.pri already included")
Qt_GMP_LIB = 1
#DEPENDS
CONFIG(release, debug|release): {
MINIGMP_LIBRARY_OUTPUT_DIR="$$PWD/build/release"
} else {
MINIGMP_LIBRARY_OUTPUT_DIR="$$PWD/build/debug"
}
unix:LIBS += -L$$MINIGMP_LIBRARY_OUTPUT_DIR -lminigmp
win32:LIBS += -L$$MINIGMP_LIBRARY_OUTPUT_DIR -lminigmp
INCLUDEPATH += "$$PWD"
include($$PWD/src/GMP.pri)

35
GMP.pro
View File

@ -5,34 +5,15 @@
# of this license document, but changing it is not allowed.
#
TEMPLATE = subdirs
CONFIG += ordered
QT -= core gui
TARGET = MiniGMP
TEMPLATE = lib
DEFINES += MINIGMP_LIBRARY
DEFINES += QT_DEPRECATED_WARNINGS
SUBDIRS += \
src \
tests
include($$PWD/tests/test.pri)
VERSION = 6.1.2
TARGET = minigmp
CONFIG += static
CONFIG(release, debug|release): {
DESTDIR="$$PWD/build/release"
} else {
DESTDIR="$$PWD/build/debug"
}
DISTFILES += \
README \
HEADERS += \
bigint.h \
mini-gmp.h \
minigmp_global.h
SOURCES += \
bigint.cpp \
mini-gmp.c
src.file = src/GMP.pro
tests.file = tests/tests.pro

21
src/GMP.pri Normal file
View File

@ -0,0 +1,21 @@
#
# Copyright (C) 2018-2019 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
!isEmpty(Qt_GMP_LIB):error("GMP.pri already included")
Qt_GMP_LIB = 1
#DEPENDS
CONFIG(release, debug|release): {
MINIGMP_LIBRARY_OUTPUT_DIR="$$PWD/build/release"
} else {
MINIGMP_LIBRARY_OUTPUT_DIR="$$PWD/build/debug"
}
unix:LIBS += -L$$MINIGMP_LIBRARY_OUTPUT_DIR -lminigmp
win32:LIBS += -L$$MINIGMP_LIBRARY_OUTPUT_DIR -lminigmp
INCLUDEPATH += "$$PWD"

37
src/GMP.pro Normal file
View File

@ -0,0 +1,37 @@
#
# Copyright (C) 2018-2019 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
QT -= core gui
TARGET = MiniGMP
TEMPLATE = lib
DEFINES += MINIGMP_LIBRARY
DEFINES += QT_DEPRECATED_WARNINGS
TARGET = minigmp
CONFIG += static
CONFIG(release, debug|release): {
DESTDIR="$$PWD/build/release"
} else {
DESTDIR="$$PWD/build/debug"
}
DISTFILES += \
README \
HEADERS += \
bigint.h \
mini-gmp.h \
minigmp_global.h
SOURCES += \
bigint.cpp \
mini-gmp.c

35
tests/test.pri Normal file
View File

@ -0,0 +1,35 @@
#
# Copyright (C) 2018-2019 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
unix:exec = $$PWD/tests/build/release/Qt-SecretTest,$$PWD/src/Qt-AES/build/release/QAESEncryption
win32:exec = $$PWD/tests/build/release/Qt-SecretTest.exe,$$PWD/src/Qt-AES/build/release/QAESEncryption.exe
contains(QMAKE_HOST.os, Linux):{
DEPLOYER=cqtdeployer
} else {
DEPLOYER=%cqtdeployer%
}
deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_QMAKE -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 5
unix:test.commands = $$PWD/deployTests/miniGmpTests.sh
win32:test.commands = $$PWD/deployTests/miniGmpTests.exe
contains(QMAKE_HOST.os, Linux):{
DEPLOYER=cqtdeployer
win32:test.commands = wine $$PWD/deployTests/miniGmpTests.exe
} else {
DEPLOYER=%cqtdeployer%
}
test.depends += deployTest
QMAKE_EXTRA_TARGETS += \
deployTest \
test

10
tests/tests.pro Normal file
View File

@ -0,0 +1,10 @@
QT += testlib core
QT -= gui
CONFIG += qt console warn_on depend_includepath testcase
CONFIG -= app_bundle
TEMPLATE = app
TARGET = miniGmpTests
SOURCES += tst_arithmetictests.cpp

View File

@ -0,0 +1,35 @@
#include <QtTest>
// add necessary includes here
class arithmetictests : public QObject
{
Q_OBJECT
public:
arithmetictests();
~arithmetictests();
private slots:
void test_case1();
};
arithmetictests::arithmetictests()
{
}
arithmetictests::~arithmetictests()
{
}
void arithmetictests::test_case1()
{
}
QTEST_APPLESS_MAIN(arithmetictests)
#include "tst_arithmetictests.moc"