Skip to content
Permalink
Browse files

Switch tests to automoc

Required for Qt5 compatibility
Raises minimum CMake version to 2.8.6
  • Loading branch information
m-kuhn committed Aug 5, 2014
1 parent f46e683 commit 1c2bdf1ea31d1bd3c46c9fe338fa957625a9a23e
Showing with 84 additions and 94 deletions.
  1. +1 −1 CMakeLists.txt
  2. +1 −1 INSTALL
  3. +1 −3 tests/src/analysis/CMakeLists.txt
  4. +1 −1 tests/src/analysis/testopenstreetmap.cpp
  5. +1 −1 tests/src/analysis/testqgsvectoranalyzer.cpp
  6. +1 −1 tests/src/analysis/testqgszonalstatistics.cpp
  7. +1 −3 tests/src/app/CMakeLists.txt
  8. +1 −1 tests/src/app/testqgisappclipboard.cpp
  9. +1 −3 tests/src/core/CMakeLists.txt
  10. +1 −1 tests/src/core/regression1141.cpp
  11. +1 −1 tests/src/core/regression992.cpp
  12. +1 −1 tests/src/core/test_template.cpp
  13. +1 −1 tests/src/core/testcontrastenhancements.cpp
  14. +1 −1 tests/src/core/testmaprendererjob.cpp
  15. +1 −1 tests/src/core/testqgsapplication.cpp
  16. +1 −1 tests/src/core/testqgsatlascomposition.cpp
  17. +1 −1 tests/src/core/testqgsblendmodes.cpp
  18. +1 −1 tests/src/core/testqgsclipper.cpp
  19. +1 −1 tests/src/core/testqgscolorscheme.cpp
  20. +1 −1 tests/src/core/testqgscolorschemeregistry.cpp
  21. +1 −1 tests/src/core/testqgscomposerdd.cpp
  22. +1 −1 tests/src/core/testqgscomposereffects.cpp
  23. +1 −1 tests/src/core/testqgscomposergroup.cpp
  24. +1 −1 tests/src/core/testqgscomposerhtml.cpp
  25. +1 −1 tests/src/core/testqgscomposerlabel.cpp
  26. +1 −1 tests/src/core/testqgscomposermap.cpp
  27. +1 −1 tests/src/core/testqgscomposermapgrid.cpp
  28. +1 −1 tests/src/core/testqgscomposermapoverview.cpp
  29. +1 −1 tests/src/core/testqgscomposermodel.cpp
  30. +1 −1 tests/src/core/testqgscomposermultiframe.cpp
  31. +1 −1 tests/src/core/testqgscomposerobject.cpp
  32. +1 −1 tests/src/core/testqgscomposerpaper.cpp
  33. +1 −1 tests/src/core/testqgscomposerpicture.cpp
  34. +1 −1 tests/src/core/testqgscomposerrotation.cpp
  35. +1 −1 tests/src/core/testqgscomposerscalebar.cpp
  36. +1 −1 tests/src/core/testqgscomposershapes.cpp
  37. +1 −1 tests/src/core/testqgscomposertable.cpp
  38. +1 −1 tests/src/core/testqgscomposertablev2.cpp
  39. +1 −1 tests/src/core/testqgscomposerutils.cpp
  40. +1 −1 tests/src/core/testqgscomposition.cpp
  41. +1 −1 tests/src/core/testqgscoordinatereferencesystem.cpp
  42. +1 −1 tests/src/core/testqgscoordinatetransform.cpp
  43. +1 −1 tests/src/core/testqgsdataitem.cpp
  44. +1 −1 tests/src/core/testqgsdiagram.cpp
  45. +1 −1 tests/src/core/testqgsdiagramexpression.cpp
  46. +1 −1 tests/src/core/testqgsdistancearea.cpp
  47. +1 −1 tests/src/core/testqgsexpression.cpp
  48. +1 −1 tests/src/core/testqgsgeometry.cpp
  49. +1 −1 tests/src/core/testqgsgeometryimport.cpp
  50. +1 −1 tests/src/core/testqgsgradients.cpp
  51. +1 −1 tests/src/core/testqgsinvertedpolygonrenderer.cpp
  52. +1 −1 tests/src/core/testqgslegendrenderer.cpp
  53. +1 −1 tests/src/core/testqgsmaplayer.cpp
  54. +1 −1 tests/src/core/testqgsmaprenderer.cpp
  55. +1 −1 tests/src/core/testqgsnetworkcontentfetcher.cpp
  56. +1 −1 tests/src/core/testqgsogcutils.cpp
  57. +1 −1 tests/src/core/testqgspoint.cpp
  58. +1 −1 tests/src/core/testqgsproject.cpp
  59. +1 −1 tests/src/core/testqgsrasterfilewriter.cpp
  60. +1 −1 tests/src/core/testqgsrasterlayer.cpp
  61. +1 −1 tests/src/core/testqgsrastersublayer.cpp
  62. +1 −1 tests/src/core/testqgsrectangle.cpp
  63. +1 −1 tests/src/core/testqgsrenderers.cpp
  64. +1 −1 tests/src/core/testqgsrulebasedrenderer.cpp
  65. +1 −1 tests/src/core/testqgsshapeburst.cpp
  66. +1 −1 tests/src/core/testqgsspatialindex.cpp
  67. +1 −1 tests/src/core/testqgsstylev2.cpp
  68. +1 −1 tests/src/core/testqgsvectordataprovider.cpp
  69. +1 −1 tests/src/core/testqgsvectorfilewriter.cpp
  70. +1 −1 tests/src/core/testqgsvectorlayer.cpp
  71. +1 −1 tests/src/core/testqgsvectorlayercache.cpp
  72. +1 −1 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
  73. +1 −1 tests/src/core/testziplayer.cpp
  74. +1 −3 tests/src/gui/CMakeLists.txt
  75. +1 −1 tests/src/gui/testprojectionissues.cpp
  76. +1 −1 tests/src/gui/testqgsdualview.cpp
  77. +1 −1 tests/src/gui/testqgsmapcanvas.cpp
  78. +1 −1 tests/src/gui/testqgsmaptoolzoom.cpp
  79. +1 −1 tests/src/gui/testqgsquickprint.cpp
  80. +1 −1 tests/src/gui/testqgsrasterhistogram.cpp
  81. +1 −1 tests/src/gui/testqgsrubberband.cpp
  82. +1 −1 tests/src/gui/testqgsscalecombobox.cpp
  83. +1 −3 tests/src/providers/CMakeLists.txt
  84. +1 −1 tests/src/providers/testqgswcsprovider.cpp
@@ -18,7 +18,7 @@ MESSAGE(STATUS "QGIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSIO
#############################################################
# CMake settings

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)

SET(CMAKE_COLOR_MAKEFILE ON)

@@ -92,7 +92,7 @@ Following a summary of the required dependencies for building:

Required build tools:

- CMake >= 2.8.0
- CMake >= 2.8.6
- Flex
- Bison >= 2.4

@@ -55,10 +55,8 @@ ENDIF (APPLE)
MACRO (ADD_QGIS_TEST testname testsrc)
SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS})
SET(qgis_${testname}_MOC_CPPS ${testsrc})
QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS})
ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS})
ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS})
ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc)
SET_TARGET_PROPERTIES(qgis_${testname} PROPERTIES AUTOMOC TRUE)
TARGET_LINK_LIBRARIES(qgis_${testname}
${QT_QTCORE_LIBRARY}
${QT_QTTEST_LIBRARY}
@@ -190,4 +190,4 @@ void TestOpenStreetMap::importAndQueries()

QTEST_MAIN( TestOpenStreetMap )

#include "moc_testopenstreetmap.cxx"
#include "testopenstreetmap.moc"
@@ -130,4 +130,4 @@ void TestQgsVectorAnalyzer::layerExtent()
}

QTEST_MAIN( TestQgsVectorAnalyzer )
#include "moc_testqgsvectoranalyzer.cxx"
#include "testqgsvectoranalyzer.moc"
@@ -117,4 +117,4 @@ void TestQgsZonalStatistics::testStatistics()
}

QTEST_MAIN( TestQgsZonalStatistics )
#include "moc_testqgszonalstatistics.cxx"
#include "testqgszonalstatistics.moc"
@@ -54,11 +54,9 @@ ENDIF (APPLE)

MACRO (ADD_QGIS_TEST testname testsrc)
SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS})
SET(qgis_${testname}_MOC_CPPS ${testsrc})
QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS})
ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS})
ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS})
ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc)
SET_TARGET_PROPERTIES(qgis_${testname} PROPERTIES AUTOMOC TRUE)
TARGET_LINK_LIBRARIES(qgis_${testname}
${QT_QTXML_LIBRARY}
${QT_QTCORE_LIBRARY}
@@ -100,4 +100,4 @@ void TestQgisAppClipboard::copyPaste()
}

QTEST_MAIN( TestQgisAppClipboard )
#include "moc_testqgisappclipboard.cxx"
#include "testqgisappclipboard.moc"
@@ -55,10 +55,8 @@ ENDIF (APPLE)
MACRO (ADD_QGIS_TEST testname testsrc)
SET(qgis_${testname}_SRCS ${testsrc} ${util_SRCS})
SET(qgis_${testname}_MOC_CPPS ${testsrc})
QT4_WRAP_CPP(qgis_${testname}_MOC_SRCS ${qgis_${testname}_MOC_CPPS})
ADD_CUSTOM_TARGET(qgis_${testname}moc ALL DEPENDS ${qgis_${testname}_MOC_SRCS})
ADD_EXECUTABLE(qgis_${testname} ${qgis_${testname}_SRCS})
ADD_DEPENDENCIES(qgis_${testname} qgis_${testname}moc)
SET_TARGET_PROPERTIES(qgis_${testname} PROPERTIES AUTOMOC TRUE)
TARGET_LINK_LIBRARIES(qgis_${testname}
${QT_QTXML_LIBRARY}
${QT_QTCORE_LIBRARY}
@@ -160,4 +160,4 @@ void Regression1141::diacriticalTest()


QTEST_MAIN( Regression1141 )
#include "moc_regression1141.cxx"
#include "regression1141.moc"
@@ -123,4 +123,4 @@ void Regression992::regression992()
}

QTEST_MAIN( Regression992 )
#include "moc_regression992.cxx"
#include "regression992.moc"
@@ -27,7 +27,7 @@ class Test[testClassCamelCaseName]: public QObject
};

QTEST_MAIN( Test[testClassCamelCaseName] )
#include "test[testClassLowerCaseName].moc.cpp"
#include "test[testClassLowerCaseName].moc"



@@ -103,5 +103,5 @@ void TestContrastEnhancements::linearMinMaxEnhancementTest()
QVERIFY( 255.0 == myEnhancement.enhance( 240.0 ) );
}
QTEST_MAIN( TestContrastEnhancements )
#include "moc_testcontrastenhancements.cxx"
#include "testcontrastenhancements.moc"

@@ -276,4 +276,4 @@ void TestQgsMapRendererJob::testCache()


QTEST_MAIN( TestQgsMapRendererJob )
#include "moc_testmaprendererjob.cxx"
#include "testmaprendererjob.moc"
@@ -64,5 +64,5 @@ void TestQgsApplication::checkGdalSkip()
}

QTEST_MAIN( TestQgsApplication )
#include "moc_testqgsapplication.cxx"
#include "testqgsapplication.moc"

@@ -471,4 +471,4 @@ void TestQgsAtlasComposition::test_remove_layer()
}

QTEST_MAIN( TestQgsAtlasComposition )
#include "moc_testqgsatlascomposition.cxx"
#include "testqgsatlascomposition.moc"
@@ -223,4 +223,4 @@ bool TestQgsBlendModes::imageCheck( QString theTestType )
}

QTEST_MAIN( TestQgsBlendModes )
#include "moc_testqgsblendmodes.cxx"
#include "testqgsblendmodes.moc"
@@ -86,4 +86,4 @@ bool TestQgsClipper::checkBoundingBox( QPolygonF polygon, QgsRectangle clipRect
}

QTEST_MAIN( TestQgsClipper )
#include "moc_testqgsclipper.cxx"
#include "testqgsclipper.moc"
@@ -155,4 +155,4 @@ void TestQgsColorScheme::clone()
}

QTEST_MAIN( TestQgsColorScheme )
#include "moc_testqgscolorscheme.cxx"
#include "testqgscolorscheme.moc"
@@ -195,4 +195,4 @@ void TestQgsColorSchemeRegistry::matchingSchemes()
}

QTEST_MAIN( TestQgsColorSchemeRegistry )
#include "moc_testqgscolorschemeregistry.cxx"
#include "testqgscolorschemeregistry.moc"
@@ -136,5 +136,5 @@ void TestQgsComposerDD::ddEvaluate()
}

QTEST_MAIN( TestQgsComposerDD )
#include "moc_testqgscomposerdd.cxx"
#include "testqgscomposerdd.moc"

@@ -108,4 +108,4 @@ void TestQgsComposerEffects::transparency()
}

QTEST_MAIN( TestQgsComposerEffects )
#include "moc_testqgscomposereffects.cxx"
#include "testqgscomposereffects.moc"
@@ -176,4 +176,4 @@ void TestQgsComposerGroup::undoRedo()
}

QTEST_MAIN( TestQgsComposerGroup )
#include "moc_testqgscomposergroup.cxx"
#include "testqgscomposergroup.moc"
@@ -222,4 +222,4 @@ void TestQgsComposerHtml::htmlMultiFrameSmartBreak()


QTEST_MAIN( TestQgsComposerHtml )
#include "moc_testqgscomposerhtml.cxx"
#include "testqgscomposerhtml.moc"
@@ -209,4 +209,4 @@ void TestQgsComposerLabel::marginMethods()
}

QTEST_MAIN( TestQgsComposerLabel )
#include "moc_testqgscomposerlabel.cxx"
#include "testqgscomposerlabel.moc"
@@ -195,4 +195,4 @@ void TestQgsComposerMap::mapPolygonVertices()
}

QTEST_MAIN( TestQgsComposerMap )
#include "moc_testqgscomposermap.cxx"
#include "testqgscomposermap.moc"
@@ -584,4 +584,4 @@ void TestQgsComposerMapGrid::annotationFormats()


QTEST_MAIN( TestQgsComposerMapGrid )
#include "moc_testqgscomposermapgrid.cxx"
#include "testqgscomposermapgrid.moc"
@@ -201,4 +201,4 @@ void TestQgsComposerMapOverview::overviewMapCenter()
}

QTEST_MAIN( TestQgsComposerMapOverview )
#include "moc_testqgscomposermapoverview.cxx"
#include "testqgscomposermapoverview.moc"
@@ -586,4 +586,4 @@ void TestQgsComposerModel::reorderToBottomWithRemoved()
}

QTEST_MAIN( TestQgsComposerModel )
#include "moc_testqgscomposermodel.cxx"
#include "testqgscomposermodel.moc"
@@ -349,4 +349,4 @@ void TestQgsComposerMultiFrame::undoRedoRemovedFrame()
}

QTEST_MAIN( TestQgsComposerMultiFrame )
#include "moc_testqgscomposermultiframe.cxx"
#include "testqgscomposermultiframe.moc"
@@ -231,4 +231,4 @@ bool TestQgsComposerObject::renderCheck( QString testName, QImage &image, int mi
}

QTEST_MAIN( TestQgsComposerObject )
#include "moc_testqgscomposerobject.cxx"
#include "testqgscomposerobject.moc"
@@ -132,4 +132,4 @@ void TestQgsComposerPaper::markerLinePaper()
}

QTEST_MAIN( TestQgsComposerPaper )
#include "moc_testqgscomposerpaper.cxx"
#include "testqgscomposerpaper.moc"
@@ -382,4 +382,4 @@ void TestQgsComposerPicture::pictureRemoteUrl()
}

QTEST_MAIN( TestQgsComposerPicture )
#include "moc_testqgscomposerpicture.cxx"
#include "testqgscomposerpicture.moc"
@@ -224,4 +224,4 @@ void TestQgsComposerRotation::oldMapRotationApi()
#endif

QTEST_MAIN( TestQgsComposerRotation )
#include "moc_testqgscomposerrotation.cxx"
#include "testqgscomposerrotation.moc"
@@ -171,4 +171,4 @@ void TestQgsComposerScaleBar::tick()
};

QTEST_MAIN( TestQgsComposerScaleBar )
#include "moc_testqgscomposerscalebar.cxx"
#include "testqgscomposerscalebar.moc"
@@ -145,4 +145,4 @@ void TestQgsComposerShapes::symbolV2()
}

QTEST_MAIN( TestQgsComposerShapes )
#include "moc_testqgscomposershapes.cxx"
#include "testqgscomposershapes.moc"
@@ -506,5 +506,5 @@ void TestQgsComposerTable::attributeTableVisibleOnly()
}

QTEST_MAIN( TestQgsComposerTable )
#include "moc_testqgscomposertable.cxx"
#include "testqgscomposertable.moc"

@@ -614,5 +614,5 @@ void TestQgsComposerTableV2::removeDuplicates()
}

QTEST_MAIN( TestQgsComposerTableV2 )
#include "moc_testqgscomposertablev2.cxx"
#include "testqgscomposertablev2.moc"

@@ -682,4 +682,4 @@ bool TestQgsComposerUtils::renderCheck( QString testName, QImage &image, int mis
}

QTEST_MAIN( TestQgsComposerUtils )
#include "moc_testqgscomposerutils.cxx"
#include "testqgscomposerutils.moc"
@@ -242,5 +242,5 @@ void TestQgsComposition::pageIsEmpty()
}

QTEST_MAIN( TestQgsComposition )
#include "moc_testqgscomposition.cxx"
#include "testqgscomposition.moc"

@@ -461,4 +461,4 @@ void TestQgsCoordinateReferenceSystem::debugPrint(
}

QTEST_MAIN( TestQgsCoordinateReferenceSystem )
#include "moc_testqgscoordinatereferencesystem.cxx"
#include "testqgscoordinatereferencesystem.moc"
@@ -62,4 +62,4 @@ void TestQgsCoordinateTransform::transformBoundingBox()
}

QTEST_MAIN( TestQgsCoordinateTransform )
#include "moc_testqgscoordinatetransform.cxx"
#include "testqgscoordinatetransform.moc"
@@ -167,4 +167,4 @@ void TestQgsDataItem::testDirItemChildren()
}

QTEST_MAIN( TestQgsDataItem )
#include "moc_testqgsdataitem.cxx"
#include "testqgsdataitem.moc"
@@ -173,4 +173,4 @@ class TestQgsDiagram: public QObject
};

QTEST_MAIN( TestQgsDiagram )
#include "moc_testqgsdiagram.cxx"
#include "testqgsdiagram.moc"
@@ -176,4 +176,4 @@ class TestQgsDiagramExpression: public QObject
};

QTEST_MAIN( TestQgsDiagramExpression )
#include "moc_testqgsdiagramexpression.cxx"
#include "testqgsdiagramexpression.moc"
@@ -162,7 +162,7 @@ void TestQgsDistanceArea::unit_conversions()
};

QTEST_MAIN( TestQgsDistanceArea )
#include "moc_testqgsdistancearea.cxx"
#include "testqgsdistancearea.moc"



@@ -974,5 +974,5 @@ class TestQgsExpression: public QObject

QTEST_MAIN( TestQgsExpression )

#include "moc_testqgsexpression.cxx"
#include "testqgsexpression.moc"

@@ -371,5 +371,5 @@ void TestQgsGeometry::dumpPolyline( QgsPolyline &thePolyline )
}

QTEST_MAIN( TestQgsGeometry )
#include "moc_testqgsgeometry.cxx"
#include "testqgsgeometry.moc"

@@ -239,5 +239,5 @@ bool TestQgsGeometryImport::compareLineStrings( const QgsPolyline& polyline, QVa
}

QTEST_MAIN( TestQgsGeometryImport )
#include "moc_testqgsgeometryimport.cxx"
#include "testqgsgeometryimport.moc"

@@ -287,4 +287,4 @@ bool TestQgsGradients::imageCheck( QString theTestType )
}

QTEST_MAIN( TestQgsGradients )
#include "moc_testqgsgradients.cxx"
#include "testqgsgradients.moc"
@@ -179,4 +179,4 @@ bool TestQgsInvertedPolygon::imageCheck( QString theTestType, const QgsRectangle
}

QTEST_MAIN( TestQgsInvertedPolygon )
#include "moc_testqgsinvertedpolygonrenderer.cxx"
#include "testqgsinvertedpolygonrenderer.moc"
@@ -251,4 +251,4 @@ void TestQgsLegendRenderer::testThreeColumns()


QTEST_MAIN( TestQgsLegendRenderer )
#include "moc_testqgslegendrenderer.cxx"
#include "testqgslegendrenderer.moc"
@@ -99,4 +99,4 @@ void TestQgsMapLayer::setBlendMode()
}

QTEST_MAIN( TestQgsMapLayer )
#include "moc_testqgsmaplayer.cxx"
#include "testqgsmaplayer.moc"
@@ -195,6 +195,6 @@ void TestQgsMapRenderer::performanceTest()
}

QTEST_MAIN( TestQgsMapRenderer )
#include "moc_testqgsmaprenderer.cxx"
#include "testqgsmaprenderer.moc"


@@ -157,4 +157,4 @@ void TestQgsNetworkContentFetcher::contentLoaded()
}

QTEST_MAIN( TestQgsNetworkContentFetcher )
#include "moc_testqgsnetworkcontentfetcher.cxx"
#include "testqgsnetworkcontentfetcher.moc"
@@ -347,4 +347,4 @@ void TestQgsOgcUtils::testExpressionToOgcFilter_data()


QTEST_MAIN( TestQgsOgcUtils )
#include "moc_testqgsogcutils.cxx"
#include "testqgsogcutils.moc"
@@ -534,4 +534,4 @@ void TestQgsPoint::onSegment()
}

QTEST_MAIN( TestQgsPoint )
#include "moc_testqgspoint.cxx"
#include "testqgspoint.moc"
@@ -74,4 +74,4 @@ void TestQgsProject::testReadPath()


QTEST_MAIN( TestQgsProject )
#include "moc_testqgsproject.cxx"
#include "testqgsproject.moc"
@@ -186,4 +186,4 @@ void TestQgsRasterFileWriter::logError( QString msg )
}

QTEST_MAIN( TestQgsRasterFileWriter )
#include "moc_testqgsrasterfilewriter.cxx"
#include "testqgsrasterfilewriter.moc"

0 comments on commit 1c2bdf1

Please sign in to comment.
You can’t perform that action at this time.