From 01f868c4040234ed4b1ee7d0e08377a89b928b77 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Fri, 29 Jan 2010 23:52:25 +0000 Subject: Fix chatwindow unit tests diff --git a/SwifTools/UnitTest/LinkifyTest.cpp b/SwifTools/UnitTest/LinkifyTest.cpp index 6c5fb15..e952585 100644 --- a/SwifTools/UnitTest/LinkifyTest.cpp +++ b/SwifTools/UnitTest/LinkifyTest.cpp @@ -91,6 +91,14 @@ class LinkifyTest : public CppUnit::TestFixture { String("http://foo.com/bar+baz"), result); } + + void testLinkify_Tilde() { + String result = Linkify::linkify("http://foo.com/~kev/"); + + CPPUNIT_ASSERT_EQUAL( + String("http://foo.com/~kev/"), + result); + } }; CPPUNIT_TEST_SUITE_REGISTRATION(LinkifyTest); diff --git a/Swift/Controllers/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/UnitTest/ChatsManagerTest.cpp index 0dfc52b..219b9b0 100644 --- a/Swift/Controllers/UnitTest/ChatsManagerTest.cpp +++ b/Swift/Controllers/UnitTest/ChatsManagerTest.cpp @@ -4,8 +4,8 @@ #include "Swift/Controllers/ChatsManager.h" -#include "Swift/Controllers/ChatWindow.h" -#include "Swift/Controllers/ChatWindowFactory.h" +#include "Swift/Controllers/UIInterfaces/ChatWindow.h" +#include "Swift/Controllers/UIInterfaces/ChatWindowFactory.h" #include "Swiften/Roster/TreeWidgetFactory.h" #include "Swiften/Client/Client.h" #include "Swift/Controllers/ChatController.h" diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h index 2625553..dc744cd 100644 --- a/Swift/Controllers/UnitTest/MockChatWindow.h +++ b/Swift/Controllers/UnitTest/MockChatWindow.h @@ -1,6 +1,6 @@ #pragma once -#include "Swift/Controllers/ChatWindow.h" +#include "Swift/Controllers/UIInterfaces/ChatWindow.h" namespace Swift { class MockChatWindow : public ChatWindow { @@ -9,6 +9,7 @@ namespace Swift { virtual ~MockChatWindow(); virtual void addMessage(const String& message, const String& /*senderName*/, bool /*senderIsSelf*/, const boost::optional& /*label*/, const String& /*avatarPath*/) {lastMessageBody_ = message;}; + virtual void addAction(const String& message, const String& /*senderName*/, bool /*senderIsSelf*/, const boost::optional& /*label*/, const String& /*avatarPath*/) {lastMessageBody_ = message;}; virtual void addSystemMessage(const String& /*message*/) {}; virtual void addErrorMessage(const String& /*message*/) {}; -- cgit v0.10.2-6-g49f6