[sword-cvs] sword/tests/cppunit stringmgr_test.cpp,NONE,1.1
sword at www.crosswire.org
sword at www.crosswire.org
Tue Jul 20 04:22:28 MST 2004
Committed by: joachim
Update of /cvs/core/sword/tests/cppunit
In directory www:/tmp/cvs-serv28757/tests/cppunit
Added Files:
stringmgr_test.cpp
Log Message:
start to fix ICUStringMgr
--- NEW FILE: stringmgr_test.cpp ---
#include <cppunit/extensions/HelperMacros.h>
#include <iostream>
#include "stringmgr.h"
using namespace sword;
class StringMgrTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE( StringMgrTest );
CPPUNIT_TEST( testUpperLatin1 );
CPPUNIT_TEST( testUpperUTF8 );
CPPUNIT_TEST_SUITE_END();
public:
void setUp() {
}
void tearDown() {
}
void testUpperLatin1() {
StringMgr* mgr = StringMgr::getSystemStringMgr();
CPPUNIT_ASSERT( !strcmp(mgr->upperLatin1(""), "") );
CPPUNIT_ASSERT( !strcmp(mgr->upperLatin1("hi this is a test"), "HI THIS IS A TEST") );
}
void testUpperUTF8() {
StringMgr* mgr = StringMgr::getSystemStringMgr();
if (mgr->hasUTF8Support()) {
CPPUNIT_ASSERT( !strcmp(mgr->upperUTF8("äüöÃ"), "ÃÃÃÃ") );
}
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(StringMgrTest);
More information about the sword-cvs
mailing list