-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a configure check for C++20 and compile more tests in more C++ ve…
…rsions Increases test coverage. Change-Id: Ie996fea85401175d5fc5a7182fb2a0c35e7739c7 Reviewed-on: https://codereview.kdab.com/c/kdab/KDToolBox/+/98817 Tested-by: Continuous Integration <[email protected]> Reviewed-by: Sérgio Martins <[email protected]>
- Loading branch information
Showing
17 changed files
with
101 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <version> | ||
|
||
int main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CONFIG -= qt | ||
CONFIG += c++2a | ||
|
||
SOURCES = cpp20.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# configure style tests | ||
# QMAKE_CONFIG_TESTS_DIR defaults to dir of current .pro files + config.tests | ||
# sets config_$test if successful, e.g. config_cpp11 for test config.tests/cpp11 | ||
|
||
load(configure) | ||
|
||
log("Running configure tests...$$escape_expand(\\n)") | ||
CONFIG_TESTS = $$files($$QMAKE_CONFIG_TESTS_DIR/*.pro, true) | ||
for(test, CONFIG_TESTS) { | ||
test = $$basename(test) | ||
test ~= s/\\.pro$// | ||
qtCompileTest($$test) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase moc | ||
TARGET = tst_duplicatetracker_20 | ||
QT = core testlib | ||
CONFIG += c++2a | ||
SOURCES += $$PWD/../tst_duplicatetracker.cpp | ||
INCLUDEPATH += ../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ TEMPLATE = subdirs | |
SUBDIRS += \ | ||
cxx11 \ | ||
cxx17 \ | ||
|
||
config_cpp20:SUBDIRS += \ | ||
cxx20 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_erase_if_11 | ||
QT = core testlib | ||
CONFIG += c++11 | ||
SOURCES += ../tst_erase_if.cpp | ||
INCLUDEPATH += ../../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_erase_if_14 | ||
QT = core testlib | ||
CONFIG += c++14 | ||
SOURCES += ../tst_erase_if.cpp | ||
INCLUDEPATH += ../../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_erase_if_17 | ||
QT = core testlib | ||
CONFIG += c++1z | ||
SOURCES += ../tst_erase_if.cpp | ||
INCLUDEPATH += ../../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_erase_if_20 | ||
QT = core testlib | ||
CONFIG += c++2a | ||
SOURCES += ../tst_erase_if.cpp | ||
INCLUDEPATH += ../../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONFIG += testcase | ||
TARGET = tst_erase_if | ||
QT = core testlib | ||
contains(QT_CONFIG, c++14):CONFIG *= c++14 | ||
contains(QT_CONFIG, c++1z):CONFIG *= c++1z | ||
contains(QT_CONFIG, c++2a):CONFIG *= c++2a | ||
SOURCES += tst_erase_if.cpp | ||
INCLUDEPATH += ../../../include | ||
TEMPLATE = subdirs | ||
|
||
SUBDIRS += \ | ||
cxx11 \ | ||
cxx14 \ | ||
cxx17 \ | ||
|
||
config_cpp20:SUBDIRS += \ | ||
cxx20 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_qstringtokenizer_11 | ||
QT = core testlib | ||
CONFIG += c++11 | ||
SOURCES += ../tst_qstringtokenizer.cpp | ||
INCLUDEPATH += ../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_qstringtokenizer_14 | ||
QT = core testlib | ||
CONFIG += c++14 | ||
SOURCES += ../tst_qstringtokenizer.cpp | ||
INCLUDEPATH += ../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_qstringtokenizer_17 | ||
QT = core testlib | ||
CONFIG += c++1z | ||
SOURCES += ../tst_qstringtokenizer.cpp | ||
INCLUDEPATH += ../../../include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += testcase | ||
TARGET = tst_qstringtokenizer_20 | ||
QT = core testlib | ||
CONFIG += c++2a | ||
SOURCES += ../tst_qstringtokenizer.cpp | ||
INCLUDEPATH += ../../../include |
17 changes: 9 additions & 8 deletions
17
qt/stringtokenizer/tests/qstringtokenizer/qstringtokenizer.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CONFIG += testcase | ||
TARGET = tst_qstringtokenizer | ||
QT = core testlib | ||
contains(QT_CONFIG, c++14):CONFIG *= c++14 | ||
contains(QT_CONFIG, c++1z):CONFIG *= c++1z | ||
contains(QT_CONFIG, c++2a):CONFIG *= c++2a | ||
SOURCES += tst_qstringtokenizer.cpp | ||
INCLUDEPATH += ../../include | ||
TEMPLATE = subdirs | ||
|
||
SUBDIRS += \ | ||
cxx11 \ | ||
cxx14 \ | ||
cxx17 \ | ||
|
||
config_cpp20:SUBDIRS += \ | ||
cxx20 \ |