From 255398309b27c1b6a81c02fca2f1bae2818d495e Mon Sep 17 00:00:00 2001
From: Gennady Pospelov <g.pospelov@fz-juelich.de>
Date: Fri, 8 Dec 2017 11:32:09 +0100
Subject: [PATCH] GUI unit tests sorted in alphabetical order.

---
 Tests/UnitTests/GUI/CMakeLists.txt |  10 +--
 Tests/UnitTests/GUI/TestGUI.cpp    | 104 ++++++++++++++---------------
 2 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/Tests/UnitTests/GUI/CMakeLists.txt b/Tests/UnitTests/GUI/CMakeLists.txt
index e04976716d6..0b7c14a8d78 100644
--- a/Tests/UnitTests/GUI/CMakeLists.txt
+++ b/Tests/UnitTests/GUI/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Here we use QtTest, not gtest ...
+set(TestName TestGUI)
 
 if(POLICY CMP0020)
     cmake_policy(SET CMP0020 NEW)
@@ -23,11 +23,11 @@ include_directories(
 
 set(CMAKE_AUTOMOC ON)
 
-add_executable(TestGUI ${source_files} ${include_files})
+add_executable(${TestName} ${source_files} ${include_files})
 
-target_link_libraries(TestGUI ${BornAgainGUI_LIBRARY})
+target_link_libraries(${TestName} ${BornAgainGUI_LIBRARY})
 
-qt5_use_modules(TestGUI Widgets Core Gui Designer PrintSupport Network Test)
+qt5_use_modules(${TestName} Widgets Core Gui Designer PrintSupport Network Test)
 
 # add execution of TestCore just after compilation
-add_custom_target(TestGUI0 ALL DEPENDS TestGUI COMMAND TestGUI)
+add_custom_target(${TestName}Target ALL DEPENDS TestGUI COMMAND ${TestName})
diff --git a/Tests/UnitTests/GUI/TestGUI.cpp b/Tests/UnitTests/GUI/TestGUI.cpp
index ef2881def66..4ca1e63400c 100644
--- a/Tests/UnitTests/GUI/TestGUI.cpp
+++ b/Tests/UnitTests/GUI/TestGUI.cpp
@@ -1,45 +1,45 @@
 #include <QtTest>
 #include <QString>
 #include <QCoreApplication>
-#include "TestMapperCases.h"
+#include "TestComboProperty.h"
+#include "TestComponentProxyModel.h"
+#include "TestComponentUtils.h"
+#include "TestDetectorItems.h"
+#include "TestExternalProperty.h"
+#include "TestFitParameterModel.h"
 #include "TestFormFactorItems.h"
 #include "TestFTDistributionItems.h"
-#include "TestParameterizedItem.h"
-#include "TestParticleItem.h"
-#include "TestLayerRoughnessItems.h"
-#include "TestParaCrystalItems.h"
-#include "TestSessionModel.h"
-#include "TestSessionItem.h"
+#include "TestGroupItem.h"
 #include "TestGUICoreObjectCorrespondence.h"
-#include "TestMapperForItem.h"
-#include "TestParticleDistributionItem.h"
 #include "TestGUIHelpers.h"
-#include "TestFitParameterModel.h"
+#include "TestIntensityDataItem.h"
+#include "TestLayerItems.h"
+#include "TestLayerRoughnessItems.h"
+#include "TestLinkInstrument.h"
+#include "TestMapperCases.h"
+#include "TestMapperForItem.h"
 #include "TestMaterialModel.h"
-#include "TestComboProperty.h"
-#include "TestTranslations.h"
-#include "TestGroupItem.h"
+#include "TestMaterialPropertyController.h"
+#include "TestModelUtils.h"
+#include "TestOutputDataIOService.h"
+#include "TestParaCrystalItems.h"
+#include "TestParameterizedItem.h"
 #include "TestParameterTreeUtils.h"
-#include "TestDetectorItems.h"
-#include "TestLinkInstrument.h"
-#include "TestUpdateTimer.h"
+#include "TestParticleCoreShell.h"
+#include "TestParticleDistributionItem.h"
+#include "TestParticleItem.h"
 #include "TestProjectDocument.h"
-#include "TestSaveService.h"
-#include "TestOutputDataIOService.h"
-#include "TestIntensityDataItem.h"
 #include "TestProjectUtils.h"
-#include "TestParticleCoreShell.h"
 #include "TestPropertyRepeater.h"
-#include "TestSessionItemController.h"
-#include "TestModelUtils.h"
-#include "TestComponentProxyModel.h"
 #include "TestProxyModelStrategy.h"
+#include "TestSaveService.h"
+#include "TestSessionItemController.h"
+#include "TestSessionItem.h"
 #include "TestSessionItemUtils.h"
-#include "TestComponentUtils.h"
-#include "TestLayerItems.h"
-#include "TestMaterialPropertyController.h"
-#include "TestExternalProperty.h"
+#include "TestSessionModel.h"
 #include "TestSessionXML.h"
+#include "TestTranslations.h"
+#include "TestUpdateTimer.h"
 #include <memory>
 
 class GUITestFactory {
@@ -75,45 +75,45 @@ int main(int argc, char** argv) {
 
     GUITestFactory tests;
 
+    tests.add<TestComboProperty>();
+    tests.add<TestComponentProxyModel>();
+    tests.add<TestComponentUtils>();
+    tests.add<TestDetectorItems>();
+    tests.add<TestExternalProperty>();
+    tests.add<TestFitParameterModel>();
     tests.add<TestFormFactorItems>();
     tests.add<TestFTDistributionItems>();
-    tests.add<TestParameterizedItem>();
-    tests.add<TestParticleItem>();
-    tests.add<TestLayerRoughnessItems>();
-    tests.add<TestParaCrystalItems>();
-    tests.add<TestSessionModel>();
+    tests.add<TestGroupItem>();
     tests.add<TestGUICoreObjectCorrespondence>();
-    tests.add<TestSessionItem>();
+    tests.add<TestGUIHelpers>();
+    tests.add<TestIntensityDataItem>();
+    tests.add<TestLayerItems>();
+    tests.add<TestLayerRoughnessItems>();
+    tests.add<TestLinkInstrument>();
     tests.add<TestMapperCases>();
     tests.add<TestMapperForItem>();
-    tests.add<TestGUIHelpers>();
-    tests.add<TestFitParameterModel>();
     tests.add<TestMaterialModel>();
-    tests.add<TestLayerItems>();
     tests.add<TestMaterialPropertyController>();
-    tests.add<TestComboProperty>();
-    tests.add<TestTranslations>();
-    tests.add<TestGroupItem>();
-    tests.add<TestParticleDistributionItem>();
+    tests.add<TestModelUtils>();
+    tests.add<TestOutputDataIOService>();
+    tests.add<TestParaCrystalItems>();
+    tests.add<TestParameterizedItem>();
     tests.add<TestParameterTreeUtils>();
-    tests.add<TestDetectorItems>();
-    tests.add<TestLinkInstrument>();
-    tests.add<TestUpdateTimer>();
+    tests.add<TestParticleCoreShell>();
+    tests.add<TestParticleDistributionItem>();
+    tests.add<TestParticleItem>();
     tests.add<TestProjectDocument>();
-    tests.add<TestSaveService>();
-    tests.add<TestOutputDataIOService>();
-    tests.add<TestIntensityDataItem>();
     tests.add<TestProjectUtils>();
-    tests.add<TestParticleCoreShell>();
     tests.add<TestPropertyRepeater>();
-    tests.add<TestSessionItemController>();
-    tests.add<TestModelUtils>();
-    tests.add<TestComponentProxyModel>();
     tests.add<TestProxyModelStrategy>();
+    tests.add<TestSaveService>();
+    tests.add<TestSessionItem>();
+    tests.add<TestSessionItemController>();
     tests.add<TestSessionItemUtils>();
-    tests.add<TestComponentUtils>();
-    tests.add<TestExternalProperty>();
+    tests.add<TestSessionModel>();
     tests.add<TestSessionXML>();
+    tests.add<TestTranslations>();
+    tests.add<TestUpdateTimer>();
 
     return tests.runAll(argc, argv);
 }
-- 
GitLab