diff options
author | Denis Shienkov <scapig2@yandex.ru> | 2011-10-23 19:48:30 +0400 |
---|---|---|
committer | Denis Shienkov <scapig2@yandex.ru> | 2011-10-23 19:48:30 +0400 |
commit | be87d88d1f631a6c324d7a93b340a0a3b18bb325 (patch) | |
tree | 5505d7141b34c61b96a16598043493c6b4c5754e /tests | |
parent | 62b3311164cf6750415ef298361a9fa1333974fd (diff) | |
download | qtserialport-be87d88d1f631a6c324d7a93b340a0a3b18bb325.tar.gz |
/tests/guidevtest: Add processing breaking a test on error.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guidevtest/maindialog.cpp | 18 | ||||
-rw-r--r-- | tests/guidevtest/maindialog.h | 1 |
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/guidevtest/maindialog.cpp b/tests/guidevtest/maindialog.cpp index b0497d7..17adfb4 100644 --- a/tests/guidevtest/maindialog.cpp +++ b/tests/guidevtest/maindialog.cpp @@ -292,14 +292,27 @@ void MainDialog::procTestFinished() enableUi(true); m_it = 0; - QString header(tr("\n*** S T O P P E D ***\n")); - m_logger->addContent(header); + QString trailer(tr("\n*** S T O P P E D ***\n")); + m_logger->addContent(trailer); return; } else procTestStarted(); } +void MainDialog::procTestError() +{ + if (ui->breakAllCheckBox->isChecked()) { + m_enabledTestsCount = 0; + m_it = 0; + enableUi(true); + QString trailer(tr("\n*** B R E A K ***\n")); + m_logger->addContent(trailer); + } else { + procTestFinished(); + } +} + void MainDialog::procItemDoubleClick(const QModelIndex &index) { QString title(tr("About: <%1>")); @@ -332,6 +345,7 @@ void MainDialog::createAvailableTests() foreach(UnitTestBase *test, m_testsList) { connect(test, SIGNAL(finished()), this, SLOT(procTestFinished())); + connect(test, SIGNAL(error()), this, SLOT(procTestError())); } } diff --git a/tests/guidevtest/maindialog.h b/tests/guidevtest/maindialog.h index d9175d8..3e1a261 100644 --- a/tests/guidevtest/maindialog.h +++ b/tests/guidevtest/maindialog.h @@ -57,6 +57,7 @@ private slots: void procStartButtonClick(); void procTestStarted(); void procTestFinished(); + void procTestError(); void procItemDoubleClick(const QModelIndex &index); |