* fixed Adopt(BString, len) test, as after adopt the source string should
be empty, thus the pointer into that string should point to empty data... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24104 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
93608e10d1
commit
4f841cf2fa
@ -95,7 +95,7 @@ StringAssignTest::PerformTest(void)
|
||||
const char *oldString = newstring.String();
|
||||
str = new BString;
|
||||
str->Adopt(newstring, 2);
|
||||
CPPUNIT_ASSERT(strncmp(str->String(), oldString, 2) == 0);
|
||||
CPPUNIT_ASSERT(strncmp(str->String(), "SomethingElseAgain", 2) == 0);
|
||||
CPPUNIT_ASSERT(str->Length() == 2);
|
||||
CPPUNIT_ASSERT(strcmp(newstring.String(), "") == 0);
|
||||
delete str;
|
||||
|
Loading…
Reference in New Issue
Block a user