[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdenetwork/kopete/kopete/chatwindow/tests
From:       Martijn Klingens <klingens () kde ! org>
Date:       2007-02-26 20:18:11
Message-ID: 1172521091.867555.22536.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 637557 by mklingens:

Make 'make check' work again.

Note that none of the dates in the output were as expected by the test
program.

Since I don't know what is "correct" I blindly adjusted the test to
match reality. If reality is broken, please tell me :)

Michael, can you forward port again?

CCMAIL: Michaƫl Larouche <larouche@kde.org>



 M  +2 -8      Makefile.am  
 M  +12 -15    chatwindowstylerendering_test.cpp  


--- branches/KDE/3.5/kdenetwork/kopete/kopete/chatwindow/tests/Makefile.am \
#637556:637557 @@ -1,7 +1,6 @@
 AM_CPPFLAGS = -DKDE_NO_COMPAT -DQT_NO_ASCII_CAST -DQT_NO_COMPAT \
 	$(KOPETE_INCLUDES) -I$(top_srcdir)/kopete/kopete/chatwindow \
-I$(top_srcdir)/kopete/libkopete $(all_includes) \
-DSRCDIR=\"$(top_srcdir)/kopete/kopete/chatwindow/tests\"  METASOURCES = AUTO
-check_PROGRAMS = kopetetabwidgettest
 check_LTLIBRARIES = kunittest_chatwindowstyle_test.la \
kunittest_chatwindowstylerendering_test.la  
 kunittest_chatwindowstyle_test_la_SOURCES = chatwindowstyle_test.cpp
@@ -9,15 +8,10 @@
 kunittest_chatwindowstyle_test_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) \
$(all_libraries)  
 kunittest_chatwindowstylerendering_test_la_SOURCES = \
                chatwindowstylerendering_test.cpp
-kunittest_chatwindowstylerendering_test_la_LIBADD = -lkunittest \
$(top_srcdir)/kopete/libkopete/libkopete.la ../libkopetechatwindow.la \
+kunittest_chatwindowstylerendering_test_la_LIBADD = -lkunittest \
../../../libkopete/libkopete.la ../libkopetechatwindow.la  \
kunittest_chatwindowstylerendering_test_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) \
$(all_libraries)  
-kopetetabwidgettest_SOURCES = kopetetabwidgettest.cpp
-kopetetabwidgettest_LDADD = ../libkopetechatwindow.la
-kopetetabwidgettest_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-
-
-check-local: 
+check-local:
 	kunittestmodrunner
 guicheck:
 	kunittestmod $(PWD) 
--- branches/KDE/3.5/kdenetwork/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp \
#637556:637557 @@ -198,14 +198,14 @@
 void ChatWindowStyleRendering_Test::testHeaderRendering()
 {
 	QString expectedHtml = QString(
-"<div>Test Session</div>\n"
+"<div><span id=\"KopeteHeaderChatNameInternal\">Test Session</span></div>\n"
 "<div>Bob</div>\n"
 "<div>Audrey</div>\n"
 "<div>Incoming/buddy_icon.png</div>\n"
 "<div>Outgoing/buddy_icon.png</div>\n"
 "<div>%1</div>\n"
 "<div>%2</div>"
-	).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime()))
+	).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) \
                )
 	.arg(QDateTime::currentDateTime().toString("hh:mm"));
 
 	QString headerHtml = d->testStyle->getHeaderHtml();
@@ -223,28 +223,26 @@
 	QString expectedIncomingHtml = QString(
 "Incoming:\n"
 "<div>Incoming/buddy_icon.png</div>\n"
-"<div>audrey@localhost</div>\n"
-"<div>Audrey</div>\n"
+"<div><a href=\"kopetemessage://audrey@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" \
class=\"KopeteDisplayName\">audrey@localhost</a></div>\n" +"<div><a \
href=\"kopetemessage://audrey@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" \
class=\"KopeteDisplayName\">Audrey</a></div>\n"  "<div>Kopete</div>\n"
-"<div>Test</div>\n"
+"<div><span style=\"\"class=\"KopeteMessageBody\">Test</span></div>\n"
 "<div>%1</div>\n"
 "<div>%2</div>\n"
 "<div id=\"insert\">"
-	).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime()))
-	.arg(QDateTime::currentDateTime().toString("hh:mm"));
+	).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), \
QDateTime::currentDateTime().toString( "hh:mm" ) );  
 	QString expectedOutgoingHtml = QString(
 "Outgoing:\n"
 "<div>Outgoing/buddy_icon.png</div>\n"
-"<div>bob@localhost</div>\n"
-"<div>Bob</div>\n"
+"<div><a href=\"kopetemessage://bob@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" \
class=\"KopeteDisplayName\">bob@localhost</a></div>\n" +"<div><a \
href=\"kopetemessage://bob@localhost/?protocolId=Kopete::Protocol&amp;accountId=testaccount\" \
class=\"KopeteDisplayName\">Bob</a></div>\n"  "<div>Kopete</div>\n"
-"<div>Hello there</div>\n"
+"<div><span style=\"\"class=\"KopeteMessageBody\">Hello there</span></div>\n"
 "<div>%1</div>\n"
 "<div>%2</div>\n"
 "<div id=\"insert\">"
-	).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime()))
-	.arg(QDateTime::currentDateTime().toString("hh:mm"));
+	).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), \
QDateTime::currentDateTime().toString( "hh:mm" ) );  
 
 	QString tempHtml;
@@ -271,11 +269,10 @@
 void ChatWindowStyleRendering_Test::testStatusRendering()
 {
 	QString expectedStatusHtml = QString(
-"<div>A contact went offline.</div>\n"
+"<div><span style=\"\"class=\"KopeteMessageBody\">A contact went \
offline.</span></div>\n"  "<div>%1</div>\n"
 "<div>%2</div>"
-	).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime()))
-	.arg(QDateTime::currentDateTime().toString("hh:mm"));
+	).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), \
QDateTime::currentDateTime().toString( "hh:mm" ) );  
 	QString statusHtml = d->testStyle->getStatusHtml();
 	QString resultHtml;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic