Changes: Add unit test for Logger - open log twice

RevBy: Juha Lintula
pull/1/head
Dmitry Rozenshtein 14 years ago
parent ce1e9109c1
commit 3e64ed2536

6
debian/changelog vendored

@ -1,3 +1,9 @@
applauncherd (1.0.10) unstable; urgency=low
* Changes: Add unit test for Logger - open log twice
-- Dmitry Rozenshtein <ext-dmitry.2.rozenshtein@nokia.com> Mon, 5 Sep 2011 13:33:55 +0300
applauncherd (1.0.9) stable; urgency=low applauncherd (1.0.9) stable; urgency=low
* Changes: Improve test debug output. * Changes: Improve test debug output.

@ -101,6 +101,22 @@ void Ut_Logger::testCloseLog() {
QVERIFY(m_subject->m_isOpened == false); QVERIFY(m_subject->m_isOpened == false);
} }
void Ut_Logger::testOpenLogTwice() {
//open log first time with random name
_setTestPhrase(Q_FUNC_INFO);
Logger::openLog(m_testPhrase);
QVERIFY(m_subject->m_isOpened == true);
Logger::logInfo("Testing OpenLog twice");
QVERIFY(_findPhraseInSyslog() == true);
//open log second time with another random name
_setTestPhrase(Q_FUNC_INFO);
Logger::openLog(m_testPhrase);
QVERIFY(m_subject->m_isOpened == true);
Logger::logInfo("Testing OpenLog twice");
QVERIFY(_findPhraseInSyslog() == true);
Logger::closeLog();
}
bool Ut_Logger::_findPhraseInSyslog() bool Ut_Logger::_findPhraseInSyslog()
{ {

@ -46,6 +46,7 @@ private Q_SLOTS:
void testLogInfo(); void testLogInfo();
void testLogWarning(); void testLogWarning();
void testCloseLog(); void testCloseLog();
void testOpenLogTwice();
private: private:
char m_testPhrase[255]; char m_testPhrase[255];

Loading…
Cancel
Save