added winchar_strdup
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4936 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
82ab983cbd
commit
0b19a3fa29
3 changed files with 19 additions and 0 deletions
|
@ -13,6 +13,7 @@ class WinCharTest : public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST( testStrNCpy );
|
||||
CPPUNIT_TEST( testStrLen );
|
||||
CPPUNIT_TEST( testStrCmp );
|
||||
CPPUNIT_TEST( testStrDup );
|
||||
CPPUNIT_TEST( testStoi );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
|
@ -96,6 +97,16 @@ public:
|
|||
TEST_STR_CMP(empty, empty);
|
||||
}
|
||||
|
||||
void testStrDup() {
|
||||
WCHAR a[] = { 'a', 'b', 'c', 0 };
|
||||
|
||||
WCHAR *b = winchar_strdup(a);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( 0, winchar_strcmp(a, b) );
|
||||
|
||||
delete [] b;
|
||||
}
|
||||
|
||||
void testStoi() {
|
||||
srand(time(0));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue