Lines Matching refs:str1
256 string const ref_short_str1("str1"), ref_short_str2("str2");
266 string str1(short_str1);
267 str1 = long_str1;
268 CPPUNIT_ASSERT(str1 == ref_long_str1);
272 string str1(long_str1);
273 str1 = short_str1;
274 CPPUNIT_ASSERT(str1 == ref_short_str1);
503 string str1;
506 str1.insert(pos, nb, '1');
508 CPPUNIT_ASSERT( str1 == "11" );
510 str0.insert(0, str1);
517 str1.insert(str1.begin() + 1, 2, '2');
518 CPPUNIT_ASSERT( str1 == "1221" );
520 str1.insert(2, "333333", 3);
521 CPPUNIT_ASSERT( str1 == "1233321" );
523 str1.insert(4, "4444");
524 CPPUNIT_ASSERT( str1 == "12334444321" );
526 str1.insert(str1.begin() + 6, '5');
527 CPPUNIT_ASSERT( str1 == "123344544321" );
866 static string str1;
870 str1 = "123456";
874 CPPUNIT_ASSERT(str1[5] == '6');
906 string str1("abcdef");
910 CPPUNIT_ASSERT( str1.compare(str2) == 0 );
912 CPPUNIT_ASSERT( str1.compare(str2) > 0 );
914 CPPUNIT_ASSERT( str1.compare(str2) < 0 );
916 CPPUNIT_ASSERT( str1.compare("abcdef") == 0 );
917 CPPUNIT_ASSERT( str1.compare("abcde") > 0 );
918 CPPUNIT_ASSERT( str1.compare("abcdefg") < 0 );
921 CPPUNIT_ASSERT( str1.compare(2, 3, str2) == 0 );
923 CPPUNIT_ASSERT( str1.compare(2, 3, str2) > 0 );
925 CPPUNIT_ASSERT( str1.compare(2, 3, str2) < 0 );
928 CPPUNIT_ASSERT( str1.compare(2, 3, str2, 2, 3) == 0 );
929 CPPUNIT_ASSERT( str1.compare(2, 3, str2, 2, 2) > 0 );
930 CPPUNIT_ASSERT( str1.compare(2, 3, str2, 2, 4) < 0 );
932 CPPUNIT_ASSERT( str1.compare(2, 3, "cdefgh", 3) == 0 );
933 CPPUNIT_ASSERT( str1.compare(2, 3, "cdefgh", 2) > 0 );
934 CPPUNIT_ASSERT( str1.compare(2, 3, "cdefgh", 4) < 0 );
1312 StackString str1("string stack1", stack1);
1313 StackString str1Cpy(str1);
1318 str1.swap(str2);
1320 CPPUNIT_ASSERT( str1.get_allocator().swaped() );
1323 CPPUNIT_ASSERT( str1 == str2Cpy );
1325 CPPUNIT_ASSERT( str1.get_allocator() == stack2 );
1333 StackString str1("longer string from stack1 allocator instance for dynamic allocation", stack1);
1334 StackString str1Cpy(str1);
1339 str1.swap(str2);
1341 CPPUNIT_ASSERT( str1.get_allocator().swaped() );
1344 CPPUNIT_ASSERT( str1 == str2Cpy );
1346 CPPUNIT_ASSERT( str1.get_allocator() == stack2 );
1355 StackString str1("string stack1", stack1);
1356 StackString str1Cpy(str1);
1361 str1.swap(str2);
1363 CPPUNIT_ASSERT( str1.get_allocator().swaped() );
1366 CPPUNIT_ASSERT( str1 == str2Cpy );
1368 CPPUNIT_ASSERT( str1.get_allocator() == stack2 );
1377 StackString str1("longer string from stack1 allocator instance for dynamic allocation", stack1);
1378 StackString str1Cpy(str1);
1383 str1.swap(str2);
1385 CPPUNIT_ASSERT( str1.get_allocator().swaped() );
1388 CPPUNIT_ASSERT( str1 == str2Cpy );
1390 CPPUNIT_ASSERT( str1.get_allocator() == stack2 );