Changes: Add unit test for Logger - open log twice

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

1
debian/changelog vendored

@ -4,6 +4,7 @@ applauncherd (2.0.0) unstable; urgency=low
* Fixes: NB#275522 - Booster::requestSplash() segfault * Fixes: NB#275522 - Booster::requestSplash() segfault
* Fixes: NB#274400 - [TASK] Remove legacy code from applauncherd * Fixes: NB#274400 - [TASK] Remove legacy code from applauncherd
* Fixes: NB#269075 - Precached (LibMeegotouch) applications do not set WM_CLASS window atom properly * Fixes: NB#269075 - Precached (LibMeegotouch) applications do not set WM_CLASS window atom properly
* Changes: Add unit test for Logger - open log twice
-- Alexey Shilov <alexey.shilov@nokia.com> Thu, 18 Aug 2011 15:43:02 +0300 -- Alexey Shilov <alexey.shilov@nokia.com> Thu, 18 Aug 2011 15:43:02 +0300

@ -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