OSDN Git Service

add tests
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 6 Dec 2003 15:40:56 +0000 (15:40 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 6 Dec 2003 15:40:56 +0000 (15:40 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@616 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/tests/threadtest.cpp
kita/src/libkita/tests/threadtest.h

index f46d0d5..60730ed 100644 (file)
@@ -71,3 +71,15 @@ void ThreadTest::testBoardName()
     CPPUNIT_ASSERT_EQUAL( QString( "Linux" ), m_normal->boardName() );
     CPPUNIT_ASSERT_EQUAL( QString::null, m_noboard->boardName() );
 }
+
+void ThreadTest::testBoardURL()
+{
+    CPPUNIT_ASSERT_EQUAL( QString( "http://pc.2ch.net/linux/" ), m_normal->boardURL().url() );
+    CPPUNIT_ASSERT_EQUAL( QString::null, m_noboard->boardURL().url() ); // TODO: should be "http://pc.2ch.net/linux"
+}
+
+void ThreadTest::testBoardID()
+{
+    CPPUNIT_ASSERT_EQUAL( QString( "linux" ), m_normal->boardID() );
+    CPPUNIT_ASSERT_EQUAL( QString::null, m_noboard->boardID() ); // TODO: should be "linux"
+}
index 87c9534..ac62675 100644 (file)
@@ -24,6 +24,8 @@ class ThreadTest : public CppUnit::TestFixture {
     CPPUNIT_TEST( testResNum );
     CPPUNIT_TEST( testName );
     CPPUNIT_TEST( testBoardName );
+    CPPUNIT_TEST( testBoardURL );
+    CPPUNIT_TEST( testBoardID );
     CPPUNIT_TEST_SUITE_END();
 
     Kita::Thread *m_normal, *m_noboard;
@@ -37,6 +39,8 @@ public:
     void testResNum();
     void testName();
     void testBoardName();
+    void testBoardURL();
+    void testBoardID();
 };
 
 #endif