diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-12-24 03:51:33 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-12-24 03:51:33 -0500 |
| commit | d2f2e4e22ba668a49b3a845abc89f4391fc1b170 (patch) | |
| tree | ab9d8812ec686ac91fb2eea125caf9c97adb3849 | |
| parent | aff67ab422b5fa092fed852bd34274654492cc5b (diff) | |
| download | sigen-d2f2e4e22ba668a49b3a845abc89f4391fc1b170.tar.gz sigen-d2f2e4e22ba668a49b3a845abc89f4391fc1b170.tar.xz sigen-d2f2e4e22ba668a49b3a845abc89f4391fc1b170.zip | |
Fixed up base test class
| -rw-r--r-- | sigmod/test/TestAbility.cpp | 4 | ||||
| -rw-r--r-- | sigmod/test/TestSigmodObject.cpp | 18 | ||||
| -rw-r--r-- | sigmod/test/TestSigmodObject.h | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/sigmod/test/TestAbility.cpp b/sigmod/test/TestAbility.cpp index 30510bf0..6987e8d6 100644 --- a/sigmod/test/TestAbility.cpp +++ b/sigmod/test/TestAbility.cpp @@ -41,11 +41,11 @@ void TestAbility::cleanupTestCase() void TestAbility::init() { + TestSigmodObject::init(); + makeConnections(m_ability1); makeConnections(m_ability2); makeConnections(m_ability3); - - TestSigmodObject::init(); } void TestAbility::cleanup() diff --git a/sigmod/test/TestSigmodObject.cpp b/sigmod/test/TestSigmodObject.cpp index 6ea81d7f..07bc1500 100644 --- a/sigmod/test/TestSigmodObject.cpp +++ b/sigmod/test/TestSigmodObject.cpp @@ -23,9 +23,9 @@ void TestSigmodObject::makeConnections(Sigmod::Object* object) { -// connect(object, SIGNAL(message(QString)), this, SLOT(message(QString))); -// connect(object, SIGNAL(warning(QString)), this, SLOT(warning(QString))); -// connect(object, SIGNAL(error(QString)), this, SLOT(error(QString))); + connect(object, SIGNAL(warning(QString)), this, SLOT(warning(QString))); + connect(object, SIGNAL(error(QString)), this, SLOT(error(QString))); + connect(object, SIGNAL(changed()), this, SLOT(changed())); } void TestSigmodObject::closeConnections(Sigmod::Object* object) @@ -33,11 +33,6 @@ void TestSigmodObject::closeConnections(Sigmod::Object* object) disconnect(object, 0, this, 0); } -void TestSigmodObject::message(const QString& message) -{ - m_messages.append(message); -} - void TestSigmodObject::warning(const QString& warning) { m_warnings.append(warning); @@ -48,6 +43,11 @@ void TestSigmodObject::error(const QString& error) m_errors.append(error); } +void TestSigmodObject::changed() +{ + ++m_changedCount; +} + void TestSigmodObject::initTestCase() { m_sigmod = new Sigmod::Sigmod; @@ -64,7 +64,7 @@ void TestSigmodObject::init() void TestSigmodObject::cleanup() { - m_messages.clear(); m_warnings.clear(); m_errors.clear(); + m_changedCount = 0; } diff --git a/sigmod/test/TestSigmodObject.h b/sigmod/test/TestSigmodObject.h index 80afc4b4..65e023c5 100644 --- a/sigmod/test/TestSigmodObject.h +++ b/sigmod/test/TestSigmodObject.h @@ -43,13 +43,13 @@ class SIGMODTEST_EXPORT TestSigmodObject : public QObject Sigmod::Sigmod* m_sigmod; - QList<QString> m_messages; QList<QString> m_warnings; QList<QString> m_errors; + int m_changedCount; protected slots: - void message(const QString& warning); void warning(const QString& warning); void error(const QString& warning); + void changed(); virtual void initTestCase(); virtual void cleanupTestCase(); |
