Fixed to compile

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2002-10-29 19:09:59 +00:00
parent f68e12e5ed
commit af1732a6d4

View File

@ -45,17 +45,18 @@ StringSearchTest::PerformTest(void)
CPPUNIT_ASSERT(i == 2); CPPUNIT_ASSERT(i == 2);
delete string1; delete string1;
NextSubTesT(); NextSubTest();
string1 = new BString; string1 = new BString;
i = string1->FindFirst("some text"); i = string1->FindFirst("some text");
CPPUNIT_ASSERT(i == B_ERROR); CPPUNIT_ASSERT(i == B_ERROR);
delete string1; delete string1;
NextSubTest(); //Commented, since crashes R5
string1 = new BString("string"); //NextSubTest();
i = string1->FindFirst((char*)NULL); //string1 = new BString("string");
CPPUNIT_ASSERT(i == 0); //i = string1->FindFirst((char*)NULL);
delete string1; //CPPUNIT_ASSERT(i == 0);
//delete string1;
//FindFirst(BString&, int32) //FindFirst(BString&, int32)
NextSubTest(); NextSubTest();
@ -100,12 +101,13 @@ StringSearchTest::PerformTest(void)
i = string1->FindFirst("abc", -10); i = string1->FindFirst("abc", -10);
CPPUNIT_ASSERT(i == B_ERROR); CPPUNIT_ASSERT(i == B_ERROR);
delete string1; delete string1;
NextSubTest(); //Commented since crashes R5
string1 = new BString("abc abc abc"); //NextSubTest();
i = string1->FindFirst((char*)NULL, 3); //string1 = new BString("abc abc abc");
CPPUNIT_ASSERT(i == 0); //i = string1->FindFirst((char*)NULL, 3);
delete string1; //CPPUNIT_ASSERT(i == 0);
//delete string1;
//FindFirst(char) //FindFirst(char)
NextSubTest(); NextSubTest();
@ -163,24 +165,25 @@ StringSearchTest::PerformTest(void)
CPPUNIT_ASSERT(i == 16); CPPUNIT_ASSERT(i == 16);
delete string1; delete string1;
NextSubTesT(); NextSubTest();
string1 = new BString; string1 = new BString;
i = string1->FindLast("some text"); i = string1->FindLast("some text");
CPPUNIT_ASSERT(i == B_ERROR); CPPUNIT_ASSERT(i == B_ERROR);
delete string1; delete string1;
NextSubTest(); //Commented since crashes R5
string1 = new BString("string"); //NextSubTest();
i = string1->FindLast((char*)NULL); //string1 = new BString("string");
CPPUNIT_ASSERT(i == 0); //i = string1->FindLast((char*)NULL);
delete string1; //CPPUNIT_ASSERT(i == 0);
//delete string1;
//FindLast(BString&, int32) //FindLast(BString&, int32)
NextSubTest(); NextSubTest();
string1 = new BString("abc abc abc"); string1 = new BString("abcabcabc");
string2 = new BString("abc"); string2 = new BString("abc");
i = string1->FindLast(*string2, 5); i = string1->FindLast(*string2, 7);
CPPUNIT_ASSERT(i == 0); CPPUNIT_ASSERT(i == 3);
delete string1; delete string1;
delete string2; delete string2;
@ -204,12 +207,13 @@ StringSearchTest::PerformTest(void)
i = string1->FindLast("abc", -10); i = string1->FindLast("abc", -10);
CPPUNIT_ASSERT(i == B_ERROR); CPPUNIT_ASSERT(i == B_ERROR);
delete string1; delete string1;
NextSubTest(); //Commented since crashes r5
string1 = new BString("abc abc abc"); //NextSubTest();
i = string1->FindLast((char*)NULL, 3); //string1 = new BString("abc abc abc");
CPPUNIT_ASSERT(i == 0); //i = string1->FindLast((char*)NULL, 3);
delete string1; //CPPUNIT_ASSERT(i == 0);
//delete string1;
//FindLast(char) //FindLast(char)
NextSubTest(); NextSubTest();