Commit 60d5223c authored by Jouni Pentikäinen's avatar Jouni Pentikäinen

Fix build for most of krita/ui/tests

parent 031db0a3
......@@ -19,6 +19,8 @@
#ifndef TEST_UTIL
#define TEST_UTIL
#include <QProcessEnvironment>
#include <QList>
#include <QTime>
#include <QDir>
......@@ -63,7 +65,6 @@ inline KisNodeSP findNode(KisNodeSP root, const QString &name) {
return 0;
}
#include <QProcessEnvironment>
inline QString fetchExternalDataFileName(const QString relativeFileName)
{
......
......@@ -21,7 +21,7 @@ include_directories(
${EXIV2_INCLUDE_DIR}
${OCIO_INCLUDE_DIR})
#add_subdirectory( tests )
add_subdirectory( tests )
if (APPLE)
find_library(FOUNDATION_LIBRARY Foundation)
......
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KRITA_INCLUDES} ${CMAKE_SOURCE_DIR}/krita/sdk/tests )
add_subdirectory(scratchpad)
#add_subdirectory(scratchpad)
macro_add_unittest_definitions()
......@@ -163,9 +163,9 @@ set_tests_properties(krita-ui-KisZoomAndPanTest PROPERTIES TIMEOUT 300)
########### next target ###############
set(kis_input_manager_test_SRCS kis_input_manager_test.cpp ../../sdk/tests/testutil.cpp)
kde4_add_unit_test(KisInputManagerTest TESTNAME krita-ui-KisInputManagerTest ${kis_input_manager_test_SRCS})
target_link_libraries(KisInputManagerTest kritaui kritaimage Qt5::Test)
# set(kis_input_manager_test_SRCS kis_input_manager_test.cpp ../../sdk/tests/testutil.cpp)
# kde4_add_unit_test(KisInputManagerTest TESTNAME krita-ui-KisInputManagerTest ${kis_input_manager_test_SRCS})
# target_link_libraries(KisInputManagerTest kritaui kritaimage Qt5::Test)
########### next target ###############
......
......@@ -183,4 +183,4 @@ void FreehandStrokeTest::testPredefinedBrushStrokeLod()
tester.testSimpleStroke();
}
QTEST_MAIN(FreehandStrokeTest, GUI)
QTEST_MAIN(FreehandStrokeTest)
......@@ -19,7 +19,7 @@
#include "kis_animation_exporter_test.h"
#include "kis_animation_exporter.h"
#include <qtest_kde.h>
#include <QTest>
#include <testutil.h>
#include "KisPart.h"
#include "kis_image.h"
......@@ -96,6 +96,6 @@ void KisAnimationExporterTest::testAnimationExport()
*/
}
QTEST_KDEMAIN(KisAnimationExporterTest, GUI)
QTEST_MAIN(KisAnimationExporterTest)
#include "kis_animation_exporter_test.moc"
......@@ -18,7 +18,7 @@
#include "kis_animation_frame_cache_test.h"
#include <qtest_kde.h>
#include <QTest>
#include <testutil.h>
#include "kis_animation_frame_cache.h"
......@@ -27,6 +27,7 @@
#include "kis_time_range.h"
#include "kis_keyframe_channel.h"
#include "kundo2command.h"
void verifyRangeIsCachedStatus(KisAnimationFrameCacheSP cache, int start, int end, KisAnimationFrameCache::CacheStatus status)
{
......@@ -99,6 +100,6 @@ void KisAnimationFrameCacheTest::testCache()
}
QTEST_KDEMAIN(KisAnimationFrameCacheTest, GUI)
QTEST_MAIN(KisAnimationFrameCacheTest)
#include "kis_animation_frame_cache_test.moc"
......@@ -28,6 +28,7 @@
#include <KoPattern.h>
#include "kis_global.h"
#include "testutil.h"
#include "kis_psd_layer_style.h"
......
......@@ -26,7 +26,6 @@
#include "KisDocument.h"
#include "kis_image.h"
#include "kis_undo_store.h"
#include "kis_factory2.h"
#include "KisPart.h"
#include <KisViewManager.h>
#include "util.h"
......
......@@ -319,4 +319,4 @@ void KisKraSaverTest::testRoundTripAnimation()
}
QTEST_MAIN(KisKraSaverTest, GUI)
QTEST_MAIN(KisKraSaverTest)
......@@ -95,7 +95,7 @@ inline void KisModelIndexConverterTest::checkIndexFromAddedDummy(KisNodeSP paren
dummy = parent ? m_dummiesFacade->dummyForNode(parent) : 0;
result = m_indexConverter->indexFromAddedDummy(dummy, index, type, false, modelIndex, row);
if(!result) dbgKrita() << "Failing parent:" << (parent ? parent->name() : "none") << "index:" << index;
if(!result) dbgKrita << "Failing parent:" << (parent ? parent->name() : "none") << "index:" << index;
QVERIFY(result);
QCOMPARE(modelIndex.isValid(), parentValid);
......
......@@ -36,6 +36,7 @@
#include <kis_paint_device.h>
#include <kis_paint_layer.h>
#include <kis_group_layer.h>
#include <kis_update_info.h>
#include "canvas/kis_coordinates_converter.h"
#include "canvas/kis_prescaled_projection.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment