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

Add more autotest

parent c7e577c9
......@@ -38,6 +38,7 @@ void CategoryTypeComboBoxTest::shouldHaveDefaultValue()
CategoryTypeComboBox w2(false);
QCOMPARE(w2.count(), 6);
}
void CategoryTypeComboBoxTest::shouldSetType_data()
......@@ -79,4 +80,19 @@ void CategoryTypeComboBoxTest::shouldVerifyItNotDefault()
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)
......@@ -35,6 +35,7 @@ private Q_SLOTS:
void shouldSetType();
void shouldVerifyItNotDefault();
void shouldChangeDefaultCategory();
};
#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