Commit 4100f7b2 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Improve an autotest

parent b67fe001
Pipeline #39918 failed with stage
in 12 minutes and 14 seconds
...@@ -63,6 +63,7 @@ add_executable(incidencedatetimetest incidencedatetimetest.cpp ...@@ -63,6 +63,7 @@ add_executable(incidencedatetimetest incidencedatetimetest.cpp
../src/combinedincidenceeditor.cpp ../src/combinedincidenceeditor.cpp
../src/incidencedatetime.cpp ../src/incidencedatetime.cpp
../src/incidenceeditor_debug.cpp) ../src/incidenceeditor_debug.cpp)
ecm_mark_nongui_executable(incidencedatetimetest)
add_test(NAME incidencedatetimetest COMMAND incidencedatetimetest) add_test(NAME incidencedatetimetest COMMAND incidencedatetimetest)
ecm_mark_as_test(incidencedatetimetest) ecm_mark_as_test(incidencedatetimetest)
target_link_libraries(incidencedatetimetest target_link_libraries(incidencedatetimetest
......
...@@ -76,9 +76,13 @@ private Q_SLOTS: ...@@ -76,9 +76,13 @@ private Q_SLOTS:
endTime->setCurrentText(QStringLiteral("12:00:00")); endTime->setCurrentText(QStringLiteral("12:00:00"));
QVERIFY(editor->isValid()); QVERIFY(editor->isValid());
endDate->setDate(startDate->date().addDays(-1));
endTime->setTime(startTime->time());
QVERIFY2(!editor->isValid(), "Didn't detect end date < start date");
endDate->setDate(startDate->date()); endDate->setDate(startDate->date());
QVERIFY(editor->isValid());
endTime->setTime(startTime->time().addSecs(-60)); endTime->setTime(startTime->time().addSecs(-60));
QVERIFY2(!editor->isValid(), "Didn't detect end date & time < start date & time"); QVERIFY2(!editor->isValid(), "Didn't detect end time < start time");
endTime->setTime(startTime->time()); endTime->setTime(startTime->time());
QVERIFY(editor->isValid()); QVERIFY(editor->isValid());
......
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