Bump for 3.6-28
[LibreOffice.git] / sal / qa / OStringBuffer / rtl_OStringBuffer.cxx
blob46b78144572d00155dc973d5f69120a4e779467a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include "sal/config.h"
30 #include "sal/precppunit.hxx"
32 #include <rtl/string.hxx>
33 #include <rtl_String_Const.h>
34 #include <rtl_String_Utils.hxx>
35 #include <rtl/strbuf.hxx>
37 #include "cppunit/TestAssert.h"
38 #include "cppunit/TestFixture.h"
39 #include "cppunit/extensions/HelperMacros.h"
40 #include "cppunit/plugin/TestPlugIn.h"
41 #include <string.h>
43 using ::rtl::OStringBuffer;
44 using ::rtl::OString;
45 // This file contains cppunit tests for the
46 // OString and OStringBuffer classes
48 //------------------------------------------------------------------------
49 // testing constructors
50 //------------------------------------------------------------------------
52 namespace rtl_OStringBuffer
54 class ctors : public CppUnit::TestFixture
56 public:
58 void ctor_001()
60 ::rtl::OStringBuffer aStrBuf;
61 const sal_Char* pStr = aStrBuf.getStr();
63 CPPUNIT_ASSERT_MESSAGE
65 "New OStringBuffer containing no characters",
66 aStrBuf.getLength() == 0 &&
67 *pStr == '\0' && aStrBuf.getCapacity() == 16
71 void ctor_002()
73 ::rtl::OString aStrtmp( kTestStr1 );
74 ::rtl::OStringBuffer aStrBuftmp( aStrtmp );
75 ::rtl::OStringBuffer aStrBuf( aStrBuftmp );
76 // sal_Bool res = cmpstr(aStrBuftmp.getStr(),aStrBuf.getStr());
78 sal_Int32 nLenStrBuftmp = aStrBuftmp.getLength();
80 rtl::OString sStr(aStrBuftmp.getStr());
81 sal_Bool res = aStrtmp.equals( sStr );
83 CPPUNIT_ASSERT_MESSAGE
85 "New OStringBuffer from another OStringBuffer",
86 aStrBuf.getLength() == nLenStrBuftmp &&
87 aStrBuf.getCapacity() == aStrBuftmp.getCapacity() &&
88 res
93 void ctor_003()
95 ::rtl::OStringBuffer aStrBuf1(kTestStr2Len);
96 ::rtl::OStringBuffer aStrBuf2(0);
98 const sal_Char* pStr1 = aStrBuf1.getStr();
99 const sal_Char* pStr2 = aStrBuf2.getStr();
101 CPPUNIT_ASSERT_MESSAGE
103 "New OStringBuffer containing no characters and contain assigned capacity",
104 aStrBuf1.getLength() == 0 &&
105 *pStr1 == '\0' &&
106 aStrBuf1.getCapacity() == kTestStr2Len &&
107 aStrBuf2.getLength() == 0 &&
108 *pStr2 == '\0' &&
109 aStrBuf2.getCapacity() == 0
114 void ctor_003_1()
116 // StringBuffer with created negative size are the
117 // same as empty StringBuffers
118 ::rtl::OStringBuffer aStrBuf3(kNonSInt32Max);
120 const sal_Char* pStr = aStrBuf3.getStr();
122 CPPUNIT_ASSERT_MESSAGE
124 "New OStringBuffer containing no characters and contain assigned capacity",
125 aStrBuf3.getLength() == 0 &&
126 *pStr == '\0' &&
127 aStrBuf3.getCapacity() == kNonSInt32Max
131 void ctor_004()
133 ::rtl::OString aStrtmp( kTestStr1 );
134 ::rtl::OStringBuffer aStrBuf( aStrtmp );
135 sal_Int32 leg = aStrBuf.getLength();
137 CPPUNIT_ASSERT_MESSAGE
139 "New OStringBuffer from OString",
140 aStrBuf.getStr() == aStrtmp &&
141 leg == aStrtmp.pData->length &&
142 aStrBuf.getCapacity() == leg+16
147 void ctor_005() {
148 rtl::OStringBuffer b1;
149 b1.makeStringAndClear();
150 rtl::OStringBuffer b2(b1);
153 void ctor_006()
155 //pass in a const char*, get a temp
156 //OString
157 ::rtl::OStringBuffer aStrBuf(kTestStr1);
158 sal_Int32 leg = aStrBuf.getLength();
160 CPPUNIT_ASSERT_MESSAGE
162 "New OStringBuffer from const char*",
163 leg == rtl_str_getLength(kTestStr1) &&
164 aStrBuf.getCapacity() == leg+16
168 SAL_CPPUNIT_TEST_SUITE(ctors);
169 CPPUNIT_TEST(ctor_001);
170 CPPUNIT_TEST(ctor_002);
171 CPPUNIT_TEST(ctor_003);
172 CPPUNIT_TEST(ctor_003_1);
173 CPPUNIT_TEST(ctor_004);
174 CPPUNIT_TEST(ctor_005);
175 CPPUNIT_TEST(ctor_006);
176 SAL_CPPUNIT_TEST_SUITE_END();
179 // -----------------------------------------------------------------------------
181 class makeStringAndClear : public CppUnit::TestFixture
183 OString* arrOUS[6];
185 public:
186 void setUp()
188 arrOUS[0] = new OString( kTestStr1 );
189 arrOUS[1] = new OString( kTestStr14 );
190 arrOUS[2] = new OString( kTestStr25 );
191 arrOUS[3] = new OString( kTestStr27 );
192 arrOUS[4] = new OString( kTestStr29 );
193 arrOUS[5] = new OString( "\0", 1 );
197 void tearDown()
199 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
200 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
203 void makeStringAndClear_001()
205 ::rtl::OStringBuffer aStrBuf1;
206 ::rtl::OString aStr1;
208 sal_Bool lastRes = (aStrBuf1.makeStringAndClear() == aStr1 );
210 CPPUNIT_ASSERT_MESSAGE
212 "two empty strings(def. constructor)",
213 lastRes && ( aStrBuf1.getCapacity() == 0 ) &&
214 ( *(aStrBuf1.getStr()) == '\0' )
219 void makeStringAndClear_002()
221 ::rtl::OStringBuffer aStrBuf2(26);
222 ::rtl::OString aStr2;
224 sal_Bool lastRes = (aStrBuf2.makeStringAndClear() == aStr2 );
226 CPPUNIT_ASSERT_MESSAGE
228 "two empty strings(with a argu)",
229 lastRes && ( aStrBuf2.getCapacity() == 0 ) &&
230 ( *(aStrBuf2.getStr()) == '\0' )
235 void makeStringAndClear_003()
237 ::rtl::OStringBuffer aStrBuf3(*arrOUS[0]);
238 ::rtl::OString aStr3(*arrOUS[0]);
240 sal_Bool lastRes = (aStrBuf3.makeStringAndClear() == aStr3 );
242 CPPUNIT_ASSERT_MESSAGE
244 "normal string",
245 lastRes && ( aStrBuf3.getCapacity() == 0 ) &&
246 ( *(aStrBuf3.getStr()) == '\0' )
251 void makeStringAndClear_004()
253 ::rtl::OStringBuffer aStrBuf4(*arrOUS[1]);
254 ::rtl::OString aStr4(*arrOUS[1]);
256 sal_Bool lastRes = (aStrBuf4.makeStringAndClear() == aStr4 );
258 CPPUNIT_ASSERT_MESSAGE
260 "string with space ",
261 lastRes && ( aStrBuf4.getCapacity() == 0 ) &&
262 ( *(aStrBuf4.getStr()) == '\0' )
266 void makeStringAndClear_005()
268 ::rtl::OStringBuffer aStrBuf5(*arrOUS[2]);
269 ::rtl::OString aStr5(*arrOUS[2]);
271 sal_Bool lastRes = (aStrBuf5.makeStringAndClear() == aStr5 );
273 CPPUNIT_ASSERT_MESSAGE
275 "empty string",
276 lastRes && ( aStrBuf5.getCapacity() == 0 ) &&
277 ( *(aStrBuf5.getStr()) == '\0' )
281 void makeStringAndClear_006()
283 ::rtl::OStringBuffer aStrBuf6(*arrOUS[3]);
284 ::rtl::OString aStr6(*arrOUS[3]);
286 sal_Bool lastRes = (aStrBuf6.makeStringAndClear() == aStr6 );
288 CPPUNIT_ASSERT_MESSAGE
290 "string with a character",
291 lastRes && ( aStrBuf6.getCapacity() == 0 ) &&
292 ( *(aStrBuf6.getStr()) == '\0' )
296 void makeStringAndClear_007()
298 ::rtl::OStringBuffer aStrBuf7(*arrOUS[4]);
299 ::rtl::OString aStr7(*arrOUS[4]);
301 sal_Bool lastRes = (aStrBuf7.makeStringAndClear() == aStr7 );
303 CPPUNIT_ASSERT_MESSAGE
305 "string with special characters",
306 lastRes && ( aStrBuf7.getCapacity() == 0 ) &&
307 ( *(aStrBuf7.getStr()) == '\0' )
311 void makeStringAndClear_008()
313 ::rtl::OStringBuffer aStrBuf8(*arrOUS[5]);
314 ::rtl::OString aStr8(*arrOUS[5]);
316 sal_Bool lastRes = (aStrBuf8.makeStringAndClear() == aStr8 );
318 CPPUNIT_ASSERT_MESSAGE
320 "string only with (\0)",
321 lastRes && ( aStrBuf8.getCapacity() == 0 ) &&
322 ( *(aStrBuf8.getStr()) == '\0' )
326 SAL_CPPUNIT_TEST_SUITE(makeStringAndClear);
327 CPPUNIT_TEST(makeStringAndClear_001);
328 CPPUNIT_TEST(makeStringAndClear_002);
329 CPPUNIT_TEST(makeStringAndClear_003);
330 CPPUNIT_TEST(makeStringAndClear_004);
331 CPPUNIT_TEST(makeStringAndClear_005);
332 CPPUNIT_TEST(makeStringAndClear_006);
333 CPPUNIT_TEST(makeStringAndClear_007);
334 CPPUNIT_TEST(makeStringAndClear_008);
335 SAL_CPPUNIT_TEST_SUITE_END();
339 class remove : public CppUnit::TestFixture
341 public:
342 void setUp()
346 void tearDown()
350 void remove_001()
352 ::rtl::OStringBuffer sb(
353 RTL_CONSTASCII_STRINGPARAM("Red Hat, Inc."));
355 sb.remove(0, 4);
356 CPPUNIT_ASSERT(sb.toString().equalsL(
357 RTL_CONSTASCII_STRINGPARAM("Hat, Inc.")));
359 sb.remove(3, 6);
360 CPPUNIT_ASSERT(sb.toString().equalsL(
361 RTL_CONSTASCII_STRINGPARAM("Hat")));
363 sb.remove(0, 100);
365 CPPUNIT_ASSERT(sb.toString().isEmpty());
367 sb.append(RTL_CONSTASCII_STRINGPARAM("Red Hat, Inc."));
369 sb.remove(3, 100);
371 CPPUNIT_ASSERT(sb.toString().equalsL(
372 RTL_CONSTASCII_STRINGPARAM("Red")));
374 sb.remove(0, sb.getLength());
376 CPPUNIT_ASSERT(sb.toString().isEmpty());
379 SAL_CPPUNIT_TEST_SUITE(remove);
380 CPPUNIT_TEST(remove_001);
381 SAL_CPPUNIT_TEST_SUITE_END();
385 // -----------------------------------------------------------------------------
387 class getLength : public CppUnit::TestFixture
389 OString* arrOUS[6];
391 public:
392 void setUp()
394 arrOUS[0] = new OString( kTestStr1 );
395 arrOUS[1] = new OString( "1" );
396 arrOUS[2] = new OString( );
397 arrOUS[3] = new OString( "" );
398 arrOUS[4] = new OString( "\0", 1 );
399 arrOUS[5] = new OString( kTestStr2 );
403 void tearDown()
405 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
406 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
409 void getLength_001()
411 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
412 sal_Int32 expVal = kTestStr1Len;
414 CPPUNIT_ASSERT_MESSAGE
416 "length of ascii string",
417 aStrBuf.getLength() == expVal
422 void getLength_002()
424 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
425 sal_Int32 expVal = 1;
427 CPPUNIT_ASSERT_MESSAGE
429 "length of ascci string of size 1",
430 aStrBuf.getLength() == expVal
434 void getLength_003()
436 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
437 sal_Int32 expVal = 0;
439 CPPUNIT_ASSERT_MESSAGE
441 "length of empty string",
442 aStrBuf.getLength() == expVal
446 void getLength_004()
448 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
449 sal_Int32 expVal = 0;
451 CPPUNIT_ASSERT_MESSAGE
453 "length of empty string (empty ascii string arg)",
454 aStrBuf.getLength() == expVal
458 void getLength_005()
460 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
461 sal_Int32 expVal = 1;
463 CPPUNIT_ASSERT_MESSAGE
465 "length of string with \\0 embedded",
466 aStrBuf.getLength() == expVal
470 void getLength_006()
472 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
473 sal_Int32 expVal = kTestStr2Len;
475 CPPUNIT_ASSERT_MESSAGE
477 "length(>16) of ascii string",
478 aStrBuf.getLength() == expVal
482 void getLength_007()
484 ::rtl::OStringBuffer aStrBuf;
485 sal_Int32 expVal = 0;
487 CPPUNIT_ASSERT_MESSAGE
489 "length of empty string (default constructor)",
490 aStrBuf.getLength()== expVal
494 void getLength_008()
496 ::rtl::OStringBuffer aStrBuf( 26 );
497 sal_Int32 expVal = 0;
499 CPPUNIT_ASSERT_MESSAGE
501 "length of empty string (with capacity)",
502 aStrBuf.getLength()== expVal
506 SAL_CPPUNIT_TEST_SUITE( getLength );
507 CPPUNIT_TEST( getLength_001 );
508 CPPUNIT_TEST( getLength_002 );
509 CPPUNIT_TEST( getLength_003 );
510 CPPUNIT_TEST( getLength_004 );
511 CPPUNIT_TEST( getLength_005 );
512 CPPUNIT_TEST( getLength_006 );
513 CPPUNIT_TEST( getLength_007 );
514 CPPUNIT_TEST( getLength_008 );
515 SAL_CPPUNIT_TEST_SUITE_END();
518 // -----------------------------------------------------------------------------
520 class getCapacity : public CppUnit::TestFixture
522 OString* arrOUS[6];
524 public:
525 void setUp()
527 arrOUS[0] = new OString( kTestStr1 );
528 arrOUS[1] = new OString( "1" );
529 arrOUS[2] = new OString( );
530 arrOUS[3] = new OString( "" );
531 arrOUS[4] = new OString( "\0", 1 );
532 arrOUS[5] = new OString( kTestStr2 );
536 void tearDown()
538 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
539 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
542 void getCapacity_001()
544 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
545 sal_Int32 expVal = kTestStr1Len+16;
547 CPPUNIT_ASSERT_MESSAGE
549 "capacity of ascii string",
550 aStrBuf.getCapacity()== expVal
555 void getCapacity_002()
557 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
558 sal_Int32 expVal = 1+16;
560 CPPUNIT_ASSERT_MESSAGE
562 "capacity of ascci string of size 1",
563 aStrBuf.getCapacity() == expVal
567 void getCapacity_003()
569 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
570 sal_Int32 expVal = 0+16;
572 CPPUNIT_ASSERT_MESSAGE
574 "capacity of empty string",
575 aStrBuf.getCapacity() == expVal
579 void getCapacity_004()
581 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
582 sal_Int32 expVal = 0+16;
584 CPPUNIT_ASSERT_MESSAGE
586 "capacity of empty string (empty ascii string arg)",
587 aStrBuf.getCapacity()== expVal
591 void getCapacity_005()
593 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
594 sal_Int32 expVal = 1+16;
596 CPPUNIT_ASSERT_MESSAGE
598 "capacity of string with \\0 embedded",
599 aStrBuf.getCapacity() == expVal
603 void getCapacity_006()
605 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
606 sal_Int32 expVal = kTestStr2Len+16;
608 CPPUNIT_ASSERT_MESSAGE
610 "capacity(>16) of ascii string",
611 aStrBuf.getCapacity() == expVal
615 void getCapacity_007()
617 ::rtl::OStringBuffer aStrBuf;
618 sal_Int32 expVal = 16;
620 CPPUNIT_ASSERT_MESSAGE
622 "capacity of empty string (default constructor)",
623 aStrBuf.getCapacity() == expVal
627 void getCapacity_009()
629 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
630 sal_Int32 expVal = kNonSInt32Max;
632 CPPUNIT_ASSERT_MESSAGE
634 "capacity of empty string (with capacity -2147483648)",
635 aStrBuf.getCapacity() == expVal
639 void getCapacity_010()
641 ::rtl::OStringBuffer aStrBuf( 16 );
642 sal_Int32 expVal = 16;
644 CPPUNIT_ASSERT_MESSAGE
646 "capacity of empty string (with capacity 16)",
647 aStrBuf.getCapacity() == expVal
651 void getCapacity_011()
653 ::rtl::OStringBuffer aStrBuf( 6 );
654 sal_Int32 expVal = 6;
656 CPPUNIT_ASSERT_MESSAGE
658 "capacity of empty string (with capacity 6)",
659 aStrBuf.getCapacity() == expVal
663 void getCapacity_012()
665 ::rtl::OStringBuffer aStrBuf( 0 );
666 sal_Int32 expVal = 0;
668 CPPUNIT_ASSERT_MESSAGE
670 "capacity of empty string (with capacity 0)",
671 aStrBuf.getCapacity() == expVal
675 void getCapacity_013()
677 ::rtl::OStringBuffer aStrBuf( -2 );
678 sal_Int32 expVal = -2;
680 CPPUNIT_ASSERT_MESSAGE
682 "capacity of empty string (with capacity -2)",
683 aStrBuf.getCapacity() == expVal
687 SAL_CPPUNIT_TEST_SUITE( getCapacity );
688 CPPUNIT_TEST( getCapacity_001 );
689 CPPUNIT_TEST( getCapacity_002 );
690 CPPUNIT_TEST( getCapacity_003 );
691 CPPUNIT_TEST( getCapacity_004 );
692 CPPUNIT_TEST( getCapacity_005 );
693 CPPUNIT_TEST( getCapacity_006 );
694 CPPUNIT_TEST( getCapacity_007 );
695 CPPUNIT_TEST( getCapacity_009 );
696 CPPUNIT_TEST( getCapacity_010 );
697 CPPUNIT_TEST( getCapacity_011 );
698 CPPUNIT_TEST( getCapacity_012 );
699 CPPUNIT_TEST( getCapacity_013 );
700 SAL_CPPUNIT_TEST_SUITE_END();
702 // -----------------------------------------------------------------------------
704 class ensureCapacity : public CppUnit::TestFixture
706 void ensureCapacity_001()
708 sal_Int32 expVal = 16;
709 ::rtl::OStringBuffer aStrBuf;
710 sal_Int32 input = 5;
712 aStrBuf.ensureCapacity( input );
714 CPPUNIT_ASSERT_MESSAGE
716 "capacity equal to 16, minimum is 5",
717 aStrBuf.getCapacity() == expVal
722 void ensureCapacity_002()
724 sal_Int32 expVal = 16;
725 ::rtl::OStringBuffer aStrBuf;
726 sal_Int32 input = -5;
728 aStrBuf.ensureCapacity( input );
730 CPPUNIT_ASSERT_MESSAGE
732 "capacity equal to 16, minimum is -5",
733 aStrBuf.getCapacity() == expVal
738 void ensureCapacity_003()
740 sal_Int32 expVal = 16;
741 ::rtl::OStringBuffer aStrBuf;
742 sal_Int32 input = 0;
744 aStrBuf.ensureCapacity( input );
746 CPPUNIT_ASSERT_MESSAGE
748 "capacity equal to 16, minimum is 0",
749 aStrBuf.getCapacity() == expVal
754 void ensureCapacity_004() //the testcase is based on comments
756 sal_Int32 expVal = 20;
757 ::rtl::OStringBuffer aStrBuf;
758 sal_Int32 input = 20;
760 aStrBuf.ensureCapacity( input );
762 CPPUNIT_ASSERT_MESSAGE
764 "capacity equal to 16, minimum is 20",
765 aStrBuf.getCapacity() == expVal
770 void ensureCapacity_005()
772 sal_Int32 expVal = 50;
773 ::rtl::OStringBuffer aStrBuf;
774 sal_Int32 input = 50;
776 aStrBuf.ensureCapacity( input );
778 CPPUNIT_ASSERT_MESSAGE
780 "capacity equal to 16, minimum is 50",
781 aStrBuf.getCapacity() == expVal
786 void ensureCapacity_006()
788 sal_Int32 expVal = 20;
789 ::rtl::OStringBuffer aStrBuf( 6 );
790 sal_Int32 input = 20;
792 aStrBuf.ensureCapacity( input );
794 CPPUNIT_ASSERT_MESSAGE
796 "capacity equal to 6, minimum is 20",
797 aStrBuf.getCapacity() == expVal
802 void ensureCapacity_007()
804 sal_Int32 expVal = 6;
805 ::rtl::OStringBuffer aStrBuf( 6 );
806 sal_Int32 input = 2;
808 aStrBuf.ensureCapacity( input );
810 CPPUNIT_ASSERT_MESSAGE
812 "capacity equal to 6, minimum is 2",
813 aStrBuf.getCapacity() == expVal
818 void ensureCapacity_008()
820 sal_Int32 expVal = 6;
821 ::rtl::OStringBuffer aStrBuf( 6 );
822 sal_Int32 input = -6;
824 aStrBuf.ensureCapacity( input );
826 CPPUNIT_ASSERT_MESSAGE
828 "capacity equal to 6, minimum is -6",
829 aStrBuf.getCapacity() == expVal
834 void ensureCapacity_009() //the testcase is based on comments
836 sal_Int32 expVal = 10;
837 ::rtl::OStringBuffer aStrBuf( 6 );
838 sal_Int32 input = 10;
840 aStrBuf.ensureCapacity( input );
842 CPPUNIT_ASSERT_MESSAGE
844 "capacity equal to 6, minimum is -6",
845 aStrBuf.getCapacity() == expVal
850 void ensureCapacity_010()
852 sal_Int32 expVal = 6;
853 ::rtl::OStringBuffer aStrBuf( 0 );
854 sal_Int32 input = 6;
856 aStrBuf.ensureCapacity( input );
858 CPPUNIT_ASSERT_MESSAGE
860 "capacity equal to 0, minimum is 6",
861 aStrBuf.getCapacity() == expVal
866 void ensureCapacity_011() //the testcase is based on comments
868 sal_Int32 expVal = 2; // capacity is x = (str->length + 1) * 2; minimum < x ? x : minimum
869 ::rtl::OStringBuffer aStrBuf( 0 );
870 sal_Int32 input = 1;
872 aStrBuf.ensureCapacity( input );
874 CPPUNIT_ASSERT_MESSAGE
876 "capacity equal to 0, minimum is 1",
877 aStrBuf.getCapacity() == expVal
882 void ensureCapacity_012()
884 sal_Int32 expVal = 0;
885 ::rtl::OStringBuffer aStrBuf( 0 );
886 sal_Int32 input = -1;
888 aStrBuf.ensureCapacity( input );
890 CPPUNIT_ASSERT_MESSAGE
892 "capacity equal to 0, minimum is -1",
893 aStrBuf.getCapacity() == expVal
898 void ensureCapacity_018()
900 sal_Int32 expVal = 65535;
901 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
902 sal_Int32 input = 65535;
904 aStrBuf.ensureCapacity( input );
906 CPPUNIT_ASSERT_MESSAGE
908 "capacity equal to -2147483648, minimum is 65535",
909 aStrBuf.getCapacity() == expVal
914 void ensureCapacity_020()
916 sal_Int32 expVal = 2;
917 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
918 sal_Int32 input = -1;
920 aStrBuf.ensureCapacity( input );
922 CPPUNIT_ASSERT_MESSAGE
924 "capacity equal to -2147483648, minimum is -1",
925 aStrBuf.getCapacity() == expVal
930 void ensureCapacity_021()
932 sal_Int32 expVal = 2;
933 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
934 sal_Int32 input = 0;
936 aStrBuf.ensureCapacity( input );
938 CPPUNIT_ASSERT_MESSAGE
940 "capacity equal to -2147483648, minimum is 0",
941 aStrBuf.getCapacity() == expVal
946 void ensureCapacity_022()
948 sal_Int32 expVal = kNonSInt32Max;
949 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
950 sal_Int32 input = kNonSInt32Max;
952 aStrBuf.ensureCapacity( input );
954 CPPUNIT_ASSERT_MESSAGE
956 "capacity equal to -2147483648, minimum is -2147483648",
957 aStrBuf.getCapacity() == expVal
962 SAL_CPPUNIT_TEST_SUITE( ensureCapacity );
963 CPPUNIT_TEST( ensureCapacity_001 );
964 CPPUNIT_TEST( ensureCapacity_002 );
965 CPPUNIT_TEST( ensureCapacity_003 );
966 CPPUNIT_TEST( ensureCapacity_004 );
967 CPPUNIT_TEST( ensureCapacity_005 );
968 CPPUNIT_TEST( ensureCapacity_006 );
969 CPPUNIT_TEST( ensureCapacity_007 );
970 CPPUNIT_TEST( ensureCapacity_008 );
971 CPPUNIT_TEST( ensureCapacity_009 );
972 CPPUNIT_TEST( ensureCapacity_010 );
973 CPPUNIT_TEST( ensureCapacity_011 );
974 CPPUNIT_TEST( ensureCapacity_012 );
975 CPPUNIT_TEST( ensureCapacity_018 );
976 CPPUNIT_TEST( ensureCapacity_020 );
977 CPPUNIT_TEST( ensureCapacity_021 );
978 CPPUNIT_TEST( ensureCapacity_022 );
979 SAL_CPPUNIT_TEST_SUITE_END();
982 // -----------------------------------------------------------------------------
984 class setLength : public CppUnit::TestFixture
986 OString* arrOUS[6];
988 public:
989 void setUp()
991 arrOUS[0] = new OString( kTestStr1 );
992 arrOUS[1] = new OString( "1" );
993 arrOUS[2] = new OString( );
994 arrOUS[3] = new OString( "" );
995 arrOUS[4] = new OString( "\0", 1 );
996 arrOUS[5] = new OString( kTestStr2 );
1000 void tearDown()
1002 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
1003 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
1006 void setLength_001()
1008 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1009 sal_Int32 expVal1 = 50;
1010 ::rtl::OString expVal2( kTestStr1 );
1011 sal_Int32 expVal3 = 50;
1012 sal_Int32 input = 50;
1014 aStrBuf.setLength( input );
1016 CPPUNIT_ASSERT_MESSAGE
1018 "newLength more than the capacity of OStringBuffer(kTestStr1)",
1019 aStrBuf.getStr() == expVal2 &&
1020 aStrBuf.getLength() == expVal1 &&
1021 aStrBuf.getCapacity() == expVal3
1026 void setLength_002()
1028 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1029 sal_Int32 expVal1 = kTestStr13Len;
1030 ::rtl::OString expVal2( kTestStr1 );
1031 sal_Int32 expVal3 = 32;
1032 sal_Int32 input = kTestStr13Len;
1034 aStrBuf.setLength( input );
1036 CPPUNIT_ASSERT_MESSAGE
1038 "newLength more than the length of OStringBuffer(kTestStr1)",
1039 aStrBuf.getStr() == expVal2 &&
1040 aStrBuf.getLength() == expVal1 &&
1041 aStrBuf.getCapacity() == expVal3
1046 void setLength_003()
1048 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1049 sal_Int32 expVal1 = kTestStr1Len;
1050 ::rtl::OString expVal2( kTestStr1 );
1051 sal_Int32 expVal3 = 32;
1052 sal_Int32 input = kTestStr1Len;
1054 aStrBuf.setLength( input );
1056 CPPUNIT_ASSERT_MESSAGE
1058 "newLength equal to the length of OStringBuffer(kTestStr1)",
1059 aStrBuf.getStr() == expVal2 &&
1060 aStrBuf.getLength() == expVal1 &&
1061 aStrBuf.getCapacity() == expVal3
1066 void setLength_004()
1068 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1069 sal_Int32 expVal1 = kTestStr7Len;
1070 ::rtl::OString expVal2( kTestStr7 );
1071 sal_Int32 expVal3 = 32;
1072 sal_Int32 input = kTestStr7Len;
1074 aStrBuf.setLength( input );
1076 CPPUNIT_ASSERT_MESSAGE
1078 "newLength less than the length of OStringBuffer(kTestStr1)",
1079 aStrBuf.getStr() == expVal2 &&
1080 aStrBuf.getLength() == expVal1 &&
1081 aStrBuf.getCapacity() == expVal3
1086 void setLength_005()
1088 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1089 sal_Int32 expVal1 = 0;
1090 ::rtl::OString expVal2;
1091 sal_Int32 expVal3 = 32;
1092 sal_Int32 input = 0;
1094 aStrBuf.setLength( input );
1096 CPPUNIT_ASSERT_MESSAGE
1098 "newLength equal to 0",
1099 aStrBuf.getStr() == expVal2 &&
1100 aStrBuf.getLength() == expVal1 &&
1101 aStrBuf.getCapacity() == expVal3
1106 void setLength_006()
1108 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1109 sal_Int32 expVal1 = 25;
1110 ::rtl::OString expVal2( *arrOUS[1] );
1111 sal_Int32 expVal3 = 25;
1112 sal_Int32 input = 25;
1114 aStrBuf.setLength( input );
1116 CPPUNIT_ASSERT_MESSAGE
1118 "newLength more than the capacity of OStringBuffer(1)",
1119 aStrBuf.getStr() == expVal2 &&
1120 aStrBuf.getLength() == expVal1 &&
1121 aStrBuf.getCapacity() == expVal3
1126 void setLength_007()
1128 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1129 sal_Int32 expVal1 = kTestStr27Len;
1130 ::rtl::OString expVal2( *arrOUS[1] );
1131 sal_Int32 expVal3 = 17;
1132 sal_Int32 input = kTestStr27Len;
1134 aStrBuf.setLength( input );
1136 CPPUNIT_ASSERT_MESSAGE
1138 "newLength equal to the length of OStringBuffer(1)",
1139 aStrBuf.getStr() == expVal2 &&
1140 aStrBuf.getLength() == expVal1 &&
1141 aStrBuf.getCapacity() == expVal3
1146 void setLength_008()
1148 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1149 sal_Int32 expVal1 = 0;
1150 ::rtl::OString expVal2;
1151 sal_Int32 expVal3 = 17;
1152 sal_Int32 input = 0;
1154 aStrBuf.setLength( input );
1156 CPPUNIT_ASSERT_MESSAGE
1158 "newLength less than the length of OUStringBuffer(1)",
1159 aStrBuf.getStr() == expVal2 &&
1160 aStrBuf.getLength() == expVal1 &&
1161 aStrBuf.getCapacity() == expVal3
1166 void setLength_009()
1168 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1169 sal_Int32 expVal1 = 20;
1170 ::rtl::OString expVal2;
1171 sal_Int32 expVal3 = 20;
1172 sal_Int32 input = 20;
1174 aStrBuf.setLength( input );
1176 CPPUNIT_ASSERT_MESSAGE
1178 "newLength more than the capacity of OStringBuffer()",
1179 aStrBuf.getStr() == expVal2 &&
1180 aStrBuf.getLength() == expVal1 &&
1181 aStrBuf.getCapacity() == expVal3
1186 void setLength_010()
1188 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1189 sal_Int32 expVal1 = 3;
1190 ::rtl::OString expVal2;
1191 sal_Int32 expVal3 = 16;
1192 sal_Int32 input = 3;
1194 aStrBuf.setLength( input );
1196 CPPUNIT_ASSERT_MESSAGE
1198 "newLength more than the length of OStringBuffer()",
1199 aStrBuf.getStr() == expVal2 &&
1200 aStrBuf.getLength() == expVal1 &&
1201 aStrBuf.getCapacity() == expVal3
1206 void setLength_011()
1208 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1209 sal_Int32 expVal1 = 0;
1210 ::rtl::OString expVal2;
1211 sal_Int32 expVal3 = 16;
1212 sal_Int32 input = 0;
1214 aStrBuf.setLength( input );
1216 CPPUNIT_ASSERT_MESSAGE
1218 "newLength more than the length of OStringBuffer()",
1219 aStrBuf.getStr() == expVal2 &&
1220 aStrBuf.getLength() == expVal1 &&
1221 aStrBuf.getCapacity() == expVal3
1226 void setLength_012()
1228 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1229 sal_Int32 expVal1 = 20;
1230 ::rtl::OString expVal2;
1231 sal_Int32 expVal3 = 20;
1232 sal_Int32 input = 20;
1234 aStrBuf.setLength( input );
1236 CPPUNIT_ASSERT_MESSAGE
1238 "newLength more than the capacity of OStringBuffer("")",
1239 aStrBuf.getStr() == expVal2 &&
1240 aStrBuf.getLength() == expVal1 &&
1241 aStrBuf.getCapacity() == expVal3
1246 void setLength_013()
1248 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1249 sal_Int32 expVal1 = 5;
1250 ::rtl::OString expVal2;
1251 sal_Int32 expVal3 = 16;
1252 sal_Int32 input = 5;
1254 aStrBuf.setLength( input );
1256 CPPUNIT_ASSERT_MESSAGE
1258 "newLength more than the length of OStringBuffer("")",
1259 aStrBuf.getStr() == expVal2 &&
1260 aStrBuf.getLength() == expVal1 &&
1261 aStrBuf.getCapacity() == expVal3
1266 void setLength_014()
1268 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1269 sal_Int32 expVal1 = 0;
1270 ::rtl::OString expVal2;
1271 sal_Int32 expVal3 = 16;
1272 sal_Int32 input = 0;
1274 aStrBuf.setLength( input );
1276 CPPUNIT_ASSERT_MESSAGE
1278 "newLength less than the length of OStringBuffer("")",
1279 aStrBuf.getStr() == expVal2 &&
1280 aStrBuf.getLength() == expVal1 &&
1281 aStrBuf.getCapacity() == expVal3
1286 void setLength_015()
1288 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1289 sal_Int32 expVal1 = 20;
1290 ::rtl::OString expVal2;
1291 sal_Int32 expVal3 = 20;
1292 sal_Int32 input = 20;
1294 aStrBuf.setLength( input );
1296 CPPUNIT_ASSERT_MESSAGE
1298 "newLength more than the length of OStringBuffer(\0)",
1299 aStrBuf.getStr() == expVal2 &&
1300 aStrBuf.getLength() == expVal1 &&
1301 aStrBuf.getCapacity() == expVal3
1306 void setLength_016()
1308 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1309 sal_Int32 expVal1 = 5;
1310 ::rtl::OString expVal2;
1311 sal_Int32 expVal3 = 17;
1312 sal_Int32 input = 5;
1314 aStrBuf.setLength( input );
1316 CPPUNIT_ASSERT_MESSAGE
1318 "newLength more than the length of OStringBuffer(\0)",
1319 aStrBuf.getStr() == expVal2 &&
1320 aStrBuf.getLength() == expVal1 &&
1321 aStrBuf.getCapacity() == expVal3
1326 void setLength_017()
1328 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1329 sal_Int32 expVal1 = 0;
1330 ::rtl::OString expVal2;
1331 sal_Int32 expVal3 = 17;
1332 sal_Int32 input = 0;
1334 aStrBuf.setLength( input );
1336 CPPUNIT_ASSERT_MESSAGE
1338 "newLength less than the length of OStringBuffer(\0)",
1339 aStrBuf.getStr() == expVal2 &&
1340 aStrBuf.getLength() == expVal1 &&
1341 aStrBuf.getCapacity() == expVal3
1346 void setLength_018()
1348 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1349 sal_Int32 expVal1 = 50;
1350 ::rtl::OString expVal2( kTestStr2 );
1351 sal_Int32 expVal3 = 66;
1352 sal_Int32 input = 50;
1354 aStrBuf.setLength( input );
1356 CPPUNIT_ASSERT_MESSAGE
1358 "newLength more than the capacity of OStringBuffer(kTestStr2)",
1359 aStrBuf.getStr() == expVal2 &&
1360 aStrBuf.getLength() == expVal1 &&
1361 aStrBuf.getCapacity() == expVal3
1366 void setLength_019()
1368 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1369 sal_Int32 expVal1 = 40;
1370 ::rtl::OString expVal2(kTestStr2);
1371 sal_Int32 expVal3 = 48;
1372 sal_Int32 input = 40;
1374 aStrBuf.setLength( input );
1376 CPPUNIT_ASSERT_MESSAGE
1378 "newLength more than the length of OStringBuffer(kTestStr2)",
1379 aStrBuf.getStr() == expVal2 &&
1380 aStrBuf.getLength() == expVal1 &&
1381 aStrBuf.getCapacity() == expVal3
1386 void setLength_020()
1388 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1389 sal_Int32 expVal1 = kTestStr2Len;
1390 ::rtl::OString expVal2(kTestStr2);
1391 sal_Int32 expVal3 = 48;
1392 sal_Int32 input = kTestStr2Len;
1394 aStrBuf.setLength( input );
1396 CPPUNIT_ASSERT_MESSAGE
1398 "newLength equal to the length of OUStringBuffer(kTestStr2)",
1399 aStrBuf.getStr() == expVal2 &&
1400 aStrBuf.getLength() == expVal1 &&
1401 aStrBuf.getCapacity() == expVal3
1406 void setLength_021()
1408 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1409 sal_Int32 expVal1 = kTestStr7Len;
1410 ::rtl::OString expVal2(kTestStr7);
1411 sal_Int32 expVal3 = 48;
1412 sal_Int32 input = kTestStr7Len;
1414 aStrBuf.setLength( input );
1416 CPPUNIT_ASSERT_MESSAGE
1418 "newLength less than the length of OUStringBuffer(TestStr2)",
1419 aStrBuf.getStr() == expVal2 &&
1420 aStrBuf.getLength() == expVal1 &&
1421 aStrBuf.getCapacity() == expVal3
1426 void setLength_022()
1428 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1429 sal_Int32 expVal1 = 0;
1430 ::rtl::OString expVal2;
1431 sal_Int32 expVal3 = 48;
1432 sal_Int32 input = 0;
1434 aStrBuf.setLength( input );
1436 CPPUNIT_ASSERT_MESSAGE
1438 "newLength equal to 0",
1439 aStrBuf.getStr() == expVal2 &&
1440 aStrBuf.getLength() == expVal1 &&
1441 aStrBuf.getCapacity() == expVal3
1446 SAL_CPPUNIT_TEST_SUITE( setLength );
1447 CPPUNIT_TEST( setLength_001 );
1448 CPPUNIT_TEST( setLength_002 );
1449 CPPUNIT_TEST( setLength_003 );
1450 CPPUNIT_TEST( setLength_004 );
1451 CPPUNIT_TEST( setLength_005 );
1452 CPPUNIT_TEST( setLength_006 );
1453 CPPUNIT_TEST( setLength_007 );
1454 CPPUNIT_TEST( setLength_008 );
1455 CPPUNIT_TEST( setLength_009 );
1456 CPPUNIT_TEST( setLength_010 );
1457 CPPUNIT_TEST( setLength_011 );
1458 CPPUNIT_TEST( setLength_012 );
1459 CPPUNIT_TEST( setLength_013 );
1460 CPPUNIT_TEST( setLength_014 );
1461 CPPUNIT_TEST( setLength_015 );
1462 CPPUNIT_TEST( setLength_016 );
1463 CPPUNIT_TEST( setLength_017 );
1464 CPPUNIT_TEST( setLength_018 );
1465 CPPUNIT_TEST( setLength_019 );
1466 CPPUNIT_TEST( setLength_020 );
1467 CPPUNIT_TEST( setLength_021 );
1468 CPPUNIT_TEST( setLength_022 );
1469 SAL_CPPUNIT_TEST_SUITE_END();
1472 // -----------------------------------------------------------------------------
1474 class csuc : public CppUnit::TestFixture
1476 void csuc_001()
1478 const sal_Char* expVal = kTestStr1;
1479 ::rtl::OStringBuffer aStrBuf( kTestStr1 );
1480 sal_Int32 cmpLen = kTestStr1Len;
1482 // LLA: wrong access! const sal_Char* pstr = *&aStrBuf;
1483 const sal_Char* pstr = aStrBuf.getStr();
1484 int nEqual = strncmp(pstr, expVal, cmpLen);
1486 CPPUNIT_ASSERT_MESSAGE
1488 "test normal string",
1489 /* cmpstr( pstr, expVal, cmpLen ) */
1490 nEqual == 0
1495 void csuc_002()
1497 ::rtl::OStringBuffer aStrBuf;
1499 // LLA: wrong access! const sal_Char* pstr = *&aStrBuf;
1500 const sal_Char* pstr = aStrBuf.getStr();
1501 sal_Int32 nLen = strlen(pstr);
1503 CPPUNIT_ASSERT_MESSAGE
1505 "test empty string",
1506 // cmpstr( pstr, &expVal, cmpLen )
1507 nLen == 0
1512 SAL_CPPUNIT_TEST_SUITE( csuc );
1513 CPPUNIT_TEST( csuc_001 );
1514 CPPUNIT_TEST( csuc_002 );
1515 SAL_CPPUNIT_TEST_SUITE_END();
1518 // -----------------------------------------------------------------------------
1520 class getStr : public CppUnit::TestFixture
1522 void getStr_001()
1524 const sal_Char* expVal = kTestStr1;
1525 ::rtl::OStringBuffer aStrBuf( kTestStr1 );
1526 sal_Int32 cmpLen = kTestStr1Len;
1528 const sal_Char* pstr = aStrBuf.getStr();
1529 int nEqual = strncmp(pstr, expVal, cmpLen);
1531 CPPUNIT_ASSERT_MESSAGE
1533 "test normal string",
1534 nEqual == 0
1539 void getStr_002()
1541 // const sal_Char tmpUC=0x0;
1542 // const sal_Char* expVal=&tmpUC;
1543 ::rtl::OStringBuffer aStrBuf;
1544 // sal_Int32 cmpLen = 1;
1546 const sal_Char* pstr = aStrBuf.getStr();
1547 sal_Int32 nLen = strlen(pstr);
1549 CPPUNIT_ASSERT_MESSAGE
1551 "test empty string",
1552 pstr != 0 &&
1553 nLen == 0
1558 SAL_CPPUNIT_TEST_SUITE( getStr );
1559 CPPUNIT_TEST( getStr_001 );
1560 CPPUNIT_TEST( getStr_002 );
1561 SAL_CPPUNIT_TEST_SUITE_END();
1564 // -----------------------------------------------------------------------------
1566 class append_001 : public CppUnit::TestFixture
1568 OString* arrOUS[5];
1570 public:
1571 void setUp()
1573 arrOUS[0] = new OString( kTestStr7 );
1574 arrOUS[1] = new OString( );
1575 arrOUS[2] = new OString( kTestStr25 );
1576 arrOUS[3] = new OString( "" );
1577 arrOUS[4] = new OString( kTestStr28 );
1581 void tearDown()
1583 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
1584 delete arrOUS[3]; delete arrOUS[4];
1587 void append_001_001()
1589 OString expVal( kTestStr1 );
1590 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1591 OString input2( kTestStr8 );
1593 aStrBuf.append( input2 );
1595 CPPUNIT_ASSERT_MESSAGE
1597 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
1598 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
1603 void append_001_002()
1605 OString expVal( kTestStr2 );
1606 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1607 OString input2( kTestStr36 );
1609 aStrBuf.append( input2 );
1611 CPPUNIT_ASSERT_MESSAGE
1613 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
1614 aStrBuf.getStr()== expVal &&
1615 aStrBuf.getLength() == expVal.getLength()
1620 void append_001_003()
1622 OString expVal( kTestStr37 );
1623 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1624 OString input2( kTestStr23 );
1626 aStrBuf.append( input2 );
1628 CPPUNIT_ASSERT_MESSAGE
1630 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
1631 aStrBuf.getStr()== expVal &&
1632 aStrBuf.getLength() == expVal.getLength()
1637 void append_001_004()
1639 OString expVal( kTestStr7 );
1640 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1641 OString input2;
1643 aStrBuf.append( input2 );
1645 CPPUNIT_ASSERT_MESSAGE
1647 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
1648 aStrBuf.getStr()== expVal &&
1649 aStrBuf.getLength() == expVal.getLength()
1654 void append_001_005()
1656 OString expVal( kTestStr7 );
1657 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1658 OString input2( kTestStr7 );
1660 aStrBuf.append( input2 );
1662 CPPUNIT_ASSERT_MESSAGE
1664 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
1665 aStrBuf.getStr()== expVal &&
1666 aStrBuf.getLength() == expVal.getLength()
1671 void append_001_006()
1673 OString expVal( kTestStr2 );
1674 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1675 OString input2( kTestStr2 );
1677 aStrBuf.append( input2 );
1679 CPPUNIT_ASSERT_MESSAGE
1681 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
1682 aStrBuf.getStr()== expVal &&
1683 aStrBuf.getLength() == expVal.getLength()
1688 void append_001_007()
1690 OString expVal( kTestStr1 );
1691 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1692 OString input2( kTestStr1 );
1694 aStrBuf.append( input2 );
1696 CPPUNIT_ASSERT_MESSAGE
1698 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
1699 aStrBuf.getStr()== expVal &&
1700 aStrBuf.getLength() == expVal.getLength()
1705 void append_001_008()
1707 OString expVal;
1708 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1709 OString input2;
1711 aStrBuf.append( input2 );
1713 CPPUNIT_ASSERT_MESSAGE
1715 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
1716 aStrBuf.getStr()== expVal &&
1717 aStrBuf.getLength() == expVal.getLength()
1722 void append_001_009()
1724 OString expVal( kTestStr7 );
1725 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1726 OString input2( kTestStr7 );
1728 aStrBuf.append( input2 );
1730 CPPUNIT_ASSERT_MESSAGE
1732 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
1733 aStrBuf.getStr()== expVal &&
1734 aStrBuf.getLength() == expVal.getLength()
1739 void append_001_010()
1741 OString expVal( kTestStr2 );
1742 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1743 OString input2( kTestStr2 );
1745 aStrBuf.append( input2 );
1747 CPPUNIT_ASSERT_MESSAGE
1749 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
1750 aStrBuf.getStr()== expVal &&
1751 aStrBuf.getLength() == expVal.getLength()
1756 void append_001_011()
1758 OString expVal( kTestStr1 );
1759 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1760 OString input2( kTestStr1 );
1762 aStrBuf.append( input2 );
1764 CPPUNIT_ASSERT_MESSAGE
1766 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
1767 aStrBuf.getStr()== expVal &&
1768 aStrBuf.getLength() == expVal.getLength()
1773 void append_001_012()
1775 OString expVal;
1776 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1777 OString input2;
1779 aStrBuf.append( input2 );
1781 CPPUNIT_ASSERT_MESSAGE
1783 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
1784 aStrBuf.getStr()== expVal &&
1785 aStrBuf.getLength() == expVal.getLength()
1790 void append_001_013()
1792 OString expVal( kTestStr7 );
1793 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1794 OString input2( kTestStr7 );
1796 aStrBuf.append( input2 );
1798 CPPUNIT_ASSERT_MESSAGE
1800 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
1801 aStrBuf.getStr()== expVal &&
1802 aStrBuf.getLength() == expVal.getLength()
1807 void append_001_014()
1809 OString expVal( kTestStr2 );
1810 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1811 OString input2( kTestStr2 );
1813 aStrBuf.append( input2 );
1815 CPPUNIT_ASSERT_MESSAGE
1817 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
1818 aStrBuf.getStr()== expVal &&
1819 aStrBuf.getLength() == expVal.getLength()
1824 void append_001_015()
1826 OString expVal( kTestStr1 );
1827 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1828 OString input2( kTestStr1 );
1830 aStrBuf.append( input2 );
1832 CPPUNIT_ASSERT_MESSAGE
1834 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
1835 aStrBuf.getStr()== expVal &&
1836 aStrBuf.getLength() == expVal.getLength()
1841 void append_001_016()
1843 OString expVal;
1844 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1845 OString input2;
1847 aStrBuf.append( input2 );
1849 CPPUNIT_ASSERT_MESSAGE
1851 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
1852 aStrBuf.getStr()== expVal &&
1853 aStrBuf.getLength() == expVal.getLength()
1858 void append_001_017()
1860 OString expVal( kTestStr29 );
1861 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1862 OString input2( kTestStr38 );
1864 aStrBuf.append( input2 );
1866 CPPUNIT_ASSERT_MESSAGE
1868 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
1869 aStrBuf.getStr()== expVal &&
1870 aStrBuf.getLength() == expVal.getLength()
1875 void append_001_018()
1877 OString expVal( kTestStr39 );
1878 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1879 OString input2( kTestStr17 );
1881 aStrBuf.append( input2 );
1883 CPPUNIT_ASSERT_MESSAGE
1885 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
1886 aStrBuf.getStr()== expVal &&
1887 aStrBuf.getLength() == expVal.getLength()
1892 void append_001_019()
1894 OString expVal( kTestStr40 );
1895 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1896 OString input2( kTestStr31 );
1898 aStrBuf.append( input2 );
1900 CPPUNIT_ASSERT_MESSAGE
1902 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
1903 aStrBuf.getStr()== expVal &&
1904 aStrBuf.getLength() == expVal.getLength()
1909 void append_001_020()
1911 OString expVal( kTestStr28 );
1912 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1913 OString input2;
1915 aStrBuf.append( input2 );
1917 CPPUNIT_ASSERT_MESSAGE
1919 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
1920 aStrBuf.getStr()== expVal &&
1921 aStrBuf.getLength() == expVal.getLength()
1926 void append_null()
1928 ::rtl::OStringBuffer aStrBuf("hello world");
1930 aStrBuf.append('\0');
1931 aStrBuf.append('\1');
1932 aStrBuf.append('\2');
1934 aStrBuf.append("hello world");
1936 CPPUNIT_ASSERT_MESSAGE
1938 "should be able to append nulls",
1939 aStrBuf.getLength() ==
1940 2 * RTL_CONSTASCII_LENGTH("hello world") + 3 &&
1941 aStrBuf[RTL_CONSTASCII_LENGTH("hello world")] == 0 &&
1942 aStrBuf[RTL_CONSTASCII_LENGTH("hello world")]+1 == 1 &&
1943 aStrBuf[RTL_CONSTASCII_LENGTH("hello world")]+2 == 2
1948 #ifdef WITH_CORE
1949 void append_001_021()
1951 OString expVal;
1952 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
1953 OString input2;
1955 aStrBuf.append( input2 );
1957 CPPUNIT_ASSERT_MESSAGE
1959 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
1960 aStrBuf.getStr()== expVal &&
1961 aStrBuf.getLength() == expVal.getLength()
1965 #endif
1967 SAL_CPPUNIT_TEST_SUITE( append_001 );
1968 CPPUNIT_TEST( append_001_001 );
1969 CPPUNIT_TEST( append_001_002 );
1970 CPPUNIT_TEST( append_001_003 );
1971 CPPUNIT_TEST( append_001_004 );
1972 CPPUNIT_TEST( append_001_005 );
1973 CPPUNIT_TEST( append_001_006 );
1974 CPPUNIT_TEST( append_001_007 );
1975 CPPUNIT_TEST( append_001_008 );
1976 CPPUNIT_TEST( append_001_009 );
1977 CPPUNIT_TEST( append_001_010 );
1978 CPPUNIT_TEST( append_001_011 );
1979 CPPUNIT_TEST( append_001_012 );
1980 CPPUNIT_TEST( append_001_013 );
1981 CPPUNIT_TEST( append_001_014 );
1982 CPPUNIT_TEST( append_001_015 );
1983 CPPUNIT_TEST( append_001_016 );
1984 CPPUNIT_TEST( append_001_017 );
1985 CPPUNIT_TEST( append_001_018 );
1986 CPPUNIT_TEST( append_001_019 );
1987 CPPUNIT_TEST( append_001_020 );
1988 CPPUNIT_TEST( append_null );
1989 #ifdef WITH_CORE
1990 CPPUNIT_TEST( append_001_021 );
1991 #endif
1992 SAL_CPPUNIT_TEST_SUITE_END();
1995 // -----------------------------------------------------------------------------
1997 class append_002 : public CppUnit::TestFixture
1999 OString* arrOUS[5];
2001 public:
2002 void setUp()
2004 arrOUS[0] = new OString( kTestStr7 );
2005 arrOUS[1] = new OString( );
2006 arrOUS[2] = new OString( kTestStr25 );
2007 arrOUS[3] = new OString( "" );
2008 arrOUS[4] = new OString( kTestStr28 );
2012 void tearDown()
2014 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
2015 delete arrOUS[3]; delete arrOUS[4];
2018 void append_002_001()
2020 OString expVal( kTestStr1 );
2021 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2022 const sal_Char* input = kTestStr8;
2024 aStrBuf.append( input );
2026 CPPUNIT_ASSERT_MESSAGE
2028 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2029 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2034 void append_002_002()
2036 OString expVal( kTestStr2 );
2037 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2038 const sal_Char* input = kTestStr36;
2040 aStrBuf.append( input );
2042 CPPUNIT_ASSERT_MESSAGE
2044 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2045 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2050 void append_002_003()
2052 OString expVal( kTestStr37 );
2053 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2054 const sal_Char* input = kTestStr23;
2056 aStrBuf.append( input );
2058 CPPUNIT_ASSERT_MESSAGE
2060 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2061 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2066 void append_002_004()
2068 OString expVal( kTestStr7 );
2069 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2070 const sal_Char* input = kTestStr25;
2072 aStrBuf.append( input );
2074 CPPUNIT_ASSERT_MESSAGE
2076 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2077 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2082 void append_002_005()
2084 OString expVal( kTestStr7 );
2085 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2086 const sal_Char* input = kTestStr7;
2088 aStrBuf.append( input );
2090 CPPUNIT_ASSERT_MESSAGE
2092 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2093 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2098 void append_002_006()
2100 OString expVal( kTestStr2 );
2101 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2102 const sal_Char* input = kTestStr2;
2104 aStrBuf.append( input );
2106 CPPUNIT_ASSERT_MESSAGE
2108 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2109 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2114 void append_002_007()
2116 OString expVal( kTestStr1 );
2117 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2118 const sal_Char* input = kTestStr1;
2120 aStrBuf.append( input );
2122 CPPUNIT_ASSERT_MESSAGE
2124 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2125 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2130 void append_002_008()
2132 OString expVal;
2133 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2134 const sal_Char* input = kTestStr25;
2136 aStrBuf.append( input );
2138 CPPUNIT_ASSERT_MESSAGE
2140 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2141 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2146 void append_002_009()
2148 OString expVal( kTestStr7 );
2149 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2150 const sal_Char* input = kTestStr7;
2152 aStrBuf.append( input );
2154 CPPUNIT_ASSERT_MESSAGE
2156 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2157 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2162 void append_002_010()
2164 OString expVal( kTestStr2 );
2165 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2166 const sal_Char* input = kTestStr2;
2168 aStrBuf.append( input );
2170 CPPUNIT_ASSERT_MESSAGE
2172 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2173 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2178 void append_002_011()
2180 OString expVal( kTestStr1 );
2181 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2182 const sal_Char* input = kTestStr1;
2184 aStrBuf.append( input );
2186 CPPUNIT_ASSERT_MESSAGE
2188 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2189 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2194 void append_002_012()
2196 OString expVal;
2197 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2198 const sal_Char* input = kTestStr25;
2200 aStrBuf.append( input );
2202 CPPUNIT_ASSERT_MESSAGE
2204 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2205 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2210 void append_002_013()
2212 OString expVal( kTestStr7 );
2213 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2214 const sal_Char* input = kTestStr7;
2216 aStrBuf.append( input );
2218 CPPUNIT_ASSERT_MESSAGE
2220 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2221 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2226 void append_002_014()
2228 OString expVal( kTestStr2 );
2229 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2230 const sal_Char* input = kTestStr2;
2232 aStrBuf.append( input );
2234 CPPUNIT_ASSERT_MESSAGE
2236 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2237 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2242 void append_002_015()
2244 OString expVal( kTestStr1 );
2245 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2246 const sal_Char* input = kTestStr1;
2248 aStrBuf.append( input );
2250 CPPUNIT_ASSERT_MESSAGE
2252 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2253 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2258 void append_002_016()
2260 OString expVal;
2261 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2262 const sal_Char* input = kTestStr25;
2264 aStrBuf.append( input );
2266 CPPUNIT_ASSERT_MESSAGE
2268 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2269 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2274 void append_002_017()
2276 OString expVal( kTestStr29 );
2277 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2278 const sal_Char* input = kTestStr38;
2280 aStrBuf.append( input );
2282 CPPUNIT_ASSERT_MESSAGE
2284 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2285 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2290 void append_002_018()
2292 OString expVal( kTestStr39 );
2293 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2294 const sal_Char* input = kTestStr17;
2296 aStrBuf.append( input );
2298 CPPUNIT_ASSERT_MESSAGE
2300 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2301 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2306 void append_002_019()
2308 OString expVal( kTestStr40 );
2309 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2310 const sal_Char* input = kTestStr31;
2312 aStrBuf.append( input );
2314 CPPUNIT_ASSERT_MESSAGE
2316 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2317 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2322 void append_002_020()
2324 OString expVal( kTestStr28 );
2325 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2326 const sal_Char* input = kTestStr25;
2328 aStrBuf.append( input );
2330 CPPUNIT_ASSERT_MESSAGE
2332 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2333 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2338 #ifdef WITH_CORE
2339 void append_002_021()
2341 OString expVal;
2342 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
2343 const sal_Char* input = kTestStr25;
2345 aStrBuf.append( input );
2347 CPPUNIT_ASSERT_MESSAGE
2349 "Appends the string(length equal to 0) to the string buffer(with INT_MAX)",
2350 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2354 #endif
2356 SAL_CPPUNIT_TEST_SUITE( append_002 );
2357 CPPUNIT_TEST( append_002_001 );
2358 CPPUNIT_TEST( append_002_002 );
2359 CPPUNIT_TEST( append_002_003 );
2360 CPPUNIT_TEST( append_002_004 );
2361 CPPUNIT_TEST( append_002_005 );
2362 CPPUNIT_TEST( append_002_006 );
2363 CPPUNIT_TEST( append_002_007 );
2364 CPPUNIT_TEST( append_002_008 );
2365 CPPUNIT_TEST( append_002_009 );
2366 CPPUNIT_TEST( append_002_010 );
2367 CPPUNIT_TEST( append_002_011 );
2368 CPPUNIT_TEST( append_002_012 );
2369 CPPUNIT_TEST( append_002_013 );
2370 CPPUNIT_TEST( append_002_014 );
2371 CPPUNIT_TEST( append_002_015 );
2372 CPPUNIT_TEST( append_002_016 );
2373 CPPUNIT_TEST( append_002_017 );
2374 CPPUNIT_TEST( append_002_018 );
2375 CPPUNIT_TEST( append_002_019 );
2376 CPPUNIT_TEST( append_002_020 );
2377 #ifdef WITH_CORE
2378 CPPUNIT_TEST( append_002_021 );
2379 #endif
2380 SAL_CPPUNIT_TEST_SUITE_END();
2382 // -----------------------------------------------------------------------------
2384 class append_003 : public CppUnit::TestFixture
2386 OString* arrOUS[5];
2388 public:
2389 void setUp()
2391 arrOUS[0] = new OString( kTestStr7 );
2392 arrOUS[1] = new OString( );
2393 arrOUS[2] = new OString( kTestStr25 );
2394 arrOUS[3] = new OString( "" );
2395 arrOUS[4] = new OString( kTestStr28 );
2399 void tearDown()
2401 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
2402 delete arrOUS[3]; delete arrOUS[4];
2405 void append_003_001()
2407 OString expVal( kTestStr1 );
2408 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2409 const sal_Char* input1 = kTestStr36;
2410 sal_Int32 input2 = 12;
2412 aStrBuf.append( input1, input2 );
2414 CPPUNIT_ASSERT_MESSAGE
2416 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2417 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2422 void append_003_002()
2424 OString expVal( kTestStr2 );
2425 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2426 const sal_Char* input1 = kTestStr36;
2427 sal_Int32 input2 = 28;
2429 aStrBuf.append( input1, input2 );
2431 CPPUNIT_ASSERT_MESSAGE
2433 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2434 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2439 void append_003_003()
2441 OString expVal( kTestStr37 );
2442 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2443 const sal_Char* input1 = kTestStr23;
2444 sal_Int32 input2 = 16;
2446 aStrBuf.append( input1, input2 );
2448 CPPUNIT_ASSERT_MESSAGE
2450 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2451 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2456 void append_003_004()
2458 OString expVal( kTestStr7 );
2459 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2460 const sal_Char* input1 = kTestStr2;
2461 sal_Int32 input2 = 0;
2463 aStrBuf.append( input1, input2 );
2465 CPPUNIT_ASSERT_MESSAGE
2467 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2468 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2473 void append_003_006()
2475 OString expVal( kTestStr7 );
2476 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2477 const sal_Char* input1 = kTestStr2;
2478 sal_Int32 input2 = 4;
2480 aStrBuf.append( input1, input2 );
2482 CPPUNIT_ASSERT_MESSAGE
2484 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2485 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2490 void append_003_007()
2492 OString expVal( kTestStr2 );
2493 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2494 const sal_Char* input1 = kTestStr2;
2495 sal_Int32 input2 = 32;
2497 aStrBuf.append( input1, input2 );
2499 CPPUNIT_ASSERT_MESSAGE
2501 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2502 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2507 void append_003_008()
2509 OString expVal( kTestStr1 );
2510 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2511 const sal_Char* input1 = kTestStr2;
2512 sal_Int32 input2 = 16;
2514 aStrBuf.append( input1, input2 );
2516 CPPUNIT_ASSERT_MESSAGE
2518 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2519 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2524 void append_003_009()
2526 OString expVal;
2527 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2528 const sal_Char* input1 = kTestStr2;
2529 sal_Int32 input2 = 0;
2531 aStrBuf.append( input1, input2 );
2533 CPPUNIT_ASSERT_MESSAGE
2535 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2536 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2541 void append_003_011()
2543 OString expVal( kTestStr7 );
2544 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2545 const sal_Char* input1 = kTestStr2;
2546 sal_Int32 input2 = 4;
2548 aStrBuf.append( input1, input2 );
2550 CPPUNIT_ASSERT_MESSAGE
2552 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2553 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2558 void append_003_012()
2560 OString expVal( kTestStr2 );
2561 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2562 const sal_Char* input1 = kTestStr2;
2563 sal_Int32 input2 = 32;
2565 aStrBuf.append( input1, input2 );
2567 CPPUNIT_ASSERT_MESSAGE
2569 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2570 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2575 void append_003_013()
2577 OString expVal( kTestStr1 );
2578 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2579 const sal_Char* input1 = kTestStr2;
2580 sal_Int32 input2 = 16;
2582 aStrBuf.append( input1, input2 );
2584 CPPUNIT_ASSERT_MESSAGE
2586 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2587 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2592 void append_003_014()
2594 OString expVal;
2595 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2596 const sal_Char* input1 = kTestStr2;
2597 sal_Int32 input2 = 0;
2599 aStrBuf.append( input1, input2 );
2601 CPPUNIT_ASSERT_MESSAGE
2603 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2604 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2609 void append_003_016()
2611 OString expVal( kTestStr7 );
2612 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2613 const sal_Char* input1 = kTestStr2;
2614 sal_Int32 input2 = 4;
2616 aStrBuf.append( input1, input2 );
2618 CPPUNIT_ASSERT_MESSAGE
2620 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2621 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2626 void append_003_017()
2628 OString expVal( kTestStr2 );
2629 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2630 const sal_Char* input1 = kTestStr2;
2631 sal_Int32 input2 = 32;
2633 aStrBuf.append( input1, input2 );
2635 CPPUNIT_ASSERT_MESSAGE
2637 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2638 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2643 void append_003_018()
2645 OString expVal( kTestStr1 );
2646 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2647 const sal_Char* input1 = kTestStr2;
2648 sal_Int32 input2 = 16;
2650 aStrBuf.append( input1, input2 );
2652 CPPUNIT_ASSERT_MESSAGE
2654 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2655 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2660 void append_003_019()
2662 OString expVal;
2663 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2664 const sal_Char* input1 = kTestStr2;
2665 sal_Int32 input2 = 0;
2667 aStrBuf.append( input1, input2 );
2669 CPPUNIT_ASSERT_MESSAGE
2671 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2672 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2677 void append_003_021()
2679 OString expVal( kTestStr29 );
2680 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2681 const sal_Char* input1 = kTestStr38;
2682 sal_Int32 input2 = 7;
2684 aStrBuf.append( input1, input2 );
2686 CPPUNIT_ASSERT_MESSAGE
2688 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2689 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2694 void append_003_022()
2696 OString expVal( kTestStr39 );
2697 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2698 const sal_Char* input1 = kTestStr17;
2699 sal_Int32 input2 = 22;
2701 aStrBuf.append( input1, input2 );
2703 CPPUNIT_ASSERT_MESSAGE
2705 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2706 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2711 void append_003_023()
2713 OString expVal( kTestStr40 );
2714 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2715 const sal_Char* input1 = kTestStr31;
2716 sal_Int32 input2 = 16;
2718 aStrBuf.append( input1, input2 );
2720 CPPUNIT_ASSERT_MESSAGE
2722 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2723 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2728 void append_003_024()
2730 OString expVal( kTestStr28 );
2731 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2732 const sal_Char* input1 = kTestStr2;
2733 sal_Int32 input2 = 0;
2735 aStrBuf.append( input1, input2 );
2737 CPPUNIT_ASSERT_MESSAGE
2739 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2740 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2745 SAL_CPPUNIT_TEST_SUITE( append_003 );
2746 CPPUNIT_TEST( append_003_001 );
2747 CPPUNIT_TEST( append_003_002 );
2748 CPPUNIT_TEST( append_003_003 );
2749 CPPUNIT_TEST( append_003_004 );
2750 CPPUNIT_TEST( append_003_006 );
2751 CPPUNIT_TEST( append_003_007 );
2752 CPPUNIT_TEST( append_003_008 );
2753 CPPUNIT_TEST( append_003_009 );
2754 CPPUNIT_TEST( append_003_011 );
2755 CPPUNIT_TEST( append_003_012 );
2756 CPPUNIT_TEST( append_003_013 );
2757 CPPUNIT_TEST( append_003_014 );
2758 CPPUNIT_TEST( append_003_016 );
2759 CPPUNIT_TEST( append_003_017 );
2760 CPPUNIT_TEST( append_003_018 );
2761 CPPUNIT_TEST( append_003_019 );
2762 CPPUNIT_TEST( append_003_021 );
2763 CPPUNIT_TEST( append_003_022 );
2764 CPPUNIT_TEST( append_003_023 );
2765 CPPUNIT_TEST( append_003_024 );
2766 SAL_CPPUNIT_TEST_SUITE_END();
2768 //-----------------------------------------------------------------------------
2770 class append_004 : public CppUnit::TestFixture
2772 OString* arrOUS[5];
2774 public:
2775 void setUp()
2777 arrOUS[0] = new OString( kTestStr7 );
2778 arrOUS[1] = new OString( );
2779 arrOUS[2] = new OString( kTestStr25 );
2780 arrOUS[3] = new OString( "" );
2781 arrOUS[4] = new OString( kTestStr28 );
2785 void tearDown()
2787 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
2788 delete arrOUS[3]; delete arrOUS[4];
2791 void append_004_001()
2793 OString expVal( kTestStr45 );
2794 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2795 sal_Bool input = sal_True;
2797 aStrBuf.append( input );
2799 CPPUNIT_ASSERT_MESSAGE
2801 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[0]",
2802 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2807 void append_004_002()
2809 OString expVal( kTestStr46 );
2810 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2811 sal_Bool input = sal_False;
2813 aStrBuf.append( input );
2815 CPPUNIT_ASSERT_MESSAGE
2817 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[0]",
2818 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2823 void append_004_003()
2825 OString expVal( kTestStr47 );
2826 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2827 sal_Bool input = sal_True;
2829 aStrBuf.append( input );
2831 CPPUNIT_ASSERT_MESSAGE
2833 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[1]",
2834 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2839 void append_004_004()
2841 OString expVal( kTestStr48 );
2842 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2843 sal_Bool input = sal_False;
2845 aStrBuf.append( input );
2847 CPPUNIT_ASSERT_MESSAGE
2849 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[1]",
2850 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2855 void append_004_005()
2857 OString expVal( kTestStr47 );
2858 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2859 sal_Bool input = sal_True;
2861 aStrBuf.append( input );
2863 CPPUNIT_ASSERT_MESSAGE
2865 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[2]",
2866 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2871 void append_004_006()
2873 OString expVal( kTestStr48 );
2874 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2875 sal_Bool input = sal_False;
2877 aStrBuf.append( input );
2879 CPPUNIT_ASSERT_MESSAGE
2881 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[2]",
2882 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2887 void append_004_007()
2889 OString expVal( kTestStr47 );
2890 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2891 sal_Bool input = sal_True;
2893 aStrBuf.append( input );
2895 CPPUNIT_ASSERT_MESSAGE
2897 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[3]",
2898 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2903 void append_004_008()
2905 OString expVal( kTestStr48 );
2906 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2907 sal_Bool input = sal_False;
2909 aStrBuf.append( input );
2911 CPPUNIT_ASSERT_MESSAGE
2913 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[3]",
2914 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2919 void append_004_009()
2921 OString expVal( kTestStr49 );
2922 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2923 sal_Bool input = sal_True;
2925 aStrBuf.append( input );
2927 CPPUNIT_ASSERT_MESSAGE
2929 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[4]",
2930 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2935 void append_004_010()
2937 OString expVal( kTestStr50 );
2938 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2939 sal_Bool input = sal_False;
2941 aStrBuf.append( input );
2943 CPPUNIT_ASSERT_MESSAGE
2945 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[4]",
2946 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2951 #ifdef WITH_CORE
2952 void append_004_011()
2954 OString expVal( kTestStr47 );
2955 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
2956 sal_Bool input = sal_True;
2958 aStrBuf.append( input );
2960 CPPUNIT_ASSERT_MESSAGE
2962 "Appends the sal_Bool(sal_True) to the string buffer(with INT_MAX)",
2963 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2968 void append_004_012()
2970 OString expVal( kTestStr48 );
2971 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
2972 sal_Bool input = sal_False;
2974 aStrBuf.append( input );
2976 CPPUNIT_ASSERT_MESSAGE
2978 "Appends the sal_Bool(sal_False) to the string buffer(with INT_MAX)",
2979 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2983 #endif
2985 SAL_CPPUNIT_TEST_SUITE( append_004 );
2986 CPPUNIT_TEST( append_004_001 );
2987 CPPUNIT_TEST( append_004_002 );
2988 CPPUNIT_TEST( append_004_003 );
2989 CPPUNIT_TEST( append_004_004 );
2990 CPPUNIT_TEST( append_004_005 );
2991 CPPUNIT_TEST( append_004_006 );
2992 CPPUNIT_TEST( append_004_007 );
2993 CPPUNIT_TEST( append_004_008 );
2994 CPPUNIT_TEST( append_004_009 );
2995 CPPUNIT_TEST( append_004_010 );
2996 #ifdef WITH_CORE
2997 CPPUNIT_TEST( append_004_011 );
2998 CPPUNIT_TEST( append_004_012 );
2999 #endif
3000 SAL_CPPUNIT_TEST_SUITE_END();
3002 //------------------------------------------------------------------------
3003 // testing the method append(sal_Char c)
3004 //------------------------------------------------------------------------
3005 class append_005 : public CppUnit::TestFixture
3007 OString* arrOUS[5];
3009 public:
3010 void setUp()
3012 arrOUS[0] = new OString( kTestStr7 );
3013 arrOUS[1] = new OString( );
3014 arrOUS[2] = new OString( kTestStr25 );
3015 arrOUS[3] = new OString( "" );
3016 arrOUS[4] = new OString( kTestStr28 );
3020 void tearDown()
3022 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
3023 delete arrOUS[3]; delete arrOUS[4];
3026 void append_001()
3028 OString expVal( kTestStr51 );
3029 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3030 sal_Char input = 'M';
3032 aStrBuf.append( input );
3034 CPPUNIT_ASSERT_MESSAGE
3036 "Appends the sal_Char(M) to the string buffer arrOUS[0]",
3037 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3042 void append_002()
3044 OString expVal( kTestStr143 );
3045 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3046 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3048 aStrBuf.append( input );
3050 CPPUNIT_ASSERT_MESSAGE
3052 "Appends the sal_Unicode(kSInt8Max) to the string buffer arrOUS[0]",
3053 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3058 void append_003()
3060 OString expVal( kTestStr27 );
3061 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3062 sal_Char input = 's';
3064 aStrBuf.append( input );
3066 CPPUNIT_ASSERT_MESSAGE
3068 "Appends the sal_Char(s) to the string buffer arrOUS[1]",
3069 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3074 void append_004()
3076 OString expVal( kTestStr144 );
3077 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3078 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3080 aStrBuf.append( input );
3082 CPPUNIT_ASSERT_MESSAGE
3084 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[1]",
3085 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3090 void append_005_005()
3092 OString expVal( kTestStr27 );
3093 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3094 sal_Char input = 's';
3096 aStrBuf.append( input );
3098 CPPUNIT_ASSERT_MESSAGE
3100 "Appends the sal_Char(s) to the string buffer arrOUS[2]",
3101 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3106 void append_006()
3108 OString expVal( kTestStr144 );
3109 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3110 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3112 aStrBuf.append( input );
3114 CPPUNIT_ASSERT_MESSAGE
3116 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[2]",
3117 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3122 void append_007()
3124 OString expVal( kTestStr27 );
3125 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3126 sal_Char input = 's';
3128 aStrBuf.append( input );
3130 CPPUNIT_ASSERT_MESSAGE
3132 "Appends the sal_Char(s) to the string buffer arrOUS[3]",
3133 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3138 void append_008()
3140 OString expVal( kTestStr144 );
3141 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3142 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3144 aStrBuf.append( input );
3146 CPPUNIT_ASSERT_MESSAGE
3148 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[3]",
3149 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3154 void append_009()
3156 OString expVal( kTestStr56 );
3157 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3158 sal_Char input = 's';
3160 aStrBuf.append( input );
3162 CPPUNIT_ASSERT_MESSAGE
3164 "Appends the sal_Char(s) to the string buffer arrOUS[4]",
3165 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3170 void append_010()
3172 OString expVal( kTestStr145 );
3173 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3174 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3176 aStrBuf.append( input );
3178 CPPUNIT_ASSERT_MESSAGE
3180 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[4]",
3181 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3186 #ifdef WITH_CORE
3187 void append_011()
3189 OString expVal( kTestStr27 );
3190 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3191 sal_Char input = 's';
3193 aStrBuf.append( input );
3195 CPPUNIT_ASSERT_MESSAGE
3197 "Appends the sal_Char(s) to the string buffer(with INT_MAX)",
3198 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3203 void append_012()
3205 OString expVal( kTestStr144 );
3206 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3207 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3209 aStrBuf.append( input );
3211 CPPUNIT_ASSERT_MESSAGE
3213 "Appends the sal_Char(kSInt8Max) to the string buffer with INT_MAX)",
3214 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3218 #endif
3220 SAL_CPPUNIT_TEST_SUITE( append_005 );
3221 CPPUNIT_TEST( append_001 );
3222 CPPUNIT_TEST( append_002 );
3223 CPPUNIT_TEST( append_003 );
3224 CPPUNIT_TEST( append_004 );
3225 CPPUNIT_TEST( append_005_005 );
3226 CPPUNIT_TEST( append_006 );
3227 CPPUNIT_TEST( append_007 );
3228 CPPUNIT_TEST( append_008 );
3229 CPPUNIT_TEST( append_009 );
3230 CPPUNIT_TEST( append_010 );
3231 #ifdef WITH_CORE
3232 CPPUNIT_TEST( append_011 );
3233 CPPUNIT_TEST( append_012 );
3234 #endif
3235 SAL_CPPUNIT_TEST_SUITE_END();
3238 class append_006_Int32 : public CppUnit::TestFixture
3240 OString* arrOUS[5];
3242 public:
3243 void setUp()
3245 arrOUS[0] = new OString( kTestStr7 );
3246 arrOUS[1] = new OString( );
3247 arrOUS[2] = new OString( kTestStr25 );
3248 arrOUS[3] = new OString( "" );
3249 arrOUS[4] = new OString( kTestStr28 );
3253 void tearDown()
3255 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
3256 delete arrOUS[3]; delete arrOUS[4];
3259 void append_001()
3261 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3262 OString expVal( aStrBuf.getStr() );
3263 sal_Int32 input = 0;
3264 sal_Int16 radix = 2;
3266 expVal += OString( "0" );
3267 aStrBuf.append( input, radix );
3269 CPPUNIT_ASSERT_MESSAGE
3271 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3272 aStrBuf.getStr()== expVal &&
3273 aStrBuf.getLength() == expVal.getLength()
3278 void append_002()
3280 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3281 OString expVal( aStrBuf.getStr() );
3282 sal_Int32 input = 4;
3283 sal_Int16 radix = 2;
3285 expVal += OString( "100" );
3286 aStrBuf.append( input, radix );
3288 CPPUNIT_ASSERT_MESSAGE
3290 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3291 aStrBuf.getStr()== expVal &&
3292 aStrBuf.getLength() == expVal.getLength()
3297 void append_003()
3299 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3300 OString expVal( aStrBuf.getStr() );
3301 sal_Int32 input = 8;
3302 sal_Int16 radix = 2;
3304 expVal += OString( "1000" );
3305 aStrBuf.append( input, radix );
3307 CPPUNIT_ASSERT_MESSAGE
3309 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3310 aStrBuf.getStr()== expVal &&
3311 aStrBuf.getLength() == expVal.getLength()
3316 void append_004()
3318 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3319 OString expVal( aStrBuf.getStr() );
3320 sal_Int32 input = 15;
3321 sal_Int16 radix = 2;
3323 expVal += OString( "1111" );
3324 aStrBuf.append( input, radix );
3326 CPPUNIT_ASSERT_MESSAGE
3328 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3329 aStrBuf.getStr()== expVal &&
3330 aStrBuf.getLength() == expVal.getLength()
3335 void append_005()
3337 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3338 OString expVal( aStrBuf.getStr() );
3339 sal_Int32 input = 0;
3340 sal_Int16 radix = 8;
3342 expVal += OString( "0" );
3343 aStrBuf.append( input, radix );
3345 CPPUNIT_ASSERT_MESSAGE
3347 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3348 aStrBuf.getStr()== expVal &&
3349 aStrBuf.getLength() == expVal.getLength()
3354 void append_006()
3356 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3357 OString expVal( aStrBuf.getStr() );
3358 sal_Int32 input = 4;
3359 sal_Int16 radix = 8;
3361 expVal += OString( "4" );
3362 aStrBuf.append( input, radix );
3364 CPPUNIT_ASSERT_MESSAGE
3366 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3367 aStrBuf.getStr()== expVal &&
3368 aStrBuf.getLength() == expVal.getLength()
3373 void append_007()
3375 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3376 OString expVal( aStrBuf.getStr() );
3377 sal_Int32 input = 8;
3378 sal_Int16 radix = 8;
3380 expVal += OString( "10" );
3381 aStrBuf.append( input, radix );
3383 CPPUNIT_ASSERT_MESSAGE
3385 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3386 aStrBuf.getStr()== expVal &&
3387 aStrBuf.getLength() == expVal.getLength()
3392 void append_008()
3394 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3395 OString expVal( aStrBuf.getStr() );
3396 sal_Int32 input = 15;
3397 sal_Int16 radix = 8;
3399 expVal += OString( "17" );
3400 aStrBuf.append( input, radix );
3402 CPPUNIT_ASSERT_MESSAGE
3404 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3405 aStrBuf.getStr()== expVal &&
3406 aStrBuf.getLength() == expVal.getLength()
3411 void append_009()
3413 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3414 OString expVal( aStrBuf.getStr() );
3415 sal_Int32 input = 0;
3416 sal_Int16 radix = 10;
3418 expVal += OString( "0" );
3419 aStrBuf.append( input, radix );
3421 CPPUNIT_ASSERT_MESSAGE
3423 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3424 aStrBuf.getStr()== expVal &&
3425 aStrBuf.getLength() == expVal.getLength()
3430 void append_010()
3432 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3433 OString expVal( aStrBuf.getStr() );
3434 sal_Int32 input = 4;
3435 sal_Int16 radix = 10;
3437 expVal += OString( "4" );
3438 aStrBuf.append( input, radix );
3440 CPPUNIT_ASSERT_MESSAGE
3442 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3443 aStrBuf.getStr()== expVal &&
3444 aStrBuf.getLength() == expVal.getLength()
3449 void append_011()
3451 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3452 OString expVal( aStrBuf.getStr() );
3453 sal_Int32 input = 8;
3454 sal_Int16 radix = 10;
3456 expVal += OString( "8" );
3457 aStrBuf.append( input, radix );
3459 CPPUNIT_ASSERT_MESSAGE
3461 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3462 aStrBuf.getStr()== expVal &&
3463 aStrBuf.getLength() == expVal.getLength()
3468 void append_012()
3470 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3471 OString expVal( aStrBuf.getStr() );
3472 sal_Int32 input = 15;
3473 sal_Int16 radix = 10;
3475 expVal += OString( "15" );
3476 aStrBuf.append( input, radix );
3478 CPPUNIT_ASSERT_MESSAGE
3480 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3481 aStrBuf.getStr()== expVal &&
3482 aStrBuf.getLength() == expVal.getLength()
3487 void append_013()
3489 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3490 OString expVal( aStrBuf.getStr() );
3491 sal_Int32 input = 0;
3492 sal_Int16 radix = 16;
3494 expVal += OString( "0" );
3495 aStrBuf.append( input, radix );
3497 CPPUNIT_ASSERT_MESSAGE
3499 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3500 aStrBuf.getStr()== expVal &&
3501 aStrBuf.getLength() == expVal.getLength()
3506 void append_014()
3508 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3509 OString expVal( aStrBuf.getStr() );
3510 sal_Int32 input = 4;
3511 sal_Int16 radix = 16;
3513 expVal += OString( "4" );
3514 aStrBuf.append( input, radix );
3516 CPPUNIT_ASSERT_MESSAGE
3518 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3519 aStrBuf.getStr()== expVal &&
3520 aStrBuf.getLength() == expVal.getLength()
3525 void append_015()
3527 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3528 OString expVal( aStrBuf.getStr() );
3529 sal_Int32 input = 8;
3530 sal_Int16 radix = 16;
3532 expVal += OString( "8" );
3533 aStrBuf.append( input, radix );
3535 CPPUNIT_ASSERT_MESSAGE
3537 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3538 aStrBuf.getStr()== expVal &&
3539 aStrBuf.getLength() == expVal.getLength()
3544 void append_016()
3546 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3547 OString expVal( aStrBuf.getStr() );
3548 sal_Int32 input = 15;
3549 sal_Int16 radix = 16;
3551 expVal += OString( "f" );
3552 aStrBuf.append( input, radix );
3554 CPPUNIT_ASSERT_MESSAGE
3556 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3557 aStrBuf.getStr()== expVal &&
3558 aStrBuf.getLength() == expVal.getLength()
3563 void append_017()
3565 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3566 OString expVal( aStrBuf.getStr() );
3567 sal_Int32 input = 0;
3568 sal_Int16 radix = 36;
3570 expVal += OString( "0" );
3571 aStrBuf.append( input, radix );
3573 CPPUNIT_ASSERT_MESSAGE
3575 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3576 aStrBuf.getStr()== expVal &&
3577 aStrBuf.getLength() == expVal.getLength()
3582 void append_018()
3584 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3585 OString expVal( aStrBuf.getStr() );
3586 sal_Int32 input = 4;
3587 sal_Int16 radix = 36;
3589 expVal += OString( "4" );
3590 aStrBuf.append( input, radix );
3592 CPPUNIT_ASSERT_MESSAGE
3594 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3595 aStrBuf.getStr()== expVal &&
3596 aStrBuf.getLength() == expVal.getLength()
3601 void append_019()
3603 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3604 OString expVal( aStrBuf.getStr() );
3605 sal_Int32 input = 8;
3606 sal_Int16 radix = 36;
3608 expVal += OString( "8" );
3609 aStrBuf.append( input, radix );
3611 CPPUNIT_ASSERT_MESSAGE
3613 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3614 aStrBuf.getStr()== expVal &&
3615 aStrBuf.getLength() == expVal.getLength()
3620 void append_020()
3622 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3623 OString expVal( aStrBuf.getStr() );
3624 sal_Int32 input = 35;
3625 sal_Int16 radix = 36;
3627 expVal += OString( "z" );
3628 aStrBuf.append( input, radix );
3630 CPPUNIT_ASSERT_MESSAGE
3632 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3633 aStrBuf.getStr()== expVal &&
3634 aStrBuf.getLength() == expVal.getLength()
3639 void append_021()
3641 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3642 OString expVal( aStrBuf.getStr() );
3643 sal_Int32 input = 0;
3644 sal_Int16 radix = 2;
3646 expVal += OString( "0" );
3647 aStrBuf.append( input, radix );
3649 CPPUNIT_ASSERT_MESSAGE
3651 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3652 aStrBuf.getStr()== expVal &&
3653 aStrBuf.getLength() == expVal.getLength()
3658 void append_022()
3660 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3661 OString expVal( aStrBuf.getStr() );
3662 sal_Int32 input = 4;
3663 sal_Int16 radix = 2;
3665 expVal += OString( "100" );
3666 aStrBuf.append( input, radix );
3668 CPPUNIT_ASSERT_MESSAGE
3670 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3671 aStrBuf.getStr()== expVal &&
3672 aStrBuf.getLength() == expVal.getLength()
3677 void append_023()
3679 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3680 OString expVal( aStrBuf.getStr() );
3681 sal_Int32 input = 8;
3682 sal_Int16 radix = 2;
3684 expVal += OString( "1000" );
3685 aStrBuf.append( input, radix );
3687 CPPUNIT_ASSERT_MESSAGE
3689 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3690 aStrBuf.getStr()== expVal &&
3691 aStrBuf.getLength() == expVal.getLength()
3696 void append_024()
3698 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3699 OString expVal( aStrBuf.getStr() );
3700 sal_Int32 input = 15;
3701 sal_Int16 radix = 2;
3703 expVal += OString( "1111" );
3704 aStrBuf.append( input, radix );
3706 CPPUNIT_ASSERT_MESSAGE
3708 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3709 aStrBuf.getStr()== expVal &&
3710 aStrBuf.getLength() == expVal.getLength()
3715 void append_025()
3717 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3718 OString expVal( aStrBuf.getStr() );
3719 sal_Int32 input = 0;
3720 sal_Int16 radix = 8;
3722 expVal += OString( "0" );
3723 aStrBuf.append( input, radix );
3725 CPPUNIT_ASSERT_MESSAGE
3727 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3728 aStrBuf.getStr()== expVal &&
3729 aStrBuf.getLength() == expVal.getLength()
3734 void append_026()
3736 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3737 OString expVal( aStrBuf.getStr() );
3738 sal_Int32 input = 4;
3739 sal_Int16 radix = 8;
3741 expVal += OString( "4" );
3742 aStrBuf.append( input, radix );
3744 CPPUNIT_ASSERT_MESSAGE
3746 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3747 aStrBuf.getStr()== expVal &&
3748 aStrBuf.getLength() == expVal.getLength()
3753 void append_027()
3755 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3756 OString expVal( aStrBuf.getStr() );
3757 sal_Int32 input = 8;
3758 sal_Int16 radix = 8;
3760 expVal += OString( "10" );
3761 aStrBuf.append( input, radix );
3763 CPPUNIT_ASSERT_MESSAGE
3765 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3766 aStrBuf.getStr()== expVal &&
3767 aStrBuf.getLength() == expVal.getLength()
3772 void append_028()
3774 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3775 OString expVal( aStrBuf.getStr() );
3776 sal_Int32 input = 15;
3777 sal_Int16 radix = 8;
3779 expVal += OString( "17" );
3780 aStrBuf.append( input, radix );
3782 CPPUNIT_ASSERT_MESSAGE
3784 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3785 aStrBuf.getStr()== expVal &&
3786 aStrBuf.getLength() == expVal.getLength()
3791 void append_029()
3793 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3794 OString expVal( aStrBuf.getStr() );
3795 sal_Int32 input = 0;
3796 sal_Int16 radix = 10;
3798 expVal += OString( "0" );
3799 aStrBuf.append( input, radix );
3801 CPPUNIT_ASSERT_MESSAGE
3803 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3804 aStrBuf.getStr()== expVal &&
3805 aStrBuf.getLength() == expVal.getLength()
3810 void append_030()
3812 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3813 OString expVal( aStrBuf.getStr() );
3814 sal_Int32 input = 4;
3815 sal_Int16 radix = 10;
3817 expVal += OString( "4" );
3818 aStrBuf.append( input, radix );
3820 CPPUNIT_ASSERT_MESSAGE
3822 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3823 aStrBuf.getStr()== expVal &&
3824 aStrBuf.getLength() == expVal.getLength()
3829 void append_031()
3831 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3832 OString expVal( aStrBuf.getStr() );
3833 sal_Int32 input = 8;
3834 sal_Int16 radix = 10;
3836 expVal += OString( "8" );
3837 aStrBuf.append( input, radix );
3839 CPPUNIT_ASSERT_MESSAGE
3841 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3842 aStrBuf.getStr()== expVal &&
3843 aStrBuf.getLength() == expVal.getLength()
3848 void append_032()
3850 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3851 OString expVal( aStrBuf.getStr() );
3852 sal_Int32 input = 15;
3853 sal_Int16 radix = 10;
3855 expVal += OString( "15" );
3856 aStrBuf.append( input, radix );
3858 CPPUNIT_ASSERT_MESSAGE
3860 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3861 aStrBuf.getStr()== expVal &&
3862 aStrBuf.getLength() == expVal.getLength()
3867 void append_033()
3869 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3870 OString expVal( aStrBuf.getStr() );
3871 sal_Int32 input = 0;
3872 sal_Int16 radix = 16;
3874 expVal += OString( "0" );
3875 aStrBuf.append( input, radix );
3877 CPPUNIT_ASSERT_MESSAGE
3879 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3880 aStrBuf.getStr()== expVal &&
3881 aStrBuf.getLength() == expVal.getLength()
3886 void append_034()
3888 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3889 OString expVal( aStrBuf.getStr() );
3890 sal_Int32 input = 4;
3891 sal_Int16 radix = 16;
3893 expVal += OString( "4" );
3894 aStrBuf.append( input, radix );
3896 CPPUNIT_ASSERT_MESSAGE
3898 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3899 aStrBuf.getStr()== expVal &&
3900 aStrBuf.getLength() == expVal.getLength()
3905 void append_035()
3907 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3908 OString expVal( aStrBuf.getStr() );
3909 sal_Int32 input = 8;
3910 sal_Int16 radix = 16;
3912 expVal += OString( "8" );
3913 aStrBuf.append( input, radix );
3915 CPPUNIT_ASSERT_MESSAGE
3917 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3918 aStrBuf.getStr()== expVal &&
3919 aStrBuf.getLength() == expVal.getLength()
3924 void append_036()
3926 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3927 OString expVal( aStrBuf.getStr() );
3928 sal_Int32 input = 15;
3929 sal_Int16 radix = 16;
3931 expVal += OString( "f" );
3932 aStrBuf.append( input, radix );
3934 CPPUNIT_ASSERT_MESSAGE
3936 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3937 aStrBuf.getStr()== expVal &&
3938 aStrBuf.getLength() == expVal.getLength()
3943 void append_037()
3945 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3946 OString expVal( aStrBuf.getStr() );
3947 sal_Int32 input = 0;
3948 sal_Int16 radix = 36;
3950 expVal += OString( "0" );
3951 aStrBuf.append( input, radix );
3953 CPPUNIT_ASSERT_MESSAGE
3955 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3956 aStrBuf.getStr()== expVal &&
3957 aStrBuf.getLength() == expVal.getLength()
3962 void append_038()
3964 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3965 OString expVal( aStrBuf.getStr() );
3966 sal_Int32 input = 4;
3967 sal_Int16 radix = 36;
3969 expVal += OString( "4" );
3970 aStrBuf.append( input, radix );
3972 CPPUNIT_ASSERT_MESSAGE
3974 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3975 aStrBuf.getStr()== expVal &&
3976 aStrBuf.getLength() == expVal.getLength()
3981 void append_039()
3983 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3984 OString expVal( aStrBuf.getStr() );
3985 sal_Int32 input = 8;
3986 sal_Int16 radix = 36;
3988 expVal += OString( "8" );
3989 aStrBuf.append( input, radix );
3991 CPPUNIT_ASSERT_MESSAGE
3993 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3994 aStrBuf.getStr()== expVal &&
3995 aStrBuf.getLength() == expVal.getLength()
4000 void append_040()
4002 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4003 OString expVal( aStrBuf.getStr() );
4004 sal_Int32 input = 35;
4005 sal_Int16 radix = 36;
4007 expVal += OString( "z" );
4008 aStrBuf.append( input, radix );
4010 CPPUNIT_ASSERT_MESSAGE
4012 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
4013 aStrBuf.getStr()== expVal &&
4014 aStrBuf.getLength() == expVal.getLength()
4019 void append_041()
4021 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4022 OString expVal( aStrBuf.getStr() );
4023 sal_Int32 input = 0;
4024 sal_Int16 radix = 2;
4026 expVal += OString( "0" );
4027 aStrBuf.append( input, radix );
4029 CPPUNIT_ASSERT_MESSAGE
4031 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4032 aStrBuf.getStr()== expVal &&
4033 aStrBuf.getLength() == expVal.getLength()
4038 void append_042()
4040 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4041 OString expVal( aStrBuf.getStr() );
4042 sal_Int32 input = 4;
4043 sal_Int16 radix = 2;
4045 expVal += OString( "100" );
4046 aStrBuf.append( input, radix );
4048 CPPUNIT_ASSERT_MESSAGE
4050 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4051 aStrBuf.getStr()== expVal &&
4052 aStrBuf.getLength() == expVal.getLength()
4057 void append_043()
4059 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4060 OString expVal( aStrBuf.getStr() );
4061 sal_Int32 input = 8;
4062 sal_Int16 radix = 2;
4064 expVal += OString( "1000" );
4065 aStrBuf.append( input, radix );
4067 CPPUNIT_ASSERT_MESSAGE
4069 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4070 aStrBuf.getStr()== expVal &&
4071 aStrBuf.getLength() == expVal.getLength()
4076 void append_044()
4078 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4079 OString expVal( aStrBuf.getStr() );
4080 sal_Int32 input = 15;
4081 sal_Int16 radix = 2;
4083 expVal += OString( "1111" );
4084 aStrBuf.append( input, radix );
4086 CPPUNIT_ASSERT_MESSAGE
4088 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4089 aStrBuf.getStr()== expVal &&
4090 aStrBuf.getLength() == expVal.getLength()
4095 void append_045()
4097 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4098 OString expVal( aStrBuf.getStr() );
4099 sal_Int32 input = 0;
4100 sal_Int16 radix = 8;
4102 expVal += OString( "0" );
4103 aStrBuf.append( input, radix );
4105 CPPUNIT_ASSERT_MESSAGE
4107 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4108 aStrBuf.getStr()== expVal &&
4109 aStrBuf.getLength() == expVal.getLength()
4114 void append_046()
4116 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4117 OString expVal( aStrBuf.getStr() );
4118 sal_Int32 input = 4;
4119 sal_Int16 radix = 8;
4121 expVal += OString( "4" );
4122 aStrBuf.append( input, radix );
4124 CPPUNIT_ASSERT_MESSAGE
4126 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4127 aStrBuf.getStr()== expVal &&
4128 aStrBuf.getLength() == expVal.getLength()
4133 void append_047()
4135 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4136 OString expVal( aStrBuf.getStr() );
4137 sal_Int32 input = 8;
4138 sal_Int16 radix = 8;
4140 expVal += OString( "10" );
4141 aStrBuf.append( input, radix );
4143 CPPUNIT_ASSERT_MESSAGE
4145 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4146 aStrBuf.getStr()== expVal &&
4147 aStrBuf.getLength() == expVal.getLength()
4152 void append_048()
4154 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4155 OString expVal( aStrBuf.getStr() );
4156 sal_Int32 input = 15;
4157 sal_Int16 radix = 8;
4159 expVal += OString( "17" );
4160 aStrBuf.append( input, radix );
4162 CPPUNIT_ASSERT_MESSAGE
4164 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4165 aStrBuf.getStr()== expVal &&
4166 aStrBuf.getLength() == expVal.getLength()
4171 void append_049()
4173 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4174 OString expVal( aStrBuf.getStr() );
4175 sal_Int32 input = 0;
4176 sal_Int16 radix = 10;
4178 expVal += OString( "0" );
4179 aStrBuf.append( input, radix );
4181 CPPUNIT_ASSERT_MESSAGE
4183 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4184 aStrBuf.getStr()== expVal &&
4185 aStrBuf.getLength() == expVal.getLength()
4190 void append_050()
4192 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4193 OString expVal( aStrBuf.getStr() );
4194 sal_Int32 input = 4;
4195 sal_Int16 radix = 10;
4197 expVal += OString( "4" );
4198 aStrBuf.append( input, radix );
4200 CPPUNIT_ASSERT_MESSAGE
4202 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4203 aStrBuf.getStr()== expVal &&
4204 aStrBuf.getLength() == expVal.getLength()
4209 void append_051()
4211 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4212 OString expVal( aStrBuf.getStr() );
4213 sal_Int32 input = 8;
4214 sal_Int16 radix = 10;
4216 expVal += OString( "8" );
4217 aStrBuf.append( input, radix );
4219 CPPUNIT_ASSERT_MESSAGE
4221 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4222 aStrBuf.getStr()== expVal &&
4223 aStrBuf.getLength() == expVal.getLength()
4228 void append_052()
4230 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4231 OString expVal( aStrBuf.getStr() );
4232 sal_Int32 input = 15;
4233 sal_Int16 radix = 10;
4235 expVal += OString( "15" );
4236 aStrBuf.append( input, radix );
4238 CPPUNIT_ASSERT_MESSAGE
4240 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4241 aStrBuf.getStr()== expVal &&
4242 aStrBuf.getLength() == expVal.getLength()
4247 void append_053()
4249 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4250 OString expVal( aStrBuf.getStr() );
4251 sal_Int32 input = 0;
4252 sal_Int16 radix = 16;
4254 expVal += OString( "0" );
4255 aStrBuf.append( input, radix );
4257 CPPUNIT_ASSERT_MESSAGE
4259 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4260 aStrBuf.getStr()== expVal &&
4261 aStrBuf.getLength() == expVal.getLength()
4266 void append_054()
4268 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4269 OString expVal( aStrBuf.getStr() );
4270 sal_Int32 input = 4;
4271 sal_Int16 radix = 16;
4273 expVal += OString( "4" );
4274 aStrBuf.append( input, radix );
4276 CPPUNIT_ASSERT_MESSAGE
4278 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4279 aStrBuf.getStr()== expVal &&
4280 aStrBuf.getLength() == expVal.getLength()
4285 void append_055()
4287 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4288 OString expVal( aStrBuf.getStr() );
4289 sal_Int32 input = 8;
4290 sal_Int16 radix = 16;
4292 expVal += OString( "8" );
4293 aStrBuf.append( input, radix );
4295 CPPUNIT_ASSERT_MESSAGE
4297 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4298 aStrBuf.getStr()== expVal &&
4299 aStrBuf.getLength() == expVal.getLength()
4304 void append_056()
4306 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4307 OString expVal( aStrBuf.getStr() );
4308 sal_Int32 input = 15;
4309 sal_Int16 radix = 16;
4311 expVal += OString( "f" );
4312 aStrBuf.append( input, radix );
4314 CPPUNIT_ASSERT_MESSAGE
4316 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4317 aStrBuf.getStr()== expVal &&
4318 aStrBuf.getLength() == expVal.getLength()
4323 void append_057()
4325 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4326 OString expVal( aStrBuf.getStr() );
4327 sal_Int32 input = 0;
4328 sal_Int16 radix = 36;
4330 expVal += OString( "0" );
4331 aStrBuf.append( input, radix );
4333 CPPUNIT_ASSERT_MESSAGE
4335 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4336 aStrBuf.getStr()== expVal &&
4337 aStrBuf.getLength() == expVal.getLength()
4342 void append_058()
4344 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4345 OString expVal( aStrBuf.getStr() );
4346 sal_Int32 input = 4;
4347 sal_Int16 radix = 36;
4349 expVal += OString( "4" );
4350 aStrBuf.append( input, radix );
4352 CPPUNIT_ASSERT_MESSAGE
4354 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4355 aStrBuf.getStr()== expVal &&
4356 aStrBuf.getLength() == expVal.getLength()
4361 void append_059()
4363 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4364 OString expVal( aStrBuf.getStr() );
4365 sal_Int32 input = 8;
4366 sal_Int16 radix = 36;
4368 expVal += OString( "8" );
4369 aStrBuf.append( input, radix );
4371 CPPUNIT_ASSERT_MESSAGE
4373 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4374 aStrBuf.getStr()== expVal &&
4375 aStrBuf.getLength() == expVal.getLength()
4380 void append_060()
4382 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4383 OString expVal( aStrBuf.getStr() );
4384 sal_Int32 input = 35;
4385 sal_Int16 radix = 36;
4387 expVal += OString( "z" );
4388 aStrBuf.append( input, radix );
4390 CPPUNIT_ASSERT_MESSAGE
4392 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4393 aStrBuf.getStr()== expVal &&
4394 aStrBuf.getLength() == expVal.getLength()
4399 void append_061()
4401 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4402 OString expVal( aStrBuf.getStr() );
4403 sal_Int32 input = 0;
4404 sal_Int16 radix = 2;
4406 expVal += OString( "0" );
4407 aStrBuf.append( input, radix );
4409 CPPUNIT_ASSERT_MESSAGE
4411 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4412 aStrBuf.getStr()== expVal &&
4413 aStrBuf.getLength() == expVal.getLength()
4418 void append_062()
4420 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4421 OString expVal( aStrBuf.getStr() );
4422 sal_Int32 input = 4;
4423 sal_Int16 radix = 2;
4425 expVal += OString( "100" );
4426 aStrBuf.append( input, radix );
4428 CPPUNIT_ASSERT_MESSAGE
4430 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4431 aStrBuf.getStr()== expVal &&
4432 aStrBuf.getLength() == expVal.getLength()
4437 void append_063()
4439 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4440 OString expVal( aStrBuf.getStr() );
4441 sal_Int32 input = 8;
4442 sal_Int16 radix = 2;
4444 expVal += OString( "1000" );
4445 aStrBuf.append( input, radix );
4447 CPPUNIT_ASSERT_MESSAGE
4449 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4450 aStrBuf.getStr()== expVal &&
4451 aStrBuf.getLength() == expVal.getLength()
4456 void append_064()
4458 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4459 OString expVal( aStrBuf.getStr() );
4460 sal_Int32 input = 15;
4461 sal_Int16 radix = 2;
4463 expVal += OString( "1111" );
4464 aStrBuf.append( input, radix );
4466 CPPUNIT_ASSERT_MESSAGE
4468 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4469 aStrBuf.getStr()== expVal &&
4470 aStrBuf.getLength() == expVal.getLength()
4475 void append_065()
4477 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4478 OString expVal( aStrBuf.getStr() );
4479 sal_Int32 input = 0;
4480 sal_Int16 radix = 8;
4482 expVal += OString( "0" );
4483 aStrBuf.append( input, radix );
4485 CPPUNIT_ASSERT_MESSAGE
4487 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4488 aStrBuf.getStr()== expVal &&
4489 aStrBuf.getLength() == expVal.getLength()
4494 void append_066()
4496 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4497 OString expVal( aStrBuf.getStr() );
4498 sal_Int32 input = 4;
4499 sal_Int16 radix = 8;
4501 expVal += OString( "4" );
4502 aStrBuf.append( input, radix );
4504 CPPUNIT_ASSERT_MESSAGE
4506 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4507 aStrBuf.getStr()== expVal &&
4508 aStrBuf.getLength() == expVal.getLength()
4513 void append_067()
4515 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4516 OString expVal( aStrBuf.getStr() );
4517 sal_Int32 input = 8;
4518 sal_Int16 radix = 8;
4520 expVal += OString( "10" );
4521 aStrBuf.append( input, radix );
4523 CPPUNIT_ASSERT_MESSAGE
4525 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4526 aStrBuf.getStr()== expVal &&
4527 aStrBuf.getLength() == expVal.getLength()
4532 void append_068()
4534 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4535 OString expVal( aStrBuf.getStr() );
4536 sal_Int32 input = 15;
4537 sal_Int16 radix = 8;
4539 expVal += OString( "17" );
4540 aStrBuf.append( input, radix );
4542 CPPUNIT_ASSERT_MESSAGE
4544 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4545 aStrBuf.getStr()== expVal &&
4546 aStrBuf.getLength() == expVal.getLength()
4551 void append_069()
4553 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4554 OString expVal( aStrBuf.getStr() );
4555 sal_Int32 input = 0;
4556 sal_Int16 radix = 10;
4558 expVal += OString( "0" );
4559 aStrBuf.append( input, radix );
4561 CPPUNIT_ASSERT_MESSAGE
4563 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4564 aStrBuf.getStr()== expVal &&
4565 aStrBuf.getLength() == expVal.getLength()
4570 void append_070()
4572 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4573 OString expVal( aStrBuf.getStr() );
4574 sal_Int32 input = 4;
4575 sal_Int16 radix = 10;
4577 expVal += OString( "4" );
4578 aStrBuf.append( input, radix );
4580 CPPUNIT_ASSERT_MESSAGE
4582 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4583 aStrBuf.getStr()== expVal &&
4584 aStrBuf.getLength() == expVal.getLength()
4589 void append_071()
4591 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4592 OString expVal( aStrBuf.getStr() );
4593 sal_Int32 input = 8;
4594 sal_Int16 radix = 10;
4596 expVal += OString( "8" );
4597 aStrBuf.append( input, radix );
4599 CPPUNIT_ASSERT_MESSAGE
4601 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4602 aStrBuf.getStr()== expVal &&
4603 aStrBuf.getLength() == expVal.getLength()
4608 void append_072()
4610 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4611 OString expVal( aStrBuf.getStr() );
4612 sal_Int32 input = 15;
4613 sal_Int16 radix = 10;
4615 expVal += OString( "15" );
4616 aStrBuf.append( input, radix );
4618 CPPUNIT_ASSERT_MESSAGE
4620 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4621 aStrBuf.getStr()== expVal &&
4622 aStrBuf.getLength() == expVal.getLength()
4627 void append_073()
4629 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4630 OString expVal( aStrBuf.getStr() );
4631 sal_Int32 input = 0;
4632 sal_Int16 radix = 16;
4634 expVal += OString( "0" );
4635 aStrBuf.append( input, radix );
4637 CPPUNIT_ASSERT_MESSAGE
4639 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4640 aStrBuf.getStr()== expVal &&
4641 aStrBuf.getLength() == expVal.getLength()
4646 void append_074()
4648 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4649 OString expVal( aStrBuf.getStr() );
4650 sal_Int32 input = 4;
4651 sal_Int16 radix = 16;
4653 expVal += OString( "4" );
4654 aStrBuf.append( input, radix );
4656 CPPUNIT_ASSERT_MESSAGE
4658 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4659 aStrBuf.getStr()== expVal &&
4660 aStrBuf.getLength() == expVal.getLength()
4665 void append_075()
4667 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4668 OString expVal( aStrBuf.getStr() );
4669 sal_Int32 input = 8;
4670 sal_Int16 radix = 16;
4672 expVal += OString( "8" );
4673 aStrBuf.append( input, radix );
4675 CPPUNIT_ASSERT_MESSAGE
4677 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4678 aStrBuf.getStr()== expVal &&
4679 aStrBuf.getLength() == expVal.getLength()
4684 void append_076()
4686 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4687 OString expVal( aStrBuf.getStr() );
4688 sal_Int32 input = 15;
4689 sal_Int16 radix = 16;
4691 expVal += OString( "f" );
4692 aStrBuf.append( input, radix );
4694 CPPUNIT_ASSERT_MESSAGE
4696 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4697 aStrBuf.getStr()== expVal &&
4698 aStrBuf.getLength() == expVal.getLength()
4703 void append_077()
4705 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4706 OString expVal( aStrBuf.getStr() );
4707 sal_Int32 input = 0;
4708 sal_Int16 radix = 36;
4710 expVal += OString( "0" );
4711 aStrBuf.append( input, radix );
4713 CPPUNIT_ASSERT_MESSAGE
4715 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4716 aStrBuf.getStr()== expVal &&
4717 aStrBuf.getLength() == expVal.getLength()
4722 void append_078()
4724 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4725 OString expVal( aStrBuf.getStr() );
4726 sal_Int32 input = 4;
4727 sal_Int16 radix = 36;
4729 expVal += OString( "4" );
4730 aStrBuf.append( input, radix );
4732 CPPUNIT_ASSERT_MESSAGE
4734 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4735 aStrBuf.getStr()== expVal &&
4736 aStrBuf.getLength() == expVal.getLength()
4741 void append_079()
4743 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4744 OString expVal( aStrBuf.getStr() );
4745 sal_Int32 input = 8;
4746 sal_Int16 radix = 36;
4748 expVal += OString( "8" );
4749 aStrBuf.append( input, radix );
4751 CPPUNIT_ASSERT_MESSAGE
4753 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4754 aStrBuf.getStr()== expVal &&
4755 aStrBuf.getLength() == expVal.getLength()
4760 void append_080()
4762 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4763 OString expVal( aStrBuf.getStr() );
4764 sal_Int32 input = 35;
4765 sal_Int16 radix = 36;
4767 expVal += OString( "z" );
4768 aStrBuf.append( input, radix );
4770 CPPUNIT_ASSERT_MESSAGE
4772 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4773 aStrBuf.getStr()== expVal &&
4774 aStrBuf.getLength() == expVal.getLength()
4779 void append_081()
4781 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4782 OString expVal( aStrBuf.getStr() );
4783 sal_Int32 input = 0;
4784 sal_Int16 radix = 2;
4786 expVal += OString( "0" );
4787 aStrBuf.append( input, radix );
4789 CPPUNIT_ASSERT_MESSAGE
4791 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4792 aStrBuf.getStr()== expVal &&
4793 aStrBuf.getLength() == expVal.getLength()
4798 void append_082()
4800 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4801 OString expVal( aStrBuf.getStr() );
4802 sal_Int32 input = 4;
4803 sal_Int16 radix = 2;
4805 expVal += OString( "100" );
4806 aStrBuf.append( input, radix );
4808 CPPUNIT_ASSERT_MESSAGE
4810 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4811 aStrBuf.getStr()== expVal &&
4812 aStrBuf.getLength() == expVal.getLength()
4817 void append_083()
4819 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4820 OString expVal( aStrBuf.getStr() );
4821 sal_Int32 input = 8;
4822 sal_Int16 radix = 2;
4824 expVal += OString( "1000" );
4825 aStrBuf.append( input, radix );
4827 CPPUNIT_ASSERT_MESSAGE
4829 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4830 aStrBuf.getStr()== expVal &&
4831 aStrBuf.getLength() == expVal.getLength()
4836 void append_084()
4838 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4839 OString expVal( aStrBuf.getStr() );
4840 sal_Int32 input = 15;
4841 sal_Int16 radix = 2;
4843 expVal += OString( "1111" );
4844 aStrBuf.append( input, radix );
4846 CPPUNIT_ASSERT_MESSAGE
4848 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4849 aStrBuf.getStr()== expVal &&
4850 aStrBuf.getLength() == expVal.getLength()
4855 void append_085()
4857 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4858 OString expVal( aStrBuf.getStr() );
4859 sal_Int32 input = 0;
4860 sal_Int16 radix = 8;
4862 expVal += OString( "0" );
4863 aStrBuf.append( input, radix );
4865 CPPUNIT_ASSERT_MESSAGE
4867 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4868 aStrBuf.getStr()== expVal &&
4869 aStrBuf.getLength() == expVal.getLength()
4874 void append_086()
4876 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4877 OString expVal( aStrBuf.getStr() );
4878 sal_Int32 input = 4;
4879 sal_Int16 radix = 8;
4881 expVal += OString( "4" );
4882 aStrBuf.append( input, radix );
4884 CPPUNIT_ASSERT_MESSAGE
4886 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4887 aStrBuf.getStr()== expVal &&
4888 aStrBuf.getLength() == expVal.getLength()
4893 void append_087()
4895 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4896 OString expVal( aStrBuf.getStr() );
4897 sal_Int32 input = 8;
4898 sal_Int16 radix = 8;
4900 expVal += OString( "10" );
4901 aStrBuf.append( input, radix );
4903 CPPUNIT_ASSERT_MESSAGE
4905 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4906 aStrBuf.getStr()== expVal &&
4907 aStrBuf.getLength() == expVal.getLength()
4912 void append_088()
4914 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4915 OString expVal( aStrBuf.getStr() );
4916 sal_Int32 input = 15;
4917 sal_Int16 radix = 8;
4919 expVal += OString( "17" );
4920 aStrBuf.append( input, radix );
4922 CPPUNIT_ASSERT_MESSAGE
4924 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4925 aStrBuf.getStr()== expVal &&
4926 aStrBuf.getLength() == expVal.getLength()
4931 void append_089()
4933 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4934 OString expVal( aStrBuf.getStr() );
4935 sal_Int32 input = 0;
4936 sal_Int16 radix = 10;
4938 expVal += OString( "0" );
4939 aStrBuf.append( input, radix );
4941 CPPUNIT_ASSERT_MESSAGE
4943 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4944 aStrBuf.getStr()== expVal &&
4945 aStrBuf.getLength() == expVal.getLength()
4950 void append_090()
4952 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4953 OString expVal( aStrBuf.getStr() );
4954 sal_Int32 input = 4;
4955 sal_Int16 radix = 10;
4957 expVal += OString( "4" );
4958 aStrBuf.append( input, radix );
4960 CPPUNIT_ASSERT_MESSAGE
4962 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4963 aStrBuf.getStr()== expVal &&
4964 aStrBuf.getLength() == expVal.getLength()
4969 void append_091()
4971 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4972 OString expVal( aStrBuf.getStr() );
4973 sal_Int32 input = 8;
4974 sal_Int16 radix = 10;
4976 expVal += OString( "8" );
4977 aStrBuf.append( input, radix );
4979 CPPUNIT_ASSERT_MESSAGE
4981 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4982 aStrBuf.getStr()== expVal &&
4983 aStrBuf.getLength() == expVal.getLength()
4988 void append_092()
4990 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
4991 OString expVal( aStrBuf.getStr() );
4992 sal_Int32 input = 15;
4993 sal_Int16 radix = 10;
4995 expVal += OString( "15" );
4996 aStrBuf.append( input, radix );
4998 CPPUNIT_ASSERT_MESSAGE
5000 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
5001 aStrBuf.getStr()== expVal &&
5002 aStrBuf.getLength() == expVal.getLength()
5007 void append_093()
5009 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5010 OString expVal( aStrBuf.getStr() );
5011 sal_Int32 input = 0;
5012 sal_Int16 radix = 16;
5014 expVal += OString( "0" );
5015 aStrBuf.append( input, radix );
5017 CPPUNIT_ASSERT_MESSAGE
5019 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5020 aStrBuf.getStr()== expVal &&
5021 aStrBuf.getLength() == expVal.getLength()
5026 void append_094()
5028 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5029 OString expVal( aStrBuf.getStr() );
5030 sal_Int32 input = 4;
5031 sal_Int16 radix = 16;
5033 expVal += OString( "4" );
5034 aStrBuf.append( input, radix );
5036 CPPUNIT_ASSERT_MESSAGE
5038 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5039 aStrBuf.getStr()== expVal &&
5040 aStrBuf.getLength() == expVal.getLength()
5045 void append_095()
5047 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5048 OString expVal( aStrBuf.getStr() );
5049 sal_Int32 input = 8;
5050 sal_Int16 radix = 16;
5052 expVal += OString( "8" );
5053 aStrBuf.append( input, radix );
5055 CPPUNIT_ASSERT_MESSAGE
5057 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5058 aStrBuf.getStr()== expVal &&
5059 aStrBuf.getLength() == expVal.getLength()
5064 void append_096()
5066 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5067 OString expVal( aStrBuf.getStr() );
5068 sal_Int32 input = 15;
5069 sal_Int16 radix = 16;
5071 expVal += OString( "f" );
5072 aStrBuf.append( input, radix );
5074 CPPUNIT_ASSERT_MESSAGE
5076 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5077 aStrBuf.getStr()== expVal &&
5078 aStrBuf.getLength() == expVal.getLength()
5083 void append_097()
5085 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5086 OString expVal( aStrBuf.getStr() );
5087 sal_Int32 input = 0;
5088 sal_Int16 radix = 36;
5090 expVal += OString( "0" );
5091 aStrBuf.append( input, radix );
5093 CPPUNIT_ASSERT_MESSAGE
5095 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5096 aStrBuf.getStr()== expVal &&
5097 aStrBuf.getLength() == expVal.getLength()
5102 void append_098()
5104 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5105 OString expVal( aStrBuf.getStr() );
5106 sal_Int32 input = 4;
5107 sal_Int16 radix = 36;
5109 expVal += OString( "4" );
5110 aStrBuf.append( input, radix );
5112 CPPUNIT_ASSERT_MESSAGE
5114 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5115 aStrBuf.getStr()== expVal &&
5116 aStrBuf.getLength() == expVal.getLength()
5121 void append_099()
5123 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5124 OString expVal( aStrBuf.getStr() );
5125 sal_Int32 input = 8;
5126 sal_Int16 radix = 36;
5128 expVal += OString( "8" );
5129 aStrBuf.append( input, radix );
5131 CPPUNIT_ASSERT_MESSAGE
5133 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5134 aStrBuf.getStr()== expVal &&
5135 aStrBuf.getLength() == expVal.getLength()
5140 void append_100()
5142 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5143 OString expVal( aStrBuf.getStr() );
5144 sal_Int32 input = 35;
5145 sal_Int16 radix = 36;
5147 expVal += OString( "z" );
5148 aStrBuf.append( input, radix );
5150 CPPUNIT_ASSERT_MESSAGE
5152 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5153 aStrBuf.getStr()== expVal &&
5154 aStrBuf.getLength() == expVal.getLength()
5159 SAL_CPPUNIT_TEST_SUITE( append_006_Int32 );
5160 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
5161 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
5162 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
5163 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
5164 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
5165 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
5166 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
5167 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
5168 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
5169 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
5170 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
5171 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
5172 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
5173 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
5174 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
5175 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
5176 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
5177 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
5178 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
5179 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
5180 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
5181 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
5182 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
5183 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
5184 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
5185 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
5186 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
5187 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
5188 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
5189 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
5190 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
5191 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
5192 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
5193 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
5194 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
5195 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
5196 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
5197 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
5198 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
5199 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
5200 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
5201 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
5202 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
5203 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
5204 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
5205 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
5206 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
5207 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
5208 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
5209 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
5210 SAL_CPPUNIT_TEST_SUITE_END();
5212 //------------------------------------------------------------------------
5213 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
5214 // where i = large constants
5215 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
5216 // where i = large constants
5217 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
5218 // where i = large constants
5219 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
5220 // where i = large constants
5221 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
5222 // where i = large constants
5223 //------------------------------------------------------------------------
5224 class append_006_Int32_Bounderies : public CppUnit::TestFixture
5226 OString* arrOUS[5];
5228 public:
5229 void setUp()
5231 arrOUS[0] = new OString( kTestStr7 );
5232 arrOUS[1] = new OString( );
5233 arrOUS[2] = new OString( kTestStr25 );
5234 arrOUS[3] = new OString( "" );
5235 arrOUS[4] = new OString( kTestStr28 );
5239 void tearDown()
5241 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
5242 delete arrOUS[3]; delete arrOUS[4];
5245 void append_001()
5247 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5248 OString expVal( aStrBuf.getStr() );
5249 sal_Int32 input = kSInt8Max;
5250 sal_Int16 radix = 2;
5252 expVal += OString( "1111111" );
5253 aStrBuf.append( input, radix );
5255 CPPUNIT_ASSERT_MESSAGE
5257 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5258 aStrBuf.getStr()== expVal &&
5259 aStrBuf.getLength() == expVal.getLength()
5264 void append_002()
5266 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5267 OString expVal( aStrBuf.getStr() );
5268 sal_Int32 input = kSInt32Max;
5269 sal_Int16 radix = 2;
5271 expVal += OString( "1111111111111111111111111111111" );
5272 aStrBuf.append( input, radix );
5274 CPPUNIT_ASSERT_MESSAGE
5276 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5277 aStrBuf.getStr()== expVal &&
5278 aStrBuf.getLength() == expVal.getLength()
5283 void append_003()
5285 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5286 OString expVal( aStrBuf.getStr() );
5287 sal_Int32 input = kSInt8Max;
5288 sal_Int16 radix = 8;
5290 expVal += OString( "177" );
5291 aStrBuf.append( input, radix );
5293 CPPUNIT_ASSERT_MESSAGE
5295 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5296 aStrBuf.getStr()== expVal &&
5297 aStrBuf.getLength() == expVal.getLength()
5302 void append_004()
5304 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5305 OString expVal( aStrBuf.getStr() );
5306 sal_Int32 input = kSInt32Max;
5307 sal_Int16 radix = 8;
5309 expVal += OString( "17777777777" );
5310 aStrBuf.append( input, radix );
5312 CPPUNIT_ASSERT_MESSAGE
5314 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5315 aStrBuf.getStr()== expVal &&
5316 aStrBuf.getLength() == expVal.getLength()
5321 void append_005()
5323 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5324 OString expVal( aStrBuf.getStr() );
5325 sal_Int32 input = kSInt8Max;
5326 sal_Int16 radix = 10;
5328 expVal += OString( "127" );
5329 aStrBuf.append( input, radix );
5331 CPPUNIT_ASSERT_MESSAGE
5333 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5334 aStrBuf.getStr()== expVal &&
5335 aStrBuf.getLength() == expVal.getLength()
5340 void append_006()
5342 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5343 OString expVal( aStrBuf.getStr() );
5344 sal_Int32 input = kSInt32Max;
5345 sal_Int16 radix = 10;
5347 expVal += OString( "2147483647" );
5348 aStrBuf.append( input, radix );
5350 CPPUNIT_ASSERT_MESSAGE
5352 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5353 aStrBuf.getStr()== expVal &&
5354 aStrBuf.getLength() == expVal.getLength()
5359 void append_007()
5361 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5362 OString expVal( aStrBuf.getStr() );
5363 sal_Int32 input = kSInt8Max;
5364 sal_Int16 radix = 16;
5366 expVal += OString( "7f" );
5367 aStrBuf.append( input, radix );
5369 CPPUNIT_ASSERT_MESSAGE
5371 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5372 aStrBuf.getStr()== expVal &&
5373 aStrBuf.getLength() == expVal.getLength()
5378 void append_008()
5380 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5381 OString expVal( aStrBuf.getStr() );
5382 sal_Int32 input = kSInt32Max;
5383 sal_Int16 radix = 16;
5385 expVal += OString( "7fffffff" );
5386 aStrBuf.append( input, radix );
5388 CPPUNIT_ASSERT_MESSAGE
5390 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5391 aStrBuf.getStr()== expVal &&
5392 aStrBuf.getLength() == expVal.getLength()
5397 void append_009()
5399 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5400 OString expVal( aStrBuf.getStr() );
5401 sal_Int32 input = kSInt8Max;
5402 sal_Int16 radix = 36;
5404 expVal += OString( "3j" );
5405 aStrBuf.append( input, radix );
5407 CPPUNIT_ASSERT_MESSAGE
5409 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5410 aStrBuf.getStr()== expVal &&
5411 aStrBuf.getLength() == expVal.getLength()
5416 void append_010()
5418 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5419 OString expVal( aStrBuf.getStr() );
5420 sal_Int32 input = kSInt32Max;
5421 sal_Int16 radix = 36;
5423 expVal += OString( "zik0zj" );
5424 aStrBuf.append( input, radix );
5426 CPPUNIT_ASSERT_MESSAGE
5428 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5429 aStrBuf.getStr()== expVal &&
5430 aStrBuf.getLength() == expVal.getLength()
5435 void append_011()
5437 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5438 OString expVal( aStrBuf.getStr() );
5439 sal_Int32 input = kSInt8Max;
5440 sal_Int16 radix = 2;
5442 expVal += OString( "1111111" );
5443 aStrBuf.append( input, radix );
5445 CPPUNIT_ASSERT_MESSAGE
5447 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
5448 aStrBuf.getStr()== expVal &&
5449 aStrBuf.getLength() == expVal.getLength()
5454 void append_012()
5456 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5457 OString expVal( aStrBuf.getStr() );
5458 sal_Int32 input = kSInt32Max;
5459 sal_Int16 radix = 2;
5461 expVal += OString( "1111111111111111111111111111111" );
5462 aStrBuf.append( input, radix );
5464 CPPUNIT_ASSERT_MESSAGE
5466 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
5467 aStrBuf.getStr()== expVal &&
5468 aStrBuf.getLength() == expVal.getLength()
5473 void append_013()
5475 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5476 OString expVal( aStrBuf.getStr() );
5477 sal_Int32 input = kSInt8Max;
5478 sal_Int16 radix = 8;
5480 expVal += OString( "177" );
5481 aStrBuf.append( input, radix );
5483 CPPUNIT_ASSERT_MESSAGE
5485 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
5486 aStrBuf.getStr()== expVal &&
5487 aStrBuf.getLength() == expVal.getLength()
5492 void append_014()
5494 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5495 OString expVal( aStrBuf.getStr() );
5496 sal_Int32 input = kSInt32Max;
5497 sal_Int16 radix = 8;
5499 expVal += OString( "17777777777" );
5500 aStrBuf.append( input, radix );
5502 CPPUNIT_ASSERT_MESSAGE
5504 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
5505 aStrBuf.getStr()== expVal &&
5506 aStrBuf.getLength() == expVal.getLength()
5511 void append_015()
5513 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5514 OString expVal( aStrBuf.getStr() );
5515 sal_Int32 input = kSInt8Max;
5516 sal_Int16 radix = 10;
5518 expVal += OString( "127" );
5519 aStrBuf.append( input, radix );
5521 CPPUNIT_ASSERT_MESSAGE
5523 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
5524 aStrBuf.getStr()== expVal &&
5525 aStrBuf.getLength() == expVal.getLength()
5530 void append_016()
5532 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5533 OString expVal( aStrBuf.getStr() );
5534 sal_Int32 input = kSInt32Max;
5535 sal_Int16 radix = 10;
5537 expVal += OString( "2147483647" );
5538 aStrBuf.append( input, radix );
5540 CPPUNIT_ASSERT_MESSAGE
5542 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
5543 aStrBuf.getStr()== expVal &&
5544 aStrBuf.getLength() == expVal.getLength()
5549 void append_017()
5551 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5552 OString expVal( aStrBuf.getStr() );
5553 sal_Int32 input = kSInt8Max;
5554 sal_Int16 radix = 16;
5556 expVal += OString( "7f" );
5557 aStrBuf.append( input, radix );
5559 CPPUNIT_ASSERT_MESSAGE
5561 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
5562 aStrBuf.getStr()== expVal &&
5563 aStrBuf.getLength() == expVal.getLength()
5568 void append_018()
5570 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5571 OString expVal( aStrBuf.getStr() );
5572 sal_Int32 input = kSInt32Max;
5573 sal_Int16 radix = 16;
5575 expVal += OString( "7fffffff" );
5576 aStrBuf.append( input, radix );
5578 CPPUNIT_ASSERT_MESSAGE
5580 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
5581 aStrBuf.getStr()== expVal &&
5582 aStrBuf.getLength() == expVal.getLength()
5587 void append_019()
5589 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5590 OString expVal( aStrBuf.getStr() );
5591 sal_Int32 input = kSInt8Max;
5592 sal_Int16 radix = 36;
5594 expVal += OString( "3j" );
5595 aStrBuf.append( input, radix );
5597 CPPUNIT_ASSERT_MESSAGE
5599 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
5600 aStrBuf.getStr()== expVal &&
5601 aStrBuf.getLength() == expVal.getLength()
5606 void append_020()
5608 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
5609 OString expVal( aStrBuf.getStr() );
5610 sal_Int32 input = kSInt32Max;
5611 sal_Int16 radix = 36;
5613 expVal += OString( "zik0zj" );
5614 aStrBuf.append( input, radix );
5616 CPPUNIT_ASSERT_MESSAGE
5618 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
5619 aStrBuf.getStr()== expVal &&
5620 aStrBuf.getLength() == expVal.getLength()
5625 void append_021()
5627 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5628 OString expVal( aStrBuf.getStr() );
5629 sal_Int32 input = kSInt8Max;
5630 sal_Int16 radix = 2;
5632 expVal += OString( "1111111" );
5633 aStrBuf.append( input, radix );
5635 CPPUNIT_ASSERT_MESSAGE
5637 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
5638 aStrBuf.getStr()== expVal &&
5639 aStrBuf.getLength() == expVal.getLength()
5644 void append_022()
5646 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5647 OString expVal( aStrBuf.getStr() );
5648 sal_Int32 input = kSInt32Max;
5649 sal_Int16 radix = 2;
5651 expVal += OString( "1111111111111111111111111111111" );
5652 aStrBuf.append( input, radix );
5654 CPPUNIT_ASSERT_MESSAGE
5656 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
5657 aStrBuf.getStr()== expVal &&
5658 aStrBuf.getLength() == expVal.getLength()
5663 void append_023()
5665 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5666 OString expVal( aStrBuf.getStr() );
5667 sal_Int32 input = kSInt8Max;
5668 sal_Int16 radix = 8;
5670 expVal += OString( "177" );
5671 aStrBuf.append( input, radix );
5673 CPPUNIT_ASSERT_MESSAGE
5675 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
5676 aStrBuf.getStr()== expVal &&
5677 aStrBuf.getLength() == expVal.getLength()
5682 void append_024()
5684 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5685 OString expVal( aStrBuf.getStr() );
5686 sal_Int32 input = kSInt32Max;
5687 sal_Int16 radix = 8;
5689 expVal += OString( "17777777777" );
5690 aStrBuf.append( input, radix );
5692 CPPUNIT_ASSERT_MESSAGE
5694 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
5695 aStrBuf.getStr()== expVal &&
5696 aStrBuf.getLength() == expVal.getLength()
5701 void append_025()
5703 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5704 OString expVal( aStrBuf.getStr() );
5705 sal_Int32 input = kSInt8Max;
5706 sal_Int16 radix = 10;
5708 expVal += OString( "127" );
5709 aStrBuf.append( input, radix );
5711 CPPUNIT_ASSERT_MESSAGE
5713 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
5714 aStrBuf.getStr()== expVal &&
5715 aStrBuf.getLength() == expVal.getLength()
5720 void append_026()
5722 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5723 OString expVal( aStrBuf.getStr() );
5724 sal_Int32 input = kSInt32Max;
5725 sal_Int16 radix = 10;
5727 expVal += OString( "2147483647" );
5728 aStrBuf.append( input, radix );
5730 CPPUNIT_ASSERT_MESSAGE
5732 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
5733 aStrBuf.getStr()== expVal &&
5734 aStrBuf.getLength() == expVal.getLength()
5739 void append_027()
5741 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5742 OString expVal( aStrBuf.getStr() );
5743 sal_Int32 input = kSInt8Max;
5744 sal_Int16 radix = 16;
5746 expVal += OString( "7f" );
5747 aStrBuf.append( input, radix );
5749 CPPUNIT_ASSERT_MESSAGE
5751 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
5752 aStrBuf.getStr()== expVal &&
5753 aStrBuf.getLength() == expVal.getLength()
5758 void append_028()
5760 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5761 OString expVal( aStrBuf.getStr() );
5762 sal_Int32 input = kSInt32Max;
5763 sal_Int16 radix = 16;
5765 expVal += OString( "7fffffff" );
5766 aStrBuf.append( input, radix );
5768 CPPUNIT_ASSERT_MESSAGE
5770 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
5771 aStrBuf.getStr()== expVal &&
5772 aStrBuf.getLength() == expVal.getLength()
5777 void append_029()
5779 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5780 OString expVal( aStrBuf.getStr() );
5781 sal_Int32 input = kSInt8Max;
5782 sal_Int16 radix = 36;
5784 expVal += OString( "3j" );
5785 aStrBuf.append( input, radix );
5787 CPPUNIT_ASSERT_MESSAGE
5789 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
5790 aStrBuf.getStr()== expVal &&
5791 aStrBuf.getLength() == expVal.getLength()
5796 void append_030()
5798 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
5799 OString expVal( aStrBuf.getStr() );
5800 sal_Int32 input = kSInt32Max;
5801 sal_Int16 radix = 36;
5803 expVal += OString( "zik0zj" );
5804 aStrBuf.append( input, radix );
5806 CPPUNIT_ASSERT_MESSAGE
5808 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
5809 aStrBuf.getStr()== expVal &&
5810 aStrBuf.getLength() == expVal.getLength()
5815 void append_031()
5817 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5818 OString expVal( aStrBuf.getStr() );
5819 sal_Int32 input = kSInt8Max;
5820 sal_Int16 radix = 2;
5822 expVal += OString( "1111111" );
5823 aStrBuf.append( input, radix );
5825 CPPUNIT_ASSERT_MESSAGE
5827 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
5828 aStrBuf.getStr()== expVal &&
5829 aStrBuf.getLength() == expVal.getLength()
5834 void append_032()
5836 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5837 OString expVal( aStrBuf.getStr() );
5838 sal_Int32 input = kSInt32Max;
5839 sal_Int16 radix = 2;
5841 expVal += OString( "1111111111111111111111111111111" );
5842 aStrBuf.append( input, radix );
5844 CPPUNIT_ASSERT_MESSAGE
5846 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
5847 aStrBuf.getStr()== expVal &&
5848 aStrBuf.getLength() == expVal.getLength()
5853 void append_033()
5855 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5856 OString expVal( aStrBuf.getStr() );
5857 sal_Int32 input = kSInt8Max;
5858 sal_Int16 radix = 8;
5860 expVal += OString( "177" );
5861 aStrBuf.append( input, radix );
5863 CPPUNIT_ASSERT_MESSAGE
5865 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
5866 aStrBuf.getStr()== expVal &&
5867 aStrBuf.getLength() == expVal.getLength()
5872 void append_034()
5874 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5875 OString expVal( aStrBuf.getStr() );
5876 sal_Int32 input = kSInt32Max;
5877 sal_Int16 radix = 8;
5879 expVal += OString( "17777777777" );
5880 aStrBuf.append( input, radix );
5882 CPPUNIT_ASSERT_MESSAGE
5884 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
5885 aStrBuf.getStr()== expVal &&
5886 aStrBuf.getLength() == expVal.getLength()
5891 void append_035()
5893 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5894 OString expVal( aStrBuf.getStr() );
5895 sal_Int32 input = kSInt8Max;
5896 sal_Int16 radix = 10;
5898 expVal += OString( "127" );
5899 aStrBuf.append( input, radix );
5901 CPPUNIT_ASSERT_MESSAGE
5903 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
5904 aStrBuf.getStr()== expVal &&
5905 aStrBuf.getLength() == expVal.getLength()
5910 void append_036()
5912 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5913 OString expVal( aStrBuf.getStr() );
5914 sal_Int32 input = kSInt32Max;
5915 sal_Int16 radix = 10;
5917 expVal += OString( "2147483647" );
5918 aStrBuf.append( input, radix );
5920 CPPUNIT_ASSERT_MESSAGE
5922 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
5923 aStrBuf.getStr()== expVal &&
5924 aStrBuf.getLength() == expVal.getLength()
5929 void append_037()
5931 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5932 OString expVal( aStrBuf.getStr() );
5933 sal_Int32 input = kSInt8Max;
5934 sal_Int16 radix = 16;
5936 expVal += OString( "7f" );
5937 aStrBuf.append( input, radix );
5939 CPPUNIT_ASSERT_MESSAGE
5941 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
5942 aStrBuf.getStr()== expVal &&
5943 aStrBuf.getLength() == expVal.getLength()
5948 void append_038()
5950 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5951 OString expVal( aStrBuf.getStr() );
5952 sal_Int32 input = kSInt32Max;
5953 sal_Int16 radix = 16;
5955 expVal += OString( "7fffffff" );
5956 aStrBuf.append( input, radix );
5958 CPPUNIT_ASSERT_MESSAGE
5960 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
5961 aStrBuf.getStr()== expVal &&
5962 aStrBuf.getLength() == expVal.getLength()
5967 void append_039()
5969 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5970 OString expVal( aStrBuf.getStr() );
5971 sal_Int32 input = kSInt8Max;
5972 sal_Int16 radix = 36;
5974 expVal += OString( "3j" );
5975 aStrBuf.append( input, radix );
5977 CPPUNIT_ASSERT_MESSAGE
5979 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
5980 aStrBuf.getStr()== expVal &&
5981 aStrBuf.getLength() == expVal.getLength()
5986 void append_040()
5988 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5989 OString expVal( aStrBuf.getStr() );
5990 sal_Int32 input = kSInt32Max;
5991 sal_Int16 radix = 36;
5993 expVal += OString( "zik0zj" );
5994 aStrBuf.append( input, radix );
5996 CPPUNIT_ASSERT_MESSAGE
5998 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
5999 aStrBuf.getStr()== expVal &&
6000 aStrBuf.getLength() == expVal.getLength()
6005 void append_041()
6007 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6008 OString expVal( aStrBuf.getStr() );
6009 sal_Int32 input = kSInt8Max;
6010 sal_Int16 radix = 2;
6012 expVal += OString( "1111111" );
6013 aStrBuf.append( input, radix );
6015 CPPUNIT_ASSERT_MESSAGE
6017 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
6018 aStrBuf.getStr()== expVal &&
6019 aStrBuf.getLength() == expVal.getLength()
6024 void append_042()
6026 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6027 OString expVal( aStrBuf.getStr() );
6028 sal_Int32 input = kSInt32Max;
6029 sal_Int16 radix = 2;
6031 expVal += OString( "1111111111111111111111111111111" );
6032 aStrBuf.append( input, radix );
6034 CPPUNIT_ASSERT_MESSAGE
6036 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
6037 aStrBuf.getStr()== expVal &&
6038 aStrBuf.getLength() == expVal.getLength()
6043 void append_043()
6045 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6046 OString expVal( aStrBuf.getStr() );
6047 sal_Int32 input = kSInt8Max;
6048 sal_Int16 radix = 8;
6050 expVal += OString( "177" );
6051 aStrBuf.append( input, radix );
6053 CPPUNIT_ASSERT_MESSAGE
6055 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
6056 aStrBuf.getStr()== expVal &&
6057 aStrBuf.getLength() == expVal.getLength()
6062 void append_044()
6064 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6065 OString expVal( aStrBuf.getStr() );
6066 sal_Int32 input = kSInt32Max;
6067 sal_Int16 radix = 8;
6069 expVal += OString( "17777777777" );
6070 aStrBuf.append( input, radix );
6072 CPPUNIT_ASSERT_MESSAGE
6074 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
6075 aStrBuf.getStr()== expVal &&
6076 aStrBuf.getLength() == expVal.getLength()
6081 void append_045()
6083 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6084 OString expVal( aStrBuf.getStr() );
6085 sal_Int32 input = kSInt8Max;
6086 sal_Int16 radix = 10;
6088 expVal += OString( "127" );
6089 aStrBuf.append( input, radix );
6091 CPPUNIT_ASSERT_MESSAGE
6093 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
6094 aStrBuf.getStr()== expVal &&
6095 aStrBuf.getLength() == expVal.getLength()
6100 void append_046()
6102 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6103 OString expVal( aStrBuf.getStr() );
6104 sal_Int32 input = kSInt32Max;
6105 sal_Int16 radix = 10;
6107 expVal += OString( "2147483647" );
6108 aStrBuf.append( input, radix );
6110 CPPUNIT_ASSERT_MESSAGE
6112 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
6113 aStrBuf.getStr()== expVal &&
6114 aStrBuf.getLength() == expVal.getLength()
6119 void append_047()
6121 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6122 OString expVal( aStrBuf.getStr() );
6123 sal_Int32 input = kSInt8Max;
6124 sal_Int16 radix = 16;
6126 expVal += OString( "7f" );
6127 aStrBuf.append( input, radix );
6129 CPPUNIT_ASSERT_MESSAGE
6131 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
6132 aStrBuf.getStr()== expVal &&
6133 aStrBuf.getLength() == expVal.getLength()
6138 void append_048()
6140 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6141 OString expVal( aStrBuf.getStr() );
6142 sal_Int32 input = kSInt32Max;
6143 sal_Int16 radix = 16;
6145 expVal += OString( "7fffffff" );
6146 aStrBuf.append( input, radix );
6148 CPPUNIT_ASSERT_MESSAGE
6150 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
6151 aStrBuf.getStr()== expVal &&
6152 aStrBuf.getLength() == expVal.getLength()
6157 void append_049()
6159 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6160 OString expVal( aStrBuf.getStr() );
6161 sal_Int32 input = kSInt8Max;
6162 sal_Int16 radix = 36;
6164 expVal += OString( "3j" );
6165 aStrBuf.append( input, radix );
6167 CPPUNIT_ASSERT_MESSAGE
6169 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
6170 aStrBuf.getStr()== expVal &&
6171 aStrBuf.getLength() == expVal.getLength()
6176 void append_050()
6178 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6179 OString expVal( aStrBuf.getStr() );
6180 sal_Int32 input = kSInt32Max;
6181 sal_Int16 radix = 36;
6183 expVal += OString( "zik0zj" );
6184 aStrBuf.append( input, radix );
6186 CPPUNIT_ASSERT_MESSAGE
6188 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
6189 aStrBuf.getStr()== expVal &&
6190 aStrBuf.getLength() == expVal.getLength()
6195 SAL_CPPUNIT_TEST_SUITE( append_006_Int32_Bounderies );
6196 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
6197 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
6198 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
6199 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
6200 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
6201 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
6202 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
6203 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
6204 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
6205 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
6206 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
6207 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
6208 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
6209 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
6210 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
6211 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
6212 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
6213 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
6214 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
6215 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
6216 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
6217 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
6218 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
6219 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
6220 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
6221 SAL_CPPUNIT_TEST_SUITE_END();
6223 //------------------------------------------------------------------------
6224 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
6225 // for negative value
6226 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
6227 // for negative value
6228 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
6229 // for negative value
6230 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
6231 // for negative value
6232 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
6233 // for negative value
6234 //------------------------------------------------------------------------
6235 class append_006_Int32_Negative : public CppUnit::TestFixture
6237 OString* arrOUS[5];
6239 public:
6240 void setUp()
6242 arrOUS[0] = new OString( kTestStr7 );
6243 arrOUS[1] = new OString( );
6244 arrOUS[2] = new OString( kTestStr25 );
6245 arrOUS[3] = new OString( "" );
6246 arrOUS[4] = new OString( kTestStr28 );
6250 void tearDown()
6252 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
6253 delete arrOUS[3]; delete arrOUS[4];
6256 void append_001()
6258 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6259 OString expVal( aStrBuf.getStr() );
6260 sal_Int32 input = -0;
6261 sal_Int16 radix = 2;
6263 expVal += OString( "0" );
6264 aStrBuf.append( input, radix );
6266 CPPUNIT_ASSERT_MESSAGE
6268 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6269 aStrBuf.getStr()== expVal &&
6270 aStrBuf.getLength() == expVal.getLength()
6275 void append_002()
6277 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6278 OString expVal( aStrBuf.getStr() );
6279 sal_Int32 input = -4;
6280 sal_Int16 radix = 2;
6282 expVal += OString( "-" );
6283 expVal += OString( "100" );
6284 aStrBuf.append( input, radix );
6286 CPPUNIT_ASSERT_MESSAGE
6288 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6289 aStrBuf.getStr()== expVal &&
6290 aStrBuf.getLength() == expVal.getLength()
6295 void append_003()
6297 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6298 OString expVal( aStrBuf.getStr() );
6299 sal_Int32 input = -8;
6300 sal_Int16 radix = 2;
6302 expVal += OString( "-" );
6303 expVal += OString( "1000" );
6304 aStrBuf.append( input, radix );
6306 CPPUNIT_ASSERT_MESSAGE
6308 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6309 aStrBuf.getStr()== expVal &&
6310 aStrBuf.getLength() == expVal.getLength()
6315 void append_004()
6317 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6318 OString expVal( aStrBuf.getStr() );
6319 sal_Int32 input = -15;
6320 sal_Int16 radix = 2;
6322 expVal += OString( "-" );
6323 expVal += OString( "1111" );
6324 aStrBuf.append( input, radix );
6326 CPPUNIT_ASSERT_MESSAGE
6328 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6329 aStrBuf.getStr()== expVal &&
6330 aStrBuf.getLength() == expVal.getLength()
6335 void append_005()
6337 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6338 OString expVal( aStrBuf.getStr() );
6339 sal_Int32 input = -0;
6340 sal_Int16 radix = 8;
6342 expVal += OString( "0" );
6343 aStrBuf.append( input, radix );
6345 CPPUNIT_ASSERT_MESSAGE
6347 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6348 aStrBuf.getStr()== expVal &&
6349 aStrBuf.getLength() == expVal.getLength()
6354 void append_006()
6356 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6357 OString expVal( aStrBuf.getStr() );
6358 sal_Int32 input = -4;
6359 sal_Int16 radix = 8;
6361 expVal += OString( "-" );
6362 expVal += OString( "4" );
6363 aStrBuf.append( input, radix );
6365 CPPUNIT_ASSERT_MESSAGE
6367 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6368 aStrBuf.getStr()== expVal &&
6369 aStrBuf.getLength() == expVal.getLength()
6374 void append_007()
6376 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6377 OString expVal( aStrBuf.getStr() );
6378 sal_Int32 input = -8;
6379 sal_Int16 radix = 8;
6381 expVal += OString( "-" );
6382 expVal += OString( "10" );
6383 aStrBuf.append( input, radix );
6385 CPPUNIT_ASSERT_MESSAGE
6387 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6388 aStrBuf.getStr()== expVal &&
6389 aStrBuf.getLength() == expVal.getLength()
6394 void append_008()
6396 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6397 OString expVal( aStrBuf.getStr() );
6398 sal_Int32 input = -15;
6399 sal_Int16 radix = 8;
6401 expVal += OString( "-" );
6402 expVal += OString( "17" );
6403 aStrBuf.append( input, radix );
6405 CPPUNIT_ASSERT_MESSAGE
6407 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6408 aStrBuf.getStr()== expVal &&
6409 aStrBuf.getLength() == expVal.getLength()
6414 void append_009()
6416 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6417 OString expVal( aStrBuf.getStr() );
6418 sal_Int32 input = -0;
6419 sal_Int16 radix = 10;
6421 expVal += OString( "0" );
6422 aStrBuf.append( input, radix );
6424 CPPUNIT_ASSERT_MESSAGE
6426 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6427 aStrBuf.getStr()== expVal &&
6428 aStrBuf.getLength() == expVal.getLength()
6433 void append_010()
6435 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6436 OString expVal( aStrBuf.getStr() );
6437 sal_Int32 input = -4;
6438 sal_Int16 radix = 10;
6440 expVal += OString( "-" );
6441 expVal += OString( "4" );
6442 aStrBuf.append( input, radix );
6444 CPPUNIT_ASSERT_MESSAGE
6446 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6447 aStrBuf.getStr()== expVal &&
6448 aStrBuf.getLength() == expVal.getLength()
6453 void append_011()
6455 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6456 OString expVal( aStrBuf.getStr() );
6457 sal_Int32 input = -8;
6458 sal_Int16 radix = 10;
6460 expVal += OString( "-" );
6461 expVal += OString( "8" );
6462 aStrBuf.append( input, radix );
6464 CPPUNIT_ASSERT_MESSAGE
6466 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6467 aStrBuf.getStr()== expVal &&
6468 aStrBuf.getLength() == expVal.getLength()
6473 void append_012()
6475 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6476 OString expVal( aStrBuf.getStr() );
6477 sal_Int32 input = -15;
6478 sal_Int16 radix = 10;
6480 expVal += OString( "-" );
6481 expVal += OString( "15" );
6482 aStrBuf.append( input, radix );
6484 CPPUNIT_ASSERT_MESSAGE
6486 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6487 aStrBuf.getStr()== expVal &&
6488 aStrBuf.getLength() == expVal.getLength()
6493 void append_013()
6495 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6496 OString expVal( aStrBuf.getStr() );
6497 sal_Int32 input = -0;
6498 sal_Int16 radix = 16;
6500 expVal += OString( "0" );
6501 aStrBuf.append( input, radix );
6503 CPPUNIT_ASSERT_MESSAGE
6505 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6506 aStrBuf.getStr()== expVal &&
6507 aStrBuf.getLength() == expVal.getLength()
6512 void append_014()
6514 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6515 OString expVal( aStrBuf.getStr() );
6516 sal_Int32 input = -4;
6517 sal_Int16 radix = 16;
6519 expVal += OString( "-" );
6520 expVal += OString( "4" );
6521 aStrBuf.append( input, radix );
6523 CPPUNIT_ASSERT_MESSAGE
6525 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6526 aStrBuf.getStr()== expVal &&
6527 aStrBuf.getLength() == expVal.getLength()
6532 void append_015()
6534 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6535 OString expVal( aStrBuf.getStr() );
6536 sal_Int32 input = -8;
6537 sal_Int16 radix = 16;
6539 expVal += OString( "-" );
6540 expVal += OString( "8" );
6541 aStrBuf.append( input, radix );
6543 CPPUNIT_ASSERT_MESSAGE
6545 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6546 aStrBuf.getStr()== expVal &&
6547 aStrBuf.getLength() == expVal.getLength()
6552 void append_016()
6554 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6555 OString expVal( aStrBuf.getStr() );
6556 sal_Int32 input = -15;
6557 sal_Int16 radix = 16;
6559 expVal += OString( "-" );
6560 expVal += OString( "f" );
6561 aStrBuf.append( input, radix );
6563 CPPUNIT_ASSERT_MESSAGE
6565 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6566 aStrBuf.getStr()== expVal &&
6567 aStrBuf.getLength() == expVal.getLength()
6572 void append_017()
6574 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6575 OString expVal( aStrBuf.getStr() );
6576 sal_Int32 input = -0;
6577 sal_Int16 radix = 36;
6579 expVal += OString( "0" );
6580 aStrBuf.append( input, radix );
6582 CPPUNIT_ASSERT_MESSAGE
6584 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6585 aStrBuf.getStr()== expVal &&
6586 aStrBuf.getLength() == expVal.getLength()
6591 void append_018()
6593 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6594 OString expVal( aStrBuf.getStr() );
6595 sal_Int32 input = -4;
6596 sal_Int16 radix = 36;
6598 expVal += OString( "-" );
6599 expVal += OString( "4" );
6600 aStrBuf.append( input, radix );
6602 CPPUNIT_ASSERT_MESSAGE
6604 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6605 aStrBuf.getStr()== expVal &&
6606 aStrBuf.getLength() == expVal.getLength()
6611 void append_019()
6613 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6614 OString expVal( aStrBuf.getStr() );
6615 sal_Int32 input = -8;
6616 sal_Int16 radix = 36;
6618 expVal += OString( "-" );
6619 expVal += OString( "8" );
6620 aStrBuf.append( input, radix );
6622 CPPUNIT_ASSERT_MESSAGE
6624 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6625 aStrBuf.getStr()== expVal &&
6626 aStrBuf.getLength() == expVal.getLength()
6631 void append_020()
6633 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6634 OString expVal( aStrBuf.getStr() );
6635 sal_Int32 input = -35;
6636 sal_Int16 radix = 36;
6638 expVal += OString( "-" );
6639 expVal += OString( "z" );
6640 aStrBuf.append( input, radix );
6642 CPPUNIT_ASSERT_MESSAGE
6644 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6645 aStrBuf.getStr()== expVal &&
6646 aStrBuf.getLength() == expVal.getLength()
6651 void append_021()
6653 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6654 OString expVal( aStrBuf.getStr() );
6655 sal_Int32 input = -0;
6656 sal_Int16 radix = 2;
6658 expVal += OString( "0" );
6659 aStrBuf.append( input, radix );
6661 CPPUNIT_ASSERT_MESSAGE
6663 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6664 aStrBuf.getStr()== expVal &&
6665 aStrBuf.getLength() == expVal.getLength()
6670 void append_022()
6672 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6673 OString expVal( aStrBuf.getStr() );
6674 sal_Int32 input = -4;
6675 sal_Int16 radix = 2;
6677 expVal += OString( "-" );
6678 expVal += OString( "100" );
6679 aStrBuf.append( input, radix );
6681 CPPUNIT_ASSERT_MESSAGE
6683 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6684 aStrBuf.getStr()== expVal &&
6685 aStrBuf.getLength() == expVal.getLength()
6690 void append_023()
6692 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6693 OString expVal( aStrBuf.getStr() );
6694 sal_Int32 input = -8;
6695 sal_Int16 radix = 2;
6697 expVal += OString( "-" );
6698 expVal += OString( "1000" );
6699 aStrBuf.append( input, radix );
6701 CPPUNIT_ASSERT_MESSAGE
6703 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6704 aStrBuf.getStr()== expVal &&
6705 aStrBuf.getLength() == expVal.getLength()
6710 void append_024()
6712 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6713 OString expVal( aStrBuf.getStr() );
6714 sal_Int32 input = -15;
6715 sal_Int16 radix = 2;
6717 expVal += OString( "-" );
6718 expVal += OString( "1111" );
6719 aStrBuf.append( input, radix );
6721 CPPUNIT_ASSERT_MESSAGE
6723 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6724 aStrBuf.getStr()== expVal &&
6725 aStrBuf.getLength() == expVal.getLength()
6730 void append_025()
6732 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6733 OString expVal( aStrBuf.getStr() );
6734 sal_Int32 input = -0;
6735 sal_Int16 radix = 8;
6737 expVal += OString( "0" );
6738 aStrBuf.append( input, radix );
6740 CPPUNIT_ASSERT_MESSAGE
6742 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6743 aStrBuf.getStr()== expVal &&
6744 aStrBuf.getLength() == expVal.getLength()
6749 void append_026()
6751 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6752 OString expVal( aStrBuf.getStr() );
6753 sal_Int32 input = -4;
6754 sal_Int16 radix = 8;
6756 expVal += OString( "-" );
6757 expVal += OString( "4" );
6758 aStrBuf.append( input, radix );
6760 CPPUNIT_ASSERT_MESSAGE
6762 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6763 aStrBuf.getStr()== expVal &&
6764 aStrBuf.getLength() == expVal.getLength()
6769 void append_027()
6771 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6772 OString expVal( aStrBuf.getStr() );
6773 sal_Int32 input = -8;
6774 sal_Int16 radix = 8;
6776 expVal += OString( "-" );
6777 expVal += OString( "10" );
6778 aStrBuf.append( input, radix );
6780 CPPUNIT_ASSERT_MESSAGE
6782 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6783 aStrBuf.getStr()== expVal &&
6784 aStrBuf.getLength() == expVal.getLength()
6789 void append_028()
6791 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6792 OString expVal( aStrBuf.getStr() );
6793 sal_Int32 input = -15;
6794 sal_Int16 radix = 8;
6796 expVal += OString( "-" );
6797 expVal += OString( "17" );
6798 aStrBuf.append( input, radix );
6800 CPPUNIT_ASSERT_MESSAGE
6802 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6803 aStrBuf.getStr()== expVal &&
6804 aStrBuf.getLength() == expVal.getLength()
6809 void append_029()
6811 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6812 OString expVal( aStrBuf.getStr() );
6813 sal_Int32 input = -0;
6814 sal_Int16 radix = 10;
6816 expVal += OString( "0" );
6817 aStrBuf.append( input, radix );
6819 CPPUNIT_ASSERT_MESSAGE
6821 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6822 aStrBuf.getStr()== expVal &&
6823 aStrBuf.getLength() == expVal.getLength()
6828 void append_030()
6830 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6831 OString expVal( aStrBuf.getStr() );
6832 sal_Int32 input = -4;
6833 sal_Int16 radix = 10;
6835 expVal += OString( "-" );
6836 expVal += OString( "4" );
6837 aStrBuf.append( input, radix );
6839 CPPUNIT_ASSERT_MESSAGE
6841 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6842 aStrBuf.getStr()== expVal &&
6843 aStrBuf.getLength() == expVal.getLength()
6848 void append_031()
6850 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6851 OString expVal( aStrBuf.getStr() );
6852 sal_Int32 input = -8;
6853 sal_Int16 radix = 10;
6855 expVal += OString( "-" );
6856 expVal += OString( "8" );
6857 aStrBuf.append( input, radix );
6859 CPPUNIT_ASSERT_MESSAGE
6861 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6862 aStrBuf.getStr()== expVal &&
6863 aStrBuf.getLength() == expVal.getLength()
6868 void append_032()
6870 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6871 OString expVal( aStrBuf.getStr() );
6872 sal_Int32 input = -15;
6873 sal_Int16 radix = 10;
6875 expVal += OString( "-" );
6876 expVal += OString( "15" );
6877 aStrBuf.append( input, radix );
6879 CPPUNIT_ASSERT_MESSAGE
6881 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6882 aStrBuf.getStr()== expVal &&
6883 aStrBuf.getLength() == expVal.getLength()
6888 void append_033()
6890 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6891 OString expVal( aStrBuf.getStr() );
6892 sal_Int32 input = -0;
6893 sal_Int16 radix = 16;
6895 expVal += OString( "0" );
6896 aStrBuf.append( input, radix );
6898 CPPUNIT_ASSERT_MESSAGE
6900 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6901 aStrBuf.getStr()== expVal &&
6902 aStrBuf.getLength() == expVal.getLength()
6907 void append_034()
6909 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6910 OString expVal( aStrBuf.getStr() );
6911 sal_Int32 input = -4;
6912 sal_Int16 radix = 16;
6914 expVal += OString( "-" );
6915 expVal += OString( "4" );
6916 aStrBuf.append( input, radix );
6918 CPPUNIT_ASSERT_MESSAGE
6920 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6921 aStrBuf.getStr()== expVal &&
6922 aStrBuf.getLength() == expVal.getLength()
6927 void append_035()
6929 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6930 OString expVal( aStrBuf.getStr() );
6931 sal_Int32 input = -8;
6932 sal_Int16 radix = 16;
6934 expVal += OString( "-" );
6935 expVal += OString( "8" );
6936 aStrBuf.append( input, radix );
6938 CPPUNIT_ASSERT_MESSAGE
6940 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6941 aStrBuf.getStr()== expVal &&
6942 aStrBuf.getLength() == expVal.getLength()
6947 void append_036()
6949 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6950 OString expVal( aStrBuf.getStr() );
6951 sal_Int32 input = -15;
6952 sal_Int16 radix = 16;
6954 expVal += OString( "-" );
6955 expVal += OString( "f" );
6956 aStrBuf.append( input, radix );
6958 CPPUNIT_ASSERT_MESSAGE
6960 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6961 aStrBuf.getStr()== expVal &&
6962 aStrBuf.getLength() == expVal.getLength()
6967 void append_037()
6969 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6970 OString expVal( aStrBuf.getStr() );
6971 sal_Int32 input = -0;
6972 sal_Int16 radix = 36;
6974 expVal += OString( "0" );
6975 aStrBuf.append( input, radix );
6977 CPPUNIT_ASSERT_MESSAGE
6979 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6980 aStrBuf.getStr()== expVal &&
6981 aStrBuf.getLength() == expVal.getLength()
6986 void append_038()
6988 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6989 OString expVal( aStrBuf.getStr() );
6990 sal_Int32 input = -4;
6991 sal_Int16 radix = 36;
6993 expVal += OString( "-" );
6994 expVal += OString( "4" );
6995 aStrBuf.append( input, radix );
6997 CPPUNIT_ASSERT_MESSAGE
6999 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7000 aStrBuf.getStr()== expVal &&
7001 aStrBuf.getLength() == expVal.getLength()
7006 void append_039()
7008 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7009 OString expVal( aStrBuf.getStr() );
7010 sal_Int32 input = -8;
7011 sal_Int16 radix = 36;
7013 expVal += OString( "-" );
7014 expVal += OString( "8" );
7015 aStrBuf.append( input, radix );
7017 CPPUNIT_ASSERT_MESSAGE
7019 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7020 aStrBuf.getStr()== expVal &&
7021 aStrBuf.getLength() == expVal.getLength()
7026 void append_040()
7028 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7029 OString expVal( aStrBuf.getStr() );
7030 sal_Int32 input = -35;
7031 sal_Int16 radix = 36;
7033 expVal += OString( "-" );
7034 expVal += OString( "z" );
7035 aStrBuf.append( input, radix );
7037 CPPUNIT_ASSERT_MESSAGE
7039 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7040 aStrBuf.getStr()== expVal &&
7041 aStrBuf.getLength() == expVal.getLength()
7046 void append_041()
7048 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7049 OString expVal( aStrBuf.getStr() );
7050 sal_Int32 input = -0;
7051 sal_Int16 radix = 2;
7053 expVal += OString( "0" );
7054 aStrBuf.append( input, radix );
7056 CPPUNIT_ASSERT_MESSAGE
7058 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7059 aStrBuf.getStr()== expVal &&
7060 aStrBuf.getLength() == expVal.getLength()
7065 void append_042()
7067 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7068 OString expVal( aStrBuf.getStr() );
7069 sal_Int32 input = -4;
7070 sal_Int16 radix = 2;
7072 expVal += OString( "-" );
7073 expVal += OString( "100" );
7074 aStrBuf.append( input, radix );
7076 CPPUNIT_ASSERT_MESSAGE
7078 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7079 aStrBuf.getStr()== expVal &&
7080 aStrBuf.getLength() == expVal.getLength()
7085 void append_043()
7087 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7088 OString expVal( aStrBuf.getStr() );
7089 sal_Int32 input = -8;
7090 sal_Int16 radix = 2;
7092 expVal += OString( "-" );
7093 expVal += OString( "1000" );
7094 aStrBuf.append( input, radix );
7096 CPPUNIT_ASSERT_MESSAGE
7098 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7099 aStrBuf.getStr()== expVal &&
7100 aStrBuf.getLength() == expVal.getLength()
7105 void append_044()
7107 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7108 OString expVal( aStrBuf.getStr() );
7109 sal_Int32 input = -15;
7110 sal_Int16 radix = 2;
7112 expVal += OString( "-" );
7113 expVal += OString( "1111" );
7114 aStrBuf.append( input, radix );
7116 CPPUNIT_ASSERT_MESSAGE
7118 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7119 aStrBuf.getStr()== expVal &&
7120 aStrBuf.getLength() == expVal.getLength()
7125 void append_045()
7127 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7128 OString expVal( aStrBuf.getStr() );
7129 sal_Int32 input = -0;
7130 sal_Int16 radix = 8;
7132 expVal += OString( "0" );
7133 aStrBuf.append( input, radix );
7135 CPPUNIT_ASSERT_MESSAGE
7137 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7138 aStrBuf.getStr()== expVal &&
7139 aStrBuf.getLength() == expVal.getLength()
7144 void append_046()
7146 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7147 OString expVal( aStrBuf.getStr() );
7148 sal_Int32 input = -4;
7149 sal_Int16 radix = 8;
7151 expVal += OString( "-" );
7152 expVal += OString( "4" );
7153 aStrBuf.append( input, radix );
7155 CPPUNIT_ASSERT_MESSAGE
7157 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7158 aStrBuf.getStr()== expVal &&
7159 aStrBuf.getLength() == expVal.getLength()
7164 void append_047()
7166 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7167 OString expVal( aStrBuf.getStr() );
7168 sal_Int32 input = -8;
7169 sal_Int16 radix = 8;
7171 expVal += OString( "-" );
7172 expVal += OString( "10" );
7173 aStrBuf.append( input, radix );
7175 CPPUNIT_ASSERT_MESSAGE
7177 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7178 aStrBuf.getStr()== expVal &&
7179 aStrBuf.getLength() == expVal.getLength()
7184 void append_048()
7186 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7187 OString expVal( aStrBuf.getStr() );
7188 sal_Int32 input = -15;
7189 sal_Int16 radix = 8;
7191 expVal += OString( "-" );
7192 expVal += OString( "17" );
7193 aStrBuf.append( input, radix );
7195 CPPUNIT_ASSERT_MESSAGE
7197 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7198 aStrBuf.getStr()== expVal &&
7199 aStrBuf.getLength() == expVal.getLength()
7204 void append_049()
7206 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7207 OString expVal( aStrBuf.getStr() );
7208 sal_Int32 input = -0;
7209 sal_Int16 radix = 10;
7211 expVal += OString( "0" );
7212 aStrBuf.append( input, radix );
7214 CPPUNIT_ASSERT_MESSAGE
7216 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7217 aStrBuf.getStr()== expVal &&
7218 aStrBuf.getLength() == expVal.getLength()
7223 void append_050()
7225 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7226 OString expVal( aStrBuf.getStr() );
7227 sal_Int32 input = -4;
7228 sal_Int16 radix = 10;
7230 expVal += OString( "-" );
7231 expVal += OString( "4" );
7232 aStrBuf.append( input, radix );
7234 CPPUNIT_ASSERT_MESSAGE
7236 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7237 aStrBuf.getStr()== expVal &&
7238 aStrBuf.getLength() == expVal.getLength()
7243 void append_051()
7245 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7246 OString expVal( aStrBuf.getStr() );
7247 sal_Int32 input = -8;
7248 sal_Int16 radix = 10;
7250 expVal += OString( "-" );
7251 expVal += OString( "8" );
7252 aStrBuf.append( input, radix );
7254 CPPUNIT_ASSERT_MESSAGE
7256 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7257 aStrBuf.getStr()== expVal &&
7258 aStrBuf.getLength() == expVal.getLength()
7263 void append_052()
7265 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7266 OString expVal( aStrBuf.getStr() );
7267 sal_Int32 input = -15;
7268 sal_Int16 radix = 10;
7270 expVal += OString( "-" );
7271 expVal += OString( "15" );
7272 aStrBuf.append( input, radix );
7274 CPPUNIT_ASSERT_MESSAGE
7276 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7277 aStrBuf.getStr()== expVal &&
7278 aStrBuf.getLength() == expVal.getLength()
7283 void append_053()
7285 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7286 OString expVal( aStrBuf.getStr() );
7287 sal_Int32 input = -0;
7288 sal_Int16 radix = 16;
7290 expVal += OString( "0" );
7291 aStrBuf.append( input, radix );
7293 CPPUNIT_ASSERT_MESSAGE
7295 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7296 aStrBuf.getStr()== expVal &&
7297 aStrBuf.getLength() == expVal.getLength()
7302 void append_054()
7304 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7305 OString expVal( aStrBuf.getStr() );
7306 sal_Int32 input = -4;
7307 sal_Int16 radix = 16;
7309 expVal += OString( "-" );
7310 expVal += OString( "4" );
7311 aStrBuf.append( input, radix );
7313 CPPUNIT_ASSERT_MESSAGE
7315 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7316 aStrBuf.getStr()== expVal &&
7317 aStrBuf.getLength() == expVal.getLength()
7322 void append_055()
7324 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7325 OString expVal( aStrBuf.getStr() );
7326 sal_Int32 input = -8;
7327 sal_Int16 radix = 16;
7329 expVal += OString( "-" );
7330 expVal += OString( "8" );
7331 aStrBuf.append( input, radix );
7333 CPPUNIT_ASSERT_MESSAGE
7335 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7336 aStrBuf.getStr()== expVal &&
7337 aStrBuf.getLength() == expVal.getLength()
7342 void append_056()
7344 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7345 OString expVal( aStrBuf.getStr() );
7346 sal_Int32 input = -15;
7347 sal_Int16 radix = 16;
7349 expVal += OString( "-" );
7350 expVal += OString( "f" );
7351 aStrBuf.append( input, radix );
7353 CPPUNIT_ASSERT_MESSAGE
7355 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7356 aStrBuf.getStr()== expVal &&
7357 aStrBuf.getLength() == expVal.getLength()
7362 void append_057()
7364 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7365 OString expVal( aStrBuf.getStr() );
7366 sal_Int32 input = -0;
7367 sal_Int16 radix = 36;
7369 expVal += OString( "0" );
7370 aStrBuf.append( input, radix );
7372 CPPUNIT_ASSERT_MESSAGE
7374 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7375 aStrBuf.getStr()== expVal &&
7376 aStrBuf.getLength() == expVal.getLength()
7381 void append_058()
7383 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7384 OString expVal( aStrBuf.getStr() );
7385 sal_Int32 input = -4;
7386 sal_Int16 radix = 36;
7388 expVal += OString( "-" );
7389 expVal += OString( "4" );
7390 aStrBuf.append( input, radix );
7392 CPPUNIT_ASSERT_MESSAGE
7394 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7395 aStrBuf.getStr()== expVal &&
7396 aStrBuf.getLength() == expVal.getLength()
7401 void append_059()
7403 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7404 OString expVal( aStrBuf.getStr() );
7405 sal_Int32 input = -8;
7406 sal_Int16 radix = 36;
7408 expVal += OString( "-" );
7409 expVal += OString( "8" );
7410 aStrBuf.append( input, radix );
7412 CPPUNIT_ASSERT_MESSAGE
7414 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7415 aStrBuf.getStr()== expVal &&
7416 aStrBuf.getLength() == expVal.getLength()
7421 void append_060()
7423 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7424 OString expVal( aStrBuf.getStr() );
7425 sal_Int32 input = -35;
7426 sal_Int16 radix = 36;
7428 expVal += OString( "-" );
7429 expVal += OString( "z" );
7430 aStrBuf.append( input, radix );
7432 CPPUNIT_ASSERT_MESSAGE
7434 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7435 aStrBuf.getStr()== expVal &&
7436 aStrBuf.getLength() == expVal.getLength()
7441 void append_061()
7443 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7444 OString expVal( aStrBuf.getStr() );
7445 sal_Int32 input = -0;
7446 sal_Int16 radix = 2;
7448 expVal += OString( "0" );
7449 aStrBuf.append( input, radix );
7451 CPPUNIT_ASSERT_MESSAGE
7453 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7454 aStrBuf.getStr()== expVal &&
7455 aStrBuf.getLength() == expVal.getLength()
7460 void append_062()
7462 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7463 OString expVal( aStrBuf.getStr() );
7464 sal_Int32 input = -4;
7465 sal_Int16 radix = 2;
7467 expVal += OString( "-" );
7468 expVal += OString( "100" );
7469 aStrBuf.append( input, radix );
7471 CPPUNIT_ASSERT_MESSAGE
7473 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7474 aStrBuf.getStr()== expVal &&
7475 aStrBuf.getLength() == expVal.getLength()
7480 void append_063()
7482 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7483 OString expVal( aStrBuf.getStr() );
7484 sal_Int32 input = -8;
7485 sal_Int16 radix = 2;
7487 expVal += OString( "-" );
7488 expVal += OString( "1000" );
7489 aStrBuf.append( input, radix );
7491 CPPUNIT_ASSERT_MESSAGE
7493 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7494 aStrBuf.getStr()== expVal &&
7495 aStrBuf.getLength() == expVal.getLength()
7500 void append_064()
7502 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7503 OString expVal( aStrBuf.getStr() );
7504 sal_Int32 input = -15;
7505 sal_Int16 radix = 2;
7507 expVal += OString( "-" );
7508 expVal += OString( "1111" );
7509 aStrBuf.append( input, radix );
7511 CPPUNIT_ASSERT_MESSAGE
7513 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7514 aStrBuf.getStr()== expVal &&
7515 aStrBuf.getLength() == expVal.getLength()
7520 void append_065()
7522 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7523 OString expVal( aStrBuf.getStr() );
7524 sal_Int32 input = -0;
7525 sal_Int16 radix = 8;
7527 expVal += OString( "0" );
7528 aStrBuf.append( input, radix );
7530 CPPUNIT_ASSERT_MESSAGE
7532 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7533 aStrBuf.getStr()== expVal &&
7534 aStrBuf.getLength() == expVal.getLength()
7539 void append_066()
7541 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7542 OString expVal( aStrBuf.getStr() );
7543 sal_Int32 input = -4;
7544 sal_Int16 radix = 8;
7546 expVal += OString( "-" );
7547 expVal += OString( "4" );
7548 aStrBuf.append( input, radix );
7550 CPPUNIT_ASSERT_MESSAGE
7552 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7553 aStrBuf.getStr()== expVal &&
7554 aStrBuf.getLength() == expVal.getLength()
7559 void append_067()
7561 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7562 OString expVal( aStrBuf.getStr() );
7563 sal_Int32 input = -8;
7564 sal_Int16 radix = 8;
7566 expVal += OString( "-" );
7567 expVal += OString( "10" );
7568 aStrBuf.append( input, radix );
7570 CPPUNIT_ASSERT_MESSAGE
7572 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7573 aStrBuf.getStr()== expVal &&
7574 aStrBuf.getLength() == expVal.getLength()
7579 void append_068()
7581 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7582 OString expVal( aStrBuf.getStr() );
7583 sal_Int32 input = -15;
7584 sal_Int16 radix = 8;
7586 expVal += OString( "-" );
7587 expVal += OString( "17" );
7588 aStrBuf.append( input, radix );
7590 CPPUNIT_ASSERT_MESSAGE
7592 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7593 aStrBuf.getStr()== expVal &&
7594 aStrBuf.getLength() == expVal.getLength()
7599 void append_069()
7601 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7602 OString expVal( aStrBuf.getStr() );
7603 sal_Int32 input = -0;
7604 sal_Int16 radix = 10;
7606 expVal += OString( "0" );
7607 aStrBuf.append( input, radix );
7609 CPPUNIT_ASSERT_MESSAGE
7611 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7612 aStrBuf.getStr()== expVal &&
7613 aStrBuf.getLength() == expVal.getLength()
7618 void append_070()
7620 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7621 OString expVal( aStrBuf.getStr() );
7622 sal_Int32 input = -4;
7623 sal_Int16 radix = 10;
7625 expVal += OString( "-" );
7626 expVal += OString( "4" );
7627 aStrBuf.append( input, radix );
7629 CPPUNIT_ASSERT_MESSAGE
7631 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7632 aStrBuf.getStr()== expVal &&
7633 aStrBuf.getLength() == expVal.getLength()
7638 void append_071()
7640 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7641 OString expVal( aStrBuf.getStr() );
7642 sal_Int32 input = -8;
7643 sal_Int16 radix = 10;
7645 expVal += OString( "-" );
7646 expVal += OString( "8" );
7647 aStrBuf.append( input, radix );
7649 CPPUNIT_ASSERT_MESSAGE
7651 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7652 aStrBuf.getStr()== expVal &&
7653 aStrBuf.getLength() == expVal.getLength()
7658 void append_072()
7660 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7661 OString expVal( aStrBuf.getStr() );
7662 sal_Int32 input = -15;
7663 sal_Int16 radix = 10;
7665 expVal += OString( "-" );
7666 expVal += OString( "15" );
7667 aStrBuf.append( input, radix );
7669 CPPUNIT_ASSERT_MESSAGE
7671 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7672 aStrBuf.getStr()== expVal &&
7673 aStrBuf.getLength() == expVal.getLength()
7678 void append_073()
7680 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7681 OString expVal( aStrBuf.getStr() );
7682 sal_Int32 input = -0;
7683 sal_Int16 radix = 16;
7685 expVal += OString( "0" );
7686 aStrBuf.append( input, radix );
7688 CPPUNIT_ASSERT_MESSAGE
7690 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7691 aStrBuf.getStr()== expVal &&
7692 aStrBuf.getLength() == expVal.getLength()
7697 void append_074()
7699 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7700 OString expVal( aStrBuf.getStr() );
7701 sal_Int32 input = -4;
7702 sal_Int16 radix = 16;
7704 expVal += OString( "-" );
7705 expVal += OString( "4" );
7706 aStrBuf.append( input, radix );
7708 CPPUNIT_ASSERT_MESSAGE
7710 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7711 aStrBuf.getStr()== expVal &&
7712 aStrBuf.getLength() == expVal.getLength()
7717 void append_075()
7719 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7720 OString expVal( aStrBuf.getStr() );
7721 sal_Int32 input = -8;
7722 sal_Int16 radix = 16;
7724 expVal += OString( "-" );
7725 expVal += OString( "8" );
7726 aStrBuf.append( input, radix );
7728 CPPUNIT_ASSERT_MESSAGE
7730 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7731 aStrBuf.getStr()== expVal &&
7732 aStrBuf.getLength() == expVal.getLength()
7737 void append_076()
7739 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7740 OString expVal( aStrBuf.getStr() );
7741 sal_Int32 input = -15;
7742 sal_Int16 radix = 16;
7744 expVal += OString( "-" );
7745 expVal += OString( "f" );
7746 aStrBuf.append( input, radix );
7748 CPPUNIT_ASSERT_MESSAGE
7750 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7751 aStrBuf.getStr()== expVal &&
7752 aStrBuf.getLength() == expVal.getLength()
7757 void append_077()
7759 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7760 OString expVal( aStrBuf.getStr() );
7761 sal_Int32 input = -0;
7762 sal_Int16 radix = 36;
7764 expVal += OString( "0" );
7765 aStrBuf.append( input, radix );
7767 CPPUNIT_ASSERT_MESSAGE
7769 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7770 aStrBuf.getStr()== expVal &&
7771 aStrBuf.getLength() == expVal.getLength()
7776 void append_078()
7778 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7779 OString expVal( aStrBuf.getStr() );
7780 sal_Int32 input = -4;
7781 sal_Int16 radix = 36;
7783 expVal += OString( "-" );
7784 expVal += OString( "4" );
7785 aStrBuf.append( input, radix );
7787 CPPUNIT_ASSERT_MESSAGE
7789 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7790 aStrBuf.getStr()== expVal &&
7791 aStrBuf.getLength() == expVal.getLength()
7796 void append_079()
7798 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7799 OString expVal( aStrBuf.getStr() );
7800 sal_Int32 input = -8;
7801 sal_Int16 radix = 36;
7803 expVal += OString( "-" );
7804 expVal += OString( "8" );
7805 aStrBuf.append( input, radix );
7807 CPPUNIT_ASSERT_MESSAGE
7809 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7810 aStrBuf.getStr()== expVal &&
7811 aStrBuf.getLength() == expVal.getLength()
7816 void append_080()
7818 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
7819 OString expVal( aStrBuf.getStr() );
7820 sal_Int32 input = -35;
7821 sal_Int16 radix = 36;
7823 expVal += OString( "-" );
7824 expVal += OString( "z" );
7825 aStrBuf.append( input, radix );
7827 CPPUNIT_ASSERT_MESSAGE
7829 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7830 aStrBuf.getStr()== expVal &&
7831 aStrBuf.getLength() == expVal.getLength()
7836 void append_081()
7838 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7839 OString expVal( aStrBuf.getStr() );
7840 sal_Int32 input = -0;
7841 sal_Int16 radix = 2;
7843 expVal += OString( "0" );
7844 aStrBuf.append( input, radix );
7846 CPPUNIT_ASSERT_MESSAGE
7848 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7849 aStrBuf.getStr()== expVal &&
7850 aStrBuf.getLength() == expVal.getLength()
7855 void append_082()
7857 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7858 OString expVal( aStrBuf.getStr() );
7859 sal_Int32 input = -4;
7860 sal_Int16 radix = 2;
7862 expVal += OString( "-" );
7863 expVal += OString( "100" );
7864 aStrBuf.append( input, radix );
7866 CPPUNIT_ASSERT_MESSAGE
7868 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7869 aStrBuf.getStr()== expVal &&
7870 aStrBuf.getLength() == expVal.getLength()
7875 void append_083()
7877 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7878 OString expVal( aStrBuf.getStr() );
7879 sal_Int32 input = -8;
7880 sal_Int16 radix = 2;
7882 expVal += OString( "-" );
7883 expVal += OString( "1000" );
7884 aStrBuf.append( input, radix );
7886 CPPUNIT_ASSERT_MESSAGE
7888 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7889 aStrBuf.getStr()== expVal &&
7890 aStrBuf.getLength() == expVal.getLength()
7895 void append_084()
7897 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7898 OString expVal( aStrBuf.getStr() );
7899 sal_Int32 input = -15;
7900 sal_Int16 radix = 2;
7902 expVal += OString( "-" );
7903 expVal += OString( "1111" );
7904 aStrBuf.append( input, radix );
7906 CPPUNIT_ASSERT_MESSAGE
7908 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7909 aStrBuf.getStr()== expVal &&
7910 aStrBuf.getLength() == expVal.getLength()
7915 void append_085()
7917 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7918 OString expVal( aStrBuf.getStr() );
7919 sal_Int32 input = -0;
7920 sal_Int16 radix = 8;
7922 expVal += OString( "0" );
7923 aStrBuf.append( input, radix );
7925 CPPUNIT_ASSERT_MESSAGE
7927 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7928 aStrBuf.getStr()== expVal &&
7929 aStrBuf.getLength() == expVal.getLength()
7934 void append_086()
7936 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7937 OString expVal( aStrBuf.getStr() );
7938 sal_Int32 input = -4;
7939 sal_Int16 radix = 8;
7941 expVal += OString( "-" );
7942 expVal += OString( "4" );
7943 aStrBuf.append( input, radix );
7945 CPPUNIT_ASSERT_MESSAGE
7947 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7948 aStrBuf.getStr()== expVal &&
7949 aStrBuf.getLength() == expVal.getLength()
7954 void append_087()
7956 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7957 OString expVal( aStrBuf.getStr() );
7958 sal_Int32 input = -8;
7959 sal_Int16 radix = 8;
7961 expVal += OString( "-" );
7962 expVal += OString( "10" );
7963 aStrBuf.append( input, radix );
7965 CPPUNIT_ASSERT_MESSAGE
7967 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7968 aStrBuf.getStr()== expVal &&
7969 aStrBuf.getLength() == expVal.getLength()
7974 void append_088()
7976 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7977 OString expVal( aStrBuf.getStr() );
7978 sal_Int32 input = -15;
7979 sal_Int16 radix = 8;
7981 expVal += OString( "-" );
7982 expVal += OString( "17" );
7983 aStrBuf.append( input, radix );
7985 CPPUNIT_ASSERT_MESSAGE
7987 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7988 aStrBuf.getStr()== expVal &&
7989 aStrBuf.getLength() == expVal.getLength()
7994 void append_089()
7996 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
7997 OString expVal( aStrBuf.getStr() );
7998 sal_Int32 input = -0;
7999 sal_Int16 radix = 10;
8001 expVal += OString( "0" );
8002 aStrBuf.append( input, radix );
8004 CPPUNIT_ASSERT_MESSAGE
8006 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8007 aStrBuf.getStr()== expVal &&
8008 aStrBuf.getLength() == expVal.getLength()
8013 void append_090()
8015 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8016 OString expVal( aStrBuf.getStr() );
8017 sal_Int32 input = -4;
8018 sal_Int16 radix = 10;
8020 expVal += OString( "-" );
8021 expVal += OString( "4" );
8022 aStrBuf.append( input, radix );
8024 CPPUNIT_ASSERT_MESSAGE
8026 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8027 aStrBuf.getStr()== expVal &&
8028 aStrBuf.getLength() == expVal.getLength()
8033 void append_091()
8035 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8036 OString expVal( aStrBuf.getStr() );
8037 sal_Int32 input = -8;
8038 sal_Int16 radix = 10;
8040 expVal += OString( "-" );
8041 expVal += OString( "8" );
8042 aStrBuf.append( input, radix );
8044 CPPUNIT_ASSERT_MESSAGE
8046 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8047 aStrBuf.getStr()== expVal &&
8048 aStrBuf.getLength() == expVal.getLength()
8053 void append_092()
8055 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8056 OString expVal( aStrBuf.getStr() );
8057 sal_Int32 input = -15;
8058 sal_Int16 radix = 10;
8060 expVal += OString( "-" );
8061 expVal += OString( "15" );
8062 aStrBuf.append( input, radix );
8064 CPPUNIT_ASSERT_MESSAGE
8066 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8067 aStrBuf.getStr()== expVal &&
8068 aStrBuf.getLength() == expVal.getLength()
8073 void append_093()
8075 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8076 OString expVal( aStrBuf.getStr() );
8077 sal_Int32 input = -0;
8078 sal_Int16 radix = 16;
8080 expVal += OString( "0" );
8081 aStrBuf.append( input, radix );
8083 CPPUNIT_ASSERT_MESSAGE
8085 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8086 aStrBuf.getStr()== expVal &&
8087 aStrBuf.getLength() == expVal.getLength()
8092 void append_094()
8094 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8095 OString expVal( aStrBuf.getStr() );
8096 sal_Int32 input = -4;
8097 sal_Int16 radix = 16;
8099 expVal += OString( "-" );
8100 expVal += OString( "4" );
8101 aStrBuf.append( input, radix );
8103 CPPUNIT_ASSERT_MESSAGE
8105 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8106 aStrBuf.getStr()== expVal &&
8107 aStrBuf.getLength() == expVal.getLength()
8112 void append_095()
8114 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8115 OString expVal( aStrBuf.getStr() );
8116 sal_Int32 input = -8;
8117 sal_Int16 radix = 16;
8119 expVal += OString( "-" );
8120 expVal += OString( "8" );
8121 aStrBuf.append( input, radix );
8123 CPPUNIT_ASSERT_MESSAGE
8125 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8126 aStrBuf.getStr()== expVal &&
8127 aStrBuf.getLength() == expVal.getLength()
8132 void append_096()
8134 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8135 OString expVal( aStrBuf.getStr() );
8136 sal_Int32 input = -15;
8137 sal_Int16 radix = 16;
8139 expVal += OString( "-" );
8140 expVal += OString( "f" );
8141 aStrBuf.append( input, radix );
8143 CPPUNIT_ASSERT_MESSAGE
8145 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8146 aStrBuf.getStr()== expVal &&
8147 aStrBuf.getLength() == expVal.getLength()
8152 void append_097()
8154 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8155 OString expVal( aStrBuf.getStr() );
8156 sal_Int32 input = -0;
8157 sal_Int16 radix = 36;
8159 expVal += OString( "0" );
8160 aStrBuf.append( input, radix );
8162 CPPUNIT_ASSERT_MESSAGE
8164 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8165 aStrBuf.getStr()== expVal &&
8166 aStrBuf.getLength() == expVal.getLength()
8171 void append_098()
8173 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8174 OString expVal( aStrBuf.getStr() );
8175 sal_Int32 input = -4;
8176 sal_Int16 radix = 36;
8178 expVal += OString( "-" );
8179 expVal += OString( "4" );
8180 aStrBuf.append( input, radix );
8182 CPPUNIT_ASSERT_MESSAGE
8184 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8185 aStrBuf.getStr()== expVal &&
8186 aStrBuf.getLength() == expVal.getLength()
8191 void append_099()
8193 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8194 OString expVal( aStrBuf.getStr() );
8195 sal_Int32 input = -8;
8196 sal_Int16 radix = 36;
8198 expVal += OString( "-" );
8199 expVal += OString( "8" );
8200 aStrBuf.append( input, radix );
8202 CPPUNIT_ASSERT_MESSAGE
8204 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8205 aStrBuf.getStr()== expVal &&
8206 aStrBuf.getLength() == expVal.getLength()
8211 void append_100()
8213 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8214 OString expVal( aStrBuf.getStr() );
8215 sal_Int32 input = -35;
8216 sal_Int16 radix = 36;
8218 expVal += OString( "-" );
8219 expVal += OString( "z" );
8220 aStrBuf.append( input, radix );
8222 CPPUNIT_ASSERT_MESSAGE
8224 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8225 aStrBuf.getStr()== expVal &&
8226 aStrBuf.getLength() == expVal.getLength()
8231 SAL_CPPUNIT_TEST_SUITE( append_006_Int32_Negative );
8232 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
8233 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
8234 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
8235 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
8236 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
8237 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
8238 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
8239 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
8240 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
8241 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
8242 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
8243 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
8244 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
8245 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
8246 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
8247 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
8248 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
8249 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
8250 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
8251 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
8252 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
8253 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
8254 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
8255 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
8256 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
8257 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
8258 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
8259 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
8260 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
8261 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
8262 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
8263 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
8264 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
8265 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
8266 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
8267 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
8268 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
8269 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
8270 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
8271 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
8272 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
8273 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
8274 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
8275 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
8276 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
8277 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
8278 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
8279 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
8280 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
8281 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
8282 SAL_CPPUNIT_TEST_SUITE_END();
8284 //------------------------------------------------------------------------
8285 // testing the method append( sal_Int32 i, sal_Int16 radix ) where radix = -5
8286 //------------------------------------------------------------------------
8287 class append_006_Int32_WrongRadix : public CppUnit::TestFixture
8289 OString* arrOUS[5];
8290 sal_Int32 intVal;
8292 public:
8293 void setUp()
8295 arrOUS[0] = new OString( kTestStr7 );
8296 arrOUS[1] = new OString( );
8297 arrOUS[2] = new OString( kTestStr25 );
8298 arrOUS[3] = new OString( "" );
8299 arrOUS[4] = new OString( kTestStr28 );
8300 intVal = 11;
8304 void tearDown()
8306 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
8307 delete arrOUS[3]; delete arrOUS[4];
8310 void append_001()
8312 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8313 OString expVal( kTestStr59 );
8315 aStrBuf.append( intVal, -5 );
8317 CPPUNIT_ASSERT_MESSAGE
8319 "Appends the WrongRadix to the string buffer arrOUS[0]",
8320 sal_True
8325 void append_002()
8327 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8328 OString expVal( kTestStr60 );
8330 aStrBuf.append( intVal, -5 );
8332 CPPUNIT_ASSERT_MESSAGE
8334 "Appends the WrongRadix to the string buffer arrOUS[1]",
8335 sal_True
8340 void append_003()
8342 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8343 OString expVal( kTestStr60 );
8345 aStrBuf.append( intVal, -5 );
8347 CPPUNIT_ASSERT_MESSAGE
8349 "Appends the WrongRadix to the string buffer arrOUS[2]",
8350 sal_True
8355 void append_004()
8357 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8358 OString expVal( kTestStr60 );
8360 aStrBuf.append( intVal, -5 );
8362 CPPUNIT_ASSERT_MESSAGE
8364 "Appends the WrongRadix to the string buffer arrOUS[3]",
8365 sal_True
8370 void append_005()
8372 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8373 OString expVal( kTestStr61 );
8375 aStrBuf.append( intVal, -5 );
8377 CPPUNIT_ASSERT_MESSAGE
8379 "Appends the WrongRadix to the string buffer arrOUS[4]",
8380 sal_True
8384 #ifdef WITH_CORE
8385 void append_006()
8387 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8388 OString expVal( kTestStr60 );
8390 aStrBuf.append( intVal, -5 );
8392 CPPUNIT_ASSERT_MESSAGE
8394 "Appends the WrongRadix to the string buffer(with INT_MAX)",
8395 sal_True
8399 #endif
8401 SAL_CPPUNIT_TEST_SUITE( append_006_Int32_WrongRadix );
8402 CPPUNIT_TEST( append_001 );
8403 CPPUNIT_TEST( append_002 );
8404 CPPUNIT_TEST( append_003 );
8405 CPPUNIT_TEST( append_004 );
8406 CPPUNIT_TEST( append_005 );
8407 #ifdef WITH_CORE
8408 CPPUNIT_TEST( append_006 );
8409 #endif
8410 SAL_CPPUNIT_TEST_SUITE_END();
8412 //------------------------------------------------------------------------
8413 class append_006_Int32_defaultParam : public CppUnit::TestFixture
8415 OString* arrOUS[5];
8417 public:
8418 void setUp()
8420 arrOUS[0] = new OString( kTestStr7 );
8421 arrOUS[1] = new OString( );
8422 arrOUS[2] = new OString( kTestStr25 );
8423 arrOUS[3] = new OString( "" );
8424 arrOUS[4] = new OString( kTestStr28 );
8428 void tearDown()
8430 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
8431 delete arrOUS[3]; delete arrOUS[4];
8434 void append_001()
8436 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8437 OString expVal( kTestStr59 );
8438 sal_Int32 input = 11;
8440 aStrBuf.append( input );
8442 CPPUNIT_ASSERT_MESSAGE
8444 "input Int32 11 and return OStringBuffer[0]+11",
8445 (aStrBuf.toString() == expVal &&
8446 aStrBuf.getLength() == expVal.getLength())
8451 void append_002()
8453 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8454 OString expVal( kTestStr62 );
8455 sal_Int32 input = 0;
8457 aStrBuf.append( input );
8459 CPPUNIT_ASSERT_MESSAGE
8461 "input Int32 0 and return OStringBuffer[0]+0",
8462 (aStrBuf.toString() == expVal &&
8463 aStrBuf.getLength() == expVal.getLength())
8468 void append_003()
8470 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8471 OString expVal( kTestStr63 );
8472 sal_Int32 input = -11;
8474 aStrBuf.append( input );
8476 CPPUNIT_ASSERT_MESSAGE
8478 "input Int32 -11 and return OStringBuffer[0]+(-11)",
8479 (aStrBuf.toString() == expVal &&
8480 aStrBuf.getLength() == expVal.getLength())
8485 void append_004()
8487 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8488 OString expVal( kTestStr64 );
8489 sal_Int32 input = 2147483647;
8491 aStrBuf.append( input );
8493 CPPUNIT_ASSERT_MESSAGE
8495 "input Int32 2147483647 and return OStringBuffer[0]+2147483647",
8496 (aStrBuf.toString() == expVal &&
8497 aStrBuf.getLength() == expVal.getLength())
8502 void append_005()
8504 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8505 OString expVal( kTestStr65 );
8506 sal_Int32 input = kNonSInt32Max;
8508 aStrBuf.append( input );
8510 CPPUNIT_ASSERT_MESSAGE
8512 "input Int32 -2147483648 and return OStringBuffer[0]+(-2147483648)",
8513 (aStrBuf.toString() == expVal &&
8514 aStrBuf.getLength() == expVal.getLength())
8519 void append_006()
8521 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8522 OString expVal( kTestStr60 );
8523 sal_Int32 input = 11;
8525 aStrBuf.append( input );
8527 CPPUNIT_ASSERT_MESSAGE
8529 "input Int32 11 and return OStringBuffer[1]+11",
8530 (aStrBuf.toString() == expVal &&
8531 aStrBuf.getLength() == expVal.getLength())
8536 void append_007()
8538 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8539 OString expVal( kTestStr66 );
8540 sal_Int32 input = 0;
8542 aStrBuf.append( input );
8544 CPPUNIT_ASSERT_MESSAGE
8546 "input Int32 0 and return OStringBuffer[1]+0",
8547 (aStrBuf.toString() == expVal &&
8548 aStrBuf.getLength() == expVal.getLength())
8553 void append_008()
8555 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8556 OString expVal( kTestStr67 );
8557 sal_Int32 input = -11;
8559 aStrBuf.append( input );
8561 CPPUNIT_ASSERT_MESSAGE
8563 "input Int32 -11 and return OStringBuffer[1]+(-11)",
8564 (aStrBuf.toString() == expVal &&
8565 aStrBuf.getLength() == expVal.getLength())
8570 void append_009()
8572 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8573 OString expVal( kTestStr68 );
8574 sal_Int32 input = 2147483647;
8576 aStrBuf.append( input );
8578 CPPUNIT_ASSERT_MESSAGE
8580 "input Int32 2147483647 and return OStringBuffer[1]+2147483647",
8581 (aStrBuf.toString() == expVal &&
8582 aStrBuf.getLength() == expVal.getLength())
8587 void append_010()
8589 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8590 OString expVal( kTestStr69 );
8591 sal_Int32 input = SAL_MIN_INT32 /*-2147483648*/;
8593 aStrBuf.append( input );
8595 CPPUNIT_ASSERT_MESSAGE
8597 "input Int32 -2147483648 and return OStringBuffer[1]+(-2147483648)",
8598 (aStrBuf.toString() == expVal &&
8599 aStrBuf.getLength() == expVal.getLength())
8604 void append_011()
8606 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8607 OString expVal( kTestStr60 );
8608 sal_Int32 input = 11;
8610 aStrBuf.append( input );
8612 CPPUNIT_ASSERT_MESSAGE
8614 "input Int32 11 and return OStringBuffer[2]+11",
8615 (aStrBuf.toString() == expVal &&
8616 aStrBuf.getLength() == expVal.getLength())
8621 void append_012()
8623 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8624 OString expVal( kTestStr66 );
8625 sal_Int32 input = 0;
8627 aStrBuf.append( input );
8629 CPPUNIT_ASSERT_MESSAGE
8631 "input Int32 0 and return OUStringBuffer[2]+0",
8632 (aStrBuf.toString() == expVal &&
8633 aStrBuf.getLength() == expVal.getLength())
8638 void append_013()
8640 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8641 OString expVal( kTestStr67 );
8642 sal_Int32 input = -11;
8644 aStrBuf.append( input );
8646 CPPUNIT_ASSERT_MESSAGE
8648 "input Int32 -11 and return OUStringBuffer[2]+(-11)",
8649 (aStrBuf.toString() == expVal &&
8650 aStrBuf.getLength() == expVal.getLength())
8655 void append_014()
8657 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8658 OString expVal( kTestStr68 );
8659 sal_Int32 input = 2147483647;
8661 aStrBuf.append( input );
8663 CPPUNIT_ASSERT_MESSAGE
8665 "input Int32 2147483647 and return OStringBuffer[2]+2147483647",
8666 (aStrBuf.toString() == expVal &&
8667 aStrBuf.getLength() == expVal.getLength())
8672 void append_015()
8674 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8675 OString expVal( kTestStr69 );
8676 sal_Int32 input = SAL_MIN_INT32;
8678 aStrBuf.append( input );
8680 CPPUNIT_ASSERT_MESSAGE
8682 "input Int32 -2147483648 and return OStringBuffer[2]+(-2147483648)",
8683 (aStrBuf.toString() == expVal &&
8684 aStrBuf.getLength() == expVal.getLength())
8689 void append_016()
8691 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8692 OString expVal( kTestStr60 );
8693 sal_Int32 input = 11;
8695 aStrBuf.append( input );
8697 CPPUNIT_ASSERT_MESSAGE
8699 "input Int32 11 and return OStringBuffer[3]+11",
8700 (aStrBuf.toString() == expVal &&
8701 aStrBuf.getLength() == expVal.getLength())
8706 void append_017()
8708 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8709 OString expVal( kTestStr66 );
8710 sal_Int32 input = 0;
8712 aStrBuf.append( input );
8714 CPPUNIT_ASSERT_MESSAGE
8716 "input Int32 0 and return OStringBuffer[3]+0",
8717 (aStrBuf.toString() == expVal &&
8718 aStrBuf.getLength() == expVal.getLength())
8723 void append_018()
8725 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8726 OString expVal( kTestStr67 );
8727 sal_Int32 input = -11;
8729 aStrBuf.append( input );
8731 CPPUNIT_ASSERT_MESSAGE
8733 "input Int32 -11 and return OStringBuffer[3]+(-11)",
8734 (aStrBuf.toString() == expVal &&
8735 aStrBuf.getLength() == expVal.getLength())
8740 void append_019()
8742 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8743 OString expVal( kTestStr68 );
8744 sal_Int32 input = 2147483647;
8746 aStrBuf.append( input );
8748 CPPUNIT_ASSERT_MESSAGE
8750 "input Int32 2147483647 and return OStringBuffer[3]+2147483647",
8751 (aStrBuf.toString() == expVal &&
8752 aStrBuf.getLength() == expVal.getLength())
8757 void append_020()
8759 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8760 OString expVal( kTestStr69 );
8761 sal_Int32 input = SAL_MIN_INT32;
8763 aStrBuf.append( input );
8765 CPPUNIT_ASSERT_MESSAGE
8767 "input Int32 -2147483648 and return OStringBuffer[3]+(-2147483648)",
8768 (aStrBuf.toString() == expVal &&
8769 aStrBuf.getLength() == expVal.getLength())
8774 void append_021()
8776 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8777 OString expVal( kTestStr61 );
8778 sal_Int32 input = 11;
8780 aStrBuf.append( input );
8782 CPPUNIT_ASSERT_MESSAGE
8784 "input Int32 11 and return OStringBuffer[4]+11",
8785 (aStrBuf.toString() == expVal &&
8786 aStrBuf.getLength() == expVal.getLength())
8791 void append_022()
8793 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8794 OString expVal( kTestStr70 );
8795 sal_Int32 input = 0;
8797 aStrBuf.append( input );
8799 CPPUNIT_ASSERT_MESSAGE
8801 "input Int32 0 and return OStringBuffer[4]+0",
8802 (aStrBuf.toString() == expVal &&
8803 aStrBuf.getLength() == expVal.getLength())
8808 void append_023()
8810 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8811 OString expVal( kTestStr71 );
8812 sal_Int32 input = -11;
8814 aStrBuf.append( input );
8816 CPPUNIT_ASSERT_MESSAGE
8818 "input Int32 -11 and return OStringBuffer[4]+(-11)",
8819 (aStrBuf.toString() == expVal &&
8820 aStrBuf.getLength() == expVal.getLength())
8825 void append_024()
8827 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8828 OString expVal( kTestStr72 );
8829 sal_Int32 input = 2147483647;
8831 aStrBuf.append( input );
8833 CPPUNIT_ASSERT_MESSAGE
8835 "input Int32 2147483647 and return OStringBuffer[4]+2147483647",
8836 (aStrBuf.toString() == expVal &&
8837 aStrBuf.getLength() == expVal.getLength())
8842 void append_025()
8844 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8845 OString expVal( kTestStr73 );
8846 sal_Int32 input = SAL_MIN_INT32;
8848 aStrBuf.append( input );
8850 CPPUNIT_ASSERT_MESSAGE
8852 "input Int32 -2147483648 and return OStringBuffer[4]+(-2147483648)",
8853 (aStrBuf.toString() == expVal &&
8854 aStrBuf.getLength() == expVal.getLength())
8858 #ifdef WITH_CORE
8859 void append_026()
8861 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8862 OString expVal( kTestStr60 );
8863 sal_Int32 input = 11;
8865 aStrBuf.append( input );
8867 CPPUNIT_ASSERT_MESSAGE
8869 "input Int32 11 and return OStringBuffer(kSInt32Max)+11",
8870 (aStrBuf.toString() == expVal &&
8871 aStrBuf.getLength() == expVal.getLength())
8876 void append_027()
8878 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8879 OString expVal( kTestStr66 );
8880 sal_Int32 input = 0;
8882 aStrBuf.append( input );
8884 CPPUNIT_ASSERT_MESSAGE
8886 "input Int32 0 and return OStringBuffer(kSInt32Max)+0",
8887 (aStrBuf.toString() == expVal &&
8888 aStrBuf.getLength() == expVal.getLength())
8893 void append_028()
8895 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8896 OString expVal( kTestStr67 );
8897 sal_Int32 input = -11;
8899 aStrBuf.append( input );
8901 CPPUNIT_ASSERT_MESSAGE
8903 "input Int32 -11 and return OStringBuffer(kSInt32Max)+(-11)",
8904 (aStrBuf.toString() == expVal &&
8905 aStrBuf.getLength() == expVal.getLength())
8910 void append_029()
8912 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8913 OString expVal( kTestStr68 );
8914 sal_Int32 input = 2147483647;
8916 aStrBuf.append( input );
8918 CPPUNIT_ASSERT_MESSAGE
8920 "input Int32 2147483647 and return OStringBuffer(kSInt32Max)+2147483647",
8921 (aStrBuf.toString() == expVal &&
8922 aStrBuf.getLength() == expVal.getLength())
8927 void append_030()
8929 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8930 OString expVal( kTestStr69 );
8931 sal_Int32 input = SAL_MIN_INT32;
8933 aStrBuf.append( input );
8935 CPPUNIT_ASSERT_MESSAGE
8937 "input Int32 -2147483648 and return OStringBuffer(kSInt32Max)+(-2147483648)",
8938 (aStrBuf.toString() == expVal &&
8939 aStrBuf.getLength() == expVal.getLength())
8943 #endif
8945 SAL_CPPUNIT_TEST_SUITE( append_006_Int32_defaultParam );
8946 CPPUNIT_TEST( append_001 );
8947 CPPUNIT_TEST( append_002 );
8948 CPPUNIT_TEST( append_003 );
8949 CPPUNIT_TEST( append_004 );
8950 CPPUNIT_TEST( append_005 );
8951 CPPUNIT_TEST( append_006 );
8952 CPPUNIT_TEST( append_007 );
8953 CPPUNIT_TEST( append_008 );
8954 CPPUNIT_TEST( append_009 );
8955 CPPUNIT_TEST( append_010 );
8956 CPPUNIT_TEST( append_011 );
8957 CPPUNIT_TEST( append_012 );
8958 CPPUNIT_TEST( append_013 );
8959 CPPUNIT_TEST( append_014 );
8960 CPPUNIT_TEST( append_015 );
8961 CPPUNIT_TEST( append_016 );
8962 CPPUNIT_TEST( append_017 );
8963 CPPUNIT_TEST( append_018 );
8964 CPPUNIT_TEST( append_019 );
8965 CPPUNIT_TEST( append_020 );
8966 CPPUNIT_TEST( append_021 );
8967 CPPUNIT_TEST( append_022 );
8968 CPPUNIT_TEST( append_023 );
8969 CPPUNIT_TEST( append_024 );
8970 CPPUNIT_TEST( append_025 );
8971 #ifdef WITH_CORE
8972 CPPUNIT_TEST( append_026 );
8973 CPPUNIT_TEST( append_027 );
8974 CPPUNIT_TEST( append_028 );
8975 CPPUNIT_TEST( append_029 );
8976 CPPUNIT_TEST( append_030 );
8977 #endif
8978 SAL_CPPUNIT_TEST_SUITE_END();
8980 //------------------------------------------------------------------------
8981 // testing the method append( sal_Int64 l, sal_Int16 radix=2 )
8982 // testing the method append( sal_Int64 l, sal_Int16 radix=8 )
8983 // testing the method append( sal_Int64 l, sal_Int16 radix=10 )
8984 // testing the method append( sal_Int64 l, sal_Int16 radix=16 )
8985 // testing the method append( sal_Int64 l, sal_Int16 radix=36 )
8986 //------------------------------------------------------------------------
8987 class append_007_Int64 : public CppUnit::TestFixture
8989 OString* arrOUS[5];
8991 public:
8992 void setUp()
8994 arrOUS[0] = new OString( kTestStr7 );
8995 arrOUS[1] = new OString( );
8996 arrOUS[2] = new OString( kTestStr25 );
8997 arrOUS[3] = new OString( "" );
8998 arrOUS[4] = new OString( kTestStr28 );
9002 void tearDown()
9004 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
9005 delete arrOUS[3]; delete arrOUS[4];
9008 void append_001()
9010 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9011 OString expVal( aStrBuf.getStr() );
9012 sal_Int64 input = 0;
9013 sal_Int16 radix = 2;
9015 expVal += OString( "0" );
9016 aStrBuf.append( input, radix );
9018 CPPUNIT_ASSERT_MESSAGE
9020 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9021 aStrBuf.getStr()== expVal &&
9022 aStrBuf.getLength() == expVal.getLength()
9027 void append_002()
9029 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9030 OString expVal( aStrBuf.getStr() );
9031 sal_Int64 input = 4;
9032 sal_Int16 radix = 2;
9034 expVal += OString( "100" );
9035 aStrBuf.append( input, radix );
9037 CPPUNIT_ASSERT_MESSAGE
9039 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9040 aStrBuf.getStr()== expVal &&
9041 aStrBuf.getLength() == expVal.getLength()
9046 void append_003()
9048 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9049 OString expVal( aStrBuf.getStr() );
9050 sal_Int64 input = 8;
9051 sal_Int16 radix = 2;
9053 expVal += OString( "1000" );
9054 aStrBuf.append( input, radix );
9056 CPPUNIT_ASSERT_MESSAGE
9058 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9059 aStrBuf.getStr()== expVal &&
9060 aStrBuf.getLength() == expVal.getLength()
9065 void append_004()
9067 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9068 OString expVal( aStrBuf.getStr() );
9069 sal_Int64 input = 15;
9070 sal_Int16 radix = 2;
9072 expVal += OString( "1111" );
9073 aStrBuf.append( input, radix );
9075 CPPUNIT_ASSERT_MESSAGE
9077 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9078 aStrBuf.getStr()== expVal &&
9079 aStrBuf.getLength() == expVal.getLength()
9084 void append_005()
9086 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9087 OString expVal( aStrBuf.getStr() );
9088 sal_Int64 input = 0;
9089 sal_Int16 radix = 8;
9091 expVal += OString( "0" );
9092 aStrBuf.append( input, radix );
9094 CPPUNIT_ASSERT_MESSAGE
9096 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9097 aStrBuf.getStr()== expVal &&
9098 aStrBuf.getLength() == expVal.getLength()
9103 void append_006()
9105 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9106 OString expVal( aStrBuf.getStr() );
9107 sal_Int64 input = 4;
9108 sal_Int16 radix = 8;
9110 expVal += OString( "4" );
9111 aStrBuf.append( input, radix );
9113 CPPUNIT_ASSERT_MESSAGE
9115 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9116 aStrBuf.getStr()== expVal &&
9117 aStrBuf.getLength() == expVal.getLength()
9122 void append_007()
9124 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9125 OString expVal( aStrBuf.getStr() );
9126 sal_Int64 input = 8;
9127 sal_Int16 radix = 8;
9129 expVal += OString( "10" );
9130 aStrBuf.append( input, radix );
9132 CPPUNIT_ASSERT_MESSAGE
9134 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9135 aStrBuf.getStr()== expVal &&
9136 aStrBuf.getLength() == expVal.getLength()
9141 void append_008()
9143 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9144 OString expVal( aStrBuf.getStr() );
9145 sal_Int64 input = 15;
9146 sal_Int16 radix = 8;
9148 expVal += OString( "17" );
9149 aStrBuf.append( input, radix );
9151 CPPUNIT_ASSERT_MESSAGE
9153 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9154 aStrBuf.getStr()== expVal &&
9155 aStrBuf.getLength() == expVal.getLength()
9160 void append_009()
9162 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9163 OString expVal( aStrBuf.getStr() );
9164 sal_Int64 input = 0;
9165 sal_Int16 radix = 10;
9167 expVal += OString( "0" );
9168 aStrBuf.append( input, radix );
9170 CPPUNIT_ASSERT_MESSAGE
9172 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9173 aStrBuf.getStr()== expVal &&
9174 aStrBuf.getLength() == expVal.getLength()
9179 void append_010()
9181 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9182 OString expVal( aStrBuf.getStr() );
9183 sal_Int64 input = 4;
9184 sal_Int16 radix = 10;
9186 expVal += OString( "4" );
9187 aStrBuf.append( input, radix );
9189 CPPUNIT_ASSERT_MESSAGE
9191 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9192 aStrBuf.getStr()== expVal &&
9193 aStrBuf.getLength() == expVal.getLength()
9198 void append_011()
9200 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9201 OString expVal( aStrBuf.getStr() );
9202 sal_Int64 input = 8;
9203 sal_Int16 radix = 10;
9205 expVal += OString( "8" );
9206 aStrBuf.append( input, radix );
9208 CPPUNIT_ASSERT_MESSAGE
9210 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9211 aStrBuf.getStr()== expVal &&
9212 aStrBuf.getLength() == expVal.getLength()
9217 void append_012()
9219 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9220 OString expVal( aStrBuf.getStr() );
9221 sal_Int64 input = 15;
9222 sal_Int16 radix = 10;
9224 expVal += OString( "15" );
9225 aStrBuf.append( input, radix );
9227 CPPUNIT_ASSERT_MESSAGE
9229 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9230 aStrBuf.getStr()== expVal &&
9231 aStrBuf.getLength() == expVal.getLength()
9236 void append_013()
9238 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9239 OString expVal( aStrBuf.getStr() );
9240 sal_Int64 input = 0;
9241 sal_Int16 radix = 16;
9243 expVal += OString( "0" );
9244 aStrBuf.append( input, radix );
9246 CPPUNIT_ASSERT_MESSAGE
9248 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9249 aStrBuf.getStr()== expVal &&
9250 aStrBuf.getLength() == expVal.getLength()
9255 void append_014()
9257 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9258 OString expVal( aStrBuf.getStr() );
9259 sal_Int64 input = 4;
9260 sal_Int16 radix = 16;
9262 expVal += OString( "4" );
9263 aStrBuf.append( input, radix );
9265 CPPUNIT_ASSERT_MESSAGE
9267 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9268 aStrBuf.getStr()== expVal &&
9269 aStrBuf.getLength() == expVal.getLength()
9274 void append_015()
9276 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9277 OString expVal( aStrBuf.getStr() );
9278 sal_Int64 input = 8;
9279 sal_Int16 radix = 16;
9281 expVal += OString( "8" );
9282 aStrBuf.append( input, radix );
9284 CPPUNIT_ASSERT_MESSAGE
9286 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9287 aStrBuf.getStr()== expVal &&
9288 aStrBuf.getLength() == expVal.getLength()
9293 void append_016()
9295 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9296 OString expVal( aStrBuf.getStr() );
9297 sal_Int64 input = 15;
9298 sal_Int16 radix = 16;
9300 expVal += OString( "f" );
9301 aStrBuf.append( input, radix );
9303 CPPUNIT_ASSERT_MESSAGE
9305 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9306 aStrBuf.getStr()== expVal &&
9307 aStrBuf.getLength() == expVal.getLength()
9312 void append_017()
9314 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9315 OString expVal( aStrBuf.getStr() );
9316 sal_Int64 input = 0;
9317 sal_Int16 radix = 36;
9319 expVal += OString( "0" );
9320 aStrBuf.append( input, radix );
9322 CPPUNIT_ASSERT_MESSAGE
9324 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9325 aStrBuf.getStr()== expVal &&
9326 aStrBuf.getLength() == expVal.getLength()
9331 void append_018()
9333 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9334 OString expVal( aStrBuf.getStr() );
9335 sal_Int64 input = 4;
9336 sal_Int16 radix = 36;
9338 expVal += OString( "4" );
9339 aStrBuf.append( input, radix );
9341 CPPUNIT_ASSERT_MESSAGE
9343 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9344 aStrBuf.getStr()== expVal &&
9345 aStrBuf.getLength() == expVal.getLength()
9350 void append_019()
9352 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9353 OString expVal( aStrBuf.getStr() );
9354 sal_Int64 input = 8;
9355 sal_Int16 radix = 36;
9357 expVal += OString( "8" );
9358 aStrBuf.append( input, radix );
9360 CPPUNIT_ASSERT_MESSAGE
9362 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9363 aStrBuf.getStr()== expVal &&
9364 aStrBuf.getLength() == expVal.getLength()
9369 void append_020()
9371 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9372 OString expVal( aStrBuf.getStr() );
9373 sal_Int64 input = 35;
9374 sal_Int16 radix = 36;
9376 expVal += OString( "z" );
9377 aStrBuf.append( input, radix );
9379 CPPUNIT_ASSERT_MESSAGE
9381 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9382 aStrBuf.getStr()== expVal &&
9383 aStrBuf.getLength() == expVal.getLength()
9388 void append_021()
9390 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9391 OString expVal( aStrBuf.getStr() );
9392 sal_Int64 input = 0;
9393 sal_Int16 radix = 2;
9395 expVal += OString( "0" );
9396 aStrBuf.append( input, radix );
9398 CPPUNIT_ASSERT_MESSAGE
9400 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9401 aStrBuf.getStr()== expVal &&
9402 aStrBuf.getLength() == expVal.getLength()
9407 void append_022()
9409 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9410 OString expVal( aStrBuf.getStr() );
9411 sal_Int64 input = 4;
9412 sal_Int16 radix = 2;
9414 expVal += OString( "100" );
9415 aStrBuf.append( input, radix );
9417 CPPUNIT_ASSERT_MESSAGE
9419 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9420 aStrBuf.getStr()== expVal &&
9421 aStrBuf.getLength() == expVal.getLength()
9426 void append_023()
9428 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9429 OString expVal( aStrBuf.getStr() );
9430 sal_Int64 input = 8;
9431 sal_Int16 radix = 2;
9433 expVal += OString( "1000" );
9434 aStrBuf.append( input, radix );
9436 CPPUNIT_ASSERT_MESSAGE
9438 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9439 aStrBuf.getStr()== expVal &&
9440 aStrBuf.getLength() == expVal.getLength()
9445 void append_024()
9447 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9448 OString expVal( aStrBuf.getStr() );
9449 sal_Int64 input = 15;
9450 sal_Int16 radix = 2;
9452 expVal += OString( "1111" );
9453 aStrBuf.append( input, radix );
9455 CPPUNIT_ASSERT_MESSAGE
9457 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9458 aStrBuf.getStr()== expVal &&
9459 aStrBuf.getLength() == expVal.getLength()
9464 void append_025()
9466 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9467 OString expVal( aStrBuf.getStr() );
9468 sal_Int64 input = 0;
9469 sal_Int16 radix = 8;
9471 expVal += OString( "0" );
9472 aStrBuf.append( input, radix );
9474 CPPUNIT_ASSERT_MESSAGE
9476 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9477 aStrBuf.getStr()== expVal &&
9478 aStrBuf.getLength() == expVal.getLength()
9483 void append_026()
9485 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9486 OString expVal( aStrBuf.getStr() );
9487 sal_Int64 input = 4;
9488 sal_Int16 radix = 8;
9490 expVal += OString( "4" );
9491 aStrBuf.append( input, radix );
9493 CPPUNIT_ASSERT_MESSAGE
9495 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9496 aStrBuf.getStr()== expVal &&
9497 aStrBuf.getLength() == expVal.getLength()
9502 void append_027()
9504 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9505 OString expVal( aStrBuf.getStr() );
9506 sal_Int64 input = 8;
9507 sal_Int16 radix = 8;
9509 expVal += OString( "10" );
9510 aStrBuf.append( input, radix );
9512 CPPUNIT_ASSERT_MESSAGE
9514 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9515 aStrBuf.getStr()== expVal &&
9516 aStrBuf.getLength() == expVal.getLength()
9521 void append_028()
9523 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9524 OString expVal( aStrBuf.getStr() );
9525 sal_Int64 input = 15;
9526 sal_Int16 radix = 8;
9528 expVal += OString( "17" );
9529 aStrBuf.append( input, radix );
9531 CPPUNIT_ASSERT_MESSAGE
9533 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9534 aStrBuf.getStr()== expVal &&
9535 aStrBuf.getLength() == expVal.getLength()
9540 void append_029()
9542 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9543 OString expVal( aStrBuf.getStr() );
9544 sal_Int64 input = 0;
9545 sal_Int16 radix = 10;
9547 expVal += OString( "0" );
9548 aStrBuf.append( input, radix );
9550 CPPUNIT_ASSERT_MESSAGE
9552 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9553 aStrBuf.getStr()== expVal &&
9554 aStrBuf.getLength() == expVal.getLength()
9559 void append_030()
9561 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9562 OString expVal( aStrBuf.getStr() );
9563 sal_Int64 input = 4;
9564 sal_Int16 radix = 10;
9566 expVal += OString( "4" );
9567 aStrBuf.append( input, radix );
9569 CPPUNIT_ASSERT_MESSAGE
9571 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9572 aStrBuf.getStr()== expVal &&
9573 aStrBuf.getLength() == expVal.getLength()
9578 void append_031()
9580 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9581 OString expVal( aStrBuf.getStr() );
9582 sal_Int64 input = 8;
9583 sal_Int16 radix = 10;
9585 expVal += OString( "8" );
9586 aStrBuf.append( input, radix );
9588 CPPUNIT_ASSERT_MESSAGE
9590 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9591 aStrBuf.getStr()== expVal &&
9592 aStrBuf.getLength() == expVal.getLength()
9597 void append_032()
9599 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9600 OString expVal( aStrBuf.getStr() );
9601 sal_Int64 input = 15;
9602 sal_Int16 radix = 10;
9604 expVal += OString( "15" );
9605 aStrBuf.append( input, radix );
9607 CPPUNIT_ASSERT_MESSAGE
9609 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9610 aStrBuf.getStr()== expVal &&
9611 aStrBuf.getLength() == expVal.getLength()
9616 void append_033()
9618 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9619 OString expVal( aStrBuf.getStr() );
9620 sal_Int64 input = 0;
9621 sal_Int16 radix = 16;
9623 expVal += OString( "0" );
9624 aStrBuf.append( input, radix );
9626 CPPUNIT_ASSERT_MESSAGE
9628 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9629 aStrBuf.getStr()== expVal &&
9630 aStrBuf.getLength() == expVal.getLength()
9635 void append_034()
9637 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9638 OString expVal( aStrBuf.getStr() );
9639 sal_Int64 input = 4;
9640 sal_Int16 radix = 16;
9642 expVal += OString( "4" );
9643 aStrBuf.append( input, radix );
9645 CPPUNIT_ASSERT_MESSAGE
9647 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9648 aStrBuf.getStr()== expVal &&
9649 aStrBuf.getLength() == expVal.getLength()
9654 void append_035()
9656 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9657 OString expVal( aStrBuf.getStr() );
9658 sal_Int64 input = 8;
9659 sal_Int16 radix = 16;
9661 expVal += OString( "8" );
9662 aStrBuf.append( input, radix );
9664 CPPUNIT_ASSERT_MESSAGE
9666 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9667 aStrBuf.getStr()== expVal &&
9668 aStrBuf.getLength() == expVal.getLength()
9673 void append_036()
9675 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9676 OString expVal( aStrBuf.getStr() );
9677 sal_Int64 input = 15;
9678 sal_Int16 radix = 16;
9680 expVal += OString( "f" );
9681 aStrBuf.append( input, radix );
9683 CPPUNIT_ASSERT_MESSAGE
9685 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9686 aStrBuf.getStr()== expVal &&
9687 aStrBuf.getLength() == expVal.getLength()
9692 void append_037()
9694 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9695 OString expVal( aStrBuf.getStr() );
9696 sal_Int64 input = 0;
9697 sal_Int16 radix = 36;
9699 expVal += OString( "0" );
9700 aStrBuf.append( input, radix );
9702 CPPUNIT_ASSERT_MESSAGE
9704 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9705 aStrBuf.getStr()== expVal &&
9706 aStrBuf.getLength() == expVal.getLength()
9711 void append_038()
9713 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9714 OString expVal( aStrBuf.getStr() );
9715 sal_Int64 input = 4;
9716 sal_Int16 radix = 36;
9718 expVal += OString( "4" );
9719 aStrBuf.append( input, radix );
9721 CPPUNIT_ASSERT_MESSAGE
9723 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9724 aStrBuf.getStr()== expVal &&
9725 aStrBuf.getLength() == expVal.getLength()
9730 void append_039()
9732 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9733 OString expVal( aStrBuf.getStr() );
9734 sal_Int64 input = 8;
9735 sal_Int16 radix = 36;
9737 expVal += OString( "8" );
9738 aStrBuf.append( input, radix );
9740 CPPUNIT_ASSERT_MESSAGE
9742 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9743 aStrBuf.getStr()== expVal &&
9744 aStrBuf.getLength() == expVal.getLength()
9749 void append_040()
9751 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9752 OString expVal( aStrBuf.getStr() );
9753 sal_Int64 input = 35;
9754 sal_Int16 radix = 36;
9756 expVal += OString( "z" );
9757 aStrBuf.append( input, radix );
9759 CPPUNIT_ASSERT_MESSAGE
9761 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9762 aStrBuf.getStr()== expVal &&
9763 aStrBuf.getLength() == expVal.getLength()
9768 void append_041()
9770 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9771 OString expVal( aStrBuf.getStr() );
9772 sal_Int64 input = 0;
9773 sal_Int16 radix = 2;
9775 expVal += OString( "0" );
9776 aStrBuf.append( input, radix );
9778 CPPUNIT_ASSERT_MESSAGE
9780 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9781 aStrBuf.getStr()== expVal &&
9782 aStrBuf.getLength() == expVal.getLength()
9787 void append_042()
9789 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9790 OString expVal( aStrBuf.getStr() );
9791 sal_Int64 input = 4;
9792 sal_Int16 radix = 2;
9794 expVal += OString( "100" );
9795 aStrBuf.append( input, radix );
9797 CPPUNIT_ASSERT_MESSAGE
9799 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9800 aStrBuf.getStr()== expVal &&
9801 aStrBuf.getLength() == expVal.getLength()
9806 void append_043()
9808 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9809 OString expVal( aStrBuf.getStr() );
9810 sal_Int64 input = 8;
9811 sal_Int16 radix = 2;
9813 expVal += OString( "1000" );
9814 aStrBuf.append( input, radix );
9816 CPPUNIT_ASSERT_MESSAGE
9818 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9819 aStrBuf.getStr()== expVal &&
9820 aStrBuf.getLength() == expVal.getLength()
9825 void append_044()
9827 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9828 OString expVal( aStrBuf.getStr() );
9829 sal_Int64 input = 15;
9830 sal_Int16 radix = 2;
9832 expVal += OString( "1111" );
9833 aStrBuf.append( input, radix );
9835 CPPUNIT_ASSERT_MESSAGE
9837 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9838 aStrBuf.getStr()== expVal &&
9839 aStrBuf.getLength() == expVal.getLength()
9844 void append_045()
9846 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9847 OString expVal( aStrBuf.getStr() );
9848 sal_Int64 input = 0;
9849 sal_Int16 radix = 8;
9851 expVal += OString( "0" );
9852 aStrBuf.append( input, radix );
9854 CPPUNIT_ASSERT_MESSAGE
9856 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9857 aStrBuf.getStr()== expVal &&
9858 aStrBuf.getLength() == expVal.getLength()
9863 void append_046()
9865 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9866 OString expVal( aStrBuf.getStr() );
9867 sal_Int64 input = 4;
9868 sal_Int16 radix = 8;
9870 expVal += OString( "4" );
9871 aStrBuf.append( input, radix );
9873 CPPUNIT_ASSERT_MESSAGE
9875 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9876 aStrBuf.getStr()== expVal &&
9877 aStrBuf.getLength() == expVal.getLength()
9882 void append_047()
9884 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9885 OString expVal( aStrBuf.getStr() );
9886 sal_Int64 input = 8;
9887 sal_Int16 radix = 8;
9889 expVal += OString( "10" );
9890 aStrBuf.append( input, radix );
9892 CPPUNIT_ASSERT_MESSAGE
9894 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9895 aStrBuf.getStr()== expVal &&
9896 aStrBuf.getLength() == expVal.getLength()
9901 void append_048()
9903 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9904 OString expVal( aStrBuf.getStr() );
9905 sal_Int64 input = 15;
9906 sal_Int16 radix = 8;
9908 expVal += OString( "17" );
9909 aStrBuf.append( input, radix );
9911 CPPUNIT_ASSERT_MESSAGE
9913 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9914 aStrBuf.getStr()== expVal &&
9915 aStrBuf.getLength() == expVal.getLength()
9920 void append_049()
9922 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9923 OString expVal( aStrBuf.getStr() );
9924 sal_Int64 input = 0;
9925 sal_Int16 radix = 10;
9927 expVal += OString( "0" );
9928 aStrBuf.append( input, radix );
9930 CPPUNIT_ASSERT_MESSAGE
9932 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9933 aStrBuf.getStr()== expVal &&
9934 aStrBuf.getLength() == expVal.getLength()
9939 void append_050()
9941 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9942 OString expVal( aStrBuf.getStr() );
9943 sal_Int64 input = 4;
9944 sal_Int16 radix = 10;
9946 expVal += OString( "4" );
9947 aStrBuf.append( input, radix );
9949 CPPUNIT_ASSERT_MESSAGE
9951 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9952 aStrBuf.getStr()== expVal &&
9953 aStrBuf.getLength() == expVal.getLength()
9958 void append_051()
9960 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9961 OString expVal( aStrBuf.getStr() );
9962 sal_Int64 input = 8;
9963 sal_Int16 radix = 10;
9965 expVal += OString( "8" );
9966 aStrBuf.append( input, radix );
9968 CPPUNIT_ASSERT_MESSAGE
9970 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9971 aStrBuf.getStr()== expVal &&
9972 aStrBuf.getLength() == expVal.getLength()
9977 void append_052()
9979 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9980 OString expVal( aStrBuf.getStr() );
9981 sal_Int64 input = 15;
9982 sal_Int16 radix = 10;
9984 expVal += OString( "15" );
9985 aStrBuf.append( input, radix );
9987 CPPUNIT_ASSERT_MESSAGE
9989 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9990 aStrBuf.getStr()== expVal &&
9991 aStrBuf.getLength() == expVal.getLength()
9996 void append_053()
9998 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9999 OString expVal( aStrBuf.getStr() );
10000 sal_Int64 input = 0;
10001 sal_Int16 radix = 16;
10003 expVal += OString( "0" );
10004 aStrBuf.append( input, radix );
10006 CPPUNIT_ASSERT_MESSAGE
10008 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10009 aStrBuf.getStr()== expVal &&
10010 aStrBuf.getLength() == expVal.getLength()
10015 void append_054()
10017 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10018 OString expVal( aStrBuf.getStr() );
10019 sal_Int64 input = 4;
10020 sal_Int16 radix = 16;
10022 expVal += OString( "4" );
10023 aStrBuf.append( input, radix );
10025 CPPUNIT_ASSERT_MESSAGE
10027 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10028 aStrBuf.getStr()== expVal &&
10029 aStrBuf.getLength() == expVal.getLength()
10034 void append_055()
10036 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10037 OString expVal( aStrBuf.getStr() );
10038 sal_Int64 input = 8;
10039 sal_Int16 radix = 16;
10041 expVal += OString( "8" );
10042 aStrBuf.append( input, radix );
10044 CPPUNIT_ASSERT_MESSAGE
10046 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10047 aStrBuf.getStr()== expVal &&
10048 aStrBuf.getLength() == expVal.getLength()
10053 void append_056()
10055 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10056 OString expVal( aStrBuf.getStr() );
10057 sal_Int64 input = 15;
10058 sal_Int16 radix = 16;
10060 expVal += OString( "f" );
10061 aStrBuf.append( input, radix );
10063 CPPUNIT_ASSERT_MESSAGE
10065 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10066 aStrBuf.getStr()== expVal &&
10067 aStrBuf.getLength() == expVal.getLength()
10072 void append_057()
10074 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10075 OString expVal( aStrBuf.getStr() );
10076 sal_Int64 input = 0;
10077 sal_Int16 radix = 36;
10079 expVal += OString( "0" );
10080 aStrBuf.append( input, radix );
10082 CPPUNIT_ASSERT_MESSAGE
10084 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10085 aStrBuf.getStr()== expVal &&
10086 aStrBuf.getLength() == expVal.getLength()
10091 void append_058()
10093 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10094 OString expVal( aStrBuf.getStr() );
10095 sal_Int64 input = 4;
10096 sal_Int16 radix = 36;
10098 expVal += OString( "4" );
10099 aStrBuf.append( input, radix );
10101 CPPUNIT_ASSERT_MESSAGE
10103 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10104 aStrBuf.getStr()== expVal &&
10105 aStrBuf.getLength() == expVal.getLength()
10110 void append_059()
10112 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10113 OString expVal( aStrBuf.getStr() );
10114 sal_Int64 input = 8;
10115 sal_Int16 radix = 36;
10117 expVal += OString( "8" );
10118 aStrBuf.append( input, radix );
10120 CPPUNIT_ASSERT_MESSAGE
10122 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10123 aStrBuf.getStr()== expVal &&
10124 aStrBuf.getLength() == expVal.getLength()
10129 void append_060()
10131 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10132 OString expVal( aStrBuf.getStr() );
10133 sal_Int64 input = 35;
10134 sal_Int16 radix = 36;
10136 expVal += OString( "z" );
10137 aStrBuf.append( input, radix );
10139 CPPUNIT_ASSERT_MESSAGE
10141 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10142 aStrBuf.getStr()== expVal &&
10143 aStrBuf.getLength() == expVal.getLength()
10148 void append_061()
10150 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10151 OString expVal( aStrBuf.getStr() );
10152 sal_Int64 input = 0;
10153 sal_Int16 radix = 2;
10155 expVal += OString( "0" );
10156 aStrBuf.append( input, radix );
10158 CPPUNIT_ASSERT_MESSAGE
10160 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10161 aStrBuf.getStr()== expVal &&
10162 aStrBuf.getLength() == expVal.getLength()
10167 void append_062()
10169 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10170 OString expVal( aStrBuf.getStr() );
10171 sal_Int64 input = 4;
10172 sal_Int16 radix = 2;
10174 expVal += OString( "100" );
10175 aStrBuf.append( input, radix );
10177 CPPUNIT_ASSERT_MESSAGE
10179 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10180 aStrBuf.getStr()== expVal &&
10181 aStrBuf.getLength() == expVal.getLength()
10186 void append_063()
10188 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10189 OString expVal( aStrBuf.getStr() );
10190 sal_Int64 input = 8;
10191 sal_Int16 radix = 2;
10193 expVal += OString( "1000" );
10194 aStrBuf.append( input, radix );
10196 CPPUNIT_ASSERT_MESSAGE
10198 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10199 aStrBuf.getStr()== expVal &&
10200 aStrBuf.getLength() == expVal.getLength()
10205 void append_064()
10207 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10208 OString expVal( aStrBuf.getStr() );
10209 sal_Int64 input = 15;
10210 sal_Int16 radix = 2;
10212 expVal += OString( "1111" );
10213 aStrBuf.append( input, radix );
10215 CPPUNIT_ASSERT_MESSAGE
10217 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10218 aStrBuf.getStr()== expVal &&
10219 aStrBuf.getLength() == expVal.getLength()
10224 void append_065()
10226 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10227 OString expVal( aStrBuf.getStr() );
10228 sal_Int64 input = 0;
10229 sal_Int16 radix = 8;
10231 expVal += OString( "0" );
10232 aStrBuf.append( input, radix );
10234 CPPUNIT_ASSERT_MESSAGE
10236 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10237 aStrBuf.getStr()== expVal &&
10238 aStrBuf.getLength() == expVal.getLength()
10243 void append_066()
10245 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10246 OString expVal( aStrBuf.getStr() );
10247 sal_Int64 input = 4;
10248 sal_Int16 radix = 8;
10250 expVal += OString( "4" );
10251 aStrBuf.append( input, radix );
10253 CPPUNIT_ASSERT_MESSAGE
10255 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10256 aStrBuf.getStr()== expVal &&
10257 aStrBuf.getLength() == expVal.getLength()
10262 void append_067()
10264 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10265 OString expVal( aStrBuf.getStr() );
10266 sal_Int64 input = 8;
10267 sal_Int16 radix = 8;
10269 expVal += OString( "10" );
10270 aStrBuf.append( input, radix );
10272 CPPUNIT_ASSERT_MESSAGE
10274 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10275 aStrBuf.getStr()== expVal &&
10276 aStrBuf.getLength() == expVal.getLength()
10281 void append_068()
10283 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10284 OString expVal( aStrBuf.getStr() );
10285 sal_Int64 input = 15;
10286 sal_Int16 radix = 8;
10288 expVal += OString( "17" );
10289 aStrBuf.append( input, radix );
10291 CPPUNIT_ASSERT_MESSAGE
10293 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10294 aStrBuf.getStr()== expVal &&
10295 aStrBuf.getLength() == expVal.getLength()
10300 void append_069()
10302 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10303 OString expVal( aStrBuf.getStr() );
10304 sal_Int64 input = 0;
10305 sal_Int16 radix = 10;
10307 expVal += OString( "0" );
10308 aStrBuf.append( input, radix );
10310 CPPUNIT_ASSERT_MESSAGE
10312 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10313 aStrBuf.getStr()== expVal &&
10314 aStrBuf.getLength() == expVal.getLength()
10319 void append_070()
10321 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10322 OString expVal( aStrBuf.getStr() );
10323 sal_Int64 input = 4;
10324 sal_Int16 radix = 10;
10326 expVal += OString( "4" );
10327 aStrBuf.append( input, radix );
10329 CPPUNIT_ASSERT_MESSAGE
10331 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10332 aStrBuf.getStr()== expVal &&
10333 aStrBuf.getLength() == expVal.getLength()
10338 void append_071()
10340 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10341 OString expVal( aStrBuf.getStr() );
10342 sal_Int64 input = 8;
10343 sal_Int16 radix = 10;
10345 expVal += OString( "8" );
10346 aStrBuf.append( input, radix );
10348 CPPUNIT_ASSERT_MESSAGE
10350 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10351 aStrBuf.getStr()== expVal &&
10352 aStrBuf.getLength() == expVal.getLength()
10357 void append_072()
10359 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10360 OString expVal( aStrBuf.getStr() );
10361 sal_Int64 input = 15;
10362 sal_Int16 radix = 10;
10364 expVal += OString( "15" );
10365 aStrBuf.append( input, radix );
10367 CPPUNIT_ASSERT_MESSAGE
10369 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10370 aStrBuf.getStr()== expVal &&
10371 aStrBuf.getLength() == expVal.getLength()
10376 void append_073()
10378 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10379 OString expVal( aStrBuf.getStr() );
10380 sal_Int64 input = 0;
10381 sal_Int16 radix = 16;
10383 expVal += OString( "0" );
10384 aStrBuf.append( input, radix );
10386 CPPUNIT_ASSERT_MESSAGE
10388 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10389 aStrBuf.getStr()== expVal &&
10390 aStrBuf.getLength() == expVal.getLength()
10395 void append_074()
10397 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10398 OString expVal( aStrBuf.getStr() );
10399 sal_Int64 input = 4;
10400 sal_Int16 radix = 16;
10402 expVal += OString( "4" );
10403 aStrBuf.append( input, radix );
10405 CPPUNIT_ASSERT_MESSAGE
10407 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10408 aStrBuf.getStr()== expVal &&
10409 aStrBuf.getLength() == expVal.getLength()
10414 void append_075()
10416 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10417 OString expVal( aStrBuf.getStr() );
10418 sal_Int64 input = 8;
10419 sal_Int16 radix = 16;
10421 expVal += OString( "8" );
10422 aStrBuf.append( input, radix );
10424 CPPUNIT_ASSERT_MESSAGE
10426 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10427 aStrBuf.getStr()== expVal &&
10428 aStrBuf.getLength() == expVal.getLength()
10433 void append_076()
10435 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10436 OString expVal( aStrBuf.getStr() );
10437 sal_Int64 input = 15;
10438 sal_Int16 radix = 16;
10440 expVal += OString( "f" );
10441 aStrBuf.append( input, radix );
10443 CPPUNIT_ASSERT_MESSAGE
10445 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10446 aStrBuf.getStr()== expVal &&
10447 aStrBuf.getLength() == expVal.getLength()
10452 void append_077()
10454 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10455 OString expVal( aStrBuf.getStr() );
10456 sal_Int64 input = 0;
10457 sal_Int16 radix = 36;
10459 expVal += OString( "0" );
10460 aStrBuf.append( input, radix );
10462 CPPUNIT_ASSERT_MESSAGE
10464 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10465 aStrBuf.getStr()== expVal &&
10466 aStrBuf.getLength() == expVal.getLength()
10471 void append_078()
10473 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10474 OString expVal( aStrBuf.getStr() );
10475 sal_Int64 input = 4;
10476 sal_Int16 radix = 36;
10478 expVal += OString( "4" );
10479 aStrBuf.append( input, radix );
10481 CPPUNIT_ASSERT_MESSAGE
10483 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10484 aStrBuf.getStr()== expVal &&
10485 aStrBuf.getLength() == expVal.getLength()
10490 void append_079()
10492 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10493 OString expVal( aStrBuf.getStr() );
10494 sal_Int64 input = 8;
10495 sal_Int16 radix = 36;
10497 expVal += OString( "8" );
10498 aStrBuf.append( input, radix );
10500 CPPUNIT_ASSERT_MESSAGE
10502 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10503 aStrBuf.getStr()== expVal &&
10504 aStrBuf.getLength() == expVal.getLength()
10509 void append_080()
10511 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10512 OString expVal( aStrBuf.getStr() );
10513 sal_Int64 input = 35;
10514 sal_Int16 radix = 36;
10516 expVal += OString( "z" );
10517 aStrBuf.append( input, radix );
10519 CPPUNIT_ASSERT_MESSAGE
10521 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10522 aStrBuf.getStr()== expVal &&
10523 aStrBuf.getLength() == expVal.getLength()
10528 void append_081()
10530 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10531 OString expVal( aStrBuf.getStr() );
10532 sal_Int64 input = 0;
10533 sal_Int16 radix = 2;
10535 expVal += OString( "0" );
10536 aStrBuf.append( input, radix );
10538 CPPUNIT_ASSERT_MESSAGE
10540 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10541 aStrBuf.getStr()== expVal &&
10542 aStrBuf.getLength() == expVal.getLength()
10547 void append_082()
10549 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10550 OString expVal( aStrBuf.getStr() );
10551 sal_Int64 input = 4;
10552 sal_Int16 radix = 2;
10554 expVal += OString( "100" );
10555 aStrBuf.append( input, radix );
10557 CPPUNIT_ASSERT_MESSAGE
10559 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10560 aStrBuf.getStr()== expVal &&
10561 aStrBuf.getLength() == expVal.getLength()
10566 void append_083()
10568 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10569 OString expVal( aStrBuf.getStr() );
10570 sal_Int64 input = 8;
10571 sal_Int16 radix = 2;
10573 expVal += OString( "1000" );
10574 aStrBuf.append( input, radix );
10576 CPPUNIT_ASSERT_MESSAGE
10578 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10579 aStrBuf.getStr()== expVal &&
10580 aStrBuf.getLength() == expVal.getLength()
10585 void append_084()
10587 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10588 OString expVal( aStrBuf.getStr() );
10589 sal_Int64 input = 15;
10590 sal_Int16 radix = 2;
10592 expVal += OString( "1111" );
10593 aStrBuf.append( input, radix );
10595 CPPUNIT_ASSERT_MESSAGE
10597 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10598 aStrBuf.getStr()== expVal &&
10599 aStrBuf.getLength() == expVal.getLength()
10604 void append_085()
10606 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10607 OString expVal( aStrBuf.getStr() );
10608 sal_Int64 input = 0;
10609 sal_Int16 radix = 8;
10611 expVal += OString( "0" );
10612 aStrBuf.append( input, radix );
10614 CPPUNIT_ASSERT_MESSAGE
10616 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10617 aStrBuf.getStr()== expVal &&
10618 aStrBuf.getLength() == expVal.getLength()
10623 void append_086()
10625 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10626 OString expVal( aStrBuf.getStr() );
10627 sal_Int64 input = 4;
10628 sal_Int16 radix = 8;
10630 expVal += OString( "4" );
10631 aStrBuf.append( input, radix );
10633 CPPUNIT_ASSERT_MESSAGE
10635 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10636 aStrBuf.getStr()== expVal &&
10637 aStrBuf.getLength() == expVal.getLength()
10642 void append_087()
10644 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10645 OString expVal( aStrBuf.getStr() );
10646 sal_Int64 input = 8;
10647 sal_Int16 radix = 8;
10649 expVal += OString( "10" );
10650 aStrBuf.append( input, radix );
10652 CPPUNIT_ASSERT_MESSAGE
10654 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10655 aStrBuf.getStr()== expVal &&
10656 aStrBuf.getLength() == expVal.getLength()
10661 void append_088()
10663 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10664 OString expVal( aStrBuf.getStr() );
10665 sal_Int64 input = 15;
10666 sal_Int16 radix = 8;
10668 expVal += OString( "17" );
10669 aStrBuf.append( input, radix );
10671 CPPUNIT_ASSERT_MESSAGE
10673 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10674 aStrBuf.getStr()== expVal &&
10675 aStrBuf.getLength() == expVal.getLength()
10680 void append_089()
10682 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10683 OString expVal( aStrBuf.getStr() );
10684 sal_Int64 input = 0;
10685 sal_Int16 radix = 10;
10687 expVal += OString( "0" );
10688 aStrBuf.append( input, radix );
10690 CPPUNIT_ASSERT_MESSAGE
10692 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10693 aStrBuf.getStr()== expVal &&
10694 aStrBuf.getLength() == expVal.getLength()
10699 void append_090()
10701 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10702 OString expVal( aStrBuf.getStr() );
10703 sal_Int64 input = 4;
10704 sal_Int16 radix = 10;
10706 expVal += OString( "4" );
10707 aStrBuf.append( input, radix );
10709 CPPUNIT_ASSERT_MESSAGE
10711 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10712 aStrBuf.getStr()== expVal &&
10713 aStrBuf.getLength() == expVal.getLength()
10718 void append_091()
10720 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10721 OString expVal( aStrBuf.getStr() );
10722 sal_Int64 input = 8;
10723 sal_Int16 radix = 10;
10725 expVal += OString( "8" );
10726 aStrBuf.append( input, radix );
10728 CPPUNIT_ASSERT_MESSAGE
10730 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10731 aStrBuf.getStr()== expVal &&
10732 aStrBuf.getLength() == expVal.getLength()
10737 void append_092()
10739 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10740 OString expVal( aStrBuf.getStr() );
10741 sal_Int64 input = 15;
10742 sal_Int16 radix = 10;
10744 expVal += OString( "15" );
10745 aStrBuf.append( input, radix );
10747 CPPUNIT_ASSERT_MESSAGE
10749 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10750 aStrBuf.getStr()== expVal &&
10751 aStrBuf.getLength() == expVal.getLength()
10756 void append_093()
10758 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10759 OString expVal( aStrBuf.getStr() );
10760 sal_Int64 input = 0;
10761 sal_Int16 radix = 16;
10763 expVal += OString( "0" );
10764 aStrBuf.append( input, radix );
10766 CPPUNIT_ASSERT_MESSAGE
10768 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10769 aStrBuf.getStr()== expVal &&
10770 aStrBuf.getLength() == expVal.getLength()
10775 void append_094()
10777 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10778 OString expVal( aStrBuf.getStr() );
10779 sal_Int64 input = 4;
10780 sal_Int16 radix = 16;
10782 expVal += OString( "4" );
10783 aStrBuf.append( input, radix );
10785 CPPUNIT_ASSERT_MESSAGE
10787 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10788 aStrBuf.getStr()== expVal &&
10789 aStrBuf.getLength() == expVal.getLength()
10794 void append_095()
10796 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10797 OString expVal( aStrBuf.getStr() );
10798 sal_Int64 input = 8;
10799 sal_Int16 radix = 16;
10801 expVal += OString( "8" );
10802 aStrBuf.append( input, radix );
10804 CPPUNIT_ASSERT_MESSAGE
10806 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10807 aStrBuf.getStr()== expVal &&
10808 aStrBuf.getLength() == expVal.getLength()
10813 void append_096()
10815 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10816 OString expVal( aStrBuf.getStr() );
10817 sal_Int64 input = 15;
10818 sal_Int16 radix = 16;
10820 expVal += OString( "f" );
10821 aStrBuf.append( input, radix );
10823 CPPUNIT_ASSERT_MESSAGE
10825 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10826 aStrBuf.getStr()== expVal &&
10827 aStrBuf.getLength() == expVal.getLength()
10832 void append_097()
10834 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10835 OString expVal( aStrBuf.getStr() );
10836 sal_Int64 input = 0;
10837 sal_Int16 radix = 36;
10839 expVal += OString( "0" );
10840 aStrBuf.append( input, radix );
10842 CPPUNIT_ASSERT_MESSAGE
10844 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10845 aStrBuf.getStr()== expVal &&
10846 aStrBuf.getLength() == expVal.getLength()
10851 void append_098()
10853 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10854 OString expVal( aStrBuf.getStr() );
10855 sal_Int64 input = 4;
10856 sal_Int16 radix = 36;
10858 expVal += OString( "4" );
10859 aStrBuf.append( input, radix );
10861 CPPUNIT_ASSERT_MESSAGE
10863 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10864 aStrBuf.getStr()== expVal &&
10865 aStrBuf.getLength() == expVal.getLength()
10870 void append_099()
10872 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10873 OString expVal( aStrBuf.getStr() );
10874 sal_Int64 input = 8;
10875 sal_Int16 radix = 36;
10877 expVal += OString( "8" );
10878 aStrBuf.append( input, radix );
10880 CPPUNIT_ASSERT_MESSAGE
10882 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10883 aStrBuf.getStr()== expVal &&
10884 aStrBuf.getLength() == expVal.getLength()
10889 void append_100()
10891 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
10892 OString expVal( aStrBuf.getStr() );
10893 sal_Int64 input = 35;
10894 sal_Int16 radix = 36;
10896 expVal += OString( "z" );
10897 aStrBuf.append( input, radix );
10899 CPPUNIT_ASSERT_MESSAGE
10901 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10902 aStrBuf.getStr()== expVal &&
10903 aStrBuf.getLength() == expVal.getLength()
10908 SAL_CPPUNIT_TEST_SUITE( append_007_Int64 );
10909 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
10910 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
10911 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
10912 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
10913 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
10914 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
10915 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
10916 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
10917 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
10918 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
10919 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
10920 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
10921 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
10922 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
10923 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
10924 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
10925 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
10926 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
10927 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
10928 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
10929 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
10930 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
10931 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
10932 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
10933 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
10934 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
10935 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
10936 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
10937 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
10938 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
10939 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
10940 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
10941 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
10942 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
10943 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
10944 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
10945 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
10946 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
10947 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
10948 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
10949 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
10950 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
10951 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
10952 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
10953 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
10954 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
10955 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
10956 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
10957 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
10958 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
10959 SAL_CPPUNIT_TEST_SUITE_END();
10961 //------------------------------------------------------------------------
10962 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
10963 // where i = large constants
10964 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
10965 // where i = large constants
10966 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
10967 // where i = large constants
10968 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
10969 // where i = large constants
10970 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
10971 // where i = large constants
10972 //------------------------------------------------------------------------
10973 class append_007_Int64_Bounderies : public CppUnit::TestFixture
10975 OString* arrOUS[5];
10977 public:
10978 void setUp()
10980 arrOUS[0] = new OString( kTestStr7 );
10981 arrOUS[1] = new OString( );
10982 arrOUS[2] = new OString( kTestStr25 );
10983 arrOUS[3] = new OString( "" );
10984 arrOUS[4] = new OString( kTestStr28 );
10988 void tearDown()
10990 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
10991 delete arrOUS[3]; delete arrOUS[4];
10994 void append_001()
10996 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
10997 OString expVal( aStrBuf.getStr() );
10998 sal_Int64 input = kSInt8Max;
10999 sal_Int16 radix = 2;
11001 expVal += OString( "1111111" );
11002 aStrBuf.append( input, radix );
11004 CPPUNIT_ASSERT_MESSAGE
11006 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
11007 aStrBuf.getStr()== expVal &&
11008 aStrBuf.getLength() == expVal.getLength()
11013 void append_002()
11015 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11016 OString expVal( aStrBuf.getStr() );
11017 sal_Int64 input = kSInt64Max;
11018 sal_Int16 radix = 2;
11020 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11021 aStrBuf.append( input, radix );
11023 CPPUNIT_ASSERT_MESSAGE
11025 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
11026 aStrBuf.getStr()== expVal &&
11027 aStrBuf.getLength() == expVal.getLength()
11032 void append_003()
11034 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11035 OString expVal( aStrBuf.getStr() );
11036 sal_Int64 input = kSInt8Max;
11037 sal_Int16 radix = 8;
11039 expVal += OString( "177" );
11040 aStrBuf.append( input, radix );
11042 CPPUNIT_ASSERT_MESSAGE
11044 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
11045 aStrBuf.getStr()== expVal &&
11046 aStrBuf.getLength() == expVal.getLength()
11051 void append_004()
11053 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11054 OString expVal( aStrBuf.getStr() );
11055 sal_Int64 input = kSInt64Max;
11056 sal_Int16 radix = 8;
11058 expVal += OString( "777777777777777777777" );
11059 aStrBuf.append( input, radix );
11061 CPPUNIT_ASSERT_MESSAGE
11063 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
11064 aStrBuf.getStr()== expVal &&
11065 aStrBuf.getLength() == expVal.getLength()
11070 void append_005()
11072 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11073 OString expVal( aStrBuf.getStr() );
11074 sal_Int64 input = kSInt8Max;
11075 sal_Int16 radix = 10;
11077 expVal += OString( "127" );
11078 aStrBuf.append( input, radix );
11080 CPPUNIT_ASSERT_MESSAGE
11082 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
11083 aStrBuf.getStr()== expVal &&
11084 aStrBuf.getLength() == expVal.getLength()
11089 void append_006()
11091 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11092 OString expVal( aStrBuf.getStr() );
11093 sal_Int64 input = kSInt64Max;
11094 sal_Int16 radix = 10;
11096 expVal += OString( "9223372036854775807" );
11097 aStrBuf.append( input, radix );
11099 CPPUNIT_ASSERT_MESSAGE
11101 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
11102 aStrBuf.getStr()== expVal &&
11103 aStrBuf.getLength() == expVal.getLength()
11108 void append_007()
11110 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11111 OString expVal( aStrBuf.getStr() );
11112 sal_Int64 input = kSInt8Max;
11113 sal_Int16 radix = 16;
11115 expVal += OString( "7f" );
11116 aStrBuf.append( input, radix );
11118 CPPUNIT_ASSERT_MESSAGE
11120 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
11121 aStrBuf.getStr()== expVal &&
11122 aStrBuf.getLength() == expVal.getLength()
11127 void append_008()
11129 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11130 OString expVal( aStrBuf.getStr() );
11131 sal_Int64 input = kSInt64Max;
11132 sal_Int16 radix = 16;
11134 expVal += OString( "7fffffffffffffff" );
11135 aStrBuf.append( input, radix );
11137 CPPUNIT_ASSERT_MESSAGE
11139 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
11140 aStrBuf.getStr()== expVal &&
11141 aStrBuf.getLength() == expVal.getLength()
11146 void append_009()
11148 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11149 OString expVal( aStrBuf.getStr() );
11150 sal_Int64 input = kSInt8Max;
11151 sal_Int16 radix = 36;
11153 expVal += OString( "3j" );
11154 aStrBuf.append( input, radix );
11156 CPPUNIT_ASSERT_MESSAGE
11158 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
11159 aStrBuf.getStr()== expVal &&
11160 aStrBuf.getLength() == expVal.getLength()
11165 void append_010()
11167 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11168 OString expVal( aStrBuf.getStr() );
11169 sal_Int64 input = kSInt64Max;
11170 sal_Int16 radix = 36;
11172 expVal += OString( "1y2p0ij32e8e7" );
11173 aStrBuf.append( input, radix );
11175 CPPUNIT_ASSERT_MESSAGE
11177 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
11178 aStrBuf.getStr()== expVal &&
11179 aStrBuf.getLength() == expVal.getLength()
11184 void append_011()
11186 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11187 OString expVal( aStrBuf.getStr() );
11188 sal_Int64 input = kSInt8Max;
11189 sal_Int16 radix = 2;
11191 expVal += OString( "1111111" );
11192 aStrBuf.append( input, radix );
11194 CPPUNIT_ASSERT_MESSAGE
11196 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
11197 aStrBuf.getStr()== expVal &&
11198 aStrBuf.getLength() == expVal.getLength()
11203 void append_012()
11205 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11206 OString expVal( aStrBuf.getStr() );
11207 sal_Int64 input = kSInt64Max;
11208 sal_Int16 radix = 2;
11210 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11211 aStrBuf.append( input, radix );
11213 CPPUNIT_ASSERT_MESSAGE
11215 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
11216 aStrBuf.getStr()== expVal &&
11217 aStrBuf.getLength() == expVal.getLength()
11222 void append_013()
11224 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11225 OString expVal( aStrBuf.getStr() );
11226 sal_Int64 input = kSInt8Max;
11227 sal_Int16 radix = 8;
11229 expVal += OString( "177" );
11230 aStrBuf.append( input, radix );
11232 CPPUNIT_ASSERT_MESSAGE
11234 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
11235 aStrBuf.getStr()== expVal &&
11236 aStrBuf.getLength() == expVal.getLength()
11241 void append_014()
11243 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11244 OString expVal( aStrBuf.getStr() );
11245 sal_Int64 input = kSInt64Max;
11246 sal_Int16 radix = 8;
11248 expVal += OString( "777777777777777777777" );
11249 aStrBuf.append( input, radix );
11251 CPPUNIT_ASSERT_MESSAGE
11253 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
11254 aStrBuf.getStr()== expVal &&
11255 aStrBuf.getLength() == expVal.getLength()
11260 void append_015()
11262 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11263 OString expVal( aStrBuf.getStr() );
11264 sal_Int64 input = kSInt8Max;
11265 sal_Int16 radix = 10;
11267 expVal += OString( "127" );
11268 aStrBuf.append( input, radix );
11270 CPPUNIT_ASSERT_MESSAGE
11272 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
11273 aStrBuf.getStr()== expVal &&
11274 aStrBuf.getLength() == expVal.getLength()
11279 void append_016()
11281 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11282 OString expVal( aStrBuf.getStr() );
11283 sal_Int64 input = kSInt64Max;
11284 sal_Int16 radix = 10;
11286 expVal += OString( "9223372036854775807" );
11287 aStrBuf.append( input, radix );
11289 CPPUNIT_ASSERT_MESSAGE
11291 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
11292 aStrBuf.getStr()== expVal &&
11293 aStrBuf.getLength() == expVal.getLength()
11298 void append_017()
11300 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11301 OString expVal( aStrBuf.getStr() );
11302 sal_Int64 input = kSInt8Max;
11303 sal_Int16 radix = 16;
11305 expVal += OString( "7f" );
11306 aStrBuf.append( input, radix );
11308 CPPUNIT_ASSERT_MESSAGE
11310 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
11311 aStrBuf.getStr()== expVal &&
11312 aStrBuf.getLength() == expVal.getLength()
11317 void append_018()
11319 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11320 OString expVal( aStrBuf.getStr() );
11321 sal_Int64 input = kSInt64Max;
11322 sal_Int16 radix = 16;
11324 expVal += OString( "7fffffffffffffff" );
11325 aStrBuf.append( input, radix );
11327 CPPUNIT_ASSERT_MESSAGE
11329 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
11330 aStrBuf.getStr()== expVal &&
11331 aStrBuf.getLength() == expVal.getLength()
11336 void append_019()
11338 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11339 OString expVal( aStrBuf.getStr() );
11340 sal_Int64 input = kSInt8Max;
11341 sal_Int16 radix = 36;
11343 expVal += OString( "3j" );
11344 aStrBuf.append( input, radix );
11346 CPPUNIT_ASSERT_MESSAGE
11348 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
11349 aStrBuf.getStr()== expVal &&
11350 aStrBuf.getLength() == expVal.getLength()
11355 void append_020()
11357 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11358 OString expVal( aStrBuf.getStr() );
11359 sal_Int64 input = kSInt64Max;
11360 sal_Int16 radix = 36;
11362 expVal += OString( "1y2p0ij32e8e7" );
11363 aStrBuf.append( input, radix );
11365 CPPUNIT_ASSERT_MESSAGE
11367 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
11368 aStrBuf.getStr()== expVal &&
11369 aStrBuf.getLength() == expVal.getLength()
11374 void append_021()
11376 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11377 OString expVal( aStrBuf.getStr() );
11378 sal_Int64 input = kSInt8Max;
11379 sal_Int16 radix = 2;
11381 expVal += OString( "1111111" );
11382 aStrBuf.append( input, radix );
11384 CPPUNIT_ASSERT_MESSAGE
11386 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11387 aStrBuf.getStr()== expVal &&
11388 aStrBuf.getLength() == expVal.getLength()
11393 void append_022()
11395 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11396 OString expVal( aStrBuf.getStr() );
11397 sal_Int64 input = kSInt64Max;
11398 sal_Int16 radix = 2;
11400 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11401 aStrBuf.append( input, radix );
11403 CPPUNIT_ASSERT_MESSAGE
11405 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11406 aStrBuf.getStr()== expVal &&
11407 aStrBuf.getLength() == expVal.getLength()
11412 void append_023()
11414 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11415 OString expVal( aStrBuf.getStr() );
11416 sal_Int64 input = kSInt8Max;
11417 sal_Int16 radix = 8;
11419 expVal += OString( "177" );
11420 aStrBuf.append( input, radix );
11422 CPPUNIT_ASSERT_MESSAGE
11424 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11425 aStrBuf.getStr()== expVal &&
11426 aStrBuf.getLength() == expVal.getLength()
11431 void append_024()
11433 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11434 OString expVal( aStrBuf.getStr() );
11435 sal_Int64 input = kSInt64Max;
11436 sal_Int16 radix = 8;
11438 expVal += OString( "777777777777777777777" );
11439 aStrBuf.append( input, radix );
11441 CPPUNIT_ASSERT_MESSAGE
11443 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11444 aStrBuf.getStr()== expVal &&
11445 aStrBuf.getLength() == expVal.getLength()
11450 void append_025()
11452 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11453 OString expVal( aStrBuf.getStr() );
11454 sal_Int64 input = kSInt8Max;
11455 sal_Int16 radix = 10;
11457 expVal += OString( "127" );
11458 aStrBuf.append( input, radix );
11460 CPPUNIT_ASSERT_MESSAGE
11462 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
11463 aStrBuf.getStr()== expVal &&
11464 aStrBuf.getLength() == expVal.getLength()
11469 void append_026()
11471 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11472 OString expVal( aStrBuf.getStr() );
11473 sal_Int64 input = kSInt64Max;
11474 sal_Int16 radix = 10;
11476 expVal += OString( "9223372036854775807" );
11477 aStrBuf.append( input, radix );
11479 CPPUNIT_ASSERT_MESSAGE
11481 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
11482 aStrBuf.getStr()== expVal &&
11483 aStrBuf.getLength() == expVal.getLength()
11488 void append_027()
11490 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11491 OString expVal( aStrBuf.getStr() );
11492 sal_Int64 input = kSInt8Max;
11493 sal_Int16 radix = 16;
11495 expVal += OString( "7f" );
11496 aStrBuf.append( input, radix );
11498 CPPUNIT_ASSERT_MESSAGE
11500 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
11501 aStrBuf.getStr()== expVal &&
11502 aStrBuf.getLength() == expVal.getLength()
11507 void append_028()
11509 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11510 OString expVal( aStrBuf.getStr() );
11511 sal_Int64 input = kSInt64Max;
11512 sal_Int16 radix = 16;
11514 expVal += OString( "7fffffffffffffff" );
11515 aStrBuf.append( input, radix );
11517 CPPUNIT_ASSERT_MESSAGE
11519 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
11520 aStrBuf.getStr()== expVal &&
11521 aStrBuf.getLength() == expVal.getLength()
11526 void append_029()
11528 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11529 OString expVal( aStrBuf.getStr() );
11530 sal_Int64 input = kSInt8Max;
11531 sal_Int16 radix = 36;
11533 expVal += OString( "3j" );
11534 aStrBuf.append( input, radix );
11536 CPPUNIT_ASSERT_MESSAGE
11538 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
11539 aStrBuf.getStr()== expVal &&
11540 aStrBuf.getLength() == expVal.getLength()
11545 void append_030()
11547 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11548 OString expVal( aStrBuf.getStr() );
11549 sal_Int64 input = kSInt64Max;
11550 sal_Int16 radix = 36;
11552 expVal += OString( "1y2p0ij32e8e7" );
11553 aStrBuf.append( input, radix );
11555 CPPUNIT_ASSERT_MESSAGE
11557 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
11558 aStrBuf.getStr()== expVal &&
11559 aStrBuf.getLength() == expVal.getLength()
11564 void append_031()
11566 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11567 OString expVal( aStrBuf.getStr() );
11568 sal_Int64 input = kSInt8Max;
11569 sal_Int16 radix = 2;
11571 expVal += OString( "1111111" );
11572 aStrBuf.append( input, radix );
11574 CPPUNIT_ASSERT_MESSAGE
11576 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
11577 aStrBuf.getStr()== expVal &&
11578 aStrBuf.getLength() == expVal.getLength()
11583 void append_032()
11585 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11586 OString expVal( aStrBuf.getStr() );
11587 sal_Int64 input = kSInt64Max;
11588 sal_Int16 radix = 2;
11590 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11591 aStrBuf.append( input, radix );
11593 CPPUNIT_ASSERT_MESSAGE
11595 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
11596 aStrBuf.getStr()== expVal &&
11597 aStrBuf.getLength() == expVal.getLength()
11602 void append_033()
11604 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11605 OString expVal( aStrBuf.getStr() );
11606 sal_Int64 input = kSInt8Max;
11607 sal_Int16 radix = 8;
11609 expVal += OString( "177" );
11610 aStrBuf.append( input, radix );
11612 CPPUNIT_ASSERT_MESSAGE
11614 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
11615 aStrBuf.getStr()== expVal &&
11616 aStrBuf.getLength() == expVal.getLength()
11621 void append_034()
11623 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11624 OString expVal( aStrBuf.getStr() );
11625 sal_Int64 input = kSInt64Max;
11626 sal_Int16 radix = 8;
11628 expVal += OString( "777777777777777777777" );
11629 aStrBuf.append( input, radix );
11631 CPPUNIT_ASSERT_MESSAGE
11633 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
11634 aStrBuf.getStr()== expVal &&
11635 aStrBuf.getLength() == expVal.getLength()
11640 void append_035()
11642 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11643 OString expVal( aStrBuf.getStr() );
11644 sal_Int64 input = kSInt8Max;
11645 sal_Int16 radix = 10;
11647 expVal += OString( "127" );
11648 aStrBuf.append( input, radix );
11650 CPPUNIT_ASSERT_MESSAGE
11652 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
11653 aStrBuf.getStr()== expVal &&
11654 aStrBuf.getLength() == expVal.getLength()
11659 void append_036()
11661 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11662 OString expVal( aStrBuf.getStr() );
11663 sal_Int64 input = kSInt64Max;
11664 sal_Int16 radix = 10;
11666 expVal += OString( "9223372036854775807" );
11667 aStrBuf.append( input, radix );
11669 CPPUNIT_ASSERT_MESSAGE
11671 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
11672 aStrBuf.getStr()== expVal &&
11673 aStrBuf.getLength() == expVal.getLength()
11678 void append_037()
11680 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11681 OString expVal( aStrBuf.getStr() );
11682 sal_Int64 input = kSInt8Max;
11683 sal_Int16 radix = 16;
11685 expVal += OString( "7f" );
11686 aStrBuf.append( input, radix );
11688 CPPUNIT_ASSERT_MESSAGE
11690 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
11691 aStrBuf.getStr()== expVal &&
11692 aStrBuf.getLength() == expVal.getLength()
11697 void append_038()
11699 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11700 OString expVal( aStrBuf.getStr() );
11701 sal_Int64 input = kSInt64Max;
11702 sal_Int16 radix = 16;
11704 expVal += OString( "7fffffffffffffff" );
11705 aStrBuf.append( input, radix );
11707 CPPUNIT_ASSERT_MESSAGE
11709 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
11710 aStrBuf.getStr()== expVal &&
11711 aStrBuf.getLength() == expVal.getLength()
11716 void append_039()
11718 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11719 OString expVal( aStrBuf.getStr() );
11720 sal_Int64 input = kSInt8Max;
11721 sal_Int16 radix = 36;
11723 expVal += OString( "3j" );
11724 aStrBuf.append( input, radix );
11726 CPPUNIT_ASSERT_MESSAGE
11728 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
11729 aStrBuf.getStr()== expVal &&
11730 aStrBuf.getLength() == expVal.getLength()
11735 void append_040()
11737 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11738 OString expVal( aStrBuf.getStr() );
11739 sal_Int64 input = kSInt64Max;
11740 sal_Int16 radix = 36;
11742 expVal += OString( "1y2p0ij32e8e7" );
11743 aStrBuf.append( input, radix );
11745 CPPUNIT_ASSERT_MESSAGE
11747 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
11748 aStrBuf.getStr()== expVal &&
11749 aStrBuf.getLength() == expVal.getLength()
11754 void append_041()
11756 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11757 OString expVal( aStrBuf.getStr() );
11758 sal_Int64 input = kSInt8Max;
11759 sal_Int16 radix = 2;
11761 expVal += OString( "1111111" );
11762 aStrBuf.append( input, radix );
11764 CPPUNIT_ASSERT_MESSAGE
11766 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
11767 aStrBuf.getStr()== expVal &&
11768 aStrBuf.getLength() == expVal.getLength()
11773 void append_042()
11775 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11776 OString expVal( aStrBuf.getStr() );
11777 sal_Int64 input = kSInt64Max;
11778 sal_Int16 radix = 2;
11780 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11781 aStrBuf.append( input, radix );
11783 CPPUNIT_ASSERT_MESSAGE
11785 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
11786 aStrBuf.getStr()== expVal &&
11787 aStrBuf.getLength() == expVal.getLength()
11792 void append_043()
11794 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11795 OString expVal( aStrBuf.getStr() );
11796 sal_Int64 input = kSInt8Max;
11797 sal_Int16 radix = 8;
11799 expVal += OString( "177" );
11800 aStrBuf.append( input, radix );
11802 CPPUNIT_ASSERT_MESSAGE
11804 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
11805 aStrBuf.getStr()== expVal &&
11806 aStrBuf.getLength() == expVal.getLength()
11811 void append_044()
11813 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11814 OString expVal( aStrBuf.getStr() );
11815 sal_Int64 input = kSInt64Max;
11816 sal_Int16 radix = 8;
11818 expVal += OString( "777777777777777777777" );
11819 aStrBuf.append( input, radix );
11821 CPPUNIT_ASSERT_MESSAGE
11823 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
11824 aStrBuf.getStr()== expVal &&
11825 aStrBuf.getLength() == expVal.getLength()
11830 void append_045()
11832 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11833 OString expVal( aStrBuf.getStr() );
11834 sal_Int64 input = kSInt8Max;
11835 sal_Int16 radix = 10;
11837 expVal += OString( "127" );
11838 aStrBuf.append( input, radix );
11840 CPPUNIT_ASSERT_MESSAGE
11842 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
11843 aStrBuf.getStr()== expVal &&
11844 aStrBuf.getLength() == expVal.getLength()
11849 void append_046()
11851 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11852 OString expVal( aStrBuf.getStr() );
11853 sal_Int64 input = kSInt64Max;
11854 sal_Int16 radix = 10;
11856 expVal += OString( "9223372036854775807" );
11857 aStrBuf.append( input, radix );
11859 CPPUNIT_ASSERT_MESSAGE
11861 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
11862 aStrBuf.getStr()== expVal &&
11863 aStrBuf.getLength() == expVal.getLength()
11868 void append_047()
11870 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11871 OString expVal( aStrBuf.getStr() );
11872 sal_Int64 input = kSInt8Max;
11873 sal_Int16 radix = 16;
11875 expVal += OString( "7f" );
11876 aStrBuf.append( input, radix );
11878 CPPUNIT_ASSERT_MESSAGE
11880 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
11881 aStrBuf.getStr()== expVal &&
11882 aStrBuf.getLength() == expVal.getLength()
11887 void append_048()
11889 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11890 OString expVal( aStrBuf.getStr() );
11891 sal_Int64 input = kSInt64Max;
11892 sal_Int16 radix = 16;
11894 expVal += OString( "7fffffffffffffff" );
11895 aStrBuf.append( input, radix );
11897 CPPUNIT_ASSERT_MESSAGE
11899 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
11900 aStrBuf.getStr()== expVal &&
11901 aStrBuf.getLength() == expVal.getLength()
11906 void append_049()
11908 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11909 OString expVal( aStrBuf.getStr() );
11910 sal_Int64 input = kSInt8Max;
11911 sal_Int16 radix = 36;
11913 expVal += OString( "3j" );
11914 aStrBuf.append( input, radix );
11916 CPPUNIT_ASSERT_MESSAGE
11918 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
11919 aStrBuf.getStr()== expVal &&
11920 aStrBuf.getLength() == expVal.getLength()
11925 void append_050()
11927 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11928 OString expVal( aStrBuf.getStr() );
11929 sal_Int64 input = kSInt64Max;
11930 sal_Int16 radix = 36;
11932 expVal += OString( "1y2p0ij32e8e7" );
11933 aStrBuf.append( input, radix );
11935 CPPUNIT_ASSERT_MESSAGE
11937 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
11938 aStrBuf.getStr()== expVal &&
11939 aStrBuf.getLength() == expVal.getLength()
11944 SAL_CPPUNIT_TEST_SUITE( append_007_Int64_Bounderies );
11945 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
11946 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
11947 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
11948 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
11949 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
11950 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
11951 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
11952 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
11953 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
11954 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
11955 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
11956 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
11957 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
11958 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
11959 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
11960 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
11961 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
11962 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
11963 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
11964 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
11965 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
11966 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
11967 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
11968 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
11969 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
11970 SAL_CPPUNIT_TEST_SUITE_END();
11972 //------------------------------------------------------------------------
11973 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
11974 // for negative value
11975 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
11976 // for negative value
11977 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
11978 // for negative value
11979 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
11980 // for negative value
11981 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
11982 // for negative value
11983 //------------------------------------------------------------------------
11984 class append_007_Int64_Negative : public CppUnit::TestFixture
11986 OString* arrOUS[5];
11988 public:
11989 void setUp()
11991 arrOUS[0] = new OString( kTestStr7 );
11992 arrOUS[1] = new OString( );
11993 arrOUS[2] = new OString( kTestStr25 );
11994 arrOUS[3] = new OString( "" );
11995 arrOUS[4] = new OString( kTestStr28 );
11999 void tearDown()
12001 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
12002 delete arrOUS[3]; delete arrOUS[4];
12005 void append_001()
12007 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12008 OString expVal( aStrBuf.getStr() );
12009 sal_Int64 input = -0;
12010 sal_Int16 radix = 2;
12012 expVal += OString( "0" );
12013 aStrBuf.append( input, radix );
12015 CPPUNIT_ASSERT_MESSAGE
12017 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12018 aStrBuf.getStr()== expVal &&
12019 aStrBuf.getLength() == expVal.getLength()
12024 void append_002()
12026 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12027 OString expVal( aStrBuf.getStr() );
12028 sal_Int64 input = -4;
12029 sal_Int16 radix = 2;
12031 expVal += OString( "-" );
12032 expVal += OString( "100" );
12033 aStrBuf.append( input, radix );
12035 CPPUNIT_ASSERT_MESSAGE
12037 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12038 aStrBuf.getStr()== expVal &&
12039 aStrBuf.getLength() == expVal.getLength()
12044 void append_003()
12046 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12047 OString expVal( aStrBuf.getStr() );
12048 sal_Int64 input = -8;
12049 sal_Int16 radix = 2;
12051 expVal += OString( "-" );
12052 expVal += OString( "1000" );
12053 aStrBuf.append( input, radix );
12055 CPPUNIT_ASSERT_MESSAGE
12057 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12058 aStrBuf.getStr()== expVal &&
12059 aStrBuf.getLength() == expVal.getLength()
12064 void append_004()
12066 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12067 OString expVal( aStrBuf.getStr() );
12068 sal_Int64 input = -15;
12069 sal_Int16 radix = 2;
12071 expVal += OString( "-" );
12072 expVal += OString( "1111" );
12073 aStrBuf.append( input, radix );
12075 CPPUNIT_ASSERT_MESSAGE
12077 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12078 aStrBuf.getStr()== expVal &&
12079 aStrBuf.getLength() == expVal.getLength()
12084 void append_005()
12086 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12087 OString expVal( aStrBuf.getStr() );
12088 sal_Int64 input = -0;
12089 sal_Int16 radix = 8;
12091 expVal += OString( "0" );
12092 aStrBuf.append( input, radix );
12094 CPPUNIT_ASSERT_MESSAGE
12096 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12097 aStrBuf.getStr()== expVal &&
12098 aStrBuf.getLength() == expVal.getLength()
12103 void append_006()
12105 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12106 OString expVal( aStrBuf.getStr() );
12107 sal_Int64 input = -4;
12108 sal_Int16 radix = 8;
12110 expVal += OString( "-" );
12111 expVal += OString( "4" );
12112 aStrBuf.append( input, radix );
12114 CPPUNIT_ASSERT_MESSAGE
12116 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12117 aStrBuf.getStr()== expVal &&
12118 aStrBuf.getLength() == expVal.getLength()
12123 void append_007()
12125 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12126 OString expVal( aStrBuf.getStr() );
12127 sal_Int64 input = -8;
12128 sal_Int16 radix = 8;
12130 expVal += OString( "-" );
12131 expVal += OString( "10" );
12132 aStrBuf.append( input, radix );
12134 CPPUNIT_ASSERT_MESSAGE
12136 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12137 aStrBuf.getStr()== expVal &&
12138 aStrBuf.getLength() == expVal.getLength()
12143 void append_008()
12145 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12146 OString expVal( aStrBuf.getStr() );
12147 sal_Int64 input = -15;
12148 sal_Int16 radix = 8;
12150 expVal += OString( "-" );
12151 expVal += OString( "17" );
12152 aStrBuf.append( input, radix );
12154 CPPUNIT_ASSERT_MESSAGE
12156 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12157 aStrBuf.getStr()== expVal &&
12158 aStrBuf.getLength() == expVal.getLength()
12163 void append_009()
12165 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12166 OString expVal( aStrBuf.getStr() );
12167 sal_Int64 input = -0;
12168 sal_Int16 radix = 10;
12170 expVal += OString( "0" );
12171 aStrBuf.append( input, radix );
12173 CPPUNIT_ASSERT_MESSAGE
12175 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12176 aStrBuf.getStr()== expVal &&
12177 aStrBuf.getLength() == expVal.getLength()
12182 void append_010()
12184 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12185 OString expVal( aStrBuf.getStr() );
12186 sal_Int64 input = -4;
12187 sal_Int16 radix = 10;
12189 expVal += OString( "-" );
12190 expVal += OString( "4" );
12191 aStrBuf.append( input, radix );
12193 CPPUNIT_ASSERT_MESSAGE
12195 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12196 aStrBuf.getStr()== expVal &&
12197 aStrBuf.getLength() == expVal.getLength()
12202 void append_011()
12204 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12205 OString expVal( aStrBuf.getStr() );
12206 sal_Int64 input = -8;
12207 sal_Int16 radix = 10;
12209 expVal += OString( "-" );
12210 expVal += OString( "8" );
12211 aStrBuf.append( input, radix );
12213 CPPUNIT_ASSERT_MESSAGE
12215 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12216 aStrBuf.getStr()== expVal &&
12217 aStrBuf.getLength() == expVal.getLength()
12222 void append_012()
12224 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12225 OString expVal( aStrBuf.getStr() );
12226 sal_Int64 input = -15;
12227 sal_Int16 radix = 10;
12229 expVal += OString( "-" );
12230 expVal += OString( "15" );
12231 aStrBuf.append( input, radix );
12233 CPPUNIT_ASSERT_MESSAGE
12235 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12236 aStrBuf.getStr()== expVal &&
12237 aStrBuf.getLength() == expVal.getLength()
12242 void append_013()
12244 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12245 OString expVal( aStrBuf.getStr() );
12246 sal_Int64 input = -0;
12247 sal_Int16 radix = 16;
12249 expVal += OString( "0" );
12250 aStrBuf.append( input, radix );
12252 CPPUNIT_ASSERT_MESSAGE
12254 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12255 aStrBuf.getStr()== expVal &&
12256 aStrBuf.getLength() == expVal.getLength()
12261 void append_014()
12263 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12264 OString expVal( aStrBuf.getStr() );
12265 sal_Int64 input = -4;
12266 sal_Int16 radix = 16;
12268 expVal += OString( "-" );
12269 expVal += OString( "4" );
12270 aStrBuf.append( input, radix );
12272 CPPUNIT_ASSERT_MESSAGE
12274 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12275 aStrBuf.getStr()== expVal &&
12276 aStrBuf.getLength() == expVal.getLength()
12281 void append_015()
12283 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12284 OString expVal( aStrBuf.getStr() );
12285 sal_Int64 input = -8;
12286 sal_Int16 radix = 16;
12288 expVal += OString( "-" );
12289 expVal += OString( "8" );
12290 aStrBuf.append( input, radix );
12292 CPPUNIT_ASSERT_MESSAGE
12294 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12295 aStrBuf.getStr()== expVal &&
12296 aStrBuf.getLength() == expVal.getLength()
12301 void append_016()
12303 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12304 OString expVal( aStrBuf.getStr() );
12305 sal_Int64 input = -15;
12306 sal_Int16 radix = 16;
12308 expVal += OString( "-" );
12309 expVal += OString( "f" );
12310 aStrBuf.append( input, radix );
12312 CPPUNIT_ASSERT_MESSAGE
12314 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12315 aStrBuf.getStr()== expVal &&
12316 aStrBuf.getLength() == expVal.getLength()
12321 void append_017()
12323 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12324 OString expVal( aStrBuf.getStr() );
12325 sal_Int64 input = -0;
12326 sal_Int16 radix = 36;
12328 expVal += OString( "0" );
12329 aStrBuf.append( input, radix );
12331 CPPUNIT_ASSERT_MESSAGE
12333 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12334 aStrBuf.getStr()== expVal &&
12335 aStrBuf.getLength() == expVal.getLength()
12340 void append_018()
12342 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12343 OString expVal( aStrBuf.getStr() );
12344 sal_Int64 input = -4;
12345 sal_Int16 radix = 36;
12347 expVal += OString( "-" );
12348 expVal += OString( "4" );
12349 aStrBuf.append( input, radix );
12351 CPPUNIT_ASSERT_MESSAGE
12353 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12354 aStrBuf.getStr()== expVal &&
12355 aStrBuf.getLength() == expVal.getLength()
12360 void append_019()
12362 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12363 OString expVal( aStrBuf.getStr() );
12364 sal_Int64 input = -8;
12365 sal_Int16 radix = 36;
12367 expVal += OString( "-" );
12368 expVal += OString( "8" );
12369 aStrBuf.append( input, radix );
12371 CPPUNIT_ASSERT_MESSAGE
12373 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12374 aStrBuf.getStr()== expVal &&
12375 aStrBuf.getLength() == expVal.getLength()
12380 void append_020()
12382 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12383 OString expVal( aStrBuf.getStr() );
12384 sal_Int64 input = -35;
12385 sal_Int16 radix = 36;
12387 expVal += OString( "-" );
12388 expVal += OString( "z" );
12389 aStrBuf.append( input, radix );
12391 CPPUNIT_ASSERT_MESSAGE
12393 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12394 aStrBuf.getStr()== expVal &&
12395 aStrBuf.getLength() == expVal.getLength()
12400 void append_021()
12402 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12403 OString expVal( aStrBuf.getStr() );
12404 sal_Int64 input = -0;
12405 sal_Int16 radix = 2;
12407 expVal += OString( "0" );
12408 aStrBuf.append( input, radix );
12410 CPPUNIT_ASSERT_MESSAGE
12412 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12413 aStrBuf.getStr()== expVal &&
12414 aStrBuf.getLength() == expVal.getLength()
12419 void append_022()
12421 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12422 OString expVal( aStrBuf.getStr() );
12423 sal_Int64 input = -4;
12424 sal_Int16 radix = 2;
12426 expVal += OString( "-" );
12427 expVal += OString( "100" );
12428 aStrBuf.append( input, radix );
12430 CPPUNIT_ASSERT_MESSAGE
12432 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12433 aStrBuf.getStr()== expVal &&
12434 aStrBuf.getLength() == expVal.getLength()
12439 void append_023()
12441 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12442 OString expVal( aStrBuf.getStr() );
12443 sal_Int64 input = -8;
12444 sal_Int16 radix = 2;
12446 expVal += OString( "-" );
12447 expVal += OString( "1000" );
12448 aStrBuf.append( input, radix );
12450 CPPUNIT_ASSERT_MESSAGE
12452 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12453 aStrBuf.getStr()== expVal &&
12454 aStrBuf.getLength() == expVal.getLength()
12459 void append_024()
12461 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12462 OString expVal( aStrBuf.getStr() );
12463 sal_Int64 input = -15;
12464 sal_Int16 radix = 2;
12466 expVal += OString( "-" );
12467 expVal += OString( "1111" );
12468 aStrBuf.append( input, radix );
12470 CPPUNIT_ASSERT_MESSAGE
12472 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12473 aStrBuf.getStr()== expVal &&
12474 aStrBuf.getLength() == expVal.getLength()
12479 void append_025()
12481 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12482 OString expVal( aStrBuf.getStr() );
12483 sal_Int64 input = -0;
12484 sal_Int16 radix = 8;
12486 expVal += OString( "0" );
12487 aStrBuf.append( input, radix );
12489 CPPUNIT_ASSERT_MESSAGE
12491 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12492 aStrBuf.getStr()== expVal &&
12493 aStrBuf.getLength() == expVal.getLength()
12498 void append_026()
12500 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12501 OString expVal( aStrBuf.getStr() );
12502 sal_Int64 input = -4;
12503 sal_Int16 radix = 8;
12505 expVal += OString( "-" );
12506 expVal += OString( "4" );
12507 aStrBuf.append( input, radix );
12509 CPPUNIT_ASSERT_MESSAGE
12511 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12512 aStrBuf.getStr()== expVal &&
12513 aStrBuf.getLength() == expVal.getLength()
12518 void append_027()
12520 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12521 OString expVal( aStrBuf.getStr() );
12522 sal_Int64 input = -8;
12523 sal_Int16 radix = 8;
12525 expVal += OString( "-" );
12526 expVal += OString( "10" );
12527 aStrBuf.append( input, radix );
12529 CPPUNIT_ASSERT_MESSAGE
12531 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12532 aStrBuf.getStr()== expVal &&
12533 aStrBuf.getLength() == expVal.getLength()
12538 void append_028()
12540 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12541 OString expVal( aStrBuf.getStr() );
12542 sal_Int64 input = -15;
12543 sal_Int16 radix = 8;
12545 expVal += OString( "-" );
12546 expVal += OString( "17" );
12547 aStrBuf.append( input, radix );
12549 CPPUNIT_ASSERT_MESSAGE
12551 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12552 aStrBuf.getStr()== expVal &&
12553 aStrBuf.getLength() == expVal.getLength()
12558 void append_029()
12560 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12561 OString expVal( aStrBuf.getStr() );
12562 sal_Int64 input = -0;
12563 sal_Int16 radix = 10;
12565 expVal += OString( "0" );
12566 aStrBuf.append( input, radix );
12568 CPPUNIT_ASSERT_MESSAGE
12570 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12571 aStrBuf.getStr()== expVal &&
12572 aStrBuf.getLength() == expVal.getLength()
12577 void append_030()
12579 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12580 OString expVal( aStrBuf.getStr() );
12581 sal_Int64 input = -4;
12582 sal_Int16 radix = 10;
12584 expVal += OString( "-" );
12585 expVal += OString( "4" );
12586 aStrBuf.append( input, radix );
12588 CPPUNIT_ASSERT_MESSAGE
12590 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12591 aStrBuf.getStr()== expVal &&
12592 aStrBuf.getLength() == expVal.getLength()
12597 void append_031()
12599 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12600 OString expVal( aStrBuf.getStr() );
12601 sal_Int64 input = -8;
12602 sal_Int16 radix = 10;
12604 expVal += OString( "-" );
12605 expVal += OString( "8" );
12606 aStrBuf.append( input, radix );
12608 CPPUNIT_ASSERT_MESSAGE
12610 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12611 aStrBuf.getStr()== expVal &&
12612 aStrBuf.getLength() == expVal.getLength()
12617 void append_032()
12619 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12620 OString expVal( aStrBuf.getStr() );
12621 sal_Int64 input = -15;
12622 sal_Int16 radix = 10;
12624 expVal += OString( "-" );
12625 expVal += OString( "15" );
12626 aStrBuf.append( input, radix );
12628 CPPUNIT_ASSERT_MESSAGE
12630 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12631 aStrBuf.getStr()== expVal &&
12632 aStrBuf.getLength() == expVal.getLength()
12637 void append_033()
12639 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12640 OString expVal( aStrBuf.getStr() );
12641 sal_Int64 input = -0;
12642 sal_Int16 radix = 16;
12644 expVal += OString( "0" );
12645 aStrBuf.append( input, radix );
12647 CPPUNIT_ASSERT_MESSAGE
12649 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12650 aStrBuf.getStr()== expVal &&
12651 aStrBuf.getLength() == expVal.getLength()
12656 void append_034()
12658 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12659 OString expVal( aStrBuf.getStr() );
12660 sal_Int64 input = -4;
12661 sal_Int16 radix = 16;
12663 expVal += OString( "-" );
12664 expVal += OString( "4" );
12665 aStrBuf.append( input, radix );
12667 CPPUNIT_ASSERT_MESSAGE
12669 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12670 aStrBuf.getStr()== expVal &&
12671 aStrBuf.getLength() == expVal.getLength()
12676 void append_035()
12678 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12679 OString expVal( aStrBuf.getStr() );
12680 sal_Int64 input = -8;
12681 sal_Int16 radix = 16;
12683 expVal += OString( "-" );
12684 expVal += OString( "8" );
12685 aStrBuf.append( input, radix );
12687 CPPUNIT_ASSERT_MESSAGE
12689 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12690 aStrBuf.getStr()== expVal &&
12691 aStrBuf.getLength() == expVal.getLength()
12696 void append_036()
12698 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12699 OString expVal( aStrBuf.getStr() );
12700 sal_Int64 input = -15;
12701 sal_Int16 radix = 16;
12703 expVal += OString( "-" );
12704 expVal += OString( "f" );
12705 aStrBuf.append( input, radix );
12707 CPPUNIT_ASSERT_MESSAGE
12709 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12710 aStrBuf.getStr()== expVal &&
12711 aStrBuf.getLength() == expVal.getLength()
12716 void append_037()
12718 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12719 OString expVal( aStrBuf.getStr() );
12720 sal_Int64 input = -0;
12721 sal_Int16 radix = 36;
12723 expVal += OString( "0" );
12724 aStrBuf.append( input, radix );
12726 CPPUNIT_ASSERT_MESSAGE
12728 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12729 aStrBuf.getStr()== expVal &&
12730 aStrBuf.getLength() == expVal.getLength()
12735 void append_038()
12737 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12738 OString expVal( aStrBuf.getStr() );
12739 sal_Int64 input = -4;
12740 sal_Int16 radix = 36;
12742 expVal += OString( "-" );
12743 expVal += OString( "4" );
12744 aStrBuf.append( input, radix );
12746 CPPUNIT_ASSERT_MESSAGE
12748 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12749 aStrBuf.getStr()== expVal &&
12750 aStrBuf.getLength() == expVal.getLength()
12755 void append_039()
12757 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12758 OString expVal( aStrBuf.getStr() );
12759 sal_Int64 input = -8;
12760 sal_Int16 radix = 36;
12762 expVal += OString( "-" );
12763 expVal += OString( "8" );
12764 aStrBuf.append( input, radix );
12766 CPPUNIT_ASSERT_MESSAGE
12768 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12769 aStrBuf.getStr()== expVal &&
12770 aStrBuf.getLength() == expVal.getLength()
12775 void append_040()
12777 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12778 OString expVal( aStrBuf.getStr() );
12779 sal_Int64 input = -35;
12780 sal_Int16 radix = 36;
12782 expVal += OString( "-" );
12783 expVal += OString( "z" );
12784 aStrBuf.append( input, radix );
12786 CPPUNIT_ASSERT_MESSAGE
12788 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12789 aStrBuf.getStr()== expVal &&
12790 aStrBuf.getLength() == expVal.getLength()
12795 void append_041()
12797 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12798 OString expVal( aStrBuf.getStr() );
12799 sal_Int64 input = -0;
12800 sal_Int16 radix = 2;
12802 expVal += OString( "0" );
12803 aStrBuf.append( input, radix );
12805 CPPUNIT_ASSERT_MESSAGE
12807 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12808 aStrBuf.getStr()== expVal &&
12809 aStrBuf.getLength() == expVal.getLength()
12814 void append_042()
12816 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12817 OString expVal( aStrBuf.getStr() );
12818 sal_Int64 input = -4;
12819 sal_Int16 radix = 2;
12821 expVal += OString( "-" );
12822 expVal += OString( "100" );
12823 aStrBuf.append( input, radix );
12825 CPPUNIT_ASSERT_MESSAGE
12827 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12828 aStrBuf.getStr()== expVal &&
12829 aStrBuf.getLength() == expVal.getLength()
12834 void append_043()
12836 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12837 OString expVal( aStrBuf.getStr() );
12838 sal_Int64 input = -8;
12839 sal_Int16 radix = 2;
12841 expVal += OString( "-" );
12842 expVal += OString( "1000" );
12843 aStrBuf.append( input, radix );
12845 CPPUNIT_ASSERT_MESSAGE
12847 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12848 aStrBuf.getStr()== expVal &&
12849 aStrBuf.getLength() == expVal.getLength()
12854 void append_044()
12856 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12857 OString expVal( aStrBuf.getStr() );
12858 sal_Int64 input = -15;
12859 sal_Int16 radix = 2;
12861 expVal += OString( "-" );
12862 expVal += OString( "1111" );
12863 aStrBuf.append( input, radix );
12865 CPPUNIT_ASSERT_MESSAGE
12867 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12868 aStrBuf.getStr()== expVal &&
12869 aStrBuf.getLength() == expVal.getLength()
12874 void append_045()
12876 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12877 OString expVal( aStrBuf.getStr() );
12878 sal_Int64 input = -0;
12879 sal_Int16 radix = 8;
12881 expVal += OString( "0" );
12882 aStrBuf.append( input, radix );
12884 CPPUNIT_ASSERT_MESSAGE
12886 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12887 aStrBuf.getStr()== expVal &&
12888 aStrBuf.getLength() == expVal.getLength()
12893 void append_046()
12895 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12896 OString expVal( aStrBuf.getStr() );
12897 sal_Int64 input = -4;
12898 sal_Int16 radix = 8;
12900 expVal += OString( "-" );
12901 expVal += OString( "4" );
12902 aStrBuf.append( input, radix );
12904 CPPUNIT_ASSERT_MESSAGE
12906 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12907 aStrBuf.getStr()== expVal &&
12908 aStrBuf.getLength() == expVal.getLength()
12913 void append_047()
12915 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12916 OString expVal( aStrBuf.getStr() );
12917 sal_Int64 input = -8;
12918 sal_Int16 radix = 8;
12920 expVal += OString( "-" );
12921 expVal += OString( "10" );
12922 aStrBuf.append( input, radix );
12924 CPPUNIT_ASSERT_MESSAGE
12926 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12927 aStrBuf.getStr()== expVal &&
12928 aStrBuf.getLength() == expVal.getLength()
12933 void append_048()
12935 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12936 OString expVal( aStrBuf.getStr() );
12937 sal_Int64 input = -15;
12938 sal_Int16 radix = 8;
12940 expVal += OString( "-" );
12941 expVal += OString( "17" );
12942 aStrBuf.append( input, radix );
12944 CPPUNIT_ASSERT_MESSAGE
12946 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12947 aStrBuf.getStr()== expVal &&
12948 aStrBuf.getLength() == expVal.getLength()
12953 void append_049()
12955 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12956 OString expVal( aStrBuf.getStr() );
12957 sal_Int64 input = -0;
12958 sal_Int16 radix = 10;
12960 expVal += OString( "0" );
12961 aStrBuf.append( input, radix );
12963 CPPUNIT_ASSERT_MESSAGE
12965 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12966 aStrBuf.getStr()== expVal &&
12967 aStrBuf.getLength() == expVal.getLength()
12972 void append_050()
12974 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12975 OString expVal( aStrBuf.getStr() );
12976 sal_Int64 input = -4;
12977 sal_Int16 radix = 10;
12979 expVal += OString( "-" );
12980 expVal += OString( "4" );
12981 aStrBuf.append( input, radix );
12983 CPPUNIT_ASSERT_MESSAGE
12985 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12986 aStrBuf.getStr()== expVal &&
12987 aStrBuf.getLength() == expVal.getLength()
12992 void append_051()
12994 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12995 OString expVal( aStrBuf.getStr() );
12996 sal_Int64 input = -8;
12997 sal_Int16 radix = 10;
12999 expVal += OString( "-" );
13000 expVal += OString( "8" );
13001 aStrBuf.append( input, radix );
13003 CPPUNIT_ASSERT_MESSAGE
13005 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13006 aStrBuf.getStr()== expVal &&
13007 aStrBuf.getLength() == expVal.getLength()
13012 void append_052()
13014 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13015 OString expVal( aStrBuf.getStr() );
13016 sal_Int64 input = -15;
13017 sal_Int16 radix = 10;
13019 expVal += OString( "-" );
13020 expVal += OString( "15" );
13021 aStrBuf.append( input, radix );
13023 CPPUNIT_ASSERT_MESSAGE
13025 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13026 aStrBuf.getStr()== expVal &&
13027 aStrBuf.getLength() == expVal.getLength()
13032 void append_053()
13034 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13035 OString expVal( aStrBuf.getStr() );
13036 sal_Int64 input = -0;
13037 sal_Int16 radix = 16;
13039 expVal += OString( "0" );
13040 aStrBuf.append( input, radix );
13042 CPPUNIT_ASSERT_MESSAGE
13044 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13045 aStrBuf.getStr()== expVal &&
13046 aStrBuf.getLength() == expVal.getLength()
13051 void append_054()
13053 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13054 OString expVal( aStrBuf.getStr() );
13055 sal_Int64 input = -4;
13056 sal_Int16 radix = 16;
13058 expVal += OString( "-" );
13059 expVal += OString( "4" );
13060 aStrBuf.append( input, radix );
13062 CPPUNIT_ASSERT_MESSAGE
13064 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13065 aStrBuf.getStr()== expVal &&
13066 aStrBuf.getLength() == expVal.getLength()
13071 void append_055()
13073 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13074 OString expVal( aStrBuf.getStr() );
13075 sal_Int64 input = -8;
13076 sal_Int16 radix = 16;
13078 expVal += OString( "-" );
13079 expVal += OString( "8" );
13080 aStrBuf.append( input, radix );
13082 CPPUNIT_ASSERT_MESSAGE
13084 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13085 aStrBuf.getStr()== expVal &&
13086 aStrBuf.getLength() == expVal.getLength()
13091 void append_056()
13093 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13094 OString expVal( aStrBuf.getStr() );
13095 sal_Int64 input = -15;
13096 sal_Int16 radix = 16;
13098 expVal += OString( "-" );
13099 expVal += OString( "f" );
13100 aStrBuf.append( input, radix );
13102 CPPUNIT_ASSERT_MESSAGE
13104 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13105 aStrBuf.getStr()== expVal &&
13106 aStrBuf.getLength() == expVal.getLength()
13111 void append_057()
13113 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13114 OString expVal( aStrBuf.getStr() );
13115 sal_Int64 input = -0;
13116 sal_Int16 radix = 36;
13118 expVal += OString( "0" );
13119 aStrBuf.append( input, radix );
13121 CPPUNIT_ASSERT_MESSAGE
13123 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13124 aStrBuf.getStr()== expVal &&
13125 aStrBuf.getLength() == expVal.getLength()
13130 void append_058()
13132 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13133 OString expVal( aStrBuf.getStr() );
13134 sal_Int64 input = -4;
13135 sal_Int16 radix = 36;
13137 expVal += OString( "-" );
13138 expVal += OString( "4" );
13139 aStrBuf.append( input, radix );
13141 CPPUNIT_ASSERT_MESSAGE
13143 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13144 aStrBuf.getStr()== expVal &&
13145 aStrBuf.getLength() == expVal.getLength()
13150 void append_059()
13152 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13153 OString expVal( aStrBuf.getStr() );
13154 sal_Int64 input = -8;
13155 sal_Int16 radix = 36;
13157 expVal += OString( "-" );
13158 expVal += OString( "8" );
13159 aStrBuf.append( input, radix );
13161 CPPUNIT_ASSERT_MESSAGE
13163 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13164 aStrBuf.getStr()== expVal &&
13165 aStrBuf.getLength() == expVal.getLength()
13170 void append_060()
13172 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13173 OString expVal( aStrBuf.getStr() );
13174 sal_Int64 input = -35;
13175 sal_Int16 radix = 36;
13177 expVal += OString( "-" );
13178 expVal += OString( "z" );
13179 aStrBuf.append( input, radix );
13181 CPPUNIT_ASSERT_MESSAGE
13183 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13184 aStrBuf.getStr()== expVal &&
13185 aStrBuf.getLength() == expVal.getLength()
13190 void append_061()
13192 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13193 OString expVal( aStrBuf.getStr() );
13194 sal_Int64 input = -0;
13195 sal_Int16 radix = 2;
13197 expVal += OString( "0" );
13198 aStrBuf.append( input, radix );
13200 CPPUNIT_ASSERT_MESSAGE
13202 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13203 aStrBuf.getStr()== expVal &&
13204 aStrBuf.getLength() == expVal.getLength()
13209 void append_062()
13211 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13212 OString expVal( aStrBuf.getStr() );
13213 sal_Int64 input = -4;
13214 sal_Int16 radix = 2;
13216 expVal += OString( "-" );
13217 expVal += OString( "100" );
13218 aStrBuf.append( input, radix );
13220 CPPUNIT_ASSERT_MESSAGE
13222 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13223 aStrBuf.getStr()== expVal &&
13224 aStrBuf.getLength() == expVal.getLength()
13229 void append_063()
13231 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13232 OString expVal( aStrBuf.getStr() );
13233 sal_Int64 input = -8;
13234 sal_Int16 radix = 2;
13236 expVal += OString( "-" );
13237 expVal += OString( "1000" );
13238 aStrBuf.append( input, radix );
13240 CPPUNIT_ASSERT_MESSAGE
13242 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13243 aStrBuf.getStr()== expVal &&
13244 aStrBuf.getLength() == expVal.getLength()
13249 void append_064()
13251 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13252 OString expVal( aStrBuf.getStr() );
13253 sal_Int64 input = -15;
13254 sal_Int16 radix = 2;
13256 expVal += OString( "-" );
13257 expVal += OString( "1111" );
13258 aStrBuf.append( input, radix );
13260 CPPUNIT_ASSERT_MESSAGE
13262 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13263 aStrBuf.getStr()== expVal &&
13264 aStrBuf.getLength() == expVal.getLength()
13269 void append_065()
13271 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13272 OString expVal( aStrBuf.getStr() );
13273 sal_Int64 input = -0;
13274 sal_Int16 radix = 8;
13276 expVal += OString( "0" );
13277 aStrBuf.append( input, radix );
13279 CPPUNIT_ASSERT_MESSAGE
13281 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13282 aStrBuf.getStr()== expVal &&
13283 aStrBuf.getLength() == expVal.getLength()
13288 void append_066()
13290 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13291 OString expVal( aStrBuf.getStr() );
13292 sal_Int64 input = -4;
13293 sal_Int16 radix = 8;
13295 expVal += OString( "-" );
13296 expVal += OString( "4" );
13297 aStrBuf.append( input, radix );
13299 CPPUNIT_ASSERT_MESSAGE
13301 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13302 aStrBuf.getStr()== expVal &&
13303 aStrBuf.getLength() == expVal.getLength()
13308 void append_067()
13310 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13311 OString expVal( aStrBuf.getStr() );
13312 sal_Int64 input = -8;
13313 sal_Int16 radix = 8;
13315 expVal += OString( "-" );
13316 expVal += OString( "10" );
13317 aStrBuf.append( input, radix );
13319 CPPUNIT_ASSERT_MESSAGE
13321 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13322 aStrBuf.getStr()== expVal &&
13323 aStrBuf.getLength() == expVal.getLength()
13328 void append_068()
13330 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13331 OString expVal( aStrBuf.getStr() );
13332 sal_Int64 input = -15;
13333 sal_Int16 radix = 8;
13335 expVal += OString( "-" );
13336 expVal += OString( "17" );
13337 aStrBuf.append( input, radix );
13339 CPPUNIT_ASSERT_MESSAGE
13341 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13342 aStrBuf.getStr()== expVal &&
13343 aStrBuf.getLength() == expVal.getLength()
13348 void append_069()
13350 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13351 OString expVal( aStrBuf.getStr() );
13352 sal_Int64 input = -0;
13353 sal_Int16 radix = 10;
13355 expVal += OString( "0" );
13356 aStrBuf.append( input, radix );
13358 CPPUNIT_ASSERT_MESSAGE
13360 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13361 aStrBuf.getStr()== expVal &&
13362 aStrBuf.getLength() == expVal.getLength()
13367 void append_070()
13369 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13370 OString expVal( aStrBuf.getStr() );
13371 sal_Int64 input = -4;
13372 sal_Int16 radix = 10;
13374 expVal += OString( "-" );
13375 expVal += OString( "4" );
13376 aStrBuf.append( input, radix );
13378 CPPUNIT_ASSERT_MESSAGE
13380 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13381 aStrBuf.getStr()== expVal &&
13382 aStrBuf.getLength() == expVal.getLength()
13387 void append_071()
13389 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13390 OString expVal( aStrBuf.getStr() );
13391 sal_Int64 input = -8;
13392 sal_Int16 radix = 10;
13394 expVal += OString( "-" );
13395 expVal += OString( "8" );
13396 aStrBuf.append( input, radix );
13398 CPPUNIT_ASSERT_MESSAGE
13400 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13401 aStrBuf.getStr()== expVal &&
13402 aStrBuf.getLength() == expVal.getLength()
13407 void append_072()
13409 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13410 OString expVal( aStrBuf.getStr() );
13411 sal_Int64 input = -15;
13412 sal_Int16 radix = 10;
13414 expVal += OString( "-" );
13415 expVal += OString( "15" );
13416 aStrBuf.append( input, radix );
13418 CPPUNIT_ASSERT_MESSAGE
13420 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13421 aStrBuf.getStr()== expVal &&
13422 aStrBuf.getLength() == expVal.getLength()
13427 void append_073()
13429 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13430 OString expVal( aStrBuf.getStr() );
13431 sal_Int64 input = -0;
13432 sal_Int16 radix = 16;
13434 expVal += OString( "0" );
13435 aStrBuf.append( input, radix );
13437 CPPUNIT_ASSERT_MESSAGE
13439 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13440 aStrBuf.getStr()== expVal &&
13441 aStrBuf.getLength() == expVal.getLength()
13446 void append_074()
13448 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13449 OString expVal( aStrBuf.getStr() );
13450 sal_Int64 input = -4;
13451 sal_Int16 radix = 16;
13453 expVal += OString( "-" );
13454 expVal += OString( "4" );
13455 aStrBuf.append( input, radix );
13457 CPPUNIT_ASSERT_MESSAGE
13459 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13460 aStrBuf.getStr()== expVal &&
13461 aStrBuf.getLength() == expVal.getLength()
13466 void append_075()
13468 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13469 OString expVal( aStrBuf.getStr() );
13470 sal_Int64 input = -8;
13471 sal_Int16 radix = 16;
13473 expVal += OString( "-" );
13474 expVal += OString( "8" );
13475 aStrBuf.append( input, radix );
13477 CPPUNIT_ASSERT_MESSAGE
13479 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13480 aStrBuf.getStr()== expVal &&
13481 aStrBuf.getLength() == expVal.getLength()
13486 void append_076()
13488 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13489 OString expVal( aStrBuf.getStr() );
13490 sal_Int64 input = -15;
13491 sal_Int16 radix = 16;
13493 expVal += OString( "-" );
13494 expVal += OString( "f" );
13495 aStrBuf.append( input, radix );
13497 CPPUNIT_ASSERT_MESSAGE
13499 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13500 aStrBuf.getStr()== expVal &&
13501 aStrBuf.getLength() == expVal.getLength()
13506 void append_077()
13508 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13509 OString expVal( aStrBuf.getStr() );
13510 sal_Int64 input = -0;
13511 sal_Int16 radix = 36;
13513 expVal += OString( "0" );
13514 aStrBuf.append( input, radix );
13516 CPPUNIT_ASSERT_MESSAGE
13518 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13519 aStrBuf.getStr()== expVal &&
13520 aStrBuf.getLength() == expVal.getLength()
13525 void append_078()
13527 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13528 OString expVal( aStrBuf.getStr() );
13529 sal_Int64 input = -4;
13530 sal_Int16 radix = 36;
13532 expVal += OString( "-" );
13533 expVal += OString( "4" );
13534 aStrBuf.append( input, radix );
13536 CPPUNIT_ASSERT_MESSAGE
13538 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13539 aStrBuf.getStr()== expVal &&
13540 aStrBuf.getLength() == expVal.getLength()
13545 void append_079()
13547 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13548 OString expVal( aStrBuf.getStr() );
13549 sal_Int64 input = -8;
13550 sal_Int16 radix = 36;
13552 expVal += OString( "-" );
13553 expVal += OString( "8" );
13554 aStrBuf.append( input, radix );
13556 CPPUNIT_ASSERT_MESSAGE
13558 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13559 aStrBuf.getStr()== expVal &&
13560 aStrBuf.getLength() == expVal.getLength()
13565 void append_080()
13567 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13568 OString expVal( aStrBuf.getStr() );
13569 sal_Int64 input = -35;
13570 sal_Int16 radix = 36;
13572 expVal += OString( "-" );
13573 expVal += OString( "z" );
13574 aStrBuf.append( input, radix );
13576 CPPUNIT_ASSERT_MESSAGE
13578 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13579 aStrBuf.getStr()== expVal &&
13580 aStrBuf.getLength() == expVal.getLength()
13585 void append_081()
13587 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13588 OString expVal( aStrBuf.getStr() );
13589 sal_Int64 input = -0;
13590 sal_Int16 radix = 2;
13592 expVal += OString( "0" );
13593 aStrBuf.append( input, radix );
13595 CPPUNIT_ASSERT_MESSAGE
13597 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13598 aStrBuf.getStr()== expVal &&
13599 aStrBuf.getLength() == expVal.getLength()
13604 void append_082()
13606 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13607 OString expVal( aStrBuf.getStr() );
13608 sal_Int64 input = -4;
13609 sal_Int16 radix = 2;
13611 expVal += OString( "-" );
13612 expVal += OString( "100" );
13613 aStrBuf.append( input, radix );
13615 CPPUNIT_ASSERT_MESSAGE
13617 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13618 aStrBuf.getStr()== expVal &&
13619 aStrBuf.getLength() == expVal.getLength()
13624 void append_083()
13626 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13627 OString expVal( aStrBuf.getStr() );
13628 sal_Int64 input = -8;
13629 sal_Int16 radix = 2;
13631 expVal += OString( "-" );
13632 expVal += OString( "1000" );
13633 aStrBuf.append( input, radix );
13635 CPPUNIT_ASSERT_MESSAGE
13637 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13638 aStrBuf.getStr()== expVal &&
13639 aStrBuf.getLength() == expVal.getLength()
13644 void append_084()
13646 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13647 OString expVal( aStrBuf.getStr() );
13648 sal_Int64 input = -15;
13649 sal_Int16 radix = 2;
13651 expVal += OString( "-" );
13652 expVal += OString( "1111" );
13653 aStrBuf.append( input, radix );
13655 CPPUNIT_ASSERT_MESSAGE
13657 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13658 aStrBuf.getStr()== expVal &&
13659 aStrBuf.getLength() == expVal.getLength()
13664 void append_085()
13666 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13667 OString expVal( aStrBuf.getStr() );
13668 sal_Int64 input = -0;
13669 sal_Int16 radix = 8;
13671 expVal += OString( "0" );
13672 aStrBuf.append( input, radix );
13674 CPPUNIT_ASSERT_MESSAGE
13676 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13677 aStrBuf.getStr()== expVal &&
13678 aStrBuf.getLength() == expVal.getLength()
13683 void append_086()
13685 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13686 OString expVal( aStrBuf.getStr() );
13687 sal_Int64 input = -4;
13688 sal_Int16 radix = 8;
13690 expVal += OString( "-" );
13691 expVal += OString( "4" );
13692 aStrBuf.append( input, radix );
13694 CPPUNIT_ASSERT_MESSAGE
13696 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13697 aStrBuf.getStr()== expVal &&
13698 aStrBuf.getLength() == expVal.getLength()
13703 void append_087()
13705 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13706 OString expVal( aStrBuf.getStr() );
13707 sal_Int64 input = -8;
13708 sal_Int16 radix = 8;
13710 expVal += OString( "-" );
13711 expVal += OString( "10" );
13712 aStrBuf.append( input, radix );
13714 CPPUNIT_ASSERT_MESSAGE
13716 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13717 aStrBuf.getStr()== expVal &&
13718 aStrBuf.getLength() == expVal.getLength()
13723 void append_088()
13725 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13726 OString expVal( aStrBuf.getStr() );
13727 sal_Int64 input = -15;
13728 sal_Int16 radix = 8;
13730 expVal += OString( "-" );
13731 expVal += OString( "17" );
13732 aStrBuf.append( input, radix );
13734 CPPUNIT_ASSERT_MESSAGE
13736 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13737 aStrBuf.getStr()== expVal &&
13738 aStrBuf.getLength() == expVal.getLength()
13743 void append_089()
13745 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13746 OString expVal( aStrBuf.getStr() );
13747 sal_Int64 input = -0;
13748 sal_Int16 radix = 10;
13750 expVal += OString( "0" );
13751 aStrBuf.append( input, radix );
13753 CPPUNIT_ASSERT_MESSAGE
13755 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13756 aStrBuf.getStr()== expVal &&
13757 aStrBuf.getLength() == expVal.getLength()
13762 void append_090()
13764 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13765 OString expVal( aStrBuf.getStr() );
13766 sal_Int64 input = -4;
13767 sal_Int16 radix = 10;
13769 expVal += OString( "-" );
13770 expVal += OString( "4" );
13771 aStrBuf.append( input, radix );
13773 CPPUNIT_ASSERT_MESSAGE
13775 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13776 aStrBuf.getStr()== expVal &&
13777 aStrBuf.getLength() == expVal.getLength()
13782 void append_091()
13784 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13785 OString expVal( aStrBuf.getStr() );
13786 sal_Int64 input = -8;
13787 sal_Int16 radix = 10;
13789 expVal += OString( "-" );
13790 expVal += OString( "8" );
13791 aStrBuf.append( input, radix );
13793 CPPUNIT_ASSERT_MESSAGE
13795 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13796 aStrBuf.getStr()== expVal &&
13797 aStrBuf.getLength() == expVal.getLength()
13802 void append_092()
13804 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13805 OString expVal( aStrBuf.getStr() );
13806 sal_Int64 input = -15;
13807 sal_Int16 radix = 10;
13809 expVal += OString( "-" );
13810 expVal += OString( "15" );
13811 aStrBuf.append( input, radix );
13813 CPPUNIT_ASSERT_MESSAGE
13815 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13816 aStrBuf.getStr()== expVal &&
13817 aStrBuf.getLength() == expVal.getLength()
13822 void append_093()
13824 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13825 OString expVal( aStrBuf.getStr() );
13826 sal_Int64 input = -0;
13827 sal_Int16 radix = 16;
13829 expVal += OString( "0" );
13830 aStrBuf.append( input, radix );
13832 CPPUNIT_ASSERT_MESSAGE
13834 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13835 aStrBuf.getStr()== expVal &&
13836 aStrBuf.getLength() == expVal.getLength()
13841 void append_094()
13843 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13844 OString expVal( aStrBuf.getStr() );
13845 sal_Int64 input = -4;
13846 sal_Int16 radix = 16;
13848 expVal += OString( "-" );
13849 expVal += OString( "4" );
13850 aStrBuf.append( input, radix );
13852 CPPUNIT_ASSERT_MESSAGE
13854 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13855 aStrBuf.getStr()== expVal &&
13856 aStrBuf.getLength() == expVal.getLength()
13861 void append_095()
13863 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13864 OString expVal( aStrBuf.getStr() );
13865 sal_Int64 input = -8;
13866 sal_Int16 radix = 16;
13868 expVal += OString( "-" );
13869 expVal += OString( "8" );
13870 aStrBuf.append( input, radix );
13872 CPPUNIT_ASSERT_MESSAGE
13874 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13875 aStrBuf.getStr()== expVal &&
13876 aStrBuf.getLength() == expVal.getLength()
13881 void append_096()
13883 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13884 OString expVal( aStrBuf.getStr() );
13885 sal_Int64 input = -15;
13886 sal_Int16 radix = 16;
13888 expVal += OString( "-" );
13889 expVal += OString( "f" );
13890 aStrBuf.append( input, radix );
13892 CPPUNIT_ASSERT_MESSAGE
13894 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13895 aStrBuf.getStr()== expVal &&
13896 aStrBuf.getLength() == expVal.getLength()
13901 void append_097()
13903 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13904 OString expVal( aStrBuf.getStr() );
13905 sal_Int64 input = -0;
13906 sal_Int16 radix = 36;
13908 expVal += OString( "0" );
13909 aStrBuf.append( input, radix );
13911 CPPUNIT_ASSERT_MESSAGE
13913 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13914 aStrBuf.getStr()== expVal &&
13915 aStrBuf.getLength() == expVal.getLength()
13920 void append_098()
13922 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13923 OString expVal( aStrBuf.getStr() );
13924 sal_Int64 input = -4;
13925 sal_Int16 radix = 36;
13927 expVal += OString( "-" );
13928 expVal += OString( "4" );
13929 aStrBuf.append( input, radix );
13931 CPPUNIT_ASSERT_MESSAGE
13933 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13934 aStrBuf.getStr()== expVal &&
13935 aStrBuf.getLength() == expVal.getLength()
13940 void append_099()
13942 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13943 OString expVal( aStrBuf.getStr() );
13944 sal_Int64 input = -8;
13945 sal_Int16 radix = 36;
13947 expVal += OString( "-" );
13948 expVal += OString( "8" );
13949 aStrBuf.append( input, radix );
13951 CPPUNIT_ASSERT_MESSAGE
13953 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13954 aStrBuf.getStr()== expVal &&
13955 aStrBuf.getLength() == expVal.getLength()
13960 void append_100()
13962 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
13963 OString expVal( aStrBuf.getStr() );
13964 sal_Int64 input = -35;
13965 sal_Int16 radix = 36;
13967 expVal += OString( "-" );
13968 expVal += OString( "z" );
13969 aStrBuf.append( input, radix );
13971 CPPUNIT_ASSERT_MESSAGE
13973 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13974 aStrBuf.getStr()== expVal &&
13975 aStrBuf.getLength() == expVal.getLength()
13980 SAL_CPPUNIT_TEST_SUITE( append_007_Int64_Negative );
13981 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
13982 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
13983 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
13984 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
13985 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
13986 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
13987 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
13988 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
13989 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
13990 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
13991 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
13992 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
13993 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
13994 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
13995 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
13996 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
13997 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
13998 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
13999 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
14000 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
14001 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
14002 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
14003 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
14004 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
14005 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
14006 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
14007 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
14008 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
14009 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
14010 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
14011 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
14012 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
14013 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
14014 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
14015 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
14016 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
14017 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
14018 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
14019 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
14020 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
14021 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
14022 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
14023 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
14024 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
14025 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
14026 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
14027 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
14028 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
14029 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
14030 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
14031 SAL_CPPUNIT_TEST_SUITE_END();
14033 //------------------------------------------------------------------------
14034 // testing the method append( sal_Int64 i, sal_Int16 radix ) where radix = -5
14035 //------------------------------------------------------------------------
14036 class append_007_Int64_WrongRadix : public CppUnit::TestFixture
14038 OString* arrOUS[5];
14039 sal_Int64 intVal;
14041 public:
14042 void setUp()
14044 arrOUS[0] = new OString( kTestStr7 );
14045 arrOUS[1] = new OString( );
14046 arrOUS[2] = new OString( kTestStr25 );
14047 arrOUS[3] = new OString( "" );
14048 arrOUS[4] = new OString( kTestStr28 );
14049 intVal = 11;
14053 void tearDown()
14055 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
14056 delete arrOUS[3]; delete arrOUS[4];
14059 void append_001()
14061 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14062 OString expVal( kTestStr59 );
14064 aStrBuf.append( intVal, -5 );
14066 CPPUNIT_ASSERT_MESSAGE
14068 "Appends the WrongRadix to the string buffer arrOUS[0]",
14069 sal_True
14074 void append_002()
14076 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14077 OString expVal( kTestStr60 );
14079 aStrBuf.append( intVal, -5 );
14081 CPPUNIT_ASSERT_MESSAGE
14083 "Appends the WrongRadix to the string buffer arrOUS[1]",
14084 sal_True
14089 void append_003()
14091 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14092 OString expVal( kTestStr60 );
14094 aStrBuf.append( intVal, -5 );
14096 CPPUNIT_ASSERT_MESSAGE
14098 "Appends the WrongRadix to the string buffer arrOUS[2]",
14099 sal_True
14104 void append_004()
14106 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14107 OString expVal( kTestStr60 );
14109 aStrBuf.append( intVal, -5 );
14111 CPPUNIT_ASSERT_MESSAGE
14113 "Appends the WrongRadix to the string buffer arrOUS[3]",
14114 sal_True
14119 void append_005()
14121 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14122 OString expVal( kTestStr61 );
14124 aStrBuf.append( intVal, -5 );
14126 CPPUNIT_ASSERT_MESSAGE
14128 "Appends the WrongRadix to the string buffer arrOUS[4]",
14129 sal_True
14133 #ifdef WITH_CORE
14134 void append_006()
14136 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14137 OString expVal( kTestStr60 );
14139 aStrBuf.append( intVal, -5 );
14141 CPPUNIT_ASSERT_MESSAGE
14143 "Appends the WrongRadix to the string buffer(with INT_MAX)",
14144 sal_True
14148 #endif
14150 SAL_CPPUNIT_TEST_SUITE( append_007_Int64_WrongRadix );
14151 CPPUNIT_TEST( append_001 );
14152 CPPUNIT_TEST( append_002 );
14153 CPPUNIT_TEST( append_003 );
14154 CPPUNIT_TEST( append_004 );
14155 CPPUNIT_TEST( append_005 );
14156 #ifdef WITH_CORE
14157 CPPUNIT_TEST( append_006 );
14158 #endif
14159 SAL_CPPUNIT_TEST_SUITE_END();
14161 //------------------------------------------------------------------------
14162 class append_007_Int64_defaultParam : public CppUnit::TestFixture
14164 OString* arrOUS[5];
14166 public:
14167 void setUp()
14169 arrOUS[0] = new OString( kTestStr7 );
14170 arrOUS[1] = new OString( );
14171 arrOUS[2] = new OString( kTestStr25 );
14172 arrOUS[3] = new OString( "" );
14173 arrOUS[4] = new OString( kTestStr28 );
14177 void tearDown()
14179 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
14180 delete arrOUS[3]; delete arrOUS[4];
14183 void append_001()
14185 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14186 OString expVal( kTestStr59 );
14187 sal_Int64 input = 11;
14189 aStrBuf.append( input );
14191 CPPUNIT_ASSERT_MESSAGE
14193 "input Int64 11 and return OStringBuffer[0]+11",
14194 (aStrBuf.toString() == expVal &&
14195 aStrBuf.getLength() == expVal.getLength())
14200 void append_002()
14202 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14203 OString expVal( kTestStr62 );
14204 sal_Int64 input = 0;
14206 aStrBuf.append( input );
14208 CPPUNIT_ASSERT_MESSAGE
14210 "input Int64 0 and return OStringBuffer[0]+0",
14211 (aStrBuf.toString() == expVal &&
14212 aStrBuf.getLength() == expVal.getLength())
14217 void append_003()
14219 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14220 OString expVal( kTestStr63 );
14221 sal_Int64 input = -11;
14223 aStrBuf.append( input );
14225 CPPUNIT_ASSERT_MESSAGE
14227 "input Int64 -11 and return OStringBuffer[0]+(-11)",
14228 (aStrBuf.toString() == expVal &&
14229 aStrBuf.getLength() == expVal.getLength())
14234 void append_004()
14236 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14237 OString expVal( kTestStr116 );
14238 sal_Int64 input = SAL_CONST_INT64(9223372036854775807);
14239 aStrBuf.append( input );
14241 CPPUNIT_ASSERT_MESSAGE
14243 "input Int64 9223372036854775807 and return OStringBuffer[0]+9223372036854775807",
14244 (aStrBuf.toString() == expVal &&
14245 aStrBuf.getLength() == expVal.getLength())
14250 void append_005()
14252 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14253 OString expVal( kTestStr117 );
14254 sal_Int64 input = SAL_MIN_INT64/*-9223372036854775808*/; // LLA: this is not the same :-( kNonSInt64Max;
14256 aStrBuf.append( input );
14258 sal_Bool bRes = expVal.equals( aStrBuf.getStr() );
14259 CPPUNIT_ASSERT_MESSAGE
14261 "input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)",
14262 bRes && aStrBuf.getLength() == expVal.getLength()
14267 void append_006()
14269 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14270 OString expVal( kTestStr60 );
14271 sal_Int64 input = 11;
14273 aStrBuf.append( input );
14275 CPPUNIT_ASSERT_MESSAGE
14277 "input Int64 11 and return OStringBuffer[1]+11",
14278 (aStrBuf.toString() == expVal &&
14279 aStrBuf.getLength() == expVal.getLength())
14284 void append_007()
14286 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14287 OString expVal( kTestStr66 );
14288 sal_Int64 input = 0;
14290 aStrBuf.append( input );
14292 CPPUNIT_ASSERT_MESSAGE
14294 "input Int64 0 and return OStringBuffer[1]+0",
14295 (aStrBuf.toString() == expVal &&
14296 aStrBuf.getLength() == expVal.getLength())
14301 void append_008()
14303 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14304 OString expVal( kTestStr67 );
14305 sal_Int64 input = -11;
14307 aStrBuf.append( input );
14309 CPPUNIT_ASSERT_MESSAGE
14311 "input Int64 -11 and return OStringBuffer[1]+(-11)",
14312 (aStrBuf.toString() == expVal &&
14313 aStrBuf.getLength() == expVal.getLength())
14318 void append_009()
14320 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14321 OString expVal( kTestStr118 );
14322 sal_Int64 input = SAL_CONST_INT64(9223372036854775807);
14323 aStrBuf.append( input );
14325 CPPUNIT_ASSERT_MESSAGE
14327 "input Int64 9223372036854775807 and return OStringBuffer[1]+9223372036854775807",
14328 (aStrBuf.toString() == expVal &&
14329 aStrBuf.getLength() == expVal.getLength())
14334 void append_010()
14336 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14337 OString expVal( kTestStr119 );
14338 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14340 aStrBuf.append( input );
14342 CPPUNIT_ASSERT_MESSAGE
14344 "input Int64 -9223372036854775808 and return OStringBuffer[1]+(-9223372036854775808)",
14345 (aStrBuf.toString() == expVal &&
14346 aStrBuf.getLength() == expVal.getLength())
14351 void append_011()
14353 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14354 OString expVal( kTestStr60 );
14355 sal_Int64 input = 11;
14357 aStrBuf.append( input );
14359 CPPUNIT_ASSERT_MESSAGE
14361 "input Int64 11 and return OStringBuffer[2]+11",
14362 (aStrBuf.toString() == expVal &&
14363 aStrBuf.getLength() == expVal.getLength())
14368 void append_012()
14370 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14371 OString expVal( kTestStr66 );
14372 sal_Int64 input = 0;
14374 aStrBuf.append( input );
14376 CPPUNIT_ASSERT_MESSAGE
14378 "input Int64 0 and return OUStringBuffer[2]+0",
14379 (aStrBuf.toString() == expVal &&
14380 aStrBuf.getLength() == expVal.getLength())
14385 void append_013()
14387 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14388 OString expVal( kTestStr67 );
14389 sal_Int64 input = -11;
14391 aStrBuf.append( input );
14393 CPPUNIT_ASSERT_MESSAGE
14395 "input Int64 -11 and return OUStringBuffer[2]+(-11)",
14396 (aStrBuf.toString() == expVal &&
14397 aStrBuf.getLength() == expVal.getLength())
14402 void append_014()
14404 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14405 OString expVal( kTestStr118 );
14406 sal_Int64 input = SAL_CONST_INT64(9223372036854775807);
14407 aStrBuf.append( input );
14409 CPPUNIT_ASSERT_MESSAGE
14411 "input Int64 9223372036854775807 and return OStringBuffer[2]+9223372036854775807",
14412 (aStrBuf.toString() == expVal &&
14413 aStrBuf.getLength() == expVal.getLength())
14418 void append_015()
14420 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14421 OString expVal( kTestStr119 );
14422 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14424 aStrBuf.append( input );
14426 CPPUNIT_ASSERT_MESSAGE
14428 "input Int64 -9223372036854775808 and return OStringBuffer[2]+(-9223372036854775808)",
14429 (aStrBuf.toString() == expVal &&
14430 aStrBuf.getLength() == expVal.getLength())
14435 void append_016()
14437 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14438 OString expVal( kTestStr60 );
14439 sal_Int64 input = 11;
14441 aStrBuf.append( input );
14443 CPPUNIT_ASSERT_MESSAGE
14445 "input Int64 11 and return OStringBuffer[3]+11",
14446 (aStrBuf.toString() == expVal &&
14447 aStrBuf.getLength() == expVal.getLength())
14452 void append_017()
14454 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14455 OString expVal( kTestStr66 );
14456 sal_Int64 input = 0;
14458 aStrBuf.append( input );
14460 CPPUNIT_ASSERT_MESSAGE
14462 "input Int64 0 and return OStringBuffer[3]+0",
14463 (aStrBuf.toString() == expVal &&
14464 aStrBuf.getLength() == expVal.getLength())
14469 void append_018()
14471 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14472 OString expVal( kTestStr67 );
14473 sal_Int64 input = -11;
14475 aStrBuf.append( input );
14477 CPPUNIT_ASSERT_MESSAGE
14479 "input Int64 -11 and return OStringBuffer[3]+(-11)",
14480 (aStrBuf.toString() == expVal &&
14481 aStrBuf.getLength() == expVal.getLength())
14486 void append_019()
14488 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14489 OString expVal( kTestStr118 );
14490 sal_Int64 input = SAL_CONST_INT64(9223372036854775807);
14491 aStrBuf.append( input );
14493 CPPUNIT_ASSERT_MESSAGE
14495 "input Int64 9223372036854775807 and return OStringBuffer[3]+9223372036854775807",
14496 (aStrBuf.toString() == expVal &&
14497 aStrBuf.getLength() == expVal.getLength())
14502 void append_020()
14504 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14505 OString expVal( kTestStr119 );
14506 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14508 aStrBuf.append( input );
14510 CPPUNIT_ASSERT_MESSAGE
14512 "input Int64 -9223372036854775808 and return OStringBuffer[3]+(-9223372036854775808)",
14513 (aStrBuf.toString() == expVal &&
14514 aStrBuf.getLength() == expVal.getLength())
14519 void append_021()
14521 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14522 OString expVal( kTestStr61 );
14523 sal_Int64 input = 11;
14525 aStrBuf.append( input );
14527 CPPUNIT_ASSERT_MESSAGE
14529 "input Int64 11 and return OStringBuffer[4]+11",
14530 (aStrBuf.toString() == expVal &&
14531 aStrBuf.getLength() == expVal.getLength())
14536 void append_022()
14538 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14539 OString expVal( kTestStr70 );
14540 sal_Int64 input = 0;
14542 aStrBuf.append( input );
14544 CPPUNIT_ASSERT_MESSAGE
14546 "input Int64 0 and return OStringBuffer[4]+0",
14547 (aStrBuf.toString() == expVal &&
14548 aStrBuf.getLength() == expVal.getLength())
14553 void append_023()
14555 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14556 OString expVal( kTestStr71 );
14557 sal_Int64 input = -11;
14559 aStrBuf.append( input );
14561 CPPUNIT_ASSERT_MESSAGE
14563 "input Int64 -11 and return OStringBuffer[4]+(-11)",
14564 (aStrBuf.toString() == expVal &&
14565 aStrBuf.getLength() == expVal.getLength())
14570 void append_024()
14572 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14573 OString expVal( kTestStr120 );
14574 sal_Int64 input = SAL_CONST_INT64(9223372036854775807);
14575 aStrBuf.append( input );
14577 CPPUNIT_ASSERT_MESSAGE
14579 "input Int64 9223372036854775807 and return OStringBuffer[4]+9223372036854775807",
14580 (aStrBuf.toString() == expVal &&
14581 aStrBuf.getLength() == expVal.getLength())
14586 void append_025()
14588 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14589 OString expVal( kTestStr121 );
14590 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14592 aStrBuf.append( input );
14594 CPPUNIT_ASSERT_MESSAGE
14596 "input Int64 -9223372036854775808 and return OStringBuffer[4]+(-9223372036854775808)",
14597 (aStrBuf.toString() == expVal &&
14598 aStrBuf.getLength() == expVal.getLength())
14602 #ifdef WITH_CORE
14603 void append_026()
14605 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14606 OString expVal( kTestStr60 );
14607 sal_Int64 input = 11;
14609 aStrBuf.append( input );
14611 CPPUNIT_ASSERT_MESSAGE
14613 "input Int64 11 and return OStringBuffer(kSInt64Max)+11",
14614 (aStrBuf.toString() == expVal &&
14615 aStrBuf.getLength() == expVal.getLength())
14620 void append_027()
14622 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14623 OString expVal( kTestStr66 );
14624 sal_Int64 input = 0;
14626 aStrBuf.append( input );
14628 CPPUNIT_ASSERT_MESSAGE
14630 "input Int64 0 and return OStringBuffer(kSInt64Max)+0",
14631 (aStrBuf.toString() == expVal &&
14632 aStrBuf.getLength() == expVal.getLength())
14637 void append_028()
14639 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14640 OString expVal( kTestStr67 );
14641 sal_Int64 input = -11;
14643 aStrBuf.append( input );
14645 CPPUNIT_ASSERT_MESSAGE
14647 "input Int64 -11 and return OStringBuffer(kSInt64Max)+(-11)",
14648 (aStrBuf.toString() == expVal &&
14649 aStrBuf.getLength() == expVal.getLength())
14654 void append_029()
14656 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14657 OString expVal( kTestStr118 );
14658 sal_Int64 input = 9223372036854775807;
14660 aStrBuf.append( input );
14662 CPPUNIT_ASSERT_MESSAGE
14664 "input Int64 9223372036854775807 and return OStringBuffer(kSInt64Max)+9223372036854775807",
14665 (aStrBuf.toString() == expVal &&
14666 aStrBuf.getLength() == expVal.getLength())
14671 void append_030()
14673 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14674 OString expVal( kTestStr119 );
14675 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14677 aStrBuf.append( input );
14679 CPPUNIT_ASSERT_MESSAGE
14681 "input Int64 -9223372036854775808 and return OStringBuffer(kSInt64Max)+(-9223372036854775808)",
14682 (aStrBuf.toString() == expVal &&
14683 aStrBuf.getLength() == expVal.getLength())
14687 #endif
14689 SAL_CPPUNIT_TEST_SUITE( append_007_Int64_defaultParam );
14690 CPPUNIT_TEST( append_001 );
14691 CPPUNIT_TEST( append_002 );
14692 CPPUNIT_TEST( append_003 );
14693 CPPUNIT_TEST( append_004 );
14694 CPPUNIT_TEST( append_005 );
14695 CPPUNIT_TEST( append_006 );
14696 CPPUNIT_TEST( append_007 );
14697 CPPUNIT_TEST( append_008 );
14698 CPPUNIT_TEST( append_009 );
14699 CPPUNIT_TEST( append_010 );
14700 CPPUNIT_TEST( append_011 );
14701 CPPUNIT_TEST( append_012 );
14702 CPPUNIT_TEST( append_013 );
14703 CPPUNIT_TEST( append_014 );
14704 CPPUNIT_TEST( append_015 );
14705 CPPUNIT_TEST( append_016 );
14706 CPPUNIT_TEST( append_017 );
14707 CPPUNIT_TEST( append_018 );
14708 CPPUNIT_TEST( append_019 );
14709 CPPUNIT_TEST( append_020 );
14710 CPPUNIT_TEST( append_021 );
14711 CPPUNIT_TEST( append_022 );
14712 CPPUNIT_TEST( append_023 );
14713 CPPUNIT_TEST( append_024 );
14714 CPPUNIT_TEST( append_025 );
14715 #ifdef WITH_CORE
14716 CPPUNIT_TEST( append_026 );
14717 CPPUNIT_TEST( append_027 );
14718 CPPUNIT_TEST( append_028 );
14719 CPPUNIT_TEST( append_029 );
14720 CPPUNIT_TEST( append_030 );
14721 #endif
14722 SAL_CPPUNIT_TEST_SUITE_END();
14724 //------------------------------------------------------------------------
14725 // testing the method append( float f )
14726 //------------------------------------------------------------------------
14727 class checkfloat : public CppUnit::TestFixture
14729 public:
14730 bool checkIfStrBufContainAtPosTheFloat(rtl::OStringBuffer const& _sStrBuf, sal_Int32 _nLen, float _nFloat)
14732 OString sFloatValue;
14733 sFloatValue = rtl::OString::valueOf(_nFloat);
14735 OString sBufferString(_sStrBuf.getStr());
14736 sal_Int32 nPos = sBufferString.indexOf(sFloatValue);
14737 if ( nPos >= 0 && nPos == _nLen)
14739 return true;
14741 return false;
14744 // -----------------------------------------------------------------------------
14745 class append_008_float : public checkfloat
14747 OString* arrOUS[5];
14749 public:
14750 void setUp()
14752 arrOUS[0] = new OString( kTestStr7 );
14753 arrOUS[1] = new OString( );
14754 arrOUS[2] = new OString( kTestStr25 );
14755 arrOUS[3] = new OString( "" );
14756 arrOUS[4] = new OString( kTestStr28 );
14760 void tearDown()
14762 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
14763 delete arrOUS[3]; delete arrOUS[4];
14766 void append_001()
14768 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14769 float input = (float)atof("3.0");
14771 // LLA:
14772 // the complex problem is here, that a float value is not really what we write.
14773 // So a 3.0 could also be 3 or 3.0 or 3.0000001 or 2.9999999
14774 // this has to be checked.
14775 sal_Int32 nLen = aStrBuf.getLength();
14776 aStrBuf.append( input );
14778 CPPUNIT_ASSERT_MESSAGE
14780 "arrOUS[0] append 3.0",
14781 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14786 void append_002()
14788 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14789 float input = (float)atof("3.5");
14791 sal_Int32 nLen = aStrBuf.getLength();
14792 aStrBuf.append( input );
14794 CPPUNIT_ASSERT_MESSAGE
14796 "arrOUS[0] append 3.5",
14797 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14802 void append_003()
14804 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14805 float input = (float)atof("3.0625");
14807 sal_Int32 nLen = aStrBuf.getLength();
14808 aStrBuf.append( input );
14810 CPPUNIT_ASSERT_MESSAGE
14812 "arrOUS[0] append 3.0625",
14813 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14818 void append_004()
14820 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14821 float input = (float)atof("3.502525");
14823 sal_Int32 nLen = aStrBuf.getLength();
14824 aStrBuf.append( input );
14826 CPPUNIT_ASSERT_MESSAGE
14828 "arrOUS[0] append 3.502525",
14829 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14834 void append_005()
14836 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14837 float input = (float)atof("3.141592");
14839 sal_Int32 nLen = aStrBuf.getLength();
14840 aStrBuf.append( input );
14842 CPPUNIT_ASSERT_MESSAGE
14844 "arrOUS[0] append 3.141592",
14845 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14850 void append_006()
14852 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14853 float input = (float)atof("3.5025255");
14855 sal_Int32 nLen = aStrBuf.getLength();
14856 aStrBuf.append( input );
14858 CPPUNIT_ASSERT_MESSAGE
14860 "arrOUS[0] append 3.5025255",
14861 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14866 void append_007()
14868 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14869 float input = (float)atof("3.00390625");
14871 sal_Int32 nLen = aStrBuf.getLength();
14872 aStrBuf.append( input );
14874 CPPUNIT_ASSERT_MESSAGE
14876 "arrOUS[0] append 3.0039062",
14877 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14882 void append_008()
14884 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14885 float input = (float)atof("3.0");
14887 sal_Int32 nLen = aStrBuf.getLength();
14888 aStrBuf.append( input );
14890 CPPUNIT_ASSERT_MESSAGE
14892 "arrOUS[1] append 3.0",
14893 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14898 void append_009()
14900 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14901 float input = (float)atof("3.5");
14903 sal_Int32 nLen = aStrBuf.getLength();
14904 aStrBuf.append( input );
14906 CPPUNIT_ASSERT_MESSAGE
14908 "arrOUS[1] append 3.5",
14909 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14914 void append_010()
14916 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14917 float input = (float)atof("3.0625");
14919 sal_Int32 nLen = aStrBuf.getLength();
14920 aStrBuf.append( input );
14922 CPPUNIT_ASSERT_MESSAGE
14924 "arrOUS[1] append 3.0625",
14925 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14930 void append_011()
14932 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14933 float input = (float)atof("3.502525");
14935 sal_Int32 nLen = aStrBuf.getLength();
14936 aStrBuf.append( input );
14938 CPPUNIT_ASSERT_MESSAGE
14940 "arrOUS[1] append 3.502525",
14941 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14946 void append_012()
14948 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14949 float input = (float)atof("3.141592");
14951 sal_Int32 nLen = aStrBuf.getLength();
14952 aStrBuf.append( input );
14954 CPPUNIT_ASSERT_MESSAGE
14956 "arrOUS[1] append 3.141592",
14957 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14962 void append_013()
14964 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14965 float input = (float)atof("3.5025255");
14967 sal_Int32 nLen = aStrBuf.getLength();
14968 aStrBuf.append( input );
14970 CPPUNIT_ASSERT_MESSAGE
14972 "arrOUS[1] append 3.5025255",
14973 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14978 void append_014()
14980 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14981 float input = (float)atof("3.00390625");
14983 sal_Int32 nLen = aStrBuf.getLength();
14984 aStrBuf.append( input );
14986 CPPUNIT_ASSERT_MESSAGE
14988 "arrOUS[1] append 3.0039062",
14989 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
14994 void append_015()
14996 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14997 float input = (float)atof("3.0");
14999 sal_Int32 nLen = aStrBuf.getLength();
15000 aStrBuf.append( input );
15002 CPPUNIT_ASSERT_MESSAGE
15004 "arrOUS[2] append 3.0",
15005 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15010 void append_016()
15012 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15013 float input = (float)atof("3.5");
15015 sal_Int32 nLen = aStrBuf.getLength();
15016 aStrBuf.append( input );
15018 CPPUNIT_ASSERT_MESSAGE
15020 "arrOUS[2] append 3.5",
15021 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15026 void append_017()
15028 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15029 float input = (float)atof("3.0625");
15031 sal_Int32 nLen = aStrBuf.getLength();
15032 aStrBuf.append( input );
15034 CPPUNIT_ASSERT_MESSAGE
15036 "arrOUS[2] append 3.0625",
15037 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15042 void append_018()
15044 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15045 float input = (float)atof("3.502525");
15047 sal_Int32 nLen = aStrBuf.getLength();
15048 aStrBuf.append( input );
15050 CPPUNIT_ASSERT_MESSAGE
15052 "arrOUS[2] append 3.502525",
15053 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15058 void append_019()
15060 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15061 float input = (float)atof("3.141592");
15063 sal_Int32 nLen = aStrBuf.getLength();
15064 aStrBuf.append( input );
15066 CPPUNIT_ASSERT_MESSAGE
15068 "arrOUS[2] append 3.141592",
15069 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15074 void append_020()
15076 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15077 float input = (float)atof("3.5025255");
15079 sal_Int32 nLen = aStrBuf.getLength();
15080 aStrBuf.append( input );
15082 CPPUNIT_ASSERT_MESSAGE
15084 "arrOUS[2] append 3.5025255",
15085 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15090 void append_021()
15092 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15093 float input = (float)atof("3.00390625");
15095 sal_Int32 nLen = aStrBuf.getLength();
15096 aStrBuf.append( input );
15098 CPPUNIT_ASSERT_MESSAGE
15100 "arrOUS[2] append 3.0039062",
15101 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15106 void append_022()
15108 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15109 float input = (float)atof("3.0");
15111 sal_Int32 nLen = aStrBuf.getLength();
15112 aStrBuf.append( input );
15114 CPPUNIT_ASSERT_MESSAGE
15116 "arrOUS[3] append 3.0",
15117 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15122 void append_023()
15124 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15125 float input = (float)atof("3.5");
15127 sal_Int32 nLen = aStrBuf.getLength();
15128 aStrBuf.append( input );
15130 CPPUNIT_ASSERT_MESSAGE
15132 "arrOUS[3] append 3.5",
15133 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15138 void append_024()
15140 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15141 float input = (float)atof("3.0625");
15143 sal_Int32 nLen = aStrBuf.getLength();
15144 aStrBuf.append( input );
15146 CPPUNIT_ASSERT_MESSAGE
15148 "arrOUS[3] append 3.0625",
15149 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15154 void append_025()
15156 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15157 float input = (float)atof("3.502525");
15159 sal_Int32 nLen = aStrBuf.getLength();
15160 aStrBuf.append( input );
15162 CPPUNIT_ASSERT_MESSAGE
15164 "arrOUS[3] append 3.502525",
15165 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15170 void append_026()
15172 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15173 float input = (float)atof("3.141592");
15175 sal_Int32 nLen = aStrBuf.getLength();
15176 aStrBuf.append( input );
15178 CPPUNIT_ASSERT_MESSAGE
15180 "arrOUS[3] append 3.141592",
15181 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15186 void append_027()
15188 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15189 float input = (float)atof("3.5025255");
15191 sal_Int32 nLen = aStrBuf.getLength();
15192 aStrBuf.append( input );
15194 CPPUNIT_ASSERT_MESSAGE
15196 "arrOUS[3] append 3.5025255",
15197 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15202 void append_028()
15204 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15205 float input = (float)atof("3.00390625");
15207 sal_Int32 nLen = aStrBuf.getLength();
15208 aStrBuf.append( input );
15210 CPPUNIT_ASSERT_MESSAGE
15212 "arrOUS[3] append 3.0039062",
15213 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15218 void append_029()
15220 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15221 float input = (float)atof("3.0");
15223 sal_Int32 nLen = aStrBuf.getLength();
15224 aStrBuf.append( input );
15226 CPPUNIT_ASSERT_MESSAGE
15228 "arrOUS[4] append 3.0",
15229 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15234 void append_030()
15236 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15237 float input = (float)atof("3.5");
15239 sal_Int32 nLen = aStrBuf.getLength();
15240 aStrBuf.append( input );
15242 CPPUNIT_ASSERT_MESSAGE
15244 "arrOUS[4] append 3.5",
15245 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15250 void append_031()
15252 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15253 float input = (float)atof("3.0625");
15255 sal_Int32 nLen = aStrBuf.getLength();
15256 aStrBuf.append( input );
15258 CPPUNIT_ASSERT_MESSAGE
15260 "arrOUS[4] append 3.0625",
15261 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15266 void append_032()
15268 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15269 float input = (float)atof("3.502525");
15271 sal_Int32 nLen = aStrBuf.getLength();
15272 aStrBuf.append( input );
15274 CPPUNIT_ASSERT_MESSAGE
15276 "arrOUS[4] append 3.502525",
15277 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15282 void append_033()
15284 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15285 float input = (float)atof("3.141592");
15287 sal_Int32 nLen = aStrBuf.getLength();
15288 aStrBuf.append( input );
15290 CPPUNIT_ASSERT_MESSAGE
15292 "arrOUS[4] append 3.141592",
15293 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15298 void append_034()
15300 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15301 float input = (float)atof("3.5025255");
15303 sal_Int32 nLen = aStrBuf.getLength();
15304 aStrBuf.append( input );
15306 CPPUNIT_ASSERT_MESSAGE
15308 "arrOUS[4] append 3.5025255",
15309 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15314 void append_035()
15316 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15317 float input = (float)atof("3.00390625");
15319 sal_Int32 nLen = aStrBuf.getLength();
15320 aStrBuf.append( input );
15322 CPPUNIT_ASSERT_MESSAGE
15324 "arrOUS[4] append 3.0039062",
15325 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15329 #ifdef WITH_CORE
15330 void append_036()
15332 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15333 float input = (float)atof("3.0");
15335 sal_Int32 nLen = aStrBuf.getLength();
15336 aStrBuf.append( input );
15338 CPPUNIT_ASSERT_MESSAGE
15340 "OStringBuffer( kSInt32Max ) append 3.0",
15341 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15346 void append_037()
15348 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15349 float input = (float)atof("3.5");
15351 sal_Int32 nLen = aStrBuf.getLength();
15352 aStrBuf.append( input );
15354 CPPUNIT_ASSERT_MESSAGE
15356 "OStringBuffer( kSInt32Max ) append 3.5",
15357 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15362 void append_038()
15364 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15365 float input = (float)atof("3.0625");
15367 sal_Int32 nLen = aStrBuf.getLength();
15368 aStrBuf.append( input );
15370 CPPUNIT_ASSERT_MESSAGE
15372 "OStringBuffer( kSInt32Max ) append 3.0625",
15373 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15378 void append_039()
15380 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15381 float input = (float)atof("3.502525");
15383 sal_Int32 nLen = aStrBuf.getLength();
15384 aStrBuf.append( input );
15386 CPPUNIT_ASSERT_MESSAGE
15388 "OStringBuffer( kSInt32Max ) append 3.502525",
15389 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15394 void append_040()
15396 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15397 float input = (float)atof("3.141592");
15399 sal_Int32 nLen = aStrBuf.getLength();
15400 aStrBuf.append( input );
15402 CPPUNIT_ASSERT_MESSAGE
15404 "OStringBuffer( kSInt32Max ) append 3.141592",
15405 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15410 void append_041()
15412 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15413 float input = (float)atof("3.5025255");
15415 sal_Int32 nLen = aStrBuf.getLength();
15416 aStrBuf.append( input );
15418 CPPUNIT_ASSERT_MESSAGE
15420 "OStringBuffer( kSInt32Max ) append 3.5025255",
15421 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15426 void append_042()
15428 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15429 float input = (float)atof("3.00390625");
15431 sal_Int32 nLen = aStrBuf.getLength();
15432 aStrBuf.append( input );
15434 CPPUNIT_ASSERT_MESSAGE
15436 "OStringBuffer( kSInt32Max ) append 3.0039062",
15437 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15441 #endif
15443 SAL_CPPUNIT_TEST_SUITE( append_008_float );
15444 CPPUNIT_TEST( append_001 );
15445 CPPUNIT_TEST( append_002 );
15446 CPPUNIT_TEST( append_003 );
15447 CPPUNIT_TEST( append_004 );
15448 CPPUNIT_TEST( append_005 );
15449 CPPUNIT_TEST( append_006 );
15450 CPPUNIT_TEST( append_007 );
15451 CPPUNIT_TEST( append_008 );
15452 CPPUNIT_TEST( append_009 );
15453 CPPUNIT_TEST( append_010 );
15454 CPPUNIT_TEST( append_011 );
15455 CPPUNIT_TEST( append_012 );
15456 CPPUNIT_TEST( append_013 );
15457 CPPUNIT_TEST( append_014 );
15458 CPPUNIT_TEST( append_015 );
15459 CPPUNIT_TEST( append_016 );
15460 CPPUNIT_TEST( append_017 );
15461 CPPUNIT_TEST( append_018 );
15462 CPPUNIT_TEST( append_019 );
15463 CPPUNIT_TEST( append_020 );
15464 CPPUNIT_TEST( append_021 );
15465 CPPUNIT_TEST( append_022 );
15466 CPPUNIT_TEST( append_023 );
15467 CPPUNIT_TEST( append_024 );
15468 CPPUNIT_TEST( append_025 );
15469 #ifdef WITH_CORE
15470 CPPUNIT_TEST( append_026 );
15471 CPPUNIT_TEST( append_027 );
15472 CPPUNIT_TEST( append_028 );
15473 CPPUNIT_TEST( append_029 );
15474 CPPUNIT_TEST( append_030 );
15475 #endif
15476 SAL_CPPUNIT_TEST_SUITE_END();
15478 //------------------------------------------------------------------------
15479 // testing the method append( float f ) for negative value
15480 //------------------------------------------------------------------------
15481 class append_008_Float_Negative : public checkfloat
15483 OString* arrOUS[5];
15485 public:
15486 void setUp()
15488 arrOUS[0] = new OString( kTestStr7 );
15489 arrOUS[1] = new OString( );
15490 arrOUS[2] = new OString( kTestStr25 );
15491 arrOUS[3] = new OString( "" );
15492 arrOUS[4] = new OString( kTestStr28 );
15496 void tearDown()
15498 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
15499 delete arrOUS[3]; delete arrOUS[4];
15502 void append_001()
15504 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15505 float input = (float)atof("-3.0");
15507 sal_Int32 nLen = aStrBuf.getLength();
15508 aStrBuf.append( input );
15510 CPPUNIT_ASSERT_MESSAGE
15512 "arrOUS[0] append -3.0",
15513 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15518 void append_002()
15520 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15521 float input = (float)atof("-3.5");
15523 sal_Int32 nLen = aStrBuf.getLength();
15524 aStrBuf.append( input );
15526 CPPUNIT_ASSERT_MESSAGE
15528 "arrOUS[0] append -3.5",
15529 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15534 void append_003()
15536 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15537 float input = (float)atof("-3.0625");
15539 sal_Int32 nLen = aStrBuf.getLength();
15540 aStrBuf.append( input );
15542 CPPUNIT_ASSERT_MESSAGE
15544 "arrOUS[0] append -3.0625",
15545 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15550 void append_004()
15552 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15553 float input = (float)atof("-3.502525");
15555 sal_Int32 nLen = aStrBuf.getLength();
15556 aStrBuf.append( input );
15558 CPPUNIT_ASSERT_MESSAGE
15560 "arrOUS[0] append -3.502525",
15561 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15566 void append_005()
15568 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15569 float input = (float)atof("-3.141592");
15571 sal_Int32 nLen = aStrBuf.getLength();
15572 aStrBuf.append( input );
15574 CPPUNIT_ASSERT_MESSAGE
15576 "arrOUS[0] append -3.141592",
15577 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15582 void append_006()
15584 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15585 float input = (float)atof("-3.5025255");
15587 sal_Int32 nLen = aStrBuf.getLength();
15588 aStrBuf.append( input );
15590 CPPUNIT_ASSERT_MESSAGE
15592 "arrOUS[0] append -3.5025255",
15593 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15598 void append_007()
15600 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15601 float input = (float)atof("-3.00390625");
15603 sal_Int32 nLen = aStrBuf.getLength();
15604 aStrBuf.append( input );
15606 CPPUNIT_ASSERT_MESSAGE
15608 "arrOUS[0] append -3.0039062",
15609 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15614 void append_008()
15616 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15617 float input = (float)atof("-3.0");
15619 sal_Int32 nLen = aStrBuf.getLength();
15620 aStrBuf.append( input );
15622 CPPUNIT_ASSERT_MESSAGE
15624 "arrOUS[1] append -3.0",
15625 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15630 void append_009()
15632 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15633 float input = (float)atof("-3.5");
15635 sal_Int32 nLen = aStrBuf.getLength();
15636 aStrBuf.append( input );
15638 CPPUNIT_ASSERT_MESSAGE
15640 "arrOUS[1] append -3.5",
15641 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15646 void append_010()
15648 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15649 float input = (float)atof("-3.0625");
15651 sal_Int32 nLen = aStrBuf.getLength();
15652 aStrBuf.append( input );
15654 CPPUNIT_ASSERT_MESSAGE
15656 "arrOUS[1] append -3.0625",
15657 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15662 void append_011()
15664 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15665 float input = (float)atof("-3.502525");
15667 sal_Int32 nLen = aStrBuf.getLength();
15668 aStrBuf.append( input );
15670 CPPUNIT_ASSERT_MESSAGE
15672 "arrOUS[1] append -3.502525",
15673 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15678 void append_012()
15680 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15681 float input = (float)atof("-3.141592");
15683 sal_Int32 nLen = aStrBuf.getLength();
15684 aStrBuf.append( input );
15686 CPPUNIT_ASSERT_MESSAGE
15688 "arrOUS[1] append -3.141592",
15689 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15694 void append_013()
15696 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15697 float input = (float)atof("-3.5025255");
15699 sal_Int32 nLen = aStrBuf.getLength();
15700 aStrBuf.append( input );
15702 CPPUNIT_ASSERT_MESSAGE
15704 "arrOUS[1] append -3.5025255",
15705 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15710 void append_014()
15712 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15713 float input = (float)atof("-3.00390625");
15715 sal_Int32 nLen = aStrBuf.getLength();
15716 aStrBuf.append( input );
15718 CPPUNIT_ASSERT_MESSAGE
15720 "arrOUS[1] append -3.0039062",
15721 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15726 void append_015()
15728 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15729 float input = (float)atof("-3.0");
15731 sal_Int32 nLen = aStrBuf.getLength();
15732 aStrBuf.append( input );
15734 CPPUNIT_ASSERT_MESSAGE
15736 "arrOUS[2] append -3.0",
15737 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15742 void append_016()
15744 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15745 float input = (float)atof("-3.5");
15747 sal_Int32 nLen = aStrBuf.getLength();
15748 aStrBuf.append( input );
15750 CPPUNIT_ASSERT_MESSAGE
15752 "arrOUS[2] append -3.5",
15753 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15758 void append_017()
15760 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15761 float input = (float)atof("-3.0625");
15763 sal_Int32 nLen = aStrBuf.getLength();
15764 aStrBuf.append( input );
15766 CPPUNIT_ASSERT_MESSAGE
15768 "arrOUS[2] append -3.0625",
15769 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15774 void append_018()
15776 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15777 float input = (float)atof("-3.502525");
15779 sal_Int32 nLen = aStrBuf.getLength();
15780 aStrBuf.append( input );
15782 CPPUNIT_ASSERT_MESSAGE
15784 "arrOUS[2] append -3.502525",
15785 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15790 void append_019()
15792 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15793 float input = (float)atof("-3.141592");
15795 sal_Int32 nLen = aStrBuf.getLength();
15796 aStrBuf.append( input );
15798 CPPUNIT_ASSERT_MESSAGE
15800 "arrOUS[2] append -3.141592",
15801 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15806 void append_020()
15808 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15809 float input = (float)atof("-3.5025255");
15811 sal_Int32 nLen = aStrBuf.getLength();
15812 aStrBuf.append( input );
15814 CPPUNIT_ASSERT_MESSAGE
15816 "arrOUS[2] append -3.5025255",
15817 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15822 void append_021()
15824 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15825 float input = (float)atof("-3.00390625");
15827 sal_Int32 nLen = aStrBuf.getLength();
15828 aStrBuf.append( input );
15830 CPPUNIT_ASSERT_MESSAGE
15832 "arrOUS[2] append -3.0039062",
15833 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15838 void append_022()
15840 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15841 float input = (float)atof("-3.0");
15843 sal_Int32 nLen = aStrBuf.getLength();
15844 aStrBuf.append( input );
15846 CPPUNIT_ASSERT_MESSAGE
15848 "arrOUS[3] append -3.0",
15849 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15854 void append_023()
15856 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15857 float input = (float)atof("-3.5");
15859 sal_Int32 nLen = aStrBuf.getLength();
15860 aStrBuf.append( input );
15862 CPPUNIT_ASSERT_MESSAGE
15864 "arrOUS[3] append -3.5",
15865 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15870 void append_024()
15872 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15873 float input = (float)atof("-3.0625");
15875 sal_Int32 nLen = aStrBuf.getLength();
15876 aStrBuf.append( input );
15878 CPPUNIT_ASSERT_MESSAGE
15880 "arrOUS[3] append -3.0625",
15881 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15886 void append_025()
15888 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15889 float input = (float)atof("-3.502525");
15891 sal_Int32 nLen = aStrBuf.getLength();
15892 aStrBuf.append( input );
15894 CPPUNIT_ASSERT_MESSAGE
15896 "arrOUS[3] append -3.502525",
15897 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15902 void append_026()
15904 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15905 float input = (float)atof("-3.141592");
15907 sal_Int32 nLen = aStrBuf.getLength();
15908 aStrBuf.append( input );
15910 CPPUNIT_ASSERT_MESSAGE
15912 "arrOUS[3] append -3.141592",
15913 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15918 void append_027()
15920 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15921 float input = (float)atof("-3.5025255");
15923 sal_Int32 nLen = aStrBuf.getLength();
15924 aStrBuf.append( input );
15926 CPPUNIT_ASSERT_MESSAGE
15928 "arrOUS[3] append -3.5025255",
15929 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15934 void append_028()
15936 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15937 float input = (float)atof("-3.00390625");
15939 sal_Int32 nLen = aStrBuf.getLength();
15940 aStrBuf.append( input );
15942 CPPUNIT_ASSERT_MESSAGE
15944 "arrOUS[3] append -3.0039062",
15945 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15950 void append_029()
15952 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15953 float input = (float)atof("-3.0");
15955 sal_Int32 nLen = aStrBuf.getLength();
15956 aStrBuf.append( input );
15958 CPPUNIT_ASSERT_MESSAGE
15960 "arrOUS[4] append -3.0",
15961 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15966 void append_030()
15968 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15969 float input = (float)atof("-3.5");
15971 sal_Int32 nLen = aStrBuf.getLength();
15972 aStrBuf.append( input );
15974 CPPUNIT_ASSERT_MESSAGE
15976 "arrOUS[4] append -3.5",
15977 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15982 void append_031()
15984 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15985 float input = (float)atof("-3.0625");
15987 sal_Int32 nLen = aStrBuf.getLength();
15988 aStrBuf.append( input );
15990 CPPUNIT_ASSERT_MESSAGE
15992 "arrOUS[4] append -3.0625",
15993 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15998 void append_032()
16000 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16001 float input = (float)atof("-3.502525");
16003 sal_Int32 nLen = aStrBuf.getLength();
16004 aStrBuf.append( input );
16006 CPPUNIT_ASSERT_MESSAGE
16008 "arrOUS[4] append -3.502525",
16009 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16014 void append_033()
16016 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16017 float input = (float)atof("-3.141592");
16019 sal_Int32 nLen = aStrBuf.getLength();
16020 aStrBuf.append( input );
16022 CPPUNIT_ASSERT_MESSAGE
16024 "arrOUS[4] append -3.141592",
16025 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16030 void append_034()
16032 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16033 float input = (float)atof("-3.5025255");
16035 sal_Int32 nLen = aStrBuf.getLength();
16036 aStrBuf.append( input );
16038 CPPUNIT_ASSERT_MESSAGE
16040 "arrOUS[4] append -3.5025255",
16041 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16046 void append_035()
16048 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16049 float input = (float)atof("-3.00390625");
16051 sal_Int32 nLen = aStrBuf.getLength();
16052 aStrBuf.append( input );
16054 CPPUNIT_ASSERT_MESSAGE
16056 "arrOUS[4] append -3.0039062",
16057 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16061 #ifdef WITH_CORE
16062 void append_036()
16064 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16065 float input = (float)atof("-3.0");
16067 sal_Int32 nLen = aStrBuf.getLength();
16068 aStrBuf.append( input );
16070 CPPUNIT_ASSERT_MESSAGE
16072 "OStringBuffer( kSInt32Max ) append -3.0",
16073 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16078 void append_037()
16080 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16081 float input = (float)atof("-3.5");
16083 sal_Int32 nLen = aStrBuf.getLength();
16084 aStrBuf.append( input );
16086 CPPUNIT_ASSERT_MESSAGE
16088 "OStringBuffer( kSInt32Max ) append -3.5",
16089 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16094 void append_038()
16096 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16097 float input = (float)atof("-3.0625");
16099 sal_Int32 nLen = aStrBuf.getLength();
16100 aStrBuf.append( input );
16102 CPPUNIT_ASSERT_MESSAGE
16104 "OStringBuffer( kSInt32Max ) append -3.0625",
16105 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16110 void append_039()
16112 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16113 float input = (float)atof("-3.502525");
16115 sal_Int32 nLen = aStrBuf.getLength();
16116 aStrBuf.append( input );
16118 CPPUNIT_ASSERT_MESSAGE
16120 "OStringBuffer( kSInt32Max ) append -3.502525",
16121 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16126 void append_040()
16128 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16129 float input = (float)atof("-3.141592");
16131 sal_Int32 nLen = aStrBuf.getLength();
16132 aStrBuf.append( input );
16134 CPPUNIT_ASSERT_MESSAGE
16136 "OStringBuffer( kSInt32Max ) append -3.141592",
16137 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16142 void append_041()
16144 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16145 float input = (float)atof("-3.5025255");
16147 sal_Int32 nLen = aStrBuf.getLength();
16148 aStrBuf.append( input );
16150 CPPUNIT_ASSERT_MESSAGE
16152 "OStringBuffer( kSInt32Max ) append -3.5025255",
16153 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16158 void append_042()
16160 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16161 float input = (float)atof("-3.00390625");
16163 sal_Int32 nLen = aStrBuf.getLength();
16164 aStrBuf.append( input );
16166 CPPUNIT_ASSERT_MESSAGE
16168 "OStringBuffer( kSInt32Max ) append -3.0039062",
16169 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16173 #endif
16175 SAL_CPPUNIT_TEST_SUITE( append_008_Float_Negative );
16176 CPPUNIT_TEST( append_001 );
16177 CPPUNIT_TEST( append_002 );
16178 CPPUNIT_TEST( append_003 );
16179 CPPUNIT_TEST( append_004 );
16180 CPPUNIT_TEST( append_005 );
16181 CPPUNIT_TEST( append_006 );
16182 CPPUNIT_TEST( append_007 );
16183 CPPUNIT_TEST( append_008 );
16184 CPPUNIT_TEST( append_009 );
16185 CPPUNIT_TEST( append_010 );
16186 CPPUNIT_TEST( append_011 );
16187 CPPUNIT_TEST( append_012 );
16188 CPPUNIT_TEST( append_013 );
16189 CPPUNIT_TEST( append_014 );
16190 CPPUNIT_TEST( append_015 );
16191 CPPUNIT_TEST( append_016 );
16192 CPPUNIT_TEST( append_017 );
16193 CPPUNIT_TEST( append_018 );
16194 CPPUNIT_TEST( append_019 );
16195 CPPUNIT_TEST( append_020 );
16196 CPPUNIT_TEST( append_021 );
16197 CPPUNIT_TEST( append_022 );
16198 CPPUNIT_TEST( append_023 );
16199 CPPUNIT_TEST( append_024 );
16200 CPPUNIT_TEST( append_025 );
16201 #ifdef WITH_CORE
16202 CPPUNIT_TEST( append_026 );
16203 CPPUNIT_TEST( append_027 );
16204 CPPUNIT_TEST( append_028 );
16205 CPPUNIT_TEST( append_029 );
16206 CPPUNIT_TEST( append_030 );
16207 #endif
16208 SAL_CPPUNIT_TEST_SUITE_END();
16210 //------------------------------------------------------------------------
16211 // testing the method append( double d )
16212 //------------------------------------------------------------------------
16214 class checkdouble : public CppUnit::TestFixture
16216 public:
16217 bool checkIfStrBufContainAtPosTheDouble(rtl::OStringBuffer const& _sStrBuf, sal_Int32 _nLen, double _nDouble)
16219 OString sDoubleValue;
16220 sDoubleValue = rtl::OString::valueOf(_nDouble);
16222 OString sBufferString(_sStrBuf.getStr());
16223 sal_Int32 nPos = sBufferString.indexOf(sDoubleValue);
16224 if ( nPos >= 0 && nPos == _nLen)
16226 return true;
16228 return false;
16232 class append_009_double : public checkdouble
16234 OString* arrOUS[5];
16236 public:
16237 void setUp()
16239 arrOUS[0] = new OString( kTestStr7 );
16240 arrOUS[1] = new OString( );
16241 arrOUS[2] = new OString( kTestStr25 );
16242 arrOUS[3] = new OString( "" );
16243 arrOUS[4] = new OString( kTestStr28 );
16247 void tearDown()
16249 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
16250 delete arrOUS[3]; delete arrOUS[4];
16253 void append_001()
16255 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16256 double input = atof("3.0");
16258 sal_Int32 nLen = aStrBuf.getLength();
16259 aStrBuf.append( input );
16261 CPPUNIT_ASSERT_MESSAGE
16263 "arrOUS[0] append 3.0",
16264 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
16269 void append_035()
16271 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16272 double input = atof("3.141592653589793238462643");
16274 sal_Int32 nLen = aStrBuf.getLength();
16275 aStrBuf.append( input );
16277 CPPUNIT_ASSERT_MESSAGE
16279 "arrOUS[4] append 3.141592653589793238462643",
16280 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
16285 SAL_CPPUNIT_TEST_SUITE( append_009_double );
16286 CPPUNIT_TEST( append_001 );
16287 CPPUNIT_TEST( append_035 );
16288 SAL_CPPUNIT_TEST_SUITE_END();
16291 //------------------------------------------------------------------------
16292 // testing the method append( double f ) for negative value
16293 //------------------------------------------------------------------------
16294 class append_009_Double_Negative : public checkdouble
16296 OString* arrOUS[5];
16298 public:
16299 void setUp()
16301 arrOUS[0] = new OString( kTestStr7 );
16302 arrOUS[1] = new OString( );
16303 arrOUS[2] = new OString( kTestStr25 );
16304 arrOUS[3] = new OString( "" );
16305 arrOUS[4] = new OString( kTestStr28 );
16309 void tearDown()
16311 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
16312 delete arrOUS[3]; delete arrOUS[4];
16315 void append_001()
16317 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16318 double input = atof("-3.0");
16320 sal_Int32 nLen = aStrBuf.getLength();
16321 aStrBuf.append( input );
16323 CPPUNIT_ASSERT_MESSAGE
16325 "arrOUS[0] append -3.0",
16326 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
16331 void append_035()
16333 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16334 double input = atof("-3.141592653589793238462643");
16336 sal_Int32 nLen = aStrBuf.getLength();
16337 aStrBuf.append( input );
16339 CPPUNIT_ASSERT_MESSAGE
16341 "arrOUS[4] append -3.141592653589793238462643",
16342 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
16347 SAL_CPPUNIT_TEST_SUITE( append_009_Double_Negative );
16348 CPPUNIT_TEST( append_001 );
16349 CPPUNIT_TEST( append_035 );
16350 SAL_CPPUNIT_TEST_SUITE_END();
16352 } // namespace rtl_OStringBuffer
16354 // -----------------------------------------------------------------------------
16355 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ctors);
16356 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::makeStringAndClear);
16357 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getLength);
16358 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getCapacity);
16359 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ensureCapacity);
16360 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::setLength);
16361 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::csuc);
16362 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getStr);
16363 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_001);
16364 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_002);
16365 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_003);
16366 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_004);
16367 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_005);
16368 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32);
16369 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Bounderies);
16370 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Negative);
16371 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_WrongRadix);
16372 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_defaultParam);
16373 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64);
16374 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Bounderies);
16375 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Negative);
16376 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_WrongRadix);
16377 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_defaultParam);
16378 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_float);
16379 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative);
16380 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_double);
16381 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative);
16382 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::remove);
16384 CPPUNIT_PLUGIN_IMPLEMENT();
16386 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */