Explorar o código

BUG: Fix ctkLanguageComboBoxTest issues

- Compile ctkLanguageComboBoxTest when QtTesting is not enabled, since it is not
  required for this test.

- Fix apparent typo in test data.
Max Smolens %!s(int64=8) %!d(string=hai) anos
pai
achega
485da6f12e

+ 1 - 1
Libs/Widgets/Testing/Cpp/CMakeLists.txt

@@ -56,6 +56,7 @@ set(TEST_SOURCES
   ctkFlowLayoutTest1.cpp
   ctkFontButtonTest.cpp
   ctkHistogramTest1.cpp
+  ctkLanguageComboBoxTest.cpp
   ctkLayoutManagerTest1.cpp
   ctkMaterialPropertyPreviewLabelTest1.cpp
   ctkMaterialPropertyWidgetTest1.cpp
@@ -144,7 +145,6 @@ if(CTK_USE_QTTESTING)
     ctkExpandButtonEventTranslatorPlayerTest1.cpp
     ctkFileDialogEventTranslatorPlayerTest1.cpp
     ctkFontButtonEventTranslatorPlayerTest1.cpp
-    ctkLanguageComboBoxTest.cpp
     ctkMaterialPropertyWidgetEventTranslatorPlayerTest1.cpp
     ctkMatrixWidgetEventTranslatorPlayerTest1.cpp
     ctkMenuButtonEventTranslatorPlayerTest1.cpp

+ 1 - 1
Libs/Widgets/Testing/Cpp/ctkLanguageComboBoxTest.cpp

@@ -92,7 +92,7 @@ void ctkLanguageComboBoxTester::testSetDefaultLanguage_data()
   QTest::newRow("en_GB") << QString("en_GB") << QString("en_GB") << QString("en_GB");
   QTest::newRow("fr") << QString("fr") << QString("fr_FR") << QString("fr_FR");
   QTest::newRow("de_CH") << QString("de_CH") << QString("de_CH") << QString("de_CH");
-  QTest::newRow("de_ch") << QString("de_ch") << QString("de_DE") << QString("de_DE");
+  QTest::newRow("de_DE") << QString("de_DE") << QString("de_DE") << QString("de_DE");
   QTest::newRow("xx") << QString("xx") << QString() << QString();
   QTest::newRow("xx_yy") << QString("xx_yy") << QString() << QString();
   QTest::newRow("_en") << QString("_en") << QString() << QString();