m_noboard->url().url() );
}
+void ThreadTest::testDatID()
+{
+ CPPUNIT_ASSERT_EQUAL( QString( "1069738960" ), m_normal->datID() );
+ CPPUNIT_ASSERT_EQUAL( QString( "1069738960" ), m_noboard->datID() );
+}
+
+void ThreadTest::testResNum()
+{
+ CPPUNIT_ASSERT_EQUAL( 0, m_normal->resNum() );
+ CPPUNIT_ASSERT_EQUAL( 0, m_noboard->resNum() );
+}
+
void ThreadTest::testName()
{
CPPUNIT_ASSERT_EQUAL( QString( "Kita - 2ch client for KDE" ),
CPPUNIT_ASSERT_EQUAL( QString( "Kita - 2ch client for KDE" ),
m_noboard->name() );
}
+
+void ThreadTest::testBoardName()
+{
+ CPPUNIT_ASSERT_EQUAL( QString( "Linux" ), m_normal->boardName() );
+ CPPUNIT_ASSERT_EQUAL( QString( "" ), m_noboard->boardName() ); // segfault!
+}
CPPUNIT_TEST_SUITE( ThreadTest );
CPPUNIT_TEST( testDatURL );
CPPUNIT_TEST( testURL );
+ CPPUNIT_TEST( testDatID );
+ CPPUNIT_TEST( testResNum );
CPPUNIT_TEST( testName );
+ CPPUNIT_TEST( testBoardName );
CPPUNIT_TEST_SUITE_END();
Kita::Thread *m_normal, *m_noboard;
void testDatURL();
void testURL();
+ void testDatID();
+ void testResNum();
void testName();
+ void testBoardName();
};
#endif