diff options
Diffstat (limited to 'autotests')
| -rw-r--r-- | autotests/kconfig_compiler/kconfigcompiler_test.cpp | 22 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test1.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test10.h.ref | 2 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test11.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test11a.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test12.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test13.h.ref | 2 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test9.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test_dpointer.cpp.ref | 44 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test_translation_kde.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test_translation_kde_domain.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfig_compiler/test_translation_qt.h.ref | 1 | ||||
| -rw-r--r-- | autotests/kconfigtest.h | 1 | 
13 files changed, 40 insertions, 39 deletions
| diff --git a/autotests/kconfig_compiler/kconfigcompiler_test.cpp b/autotests/kconfig_compiler/kconfigcompiler_test.cpp index 383745b1..7ab4a923 100644 --- a/autotests/kconfig_compiler/kconfigcompiler_test.cpp +++ b/autotests/kconfig_compiler/kconfigcompiler_test.cpp @@ -125,9 +125,7 @@ void KConfigCompiler_Test::testBaselineComparison()      if (content != contentRef)  {          appendFileDiff(fileRef.fileName(), file.fileName());      } -    // use split('\n') to avoid -    // the whole output shown inline -    QCOMPARE(content.split('\n'), contentRef.split('\n')); +      QVERIFY(content == contentRef);  } @@ -166,17 +164,23 @@ void KConfigCompiler_Test::appendFileDiff(const QString &oldFile, const QString          return;      } -    QStringList args; -    args << QStringLiteral("-u"); -    args << QFileInfo(oldFile).absoluteFilePath(); -    args << QFileInfo(newFile).absoluteFilePath(); +    QStringList args({ +        QStringLiteral("-u"), +        QFileInfo(oldFile).absoluteFilePath(), +        QFileInfo(newFile).absoluteFilePath() });      QProcess process;      process.start(m_diffExe, args, QIODevice::ReadOnly);      process.waitForStarted();      process.waitForFinished(); +      if (process.exitCode() == 1) { -        QByteArray out = process.readAllStandardOutput(); -        qDebug() << '\n' << out; +        const QString diffFileName = oldFile + QStringLiteral(".diff"); +        QFile diffFile(diffFileName); +        QVERIFY2(diffFile.open(QIODevice::WriteOnly), qPrintable(QLatin1String("Could not save diff file for ") + oldFile)); +        diffFile.write(process.readAllStandardOutput()); + +        // force a failure to print the flename where we stored the diff. +        QVERIFY2(false, qPrintable(QLatin1String("This test failed, look at the following file for details: ") + diffFileName));      }  } diff --git a/autotests/kconfig_compiler/test1.h.ref b/autotests/kconfig_compiler/test1.h.ref index 77c3b65f..52921ac6 100644 --- a/autotests/kconfig_compiler/test1.h.ref +++ b/autotests/kconfig_compiler/test1.h.ref @@ -8,6 +8,7 @@  #include <QDebug>  #include <qdir.h> +  class Test1 : public KConfigSkeleton  {    public: diff --git a/autotests/kconfig_compiler/test10.h.ref b/autotests/kconfig_compiler/test10.h.ref index 93839a54..82bbab84 100644 --- a/autotests/kconfig_compiler/test10.h.ref +++ b/autotests/kconfig_compiler/test10.h.ref @@ -14,7 +14,6 @@ class Test10 : public KConfigSkeleton      static Test10 *self();      ~Test10(); -      /**        Get foo bar      */ @@ -24,7 +23,6 @@ class Test10 : public KConfigSkeleton        return self()->mFooBar;      } -      /**        Get bar foo      */ diff --git a/autotests/kconfig_compiler/test11.h.ref b/autotests/kconfig_compiler/test11.h.ref index 395810ef..2acbe9e5 100644 --- a/autotests/kconfig_compiler/test11.h.ref +++ b/autotests/kconfig_compiler/test11.h.ref @@ -11,6 +11,7 @@  #include <QDebug>  #include "test11_types.h" +  class Test11 : public MyPrefs  {    public: diff --git a/autotests/kconfig_compiler/test11a.h.ref b/autotests/kconfig_compiler/test11a.h.ref index 23c83713..62b59381 100644 --- a/autotests/kconfig_compiler/test11a.h.ref +++ b/autotests/kconfig_compiler/test11a.h.ref @@ -11,6 +11,7 @@  #include <QDebug>  #include "test11_types.h" +  class Test11a : public MyPrefs  {    public: diff --git a/autotests/kconfig_compiler/test12.h.ref b/autotests/kconfig_compiler/test12.h.ref index d96d4609..e3954282 100644 --- a/autotests/kconfig_compiler/test12.h.ref +++ b/autotests/kconfig_compiler/test12.h.ref @@ -15,7 +15,6 @@ class Test12 : public KConfigSkeleton      Test12( );      ~Test12(); -      /**        Get RnRSource      */ diff --git a/autotests/kconfig_compiler/test13.h.ref b/autotests/kconfig_compiler/test13.h.ref index 6c67fc5d..3a6e7f89 100644 --- a/autotests/kconfig_compiler/test13.h.ref +++ b/autotests/kconfig_compiler/test13.h.ref @@ -16,7 +16,6 @@ class Test13 : public KConfigSkeleton      Test13( );      ~Test13(); -      Q_PROPERTY(QUrl picturesDir READ picturesDir CONSTANT)      /**        Get picturesDir @@ -46,7 +45,6 @@ class Test13 : public KConfigSkeleton        return mBrightness;      } -      Q_PROPERTY(bool startsWithUppercase READ startsWithUppercase CONSTANT)      /**        Get StartsWithUppercase diff --git a/autotests/kconfig_compiler/test9.h.ref b/autotests/kconfig_compiler/test9.h.ref index 9bcf0001..6e40cf48 100644 --- a/autotests/kconfig_compiler/test9.h.ref +++ b/autotests/kconfig_compiler/test9.h.ref @@ -8,6 +8,7 @@  #include <QDebug>  #include <qdir.h> +  class Test9 : public KConfigSkeleton  {    public: diff --git a/autotests/kconfig_compiler/test_dpointer.cpp.ref b/autotests/kconfig_compiler/test_dpointer.cpp.ref index c69d38a4..1bfb9f52 100644 --- a/autotests/kconfig_compiler/test_dpointer.cpp.ref +++ b/autotests/kconfig_compiler/test_dpointer.cpp.ref @@ -157,8 +157,8 @@ TestDPointer::TestDPointer( )  void TestDPointer::setAutoSave( bool v )  { -      if (!self()->isImmutable( QStringLiteral( "AutoSave" ) )) -        self()->d->autoSave = v; +    if (!self()->isImmutable( QStringLiteral( "AutoSave" ) )) +      self()->d->autoSave = v;  }  bool TestDPointer::autoSave() @@ -174,8 +174,8 @@ KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()  void TestDPointer::setAutoSaveInterval( int v )  { -      if (!self()->isImmutable( QStringLiteral( "AutoSaveInterval" ) )) -        self()->d->autoSaveInterval = v; +    if (!self()->isImmutable( QStringLiteral( "AutoSaveInterval" ) )) +      self()->d->autoSaveInterval = v;  }  int TestDPointer::autoSaveInterval() @@ -191,8 +191,8 @@ KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()  void TestDPointer::setConfirm( bool v )  { -      if (!self()->isImmutable( QStringLiteral( "Confirm" ) )) -        self()->d->confirm = v; +    if (!self()->isImmutable( QStringLiteral( "Confirm" ) )) +      self()->d->confirm = v;  }  bool TestDPointer::confirm() @@ -208,8 +208,8 @@ KConfigSkeleton::ItemBool *TestDPointer::confirmItem()  void TestDPointer::setArchiveFile( const QString & v )  { -      if (!self()->isImmutable( QStringLiteral( "ArchiveFile" ) )) -        self()->d->archiveFile = v; +    if (!self()->isImmutable( QStringLiteral( "ArchiveFile" ) )) +      self()->d->archiveFile = v;  }  QString TestDPointer::archiveFile() @@ -225,8 +225,8 @@ KConfigSkeleton::ItemString *TestDPointer::archiveFileItem()  void TestDPointer::setDestination( int v )  { -      if (!self()->isImmutable( QStringLiteral( "Destination" ) )) -        self()->d->destination = v; +    if (!self()->isImmutable( QStringLiteral( "Destination" ) )) +      self()->d->destination = v;  }  int TestDPointer::destination() @@ -242,8 +242,8 @@ KConfigSkeleton::ItemEnum *TestDPointer::destinationItem()  void TestDPointer::setHourSize( int v )  { -      if (!self()->isImmutable( QStringLiteral( "HourSize" ) )) -        self()->d->hourSize = v; +    if (!self()->isImmutable( QStringLiteral( "HourSize" ) )) +      self()->d->hourSize = v;  }  int TestDPointer::hourSize() @@ -259,8 +259,8 @@ KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()  void TestDPointer::setSelectionStartsEditor( bool v )  { -      if (!self()->isImmutable( QStringLiteral( "SelectionStartsEditor" ) )) -        self()->d->selectionStartsEditor = v; +    if (!self()->isImmutable( QStringLiteral( "SelectionStartsEditor" ) )) +      self()->d->selectionStartsEditor = v;  }  bool TestDPointer::selectionStartsEditor() @@ -276,8 +276,8 @@ KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()  void TestDPointer::setSelectedPlugins( const QStringList & v )  { -      if (!self()->isImmutable( QStringLiteral( "SelectedPlugins" ) )) -        self()->d->selectedPlugins = v; +    if (!self()->isImmutable( QStringLiteral( "SelectedPlugins" ) )) +      self()->d->selectedPlugins = v;  }  QStringList TestDPointer::selectedPlugins() @@ -293,8 +293,8 @@ KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()  void TestDPointer::setHighlightColor( const QColor & v )  { -      if (!self()->isImmutable( QStringLiteral( "HighlightColor" ) )) -        self()->d->highlightColor = v; +    if (!self()->isImmutable( QStringLiteral( "HighlightColor" ) )) +      self()->d->highlightColor = v;  }  QColor TestDPointer::highlightColor() @@ -310,8 +310,8 @@ KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()  void TestDPointer::setAgendaBgColor( const QColor & v )  { -      if (!self()->isImmutable( QStringLiteral( "AgendaBgColor" ) )) -        self()->d->agendaBgColor = v; +    if (!self()->isImmutable( QStringLiteral( "AgendaBgColor" ) )) +      self()->d->agendaBgColor = v;  }  QColor TestDPointer::agendaBgColor() @@ -327,8 +327,8 @@ KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()  void TestDPointer::setTimeBarFont( const QFont & v )  { -      if (!self()->isImmutable( QStringLiteral( "TimeBarFont" ) )) -        self()->d->timeBarFont = v; +    if (!self()->isImmutable( QStringLiteral( "TimeBarFont" ) )) +      self()->d->timeBarFont = v;  }  QFont TestDPointer::timeBarFont() diff --git a/autotests/kconfig_compiler/test_translation_kde.h.ref b/autotests/kconfig_compiler/test_translation_kde.h.ref index f9b582c4..0e50b5a2 100644 --- a/autotests/kconfig_compiler/test_translation_kde.h.ref +++ b/autotests/kconfig_compiler/test_translation_kde.h.ref @@ -17,7 +17,6 @@ class TestTranslationKde : public KConfigSkeleton      TestTranslationKde( );      ~TestTranslationKde(); -      /**        Get Enable automatic saving of calendar      */ diff --git a/autotests/kconfig_compiler/test_translation_kde_domain.h.ref b/autotests/kconfig_compiler/test_translation_kde_domain.h.ref index 2fa42c71..4ed5d9bd 100644 --- a/autotests/kconfig_compiler/test_translation_kde_domain.h.ref +++ b/autotests/kconfig_compiler/test_translation_kde_domain.h.ref @@ -17,7 +17,6 @@ class TestTranslationKdeDomain : public KConfigSkeleton      TestTranslationKdeDomain( );      ~TestTranslationKdeDomain(); -      /**        Get Enable automatic saving of calendar      */ diff --git a/autotests/kconfig_compiler/test_translation_qt.h.ref b/autotests/kconfig_compiler/test_translation_qt.h.ref index 9831468b..2fe3274a 100644 --- a/autotests/kconfig_compiler/test_translation_qt.h.ref +++ b/autotests/kconfig_compiler/test_translation_qt.h.ref @@ -17,7 +17,6 @@ class TestTranslationQt : public KConfigSkeleton      TestTranslationQt( );      ~TestTranslationQt(); -      /**        Get Enable automatic saving of calendar      */ diff --git a/autotests/kconfigtest.h b/autotests/kconfigtest.h index 26d8e7f5..9963d476 100644 --- a/autotests/kconfigtest.h +++ b/autotests/kconfigtest.h @@ -16,6 +16,7 @@      the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      Boston, MA 02110-1301, USA.  */ +  #ifndef KCONFIGTEST_H  #define KCONFIGTEST_H | 
