File indexing completed on 2024-12-22 04:28:06
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "autocorrectionsettingstest.h" 0008 #include "autocorrectionsettings.h" 0009 #include <QStandardPaths> 0010 #include <QTest> 0011 QTEST_MAIN(AutoCorrectionSettingsTest) 0012 AutoCorrectionSettingsTest::AutoCorrectionSettingsTest(QObject *parent) 0013 : QObject{parent} 0014 { 0015 QStandardPaths::setTestModeEnabled(true); 0016 } 0017 0018 void AutoCorrectionSettingsTest::shouldHaveDefaultValues() 0019 { 0020 TextAutoCorrectionCore::AutoCorrectionSettings settings; 0021 QVERIFY(!settings.isEnabledAutoCorrection()); 0022 QVERIFY(!settings.isUppercaseFirstCharOfSentence()); 0023 QVERIFY(!settings.isFixTwoUppercaseChars()); 0024 QVERIFY(!settings.isSingleSpaces()); 0025 QVERIFY(!settings.isAutoFractions()); 0026 QVERIFY(!settings.isCapitalizeWeekDays()); 0027 QVERIFY(!settings.isReplaceDoubleQuotes()); 0028 QVERIFY(!settings.isReplaceSingleQuotes()); 0029 QVERIFY(!settings.isAdvancedAutocorrect()); 0030 QVERIFY(!settings.isAutoFormatUrl()); 0031 QVERIFY(!settings.isAutoBoldUnderline()); 0032 QVERIFY(!settings.isSuperScript()); 0033 QVERIFY(!settings.isReplaceDoubleQuotesByFrenchQuotes()); 0034 QVERIFY(!settings.isAddNonBreakingSpace()); 0035 } 0036 0037 #include "moc_autocorrectionsettingstest.cpp"