Commit 2487429d authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotest

parent c7e577c9
...@@ -38,6 +38,7 @@ void CategoryTypeComboBoxTest::shouldHaveDefaultValue() ...@@ -38,6 +38,7 @@ void CategoryTypeComboBoxTest::shouldHaveDefaultValue()
CategoryTypeComboBox w2(false); CategoryTypeComboBox w2(false);
QCOMPARE(w2.count(), 6); QCOMPARE(w2.count(), 6);
} }
void CategoryTypeComboBoxTest::shouldSetType_data() void CategoryTypeComboBoxTest::shouldSetType_data()
...@@ -79,4 +80,19 @@ void CategoryTypeComboBoxTest::shouldVerifyItNotDefault() ...@@ -79,4 +80,19 @@ void CategoryTypeComboBoxTest::shouldVerifyItNotDefault()
QVERIFY(w.loggingCategoryIsNotDefault()); QVERIFY(w.loggingCategoryIsNotDefault());
} }
void CategoryTypeComboBoxTest::shouldChangeDefaultCategory()
{
CategoryTypeComboBox w(true);
w.setDefaultCategories(LoggingCategory::All);
w.setType(LoggingCategory::All);
QVERIFY(!w.loggingCategoryIsNotDefault());
w.setDefaultCategories(LoggingCategory::Critical);
w.setType(LoggingCategory::Critical);
QVERIFY(!w.loggingCategoryIsNotDefault());
w.setType(LoggingCategory::Debug);
QVERIFY(w.loggingCategoryIsNotDefault());
}
QTEST_MAIN(CategoryTypeComboBoxTest) QTEST_MAIN(CategoryTypeComboBoxTest)
...@@ -35,6 +35,7 @@ private Q_SLOTS: ...@@ -35,6 +35,7 @@ private Q_SLOTS:
void shouldSetType(); void shouldSetType();
void shouldVerifyItNotDefault(); void shouldVerifyItNotDefault();
void shouldChangeDefaultCategory();
}; };
#endif // CATEGORYTYPECOMBOBOXTEST_H #endif // CATEGORYTYPECOMBOBOXTEST_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment