From f11321efd11ce4958d45f4673465b5b9484f1af2 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Fri, 8 Dec 2017 18:47:15 +0100 Subject: Autogen: Tests: Separate UicSkipSource test --- Tests/QtAutogen/CMakeLists.txt | 20 -------------------- Tests/QtAutogen/CommonTests.cmake | 1 + Tests/QtAutogen/UicSkipSource/CMakeLists.txt | 22 ++++++++++++++++++++++ Tests/QtAutogen/UicSkipSource/skipUic.cpp | 22 ++++++++++++++++++++++ Tests/QtAutogen/UicSkipSource/skipUicGen.cpp | 7 +++++++ Tests/QtAutogen/UicSkipSource/skipUicGen.hpp | 8 ++++++++ Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp | 7 +++++++ Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp | 8 ++++++++ Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp | 7 +++++++ Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp | 8 ++++++++ Tests/QtAutogen/UicSkipSource/ui_nogen1.h | 6 ++++++ Tests/QtAutogen/UicSkipSource/ui_nogen2.h | 6 ++++++ Tests/QtAutogen/UicSkipSource/uigen1.ui | 24 ++++++++++++++++++++++++ Tests/QtAutogen/UicSkipSource/uigen2.ui | 24 ++++++++++++++++++++++++ Tests/QtAutogen/skipSource/skipUicGen.cpp | 7 ------- Tests/QtAutogen/skipSource/skipUicGen.hpp | 8 -------- Tests/QtAutogen/skipSource/skipUicNoGen1.cpp | 7 ------- Tests/QtAutogen/skipSource/skipUicNoGen1.hpp | 8 -------- Tests/QtAutogen/skipSource/skipUicNoGen2.cpp | 7 ------- Tests/QtAutogen/skipSource/skipUicNoGen2.hpp | 8 -------- Tests/QtAutogen/skipSource/ui_nogen1.h | 6 ------ Tests/QtAutogen/skipSource/ui_nogen2.h | 6 ------ Tests/QtAutogen/skipSource/uigen1.ui | 24 ------------------------ Tests/QtAutogen/skipSource/uigen2.ui | 24 ------------------------ Tests/QtAutogen/skipUic.cpp | 22 ---------------------- 25 files changed, 150 insertions(+), 147 deletions(-) create mode 100644 Tests/QtAutogen/UicSkipSource/CMakeLists.txt create mode 100644 Tests/QtAutogen/UicSkipSource/skipUic.cpp create mode 100644 Tests/QtAutogen/UicSkipSource/skipUicGen.cpp create mode 100644 Tests/QtAutogen/UicSkipSource/skipUicGen.hpp create mode 100644 Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp create mode 100644 Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp create mode 100644 Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp create mode 100644 Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp create mode 100644 Tests/QtAutogen/UicSkipSource/ui_nogen1.h create mode 100644 Tests/QtAutogen/UicSkipSource/ui_nogen2.h create mode 100644 Tests/QtAutogen/UicSkipSource/uigen1.ui create mode 100644 Tests/QtAutogen/UicSkipSource/uigen2.ui delete mode 100644 Tests/QtAutogen/skipSource/skipUicGen.cpp delete mode 100644 Tests/QtAutogen/skipSource/skipUicGen.hpp delete mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen1.cpp delete mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen1.hpp delete mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen2.cpp delete mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen2.hpp delete mode 100644 Tests/QtAutogen/skipSource/ui_nogen1.h delete mode 100644 Tests/QtAutogen/skipSource/ui_nogen2.h delete mode 100644 Tests/QtAutogen/skipSource/uigen1.ui delete mode 100644 Tests/QtAutogen/skipSource/uigen2.ui delete mode 100644 Tests/QtAutogen/skipUic.cpp diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index d09823f..317de7e 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -60,26 +60,6 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test -# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target -set(skipUicSources - skipUic.cpp - skipSource/skipUicGen.cpp - skipSource/skipUicNoGen1.cpp - skipSource/skipUicNoGen2.cpp -) -set_property(SOURCE skipSource/skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON) -set_property(SOURCE skipSource/skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON) -# AUTOUIC enabled -add_executable(skipUicA ${skipUicSources}) -set_property(TARGET skipUicA PROPERTY AUTOUIC ON) -target_link_libraries(skipUicA ${QT_LIBRARIES}) -# AUTOUIC and AUTOMOC enabled -add_executable(skipUicB ${skipUicSources}) -set_property(TARGET skipUicB PROPERTY AUTOUIC ON) -set_property(TARGET skipUicB PROPERTY AUTOMOC ON) -target_link_libraries(skipUicB ${QT_LIBRARIES}) - -# -- Test # Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target set(skipRccSources skipRcc.cpp diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake index 072a853..2c4788b 100644 --- a/Tests/QtAutogen/CommonTests.cmake +++ b/Tests/QtAutogen/CommonTests.cmake @@ -10,3 +10,4 @@ ADD_AUTOGEN_TEST(RccOffMocLibrary) if(QT_TEST_ALLOW_QT_MACROS) ADD_AUTOGEN_TEST(MocSkipSource) endif() +ADD_AUTOGEN_TEST(UicSkipSource) diff --git a/Tests/QtAutogen/UicSkipSource/CMakeLists.txt b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt new file mode 100644 index 0000000..e94864d --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.10) +project(UicSkipSource) +include("../AutogenTest.cmake") + +# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target +set(skipUicSources + skipUic.cpp + skipUicGen.cpp + skipUicNoGen1.cpp + skipUicNoGen2.cpp +) +set_property(SOURCE skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON) +set_property(SOURCE skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON) +# AUTOUIC enabled +add_executable(skipUicA ${skipUicSources}) +set_property(TARGET skipUicA PROPERTY AUTOUIC ON) +target_link_libraries(skipUicA ${QT_LIBRARIES}) +# AUTOUIC and AUTOMOC enabled +add_executable(skipUicB ${skipUicSources}) +set_property(TARGET skipUicB PROPERTY AUTOUIC ON) +set_property(TARGET skipUicB PROPERTY AUTOMOC ON) +target_link_libraries(skipUicB ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/UicSkipSource/skipUic.cpp b/Tests/QtAutogen/UicSkipSource/skipUic.cpp new file mode 100644 index 0000000..c4a7ce9 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUic.cpp @@ -0,0 +1,22 @@ + +#include "skipUicGen.hpp" +#include "skipUicNoGen1.hpp" +#include "skipUicNoGen2.hpp" + +int main(int, char**) +{ + skipGen(); + skipNoGen1(); + skipNoGen2(); + + return 0; +} + +// -- Function definitions +void ui_nogen1() +{ +} + +void ui_nogen2() +{ +} diff --git a/Tests/QtAutogen/UicSkipSource/skipUicGen.cpp b/Tests/QtAutogen/UicSkipSource/skipUicGen.cpp new file mode 100644 index 0000000..d2a55a6 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUicGen.cpp @@ -0,0 +1,7 @@ + +#include "skipUicGen.hpp" +#include "ui_uigen2.h" + +void skipGen() +{ +} diff --git a/Tests/QtAutogen/UicSkipSource/skipUicGen.hpp b/Tests/QtAutogen/UicSkipSource/skipUicGen.hpp new file mode 100644 index 0000000..3669f0e --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUicGen.hpp @@ -0,0 +1,8 @@ +#ifndef SKIPUICGEN_HPP +#define SKIPUICGEN_HPP + +#include "ui_uigen1.h" + +void skipGen(); + +#endif diff --git a/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp new file mode 100644 index 0000000..f591a42 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.cpp @@ -0,0 +1,7 @@ + +#include "skipUicNoGen1.hpp" +#include "ui_nogen2.h" + +void skipNoGen1() +{ +} diff --git a/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp new file mode 100644 index 0000000..2864695 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen1.hpp @@ -0,0 +1,8 @@ +#ifndef SKIPUICNOGEN1_H +#define SKIPUICNOGEN1_H + +#include "ui_nogen1.h" + +void skipNoGen1(); + +#endif diff --git a/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp new file mode 100644 index 0000000..8c1c324 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.cpp @@ -0,0 +1,7 @@ + +#include "skipUicNoGen2.hpp" +#include "ui_nogen2.h" + +void skipNoGen2() +{ +} diff --git a/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp new file mode 100644 index 0000000..7c38193 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/skipUicNoGen2.hpp @@ -0,0 +1,8 @@ +#ifndef SKIPUICNOGEN2_H +#define SKIPUICNOGEN2_H + +#include "ui_nogen1.h" + +void skipNoGen2(); + +#endif diff --git a/Tests/QtAutogen/UicSkipSource/ui_nogen1.h b/Tests/QtAutogen/UicSkipSource/ui_nogen1.h new file mode 100644 index 0000000..a7be52b --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/ui_nogen1.h @@ -0,0 +1,6 @@ +#ifndef UI_NOGEN1_H +#define UI_NOGEN1_H + +void ui_nogen1(); + +#endif diff --git a/Tests/QtAutogen/UicSkipSource/ui_nogen2.h b/Tests/QtAutogen/UicSkipSource/ui_nogen2.h new file mode 100644 index 0000000..4e500a4 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/ui_nogen2.h @@ -0,0 +1,6 @@ +#ifndef UI_NOGEN2_H +#define UI_NOGEN2_H + +void ui_nogen2(); + +#endif diff --git a/Tests/QtAutogen/UicSkipSource/uigen1.ui b/Tests/QtAutogen/UicSkipSource/uigen1.ui new file mode 100644 index 0000000..fc7cb82 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/uigen1.ui @@ -0,0 +1,24 @@ + + + UiGen1 + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + + + diff --git a/Tests/QtAutogen/UicSkipSource/uigen2.ui b/Tests/QtAutogen/UicSkipSource/uigen2.ui new file mode 100644 index 0000000..01f08d2 --- /dev/null +++ b/Tests/QtAutogen/UicSkipSource/uigen2.ui @@ -0,0 +1,24 @@ + + + UiGen2 + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + + + diff --git a/Tests/QtAutogen/skipSource/skipUicGen.cpp b/Tests/QtAutogen/skipSource/skipUicGen.cpp deleted file mode 100644 index d2a55a6..0000000 --- a/Tests/QtAutogen/skipSource/skipUicGen.cpp +++ /dev/null @@ -1,7 +0,0 @@ - -#include "skipUicGen.hpp" -#include "ui_uigen2.h" - -void skipGen() -{ -} diff --git a/Tests/QtAutogen/skipSource/skipUicGen.hpp b/Tests/QtAutogen/skipSource/skipUicGen.hpp deleted file mode 100644 index 3669f0e..0000000 --- a/Tests/QtAutogen/skipSource/skipUicGen.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SKIPUICGEN_HPP -#define SKIPUICGEN_HPP - -#include "ui_uigen1.h" - -void skipGen(); - -#endif diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp b/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp deleted file mode 100644 index f591a42..0000000 --- a/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp +++ /dev/null @@ -1,7 +0,0 @@ - -#include "skipUicNoGen1.hpp" -#include "ui_nogen2.h" - -void skipNoGen1() -{ -} diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp b/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp deleted file mode 100644 index 2864695..0000000 --- a/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SKIPUICNOGEN1_H -#define SKIPUICNOGEN1_H - -#include "ui_nogen1.h" - -void skipNoGen1(); - -#endif diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp b/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp deleted file mode 100644 index 8c1c324..0000000 --- a/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp +++ /dev/null @@ -1,7 +0,0 @@ - -#include "skipUicNoGen2.hpp" -#include "ui_nogen2.h" - -void skipNoGen2() -{ -} diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp b/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp deleted file mode 100644 index 7c38193..0000000 --- a/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SKIPUICNOGEN2_H -#define SKIPUICNOGEN2_H - -#include "ui_nogen1.h" - -void skipNoGen2(); - -#endif diff --git a/Tests/QtAutogen/skipSource/ui_nogen1.h b/Tests/QtAutogen/skipSource/ui_nogen1.h deleted file mode 100644 index a7be52b..0000000 --- a/Tests/QtAutogen/skipSource/ui_nogen1.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef UI_NOGEN1_H -#define UI_NOGEN1_H - -void ui_nogen1(); - -#endif diff --git a/Tests/QtAutogen/skipSource/ui_nogen2.h b/Tests/QtAutogen/skipSource/ui_nogen2.h deleted file mode 100644 index 5d547d4..0000000 --- a/Tests/QtAutogen/skipSource/ui_nogen2.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef UI_NOGEN2_H -#define UI_NOGEN2_H - -void ui_nogen2(); - -#endif \ No newline at end of file diff --git a/Tests/QtAutogen/skipSource/uigen1.ui b/Tests/QtAutogen/skipSource/uigen1.ui deleted file mode 100644 index fc7cb82..0000000 --- a/Tests/QtAutogen/skipSource/uigen1.ui +++ /dev/null @@ -1,24 +0,0 @@ - - - UiGen1 - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - - - - - diff --git a/Tests/QtAutogen/skipSource/uigen2.ui b/Tests/QtAutogen/skipSource/uigen2.ui deleted file mode 100644 index 01f08d2..0000000 --- a/Tests/QtAutogen/skipSource/uigen2.ui +++ /dev/null @@ -1,24 +0,0 @@ - - - UiGen2 - - - - 0 - 0 - 400 - 300 - - - - Form - - - - - - - - - - diff --git a/Tests/QtAutogen/skipUic.cpp b/Tests/QtAutogen/skipUic.cpp deleted file mode 100644 index 0adf011..0000000 --- a/Tests/QtAutogen/skipUic.cpp +++ /dev/null @@ -1,22 +0,0 @@ - -#include "skipSource/skipUicGen.hpp" -#include "skipSource/skipUicNoGen1.hpp" -#include "skipSource/skipUicNoGen2.hpp" - -int main(int, char**) -{ - skipGen(); - skipNoGen1(); - skipNoGen2(); - - return 0; -} - -// -- Function definitions -void ui_nogen1() -{ -} - -void ui_nogen2() -{ -} -- cgit v0.12