Rename tst_common to tst_docks

Now that tst_docks was all ported let's have the old name again.
Also cmake -jN now works, as tst_docks is called by the tests_launcher
while tst_common was not
This commit is contained in:
Sergio Martins
2020-11-17 15:44:49 +00:00
parent f4e33c1409
commit aa39a71ae5
10 changed files with 182 additions and 183 deletions

View File

@@ -179,9 +179,9 @@ if(${PROJECT_NAME}_DEVELOPER_MODE)
add_subdirectory(tests)
if (NOT ${PROJECT_NAME}_QTQUICK)
#Require Qt5.15.1 or higher to run the tests_launcher tests on Mac
if(NOT APPLE OR Qt5Widgets_VERSION VERSION_GREATER 5.15.0)
# tst_docks.exe is pretty big (140 tests), so split it in 6 runs so we can use threads.
# Require Qt5.15.1 or higher to run the tests_launcher tests on Mac
if (NOT APPLE OR Qt5Widgets_VERSION VERSION_GREATER 5.15.0)
# tst_docks.exe is pretty big (160 tests), so split it in more runs so we can use threads.
add_test(NAME tst_docks0 COMMAND tests_launcher 0 5)
add_test(NAME tst_docks1 COMMAND tests_launcher 1 5)
add_test(NAME tst_docks2 COMMAND tests_launcher 2 5)
@@ -208,7 +208,7 @@ if(${PROJECT_NAME}_DEVELOPER_MODE)
endif()
add_test(NAME tst_multisplitter COMMAND tst_multisplitter)
add_test(NAME tst_common COMMAND tst_common)
add_test(NAME tst_docks COMMAND tst_docks)
endif()
endif()

View File

@@ -30,6 +30,8 @@ QT_BEGIN_NAMESPACE
class QAction;
QT_END_NAMESPACE
class TestDocks;
namespace Layouting {
class Item;
}
@@ -447,7 +449,7 @@ private:
friend class MultiSplitter;
friend class Frame;
friend class DropArea;
friend class TestDocks;
friend class ::TestDocks;
friend class StateDragging;
friend class KDDockWidgets::TabWidget;
friend class KDDockWidgets::TitleBar;

View File

@@ -28,7 +28,7 @@
#include <QVector>
#include <QMargins>
class TestCommon;
class TestDocks;
namespace KDDockWidgets {
@@ -182,7 +182,7 @@ private:
class Private;
Private *const d;
friend class ::TestCommon;
friend class ::TestDocks;
friend class LayoutSaver;
bool deserialize(const LayoutSaver::MainWindow &);
LayoutSaver::MainWindow serialize() const;

View File

@@ -25,7 +25,7 @@
#include "MultiSplitter_p.h"
#include "DropIndicatorOverlayInterface_p.h"
class TestCommon;
class TestDocks;
namespace KDDockWidgets {
@@ -65,8 +65,7 @@ public:
private:
Q_DISABLE_COPY(DropArea)
friend class Frame;
friend class TestDocks;
friend class ::TestCommon;
friend class ::TestDocks;
friend class DropIndicatorOverlayInterface;
friend class AnimatedIndicators;
friend class FloatingWindow;

View File

@@ -35,7 +35,7 @@ class Separator;
class Widget_qwidget;
}
class TestCommon;
class TestDocks;
namespace KDDockWidgets {
@@ -215,8 +215,7 @@ protected:
private:
bool m_inResizeEvent = false;
friend class TestDocks;
friend class ::TestCommon;
friend class ::TestDocks;
/**
* @brief returns the frames contained in @p frameOrMultiSplitter

View File

@@ -27,7 +27,7 @@ class QHBoxLayout;
class QLabel;
QT_END_NAMESPACE
class TestCommon;
class TestDocks;
namespace KDDockWidgets {
@@ -128,8 +128,7 @@ protected:
bool isOverlayed() const;
private:
friend class TestDocks;
friend class ::TestCommon;
friend class ::TestDocks;
void init();

View File

@@ -19,9 +19,10 @@ QT_BEGIN_NAMESPACE
class QTabBar;
QT_END_NAMESPACE
class TestDocks;
namespace KDDockWidgets {
class TestDocks;
class TabWidget;
/**

View File

@@ -10,9 +10,8 @@
#
# Tests:
# 1. tst_common - tests which are common between QtWidgets and QtQuick frontends
# 2. tst_docks - the old tests, mostly specific to QWidget, unless ported. Ideally we should move code from here into tst_common
# 3. tests_launcher - helper executable to paralelize the execution of tests
# 1. tst_docks - The KDDockWidge tests. Compatible with QtWidgets and QtQuick.
# 2. tests_launcher - helper executable to paralelize the execution of tests
if(POLICY CMP0043)
cmake_policy(SET CMP0043 NEW)
@@ -31,11 +30,11 @@ include_directories(../src/private)
find_package(Qt5Test)
set(TESTING_SRCS utils.cpp Testing.cpp)
# tst_common
# tst_docks
qt5_add_resources(TESTING_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/test_resources.qrc)
add_executable(tst_common tst_common.cpp ${TESTING_SRCS} ${TESTING_RESOURCES})
target_link_libraries(tst_common kddockwidgets kddockwidgets_multisplitter Qt5::Test)
set_compiler_flags(tst_common)
add_executable(tst_docks tst_docks.cpp ${TESTING_SRCS} ${TESTING_RESOURCES})
target_link_libraries(tst_docks kddockwidgets kddockwidgets_multisplitter Qt5::Test)
set_compiler_flags(tst_docks)
if (NOT ${PROJECT_NAME}_QTQUICK)
add_subdirectory(fuzzer)

View File

@@ -40,7 +40,7 @@ static QStringList availableTests()
for (QString &function : functions) {
function = function.replace("()", "").trimmed();
function = function.replace(" ", ":"); // datatags
function = function.replace("KDDockWidgets::TestDocks:", "");
function = function.replace("TestDocks:", "");
if (!function.isEmpty())
result << function;
}

File diff suppressed because it is too large Load Diff