update dev300-m57
[ooovba.git] / sal / qa / OStringBuffer / rtl_OStringBuffer.cxx
blobfa77904774b15bd8cf8323d5e27282783940feb8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rtl_OStringBuffer.cxx,v $
10 * $Revision: 1.17 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sal.hxx"
34 // -----------------------------------------------------------------------------
35 #include <rtl/string.hxx>
36 #include <rtl_String_Const.h>
37 #include <rtl_String_Utils.hxx>
39 #include <rtl/strbuf.hxx>
41 #include <cppunit/simpleheader.hxx>
43 using namespace rtl;
45 //------------------------------------------------------------------------
46 // test classes
47 //------------------------------------------------------------------------
48 // const MAXBUFLENGTH = 255;
49 //------------------------------------------------------------------------
50 // helper functions
51 //------------------------------------------------------------------------
53 //------------------------------------------------------------------------
54 // testing constructors
55 //------------------------------------------------------------------------
57 // LLA: there exist some #if WITH_CORE #endif envelopes, which contain test code, which will core dump
58 // due to the fact, that we can't handle MAXINT32 right.
60 namespace rtl_OStringBuffer
62 class ctors : public CppUnit::TestFixture
64 public:
66 void ctor_001()
68 ::rtl::OStringBuffer aStrBuf;
69 const sal_Char* pStr = aStrBuf.getStr();
71 CPPUNIT_ASSERT_MESSAGE
73 "New OStringBuffer containing no characters",
74 aStrBuf.getLength() == 0 &&
75 *pStr == '\0' && aStrBuf.getCapacity() == 16
79 void ctor_002()
81 ::rtl::OString aStrtmp( kTestStr1 );
82 ::rtl::OStringBuffer aStrBuftmp( aStrtmp );
83 ::rtl::OStringBuffer aStrBuf( aStrBuftmp );
84 // sal_Bool res = cmpstr(aStrBuftmp.getStr(),aStrBuf.getStr());
86 sal_Int32 nLenStrBuftmp = aStrBuftmp.getLength();
88 rtl::OString sStr(aStrBuftmp.getStr());
89 sal_Bool res = aStrtmp.equals( sStr );
91 CPPUNIT_ASSERT_MESSAGE
93 "New OStringBuffer from another OStringBuffer",
94 aStrBuf.getLength() == nLenStrBuftmp &&
95 aStrBuf.getCapacity() == aStrBuftmp.getCapacity() &&
96 res
101 void ctor_003()
103 ::rtl::OStringBuffer aStrBuf1(kTestStr2Len);
104 #ifdef WITH_CORE
105 ::rtl::OStringBuffer aStrBuf2(kSInt32Max); //will core dump
106 // LLA: will core, due to the fact, that ksint32max is too big, the max length can't
107 // use, because there are some internal bytes, which we can't calculate.
109 #else
110 ::rtl::OStringBuffer aStrBuf2(0);
111 #endif
113 const sal_Char* pStr1 = aStrBuf1.getStr();
114 const sal_Char* pStr2 = aStrBuf2.getStr();
116 #ifdef WITH_CORE
117 CPPUNIT_ASSERT_MESSAGE
119 "New OStringBuffer containing no characters and contain assigned capacity",
120 aStrBuf1.getLength() == 0 &&
121 ! *(aStrBuf1.getStr()) && aStrBuf1.getCapacity() == kTestStr2Len &&
122 aStrBuf2.getLength() == 0 &&
123 ! *(aStrBuf2.getStr()) && aStrBuf2.getCapacity() == kSInt32Max
126 #else
127 CPPUNIT_ASSERT_MESSAGE
129 "New OStringBuffer containing no characters and contain assigned capacity",
130 aStrBuf1.getLength() == 0 &&
131 *pStr1 == '\0' &&
132 aStrBuf1.getCapacity() == kTestStr2Len &&
133 aStrBuf2.getLength() == 0 &&
134 *pStr2 == '\0' &&
135 aStrBuf2.getCapacity() == 0
137 #endif
141 void ctor_003_1()
143 // LLA: StringBuffer with created negativ size are the same as empty StringBuffers
144 ::rtl::OStringBuffer aStrBuf3(kNonSInt32Max);
146 const sal_Char* pStr = aStrBuf3.getStr();
148 CPPUNIT_ASSERT_MESSAGE
150 "New OStringBuffer containing no characters and contain assigned capacity",
151 aStrBuf3.getLength() == 0 &&
152 *pStr == '\0' &&
153 aStrBuf3.getCapacity() == kNonSInt32Max
157 void ctor_004()
159 ::rtl::OString aStrtmp( kTestStr1 );
160 ::rtl::OStringBuffer aStrBuf( aStrtmp );
161 sal_Int32 leg = aStrBuf.getLength();
163 CPPUNIT_ASSERT_MESSAGE
165 "New OStringBuffer from Ostring",
166 aStrBuf.getStr() == aStrtmp &&
167 leg == aStrtmp.pData->length &&
168 aStrBuf.getCapacity() == leg+16
173 void ctor_005() {
174 rtl::OStringBuffer b1;
175 b1.makeStringAndClear();
176 rtl::OStringBuffer b2(b1);
179 CPPUNIT_TEST_SUITE(ctors);
180 CPPUNIT_TEST(ctor_001);
181 CPPUNIT_TEST(ctor_002);
182 CPPUNIT_TEST(ctor_003);
183 CPPUNIT_TEST(ctor_003_1);
184 CPPUNIT_TEST(ctor_004);
185 CPPUNIT_TEST(ctor_005);
186 CPPUNIT_TEST_SUITE_END();
191 // -----------------------------------------------------------------------------
193 class makeStringAndClear : public CppUnit::TestFixture
195 OString* arrOUS[6];
197 public:
198 void setUp()
200 arrOUS[0] = new OString( kTestStr1 );
201 arrOUS[1] = new OString( kTestStr14 );
202 arrOUS[2] = new OString( kTestStr25 );
203 arrOUS[3] = new OString( kTestStr27 );
204 arrOUS[4] = new OString( kTestStr29 );
205 arrOUS[5] = new OString( "\0" );
209 void tearDown()
211 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
212 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
215 void makeStringAndClear_001()
217 ::rtl::OStringBuffer aStrBuf1;
218 ::rtl::OString aStr1;
220 sal_Bool lastRes = (aStrBuf1.makeStringAndClear() == aStr1 );
222 CPPUNIT_ASSERT_MESSAGE
224 "two empty strings(def. constructor)",
225 lastRes && ( aStrBuf1.getCapacity() == 0 ) &&
226 ( *(aStrBuf1.getStr()) == '\0' )
231 void makeStringAndClear_002()
233 ::rtl::OStringBuffer aStrBuf2(26);
234 ::rtl::OString aStr2;
236 sal_Bool lastRes = (aStrBuf2.makeStringAndClear() == aStr2 );
238 CPPUNIT_ASSERT_MESSAGE
240 "two empty strings(with a argu)",
241 lastRes && ( aStrBuf2.getCapacity() == 0 ) &&
242 ( *(aStrBuf2.getStr()) == '\0' )
247 void makeStringAndClear_003()
249 ::rtl::OStringBuffer aStrBuf3(*arrOUS[0]);
250 ::rtl::OString aStr3(*arrOUS[0]);
252 sal_Bool lastRes = (aStrBuf3.makeStringAndClear() == aStr3 );
254 CPPUNIT_ASSERT_MESSAGE
256 "normal string",
257 lastRes && ( aStrBuf3.getCapacity() == 0 ) &&
258 ( *(aStrBuf3.getStr()) == '\0' )
263 void makeStringAndClear_004()
265 ::rtl::OStringBuffer aStrBuf4(*arrOUS[1]);
266 ::rtl::OString aStr4(*arrOUS[1]);
268 sal_Bool lastRes = (aStrBuf4.makeStringAndClear() == aStr4 );
270 CPPUNIT_ASSERT_MESSAGE
272 "string with space ",
273 lastRes && ( aStrBuf4.getCapacity() == 0 ) &&
274 ( *(aStrBuf4.getStr()) == '\0' )
278 void makeStringAndClear_005()
280 ::rtl::OStringBuffer aStrBuf5(*arrOUS[2]);
281 ::rtl::OString aStr5(*arrOUS[2]);
283 sal_Bool lastRes = (aStrBuf5.makeStringAndClear() == aStr5 );
285 CPPUNIT_ASSERT_MESSAGE
287 "empty string",
288 lastRes && ( aStrBuf5.getCapacity() == 0 ) &&
289 ( *(aStrBuf5.getStr()) == '\0' )
293 void makeStringAndClear_006()
295 ::rtl::OStringBuffer aStrBuf6(*arrOUS[3]);
296 ::rtl::OString aStr6(*arrOUS[3]);
298 sal_Bool lastRes = (aStrBuf6.makeStringAndClear() == aStr6 );
300 CPPUNIT_ASSERT_MESSAGE
302 "string with a character",
303 lastRes && ( aStrBuf6.getCapacity() == 0 ) &&
304 ( *(aStrBuf6.getStr()) == '\0' )
308 void makeStringAndClear_007()
310 ::rtl::OStringBuffer aStrBuf7(*arrOUS[4]);
311 ::rtl::OString aStr7(*arrOUS[4]);
313 sal_Bool lastRes = (aStrBuf7.makeStringAndClear() == aStr7 );
315 CPPUNIT_ASSERT_MESSAGE
317 "string with special characters",
318 lastRes && ( aStrBuf7.getCapacity() == 0 ) &&
319 ( *(aStrBuf7.getStr()) == '\0' )
323 void makeStringAndClear_008()
325 ::rtl::OStringBuffer aStrBuf8(*arrOUS[5]);
326 ::rtl::OString aStr8(*arrOUS[5]);
328 sal_Bool lastRes = (aStrBuf8.makeStringAndClear() == aStr8 );
330 CPPUNIT_ASSERT_MESSAGE
332 "string only with (\0)",
333 lastRes && ( aStrBuf8.getCapacity() == 0 ) &&
334 ( *(aStrBuf8.getStr()) == '\0' )
338 CPPUNIT_TEST_SUITE(makeStringAndClear);
339 CPPUNIT_TEST(makeStringAndClear_001);
340 CPPUNIT_TEST(makeStringAndClear_002);
341 CPPUNIT_TEST(makeStringAndClear_003);
342 CPPUNIT_TEST(makeStringAndClear_004);
343 CPPUNIT_TEST(makeStringAndClear_005);
344 CPPUNIT_TEST(makeStringAndClear_006);
345 CPPUNIT_TEST(makeStringAndClear_007);
346 CPPUNIT_TEST(makeStringAndClear_008);
347 CPPUNIT_TEST_SUITE_END();
350 // -----------------------------------------------------------------------------
352 class getLength : public CppUnit::TestFixture
354 OString* arrOUS[6];
356 public:
357 void setUp()
359 arrOUS[0] = new OString( kTestStr1 );
360 arrOUS[1] = new OString( "1" );
361 arrOUS[2] = new OString( );
362 arrOUS[3] = new OString( "" );
363 arrOUS[4] = new OString( "\0" );
364 arrOUS[5] = new OString( kTestStr2 );
368 void tearDown()
370 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
371 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
374 void getLength_001()
376 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
377 sal_Int32 expVal = kTestStr1Len;
379 CPPUNIT_ASSERT_MESSAGE
381 "length of ascii string",
382 aStrBuf.getLength() == expVal
387 void getLength_002()
389 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
390 sal_Int32 expVal = 1;
392 CPPUNIT_ASSERT_MESSAGE
394 "length of ascci string of size 1",
395 aStrBuf.getLength() == expVal
399 void getLength_003()
401 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
402 sal_Int32 expVal = 0;
404 CPPUNIT_ASSERT_MESSAGE
406 "length of empty string",
407 aStrBuf.getLength() == expVal
411 void getLength_004()
413 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
414 sal_Int32 expVal = 0;
416 CPPUNIT_ASSERT_MESSAGE
418 "length of empty string (empty ascii string arg)",
419 aStrBuf.getLength() == expVal
423 void getLength_005()
425 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
426 sal_Int32 expVal = 0;
428 CPPUNIT_ASSERT_MESSAGE
430 "length of empty string (string arg = '\\0')",
431 aStrBuf.getLength() == expVal
435 void getLength_006()
437 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
438 sal_Int32 expVal = kTestStr2Len;
440 CPPUNIT_ASSERT_MESSAGE
442 "length(>16) of ascii string",
443 aStrBuf.getLength() == expVal
447 void getLength_007()
449 ::rtl::OStringBuffer aStrBuf;
450 sal_Int32 expVal = 0;
452 CPPUNIT_ASSERT_MESSAGE
454 "length of empty string (default constructor)",
455 aStrBuf.getLength()== expVal
459 void getLength_008()
461 ::rtl::OStringBuffer aStrBuf( 26 );
462 sal_Int32 expVal = 0;
464 CPPUNIT_ASSERT_MESSAGE
466 "length of empty string (with capacity)",
467 aStrBuf.getLength()== expVal
471 CPPUNIT_TEST_SUITE( getLength );
472 CPPUNIT_TEST( getLength_001 );
473 CPPUNIT_TEST( getLength_002 );
474 CPPUNIT_TEST( getLength_003 );
475 CPPUNIT_TEST( getLength_004 );
476 CPPUNIT_TEST( getLength_005 );
477 CPPUNIT_TEST( getLength_006 );
478 CPPUNIT_TEST( getLength_007 );
479 CPPUNIT_TEST( getLength_008 );
480 CPPUNIT_TEST_SUITE_END();
483 // -----------------------------------------------------------------------------
485 class getCapacity : public CppUnit::TestFixture
487 OString* arrOUS[6];
489 public:
490 void setUp()
492 arrOUS[0] = new OString( kTestStr1 );
493 arrOUS[1] = new OString( "1" );
494 arrOUS[2] = new OString( );
495 arrOUS[3] = new OString( "" );
496 arrOUS[4] = new OString( "\0" );
497 arrOUS[5] = new OString( kTestStr2 );
501 void tearDown()
503 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
504 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
507 void getCapacity_001()
509 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
510 sal_Int32 expVal = kTestStr1Len+16;
512 CPPUNIT_ASSERT_MESSAGE
514 "capacity of ascii string",
515 aStrBuf.getCapacity()== expVal
520 void getCapacity_002()
522 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
523 sal_Int32 expVal = 1+16;
525 CPPUNIT_ASSERT_MESSAGE
527 "capacity of ascci string of size 1",
528 aStrBuf.getCapacity() == expVal
532 void getCapacity_003()
534 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
535 sal_Int32 expVal = 0+16;
537 CPPUNIT_ASSERT_MESSAGE
539 "capacity of empty string",
540 aStrBuf.getCapacity() == expVal
544 void getCapacity_004()
546 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
547 sal_Int32 expVal = 0+16;
549 CPPUNIT_ASSERT_MESSAGE
551 "capacity of empty string (empty ascii string arg)",
552 aStrBuf.getCapacity()== expVal
556 void getCapacity_005()
558 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
559 sal_Int32 expVal = 0+16;
561 CPPUNIT_ASSERT_MESSAGE
563 "capacity of empty string (string arg = '\\0')",
564 aStrBuf.getCapacity() == expVal
568 void getCapacity_006()
570 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
571 sal_Int32 expVal = kTestStr2Len+16;
573 CPPUNIT_ASSERT_MESSAGE
575 "capacity(>16) of ascii string",
576 aStrBuf.getCapacity() == expVal
580 void getCapacity_007()
582 ::rtl::OStringBuffer aStrBuf;
583 sal_Int32 expVal = 16;
585 CPPUNIT_ASSERT_MESSAGE
587 "capacity of empty string (default constructor)",
588 aStrBuf.getCapacity() == expVal
591 #ifdef WITH_CORE
592 void getCapacity_008()
594 ::rtl::OStringBuffer aStrBuf ( kSInt32Max );
595 sal_Int32 expVal = kSInt32Max;
597 CPPUNIT_ASSERT_MESSAGE
599 "capacity of empty string (with capacity 2147483647)(code will core dump)",
600 aStrBuf.getCapacity() == expVal
603 #endif
604 void getCapacity_009()
606 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
607 sal_Int32 expVal = kNonSInt32Max;
609 CPPUNIT_ASSERT_MESSAGE
611 "capacity of empty string (with capacity -2147483648)",
612 aStrBuf.getCapacity() == expVal
616 void getCapacity_010()
618 ::rtl::OStringBuffer aStrBuf( 16 );
619 sal_Int32 expVal = 16;
621 CPPUNIT_ASSERT_MESSAGE
623 "capacity of empty string (with capacity 16)",
624 aStrBuf.getCapacity() == expVal
628 void getCapacity_011()
630 ::rtl::OStringBuffer aStrBuf( 6 );
631 sal_Int32 expVal = 6;
633 CPPUNIT_ASSERT_MESSAGE
635 "capacity of empty string (with capacity 6)",
636 aStrBuf.getCapacity() == expVal
640 void getCapacity_012()
642 ::rtl::OStringBuffer aStrBuf( 0 );
643 sal_Int32 expVal = 0;
645 CPPUNIT_ASSERT_MESSAGE
647 "capacity of empty string (with capacity 0)",
648 aStrBuf.getCapacity() == expVal
652 void getCapacity_013()
654 ::rtl::OStringBuffer aStrBuf( -2 );
655 sal_Int32 expVal = -2;
657 CPPUNIT_ASSERT_MESSAGE
659 "capacity of empty string (with capacity -2)",
660 aStrBuf.getCapacity() == expVal
664 CPPUNIT_TEST_SUITE( getCapacity );
665 CPPUNIT_TEST( getCapacity_001 );
666 CPPUNIT_TEST( getCapacity_002 );
667 CPPUNIT_TEST( getCapacity_003 );
668 CPPUNIT_TEST( getCapacity_004 );
669 CPPUNIT_TEST( getCapacity_005 );
670 CPPUNIT_TEST( getCapacity_006 );
671 CPPUNIT_TEST( getCapacity_007 );
672 #ifdef WITH_CORE
673 CPPUNIT_TEST( getCapacity_008 );
674 #endif
675 CPPUNIT_TEST( getCapacity_009 );
676 CPPUNIT_TEST( getCapacity_010 );
677 CPPUNIT_TEST( getCapacity_011 );
678 CPPUNIT_TEST( getCapacity_012 );
679 CPPUNIT_TEST( getCapacity_013 );
680 CPPUNIT_TEST_SUITE_END();
682 // -----------------------------------------------------------------------------
684 class ensureCapacity : public CppUnit::TestFixture
686 void ensureCapacity_001()
688 sal_Int32 expVal = 16;
689 ::rtl::OStringBuffer aStrBuf;
690 sal_Int32 input = 5;
692 aStrBuf.ensureCapacity( input );
694 CPPUNIT_ASSERT_MESSAGE
696 "capacity equal to 16, minimum is 5",
697 aStrBuf.getCapacity() == expVal
702 void ensureCapacity_002()
704 sal_Int32 expVal = 16;
705 ::rtl::OStringBuffer aStrBuf;
706 sal_Int32 input = -5;
708 aStrBuf.ensureCapacity( input );
710 CPPUNIT_ASSERT_MESSAGE
712 "capacity equal to 16, minimum is -5",
713 aStrBuf.getCapacity() == expVal
718 void ensureCapacity_003()
720 sal_Int32 expVal = 16;
721 ::rtl::OStringBuffer aStrBuf;
722 sal_Int32 input = 0;
724 aStrBuf.ensureCapacity( input );
726 CPPUNIT_ASSERT_MESSAGE
728 "capacity equal to 16, minimum is 0",
729 aStrBuf.getCapacity() == expVal
734 void ensureCapacity_004() //the testcase is based on comments
736 sal_Int32 expVal = 20;
737 ::rtl::OStringBuffer aStrBuf;
738 sal_Int32 input = 20;
740 aStrBuf.ensureCapacity( input );
742 CPPUNIT_ASSERT_MESSAGE
744 "capacity equal to 16, minimum is 20",
745 aStrBuf.getCapacity() == expVal
750 void ensureCapacity_005()
752 sal_Int32 expVal = 50;
753 ::rtl::OStringBuffer aStrBuf;
754 sal_Int32 input = 50;
756 aStrBuf.ensureCapacity( input );
758 CPPUNIT_ASSERT_MESSAGE
760 "capacity equal to 16, minimum is 50",
761 aStrBuf.getCapacity() == expVal
766 void ensureCapacity_006()
768 sal_Int32 expVal = 20;
769 ::rtl::OStringBuffer aStrBuf( 6 );
770 sal_Int32 input = 20;
772 aStrBuf.ensureCapacity( input );
774 CPPUNIT_ASSERT_MESSAGE
776 "capacity equal to 6, minimum is 20",
777 aStrBuf.getCapacity() == expVal
782 void ensureCapacity_007()
784 sal_Int32 expVal = 6;
785 ::rtl::OStringBuffer aStrBuf( 6 );
786 sal_Int32 input = 2;
788 aStrBuf.ensureCapacity( input );
790 CPPUNIT_ASSERT_MESSAGE
792 "capacity equal to 6, minimum is 2",
793 aStrBuf.getCapacity() == expVal
798 void ensureCapacity_008()
800 sal_Int32 expVal = 6;
801 ::rtl::OStringBuffer aStrBuf( 6 );
802 sal_Int32 input = -6;
804 aStrBuf.ensureCapacity( input );
806 CPPUNIT_ASSERT_MESSAGE
808 "capacity equal to 6, minimum is -6",
809 aStrBuf.getCapacity() == expVal
814 void ensureCapacity_009() //the testcase is based on comments
816 sal_Int32 expVal = 10;
817 ::rtl::OStringBuffer aStrBuf( 6 );
818 sal_Int32 input = 10;
820 aStrBuf.ensureCapacity( input );
822 CPPUNIT_ASSERT_MESSAGE
824 "capacity equal to 6, minimum is -6",
825 aStrBuf.getCapacity() == expVal
830 void ensureCapacity_010()
832 sal_Int32 expVal = 6;
833 ::rtl::OStringBuffer aStrBuf( 0 );
834 sal_Int32 input = 6;
836 aStrBuf.ensureCapacity( input );
838 CPPUNIT_ASSERT_MESSAGE
840 "capacity equal to 0, minimum is 6",
841 aStrBuf.getCapacity() == expVal
846 void ensureCapacity_011() //the testcase is based on comments
848 sal_Int32 expVal = 2; // capacity is x = (str->length + 1) * 2; minimum < x ? x : minimum
849 ::rtl::OStringBuffer aStrBuf( 0 );
850 sal_Int32 input = 1;
852 aStrBuf.ensureCapacity( input );
854 CPPUNIT_ASSERT_MESSAGE
856 "capacity equal to 0, minimum is 1",
857 aStrBuf.getCapacity() == expVal
862 void ensureCapacity_012()
864 sal_Int32 expVal = 0;
865 ::rtl::OStringBuffer aStrBuf( 0 );
866 sal_Int32 input = -1;
868 aStrBuf.ensureCapacity( input );
870 CPPUNIT_ASSERT_MESSAGE
872 "capacity equal to 0, minimum is -1",
873 aStrBuf.getCapacity() == expVal
877 #ifdef WITH_CORE
878 void ensureCapacity_013() //will core dump
880 sal_Int32 expVal = kSInt32Max;
881 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
882 sal_Int32 input = 65535;
884 aStrBuf.ensureCapacity( input );
886 CPPUNIT_ASSERT_MESSAGE
888 "capacity equal to 2147483647, minimum is 65535",
889 aStrBuf.getCapacity() == expVal
894 void ensureCapacity_014() //will core dump
896 sal_Int32 expVal = kSInt32Max;
897 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
898 sal_Int32 input = kSInt32Max;
900 aStrBuf.ensureCapacity( input );
902 CPPUNIT_ASSERT_MESSAGE
904 "capacity equal to 2147483647, minimum is 2147483647",
905 aStrBuf.getCapacity() == expVal
910 void ensureCapacity_015() //will core dump
912 sal_Int32 expVal = kSInt32Max;
913 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
914 sal_Int32 input = -1;
916 aStrBuf.ensureCapacity( input );
918 CPPUNIT_ASSERT_MESSAGE
920 "capacity equal to 2147483647, minimum is -1",
921 aStrBuf.getCapacity() == expVal
926 void ensureCapacity_016() //will core dump
928 sal_Int32 expVal = kSInt32Max;
929 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
930 sal_Int32 input = 0;
932 aStrBuf.ensureCapacity( input );
934 CPPUNIT_ASSERT_MESSAGE
936 "capacity equal to 2147483647, minimum is 0",
937 aStrBuf.getCapacity() == expVal
942 void ensureCapacity_017() //will core dump
944 sal_Int32 expVal = kSInt32Max;
945 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
946 sal_Int32 input = kNonSInt32Max;
948 aStrBuf.ensureCapacity( input );
950 CPPUNIT_ASSERT_MESSAGE
952 "capacity equal to 2147483647, minimum is -2147483648",
953 aStrBuf.getCapacity() == expVal
957 #endif
958 void ensureCapacity_018()
960 sal_Int32 expVal = 65535;
961 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
962 sal_Int32 input = 65535;
964 aStrBuf.ensureCapacity( input );
966 CPPUNIT_ASSERT_MESSAGE
968 "capacity equal to -2147483648, minimum is 65535",
969 aStrBuf.getCapacity() == expVal
973 #ifdef WITH_CORE
974 void ensureCapacity_019() //will core dump
976 sal_Int32 expVal = 2147483647;
977 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
978 sal_Int32 input = 2147483647;
980 aStrBuf.ensureCapacity( input );
982 CPPUNIT_ASSERT_MESSAGE
984 "capacity equal to -2147483648, minimum is 2147483647",
985 aStrBuf.getCapacity() == expVal
989 #endif
990 void ensureCapacity_020()
992 sal_Int32 expVal = 2;
993 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
994 sal_Int32 input = -1;
996 aStrBuf.ensureCapacity( input );
998 CPPUNIT_ASSERT_MESSAGE
1000 "capacity equal to -2147483648, minimum is -1",
1001 aStrBuf.getCapacity() == expVal
1006 void ensureCapacity_021()
1008 sal_Int32 expVal = 2;
1009 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
1010 sal_Int32 input = 0;
1012 aStrBuf.ensureCapacity( input );
1014 CPPUNIT_ASSERT_MESSAGE
1016 "capacity equal to -2147483648, minimum is 0",
1017 aStrBuf.getCapacity() == expVal
1022 void ensureCapacity_022()
1024 sal_Int32 expVal = kNonSInt32Max;
1025 ::rtl::OStringBuffer aStrBuf( kNonSInt32Max );
1026 sal_Int32 input = kNonSInt32Max;
1028 aStrBuf.ensureCapacity( input );
1030 CPPUNIT_ASSERT_MESSAGE
1032 "capacity equal to -2147483648, minimum is -2147483648",
1033 aStrBuf.getCapacity() == expVal
1038 CPPUNIT_TEST_SUITE( ensureCapacity );
1039 CPPUNIT_TEST( ensureCapacity_001 );
1040 CPPUNIT_TEST( ensureCapacity_002 );
1041 CPPUNIT_TEST( ensureCapacity_003 );
1042 CPPUNIT_TEST( ensureCapacity_004 );
1043 CPPUNIT_TEST( ensureCapacity_005 );
1044 CPPUNIT_TEST( ensureCapacity_006 );
1045 CPPUNIT_TEST( ensureCapacity_007 );
1046 CPPUNIT_TEST( ensureCapacity_008 );
1047 CPPUNIT_TEST( ensureCapacity_009 );
1048 CPPUNIT_TEST( ensureCapacity_010 );
1049 CPPUNIT_TEST( ensureCapacity_011 );
1050 CPPUNIT_TEST( ensureCapacity_012 );
1051 #ifdef WITH_CORE
1052 CPPUNIT_TEST( ensureCapacity_013 );
1053 CPPUNIT_TEST( ensureCapacity_014 );
1054 CPPUNIT_TEST( ensureCapacity_015 );
1055 CPPUNIT_TEST( ensureCapacity_016 );
1056 CPPUNIT_TEST( ensureCapacity_017 );
1057 #endif
1058 CPPUNIT_TEST( ensureCapacity_018 );
1059 #ifdef WITH_CORE
1060 CPPUNIT_TEST( ensureCapacity_019 );
1061 #endif
1062 CPPUNIT_TEST( ensureCapacity_020 );
1063 CPPUNIT_TEST( ensureCapacity_021 );
1064 CPPUNIT_TEST( ensureCapacity_022 );
1065 CPPUNIT_TEST_SUITE_END();
1068 // -----------------------------------------------------------------------------
1070 class setLength : public CppUnit::TestFixture
1072 OString* arrOUS[6];
1074 public:
1075 void setUp()
1077 arrOUS[0] = new OString( kTestStr1 );
1078 arrOUS[1] = new OString( "1" );
1079 arrOUS[2] = new OString( );
1080 arrOUS[3] = new OString( "" );
1081 arrOUS[4] = new OString( "\0" );
1082 arrOUS[5] = new OString( kTestStr2 );
1086 void tearDown()
1088 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
1089 delete arrOUS[3]; delete arrOUS[4]; delete arrOUS[5];
1092 void setLength_001()
1094 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1095 sal_Int32 expVal1 = 50;
1096 ::rtl::OString expVal2( kTestStr1 );
1097 sal_Int32 expVal3 = 50;
1098 sal_Int32 input = 50;
1100 aStrBuf.setLength( input );
1102 CPPUNIT_ASSERT_MESSAGE
1104 "newLength more than the capacity of OStringBuffer(kTestStr1)",
1105 aStrBuf.getStr() == expVal2 &&
1106 aStrBuf.getLength() == expVal1 &&
1107 aStrBuf.getCapacity() == expVal3
1112 void setLength_002()
1114 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1115 sal_Int32 expVal1 = kTestStr13Len;
1116 ::rtl::OString expVal2( kTestStr1 );
1117 sal_Int32 expVal3 = 32;
1118 sal_Int32 input = kTestStr13Len;
1120 aStrBuf.setLength( input );
1122 CPPUNIT_ASSERT_MESSAGE
1124 "newLength more than the length of OStringBuffer(kTestStr1)",
1125 aStrBuf.getStr() == expVal2 &&
1126 aStrBuf.getLength() == expVal1 &&
1127 aStrBuf.getCapacity() == expVal3
1132 void setLength_003()
1134 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1135 sal_Int32 expVal1 = kTestStr1Len;
1136 ::rtl::OString expVal2( kTestStr1 );
1137 sal_Int32 expVal3 = 32;
1138 sal_Int32 input = kTestStr1Len;
1140 aStrBuf.setLength( input );
1142 CPPUNIT_ASSERT_MESSAGE
1144 "newLength equal to the length of OStringBuffer(kTestStr1)",
1145 aStrBuf.getStr() == expVal2 &&
1146 aStrBuf.getLength() == expVal1 &&
1147 aStrBuf.getCapacity() == expVal3
1152 void setLength_004()
1154 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1155 sal_Int32 expVal1 = kTestStr7Len;
1156 ::rtl::OString expVal2( kTestStr7 );
1157 sal_Int32 expVal3 = 32;
1158 sal_Int32 input = kTestStr7Len;
1160 aStrBuf.setLength( input );
1162 CPPUNIT_ASSERT_MESSAGE
1164 "newLength less than the length of OStringBuffer(kTestStr1)",
1165 aStrBuf.getStr() == expVal2 &&
1166 aStrBuf.getLength() == expVal1 &&
1167 aStrBuf.getCapacity() == expVal3
1172 void setLength_005()
1174 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1175 sal_Int32 expVal1 = 0;
1176 ::rtl::OString expVal2;
1177 sal_Int32 expVal3 = 32;
1178 sal_Int32 input = 0;
1180 aStrBuf.setLength( input );
1182 CPPUNIT_ASSERT_MESSAGE
1184 "newLength equal to 0",
1185 aStrBuf.getStr() == expVal2 &&
1186 aStrBuf.getLength() == expVal1 &&
1187 aStrBuf.getCapacity() == expVal3
1192 void setLength_006()
1194 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1195 sal_Int32 expVal1 = 25;
1196 ::rtl::OString expVal2( *arrOUS[1] );
1197 sal_Int32 expVal3 = 25;
1198 sal_Int32 input = 25;
1200 aStrBuf.setLength( input );
1202 CPPUNIT_ASSERT_MESSAGE
1204 "newLength more than the capacity of OStringBuffer(1)",
1205 aStrBuf.getStr() == expVal2 &&
1206 aStrBuf.getLength() == expVal1 &&
1207 aStrBuf.getCapacity() == expVal3
1212 void setLength_007()
1214 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1215 sal_Int32 expVal1 = kTestStr27Len;
1216 ::rtl::OString expVal2( *arrOUS[1] );
1217 sal_Int32 expVal3 = 17;
1218 sal_Int32 input = kTestStr27Len;
1220 aStrBuf.setLength( input );
1222 CPPUNIT_ASSERT_MESSAGE
1224 "newLength equal to the length of OStringBuffer(1)",
1225 aStrBuf.getStr() == expVal2 &&
1226 aStrBuf.getLength() == expVal1 &&
1227 aStrBuf.getCapacity() == expVal3
1232 void setLength_008()
1234 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1235 sal_Int32 expVal1 = 0;
1236 ::rtl::OString expVal2;
1237 sal_Int32 expVal3 = 17;
1238 sal_Int32 input = 0;
1240 aStrBuf.setLength( input );
1242 CPPUNIT_ASSERT_MESSAGE
1244 "newLength less than the length of OUStringBuffer(1)",
1245 aStrBuf.getStr() == expVal2 &&
1246 aStrBuf.getLength() == expVal1 &&
1247 aStrBuf.getCapacity() == expVal3
1252 void setLength_009()
1254 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1255 sal_Int32 expVal1 = 20;
1256 ::rtl::OString expVal2;
1257 sal_Int32 expVal3 = 20;
1258 sal_Int32 input = 20;
1260 aStrBuf.setLength( input );
1262 CPPUNIT_ASSERT_MESSAGE
1264 "newLength more than the capacity of OStringBuffer()",
1265 aStrBuf.getStr() == expVal2 &&
1266 aStrBuf.getLength() == expVal1 &&
1267 aStrBuf.getCapacity() == expVal3
1272 void setLength_010()
1274 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1275 sal_Int32 expVal1 = 3;
1276 ::rtl::OString expVal2;
1277 sal_Int32 expVal3 = 16;
1278 sal_Int32 input = 3;
1280 aStrBuf.setLength( input );
1282 CPPUNIT_ASSERT_MESSAGE
1284 "newLength more than the length of OStringBuffer()",
1285 aStrBuf.getStr() == expVal2 &&
1286 aStrBuf.getLength() == expVal1 &&
1287 aStrBuf.getCapacity() == expVal3
1292 void setLength_011()
1294 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1295 sal_Int32 expVal1 = 0;
1296 ::rtl::OString expVal2;
1297 sal_Int32 expVal3 = 16;
1298 sal_Int32 input = 0;
1300 aStrBuf.setLength( input );
1302 CPPUNIT_ASSERT_MESSAGE
1304 "newLength more than the length of OStringBuffer()",
1305 aStrBuf.getStr() == expVal2 &&
1306 aStrBuf.getLength() == expVal1 &&
1307 aStrBuf.getCapacity() == expVal3
1312 void setLength_012()
1314 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1315 sal_Int32 expVal1 = 20;
1316 ::rtl::OString expVal2;
1317 sal_Int32 expVal3 = 20;
1318 sal_Int32 input = 20;
1320 aStrBuf.setLength( input );
1322 CPPUNIT_ASSERT_MESSAGE
1324 "newLength more than the capacity of OStringBuffer("")",
1325 aStrBuf.getStr() == expVal2 &&
1326 aStrBuf.getLength() == expVal1 &&
1327 aStrBuf.getCapacity() == expVal3
1332 void setLength_013()
1334 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1335 sal_Int32 expVal1 = 5;
1336 ::rtl::OString expVal2;
1337 sal_Int32 expVal3 = 16;
1338 sal_Int32 input = 5;
1340 aStrBuf.setLength( input );
1342 CPPUNIT_ASSERT_MESSAGE
1344 "newLength more than the length of OStringBuffer("")",
1345 aStrBuf.getStr() == expVal2 &&
1346 aStrBuf.getLength() == expVal1 &&
1347 aStrBuf.getCapacity() == expVal3
1352 void setLength_014()
1354 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1355 sal_Int32 expVal1 = 0;
1356 ::rtl::OString expVal2;
1357 sal_Int32 expVal3 = 16;
1358 sal_Int32 input = 0;
1360 aStrBuf.setLength( input );
1362 CPPUNIT_ASSERT_MESSAGE
1364 "newLength less than the length of OStringBuffer("")",
1365 aStrBuf.getStr() == expVal2 &&
1366 aStrBuf.getLength() == expVal1 &&
1367 aStrBuf.getCapacity() == expVal3
1372 void setLength_015()
1374 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1375 sal_Int32 expVal1 = 20;
1376 ::rtl::OString expVal2;
1377 sal_Int32 expVal3 = 20;
1378 sal_Int32 input = 20;
1380 aStrBuf.setLength( input );
1382 CPPUNIT_ASSERT_MESSAGE
1384 "newLength more than the length of OStringBuffer(\0)",
1385 aStrBuf.getStr() == expVal2 &&
1386 aStrBuf.getLength() == expVal1 &&
1387 aStrBuf.getCapacity() == expVal3
1392 void setLength_016()
1394 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1395 sal_Int32 expVal1 = 5;
1396 ::rtl::OString expVal2;
1397 sal_Int32 expVal3 = 16;
1398 sal_Int32 input = 5;
1400 aStrBuf.setLength( input );
1402 CPPUNIT_ASSERT_MESSAGE
1404 "newLength more than the length of OStringBuffer(\0)",
1405 aStrBuf.getStr() == expVal2 &&
1406 aStrBuf.getLength() == expVal1 &&
1407 aStrBuf.getCapacity() == expVal3
1412 void setLength_017()
1414 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
1415 sal_Int32 expVal1 = 0;
1416 ::rtl::OString expVal2;
1417 sal_Int32 expVal3 = 16;
1418 sal_Int32 input = 0;
1420 aStrBuf.setLength( input );
1422 CPPUNIT_ASSERT_MESSAGE
1424 "newLength less than the length of OStringBuffer(\0)",
1425 aStrBuf.getStr() == expVal2 &&
1426 aStrBuf.getLength() == expVal1 &&
1427 aStrBuf.getCapacity() == expVal3
1432 void setLength_018()
1434 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1435 sal_Int32 expVal1 = 50;
1436 ::rtl::OString expVal2( kTestStr2 );
1437 sal_Int32 expVal3 = 66;
1438 sal_Int32 input = 50;
1440 aStrBuf.setLength( input );
1442 CPPUNIT_ASSERT_MESSAGE
1444 "newLength more than the capacity of OStringBuffer(kTestStr2)",
1445 aStrBuf.getStr() == expVal2 &&
1446 aStrBuf.getLength() == expVal1 &&
1447 aStrBuf.getCapacity() == expVal3
1452 void setLength_019()
1454 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1455 sal_Int32 expVal1 = 40;
1456 ::rtl::OString expVal2(kTestStr2);
1457 sal_Int32 expVal3 = 48;
1458 sal_Int32 input = 40;
1460 aStrBuf.setLength( input );
1462 CPPUNIT_ASSERT_MESSAGE
1464 "newLength more than the length of OStringBuffer(kTestStr2)",
1465 aStrBuf.getStr() == expVal2 &&
1466 aStrBuf.getLength() == expVal1 &&
1467 aStrBuf.getCapacity() == expVal3
1472 void setLength_020()
1474 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1475 sal_Int32 expVal1 = kTestStr2Len;
1476 ::rtl::OString expVal2(kTestStr2);
1477 sal_Int32 expVal3 = 48;
1478 sal_Int32 input = kTestStr2Len;
1480 aStrBuf.setLength( input );
1482 CPPUNIT_ASSERT_MESSAGE
1484 "newLength equal to the length of OUStringBuffer(kTestStr2)",
1485 aStrBuf.getStr() == expVal2 &&
1486 aStrBuf.getLength() == expVal1 &&
1487 aStrBuf.getCapacity() == expVal3
1492 void setLength_021()
1494 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1495 sal_Int32 expVal1 = kTestStr7Len;
1496 ::rtl::OString expVal2(kTestStr7);
1497 sal_Int32 expVal3 = 48;
1498 sal_Int32 input = kTestStr7Len;
1500 aStrBuf.setLength( input );
1502 CPPUNIT_ASSERT_MESSAGE
1504 "newLength less than the length of OUStringBuffer(TestStr2)",
1505 aStrBuf.getStr() == expVal2 &&
1506 aStrBuf.getLength() == expVal1 &&
1507 aStrBuf.getCapacity() == expVal3
1512 void setLength_022()
1514 ::rtl::OStringBuffer aStrBuf( *arrOUS[5] );
1515 sal_Int32 expVal1 = 0;
1516 ::rtl::OString expVal2;
1517 sal_Int32 expVal3 = 48;
1518 sal_Int32 input = 0;
1520 aStrBuf.setLength( input );
1522 CPPUNIT_ASSERT_MESSAGE
1524 "newLength equal to 0",
1525 aStrBuf.getStr() == expVal2 &&
1526 aStrBuf.getLength() == expVal1 &&
1527 aStrBuf.getCapacity() == expVal3
1534 CPPUNIT_TEST_SUITE( setLength );
1535 CPPUNIT_TEST( setLength_001 );
1536 CPPUNIT_TEST( setLength_002 );
1537 CPPUNIT_TEST( setLength_003 );
1538 CPPUNIT_TEST( setLength_004 );
1539 CPPUNIT_TEST( setLength_005 );
1540 CPPUNIT_TEST( setLength_006 );
1541 CPPUNIT_TEST( setLength_007 );
1542 CPPUNIT_TEST( setLength_008 );
1543 CPPUNIT_TEST( setLength_009 );
1544 CPPUNIT_TEST( setLength_010 );
1545 CPPUNIT_TEST( setLength_011 );
1546 CPPUNIT_TEST( setLength_012 );
1547 CPPUNIT_TEST( setLength_013 );
1548 CPPUNIT_TEST( setLength_014 );
1549 CPPUNIT_TEST( setLength_015 );
1550 CPPUNIT_TEST( setLength_016 );
1551 CPPUNIT_TEST( setLength_017 );
1552 CPPUNIT_TEST( setLength_018 );
1553 CPPUNIT_TEST( setLength_019 );
1554 CPPUNIT_TEST( setLength_020 );
1555 CPPUNIT_TEST( setLength_021 );
1556 CPPUNIT_TEST( setLength_022 );
1557 CPPUNIT_TEST_SUITE_END();
1560 // -----------------------------------------------------------------------------
1562 class charAt : public CppUnit::TestFixture
1564 OString* arrOUS[4];
1566 public:
1567 void setUp()
1569 arrOUS[0] = new OString( kTestStr1 );
1570 arrOUS[1] = new OString( kTestStr27 );
1571 arrOUS[2] = new OString( kTestStr28 );
1572 arrOUS[3] = new OString( );
1576 void tearDown()
1578 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
1579 delete arrOUS[3];
1582 void charAt_001()
1584 sal_Unicode expVal = 83;
1585 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1586 sal_Int32 input = 0;
1588 CPPUNIT_ASSERT_MESSAGE
1590 "return the first character of OStringBuffer(kTestStr1)",
1591 aStrBuf.charAt(input) == expVal
1596 void charAt_002()
1598 sal_Unicode expVal = 32;
1599 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1600 sal_Int32 input = 3;
1602 CPPUNIT_ASSERT_MESSAGE
1604 "return the middle character of OStringBuffer(kTestStr1)",
1605 aStrBuf.charAt(input) == expVal
1610 void charAt_003()
1612 sal_Unicode expVal = 115;
1613 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1614 sal_Int32 input = 15;
1616 CPPUNIT_ASSERT_MESSAGE
1618 "return the last character of OStringBuffer(kTestStr1)",
1619 aStrBuf.charAt(input) == expVal
1624 void charAt_004()
1626 sal_Unicode expVal = 115;
1627 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1628 sal_Int32 input = 0;
1630 CPPUNIT_ASSERT_MESSAGE
1632 "return the only character of OStringBuffer(kTestStr27)",
1633 aStrBuf.charAt(input) == expVal
1638 void charAt_005()
1640 sal_Unicode expVal = 40;
1641 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1642 sal_Int32 input = 0;
1644 CPPUNIT_ASSERT_MESSAGE
1646 "return the first of OStringBuffer(kTestStr28) with special character",
1647 aStrBuf.charAt(input) == expVal
1652 void charAt_006()
1654 sal_Unicode expVal = 11;
1655 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1656 sal_Int32 input = 5;
1658 CPPUNIT_ASSERT_MESSAGE
1660 "return the mid of OStringBuffer(kTestStr28) with special character",
1661 aStrBuf.charAt(input) == expVal
1666 void charAt_007()
1668 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1670 CPPUNIT_ASSERT_MESSAGE
1672 "invalid character of OStringBuffer()",
1673 sal_True
1678 void charAt_008()
1680 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1682 CPPUNIT_ASSERT_MESSAGE
1684 "invalid character of OStringBuffer()",
1685 sal_True
1690 CPPUNIT_TEST_SUITE( charAt );
1691 CPPUNIT_TEST( charAt_001 );
1692 CPPUNIT_TEST( charAt_002 );
1693 CPPUNIT_TEST( charAt_003 );
1694 CPPUNIT_TEST( charAt_004 );
1695 CPPUNIT_TEST( charAt_005 );
1696 CPPUNIT_TEST( charAt_006 );
1697 CPPUNIT_TEST( charAt_007 );
1698 CPPUNIT_TEST( charAt_008 );
1699 CPPUNIT_TEST_SUITE_END();
1701 // -----------------------------------------------------------------------------
1704 class csuc : public CppUnit::TestFixture
1706 void csuc_001()
1708 const sal_Char* expVal = kTestStr1;
1709 ::rtl::OStringBuffer aStrBuf( kTestStr1 );
1710 sal_Int32 cmpLen = kTestStr1Len;
1712 // LLA: wrong access! const sal_Char* pstr = *&aStrBuf;
1713 const sal_Char* pstr = aStrBuf.getStr();
1714 int nEqual = strncmp(pstr, expVal, cmpLen);
1716 CPPUNIT_ASSERT_MESSAGE
1718 "test normal string",
1719 /* cmpstr( pstr, expVal, cmpLen ) */
1720 nEqual == 0
1725 void csuc_002()
1727 ::rtl::OStringBuffer aStrBuf;
1729 // LLA: wrong access! const sal_Char* pstr = *&aStrBuf;
1730 const sal_Char* pstr = aStrBuf.getStr();
1731 sal_Int32 nLen = strlen(pstr);
1733 CPPUNIT_ASSERT_MESSAGE
1735 "test empty string",
1736 // cmpstr( pstr, &expVal, cmpLen )
1737 nLen == 0
1743 CPPUNIT_TEST_SUITE( csuc );
1744 CPPUNIT_TEST( csuc_001 );
1745 CPPUNIT_TEST( csuc_002 );
1746 CPPUNIT_TEST_SUITE_END();
1750 // -----------------------------------------------------------------------------
1752 class getStr : public CppUnit::TestFixture
1754 void getStr_001()
1756 const sal_Char* expVal = kTestStr1;
1757 ::rtl::OStringBuffer aStrBuf( kTestStr1 );
1758 sal_Int32 cmpLen = kTestStr1Len;
1760 const sal_Char* pstr = aStrBuf.getStr();
1761 int nEqual = strncmp(pstr, expVal, cmpLen);
1763 CPPUNIT_ASSERT_MESSAGE
1765 "test normal string",
1766 nEqual == 0
1771 void getStr_002()
1773 // const sal_Char tmpUC=0x0;
1774 // const sal_Char* expVal=&tmpUC;
1775 ::rtl::OStringBuffer aStrBuf;
1776 // sal_Int32 cmpLen = 1;
1778 const sal_Char* pstr = aStrBuf.getStr();
1779 sal_Int32 nLen = strlen(pstr);
1781 CPPUNIT_ASSERT_MESSAGE
1783 "test empty string",
1784 pstr != 0 &&
1785 nLen == 0
1791 CPPUNIT_TEST_SUITE( getStr );
1792 CPPUNIT_TEST( getStr_001 );
1793 CPPUNIT_TEST( getStr_002 );
1794 CPPUNIT_TEST_SUITE_END();
1797 // -----------------------------------------------------------------------------
1799 class setCharAt : public CppUnit::TestFixture
1801 OString* arrOUS[4];
1803 public:
1804 void setUp()
1806 arrOUS[0] = new OString( kTestStr1 );
1807 arrOUS[1] = new OString( kTestStr27 );
1808 arrOUS[2] = new OString( kTestStr28 );
1809 arrOUS[3] = new OString( );
1813 void tearDown()
1815 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
1816 delete arrOUS[3];
1819 void setCharAt_001()
1821 OString expVal( kTestStr31 );
1822 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1823 sal_Int32 input1 = 0;
1824 sal_Char input2 = 's';
1826 CPPUNIT_ASSERT_MESSAGE
1828 "set the first character of OStringBuffer(kTestStr1) with s",
1829 (aStrBuf.setCharAt(input1, input2)).getStr() == expVal
1834 void setCharAt_002()
1836 OString expVal( kTestStr3 );
1837 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1838 sal_Int32 input1 = 4;
1839 sal_Char input2 = 'm';
1841 CPPUNIT_ASSERT_MESSAGE
1843 "set the middle character of OStringBuffer(kTestStr1) with m",
1844 (aStrBuf.setCharAt(input1, input2)).getStr() == expVal
1849 void setCharAt_003()
1851 OString expVal( kTestStr32 );
1852 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
1853 sal_Int32 input1 = 15;
1854 sal_Char input2 = ' ';
1856 CPPUNIT_ASSERT_MESSAGE
1858 "set the last character of OStringBuffer(kTestStr1) with ' '",
1859 (aStrBuf.setCharAt(input1, input2)).getStr() == expVal
1865 void setCharAt_004()
1867 OString expVal( kTestStr33 );
1868 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
1869 sal_Int32 input1 = 0;
1870 sal_Char input2 = ' ';
1872 CPPUNIT_ASSERT_MESSAGE
1874 "set the only character of OStringBuffer(kTestStr27) with ' '",
1875 (aStrBuf.setCharAt(input1, input2)).getStr() == expVal
1881 void setCharAt_005()
1883 OString expVal( kTestStr34 );
1884 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1885 sal_Int32 input1 = 1;
1886 sal_Char input2 = (sal_Char)5;
1888 CPPUNIT_ASSERT_MESSAGE
1890 "set the only of OStringBuffer(kTestStr28) with special character",
1891 (aStrBuf.setCharAt(input1, input2)).getStr() == expVal
1896 void setCharAt_006()
1898 OString expVal( kTestStr35 );
1899 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
1900 sal_Int32 input1 = 1;
1901 sal_Char input2 = (sal_Char)-5;
1903 CPPUNIT_ASSERT_MESSAGE
1905 "set the only of OStringBuffer(kTestStr28) with special character",
1906 (aStrBuf.setCharAt(input1, input2)).getStr() == expVal
1910 #ifdef WITH_CORE
1911 void setCharAt_007()
1913 OString* expVal = 0;
1914 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1915 sal_Int32 input1 = 0;
1916 sal_Char input2 = (sal_Char)5;
1918 CPPUNIT_ASSERT_MESSAGE
1920 "invalid character of OStringBuffer()",
1921 sal_True
1924 delete expVal;
1928 void setCharAt_008()
1930 OString* expVal = 0;
1931 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1932 sal_Int32 input1 = -2;
1933 sal_Char input2 = (sal_Char)5;
1935 CPPUNIT_ASSERT_MESSAGE
1937 "invalid character of OStringBuffer()",
1938 sal_True
1941 delete expVal;
1945 void setCharAt_009()
1947 OString* expVal = 0;
1948 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
1949 sal_Int32 input1 = 3;
1950 sal_Char input2 = (sal_Char)5;
1952 CPPUNIT_ASSERT_MESSAGE
1954 "invalid character of OStringBuffer()",
1955 sal_True
1958 delete expVal;
1961 #endif
1962 CPPUNIT_TEST_SUITE( setCharAt );
1963 CPPUNIT_TEST( setCharAt_001 );
1964 CPPUNIT_TEST( setCharAt_002 );
1965 CPPUNIT_TEST( setCharAt_003 );
1966 CPPUNIT_TEST( setCharAt_004 );
1967 CPPUNIT_TEST( setCharAt_005 );
1968 CPPUNIT_TEST( setCharAt_006 );
1969 #ifdef WITH_CORE
1970 CPPUNIT_TEST( setCharAt_007 );
1971 CPPUNIT_TEST( setCharAt_008 );
1972 CPPUNIT_TEST( setCharAt_009 );
1973 #endif
1974 CPPUNIT_TEST_SUITE_END();
1977 // -----------------------------------------------------------------------------
1979 class append_001 : public CppUnit::TestFixture
1981 OString* arrOUS[5];
1983 public:
1984 void setUp()
1986 arrOUS[0] = new OString( kTestStr7 );
1987 arrOUS[1] = new OString( );
1988 arrOUS[2] = new OString( kTestStr25 );
1989 arrOUS[3] = new OString( "\0" );
1990 arrOUS[4] = new OString( kTestStr28 );
1994 void tearDown()
1996 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
1997 delete arrOUS[3]; delete arrOUS[4];
2000 void append_001_001()
2002 OString expVal( kTestStr1 );
2003 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2004 OString input2( kTestStr8 );
2006 aStrBuf.append( input2 );
2008 CPPUNIT_ASSERT_MESSAGE
2010 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2011 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2016 void append_001_002()
2018 OString expVal( kTestStr2 );
2019 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2020 OString input2( kTestStr36 );
2022 aStrBuf.append( input2 );
2024 CPPUNIT_ASSERT_MESSAGE
2026 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2027 aStrBuf.getStr()== expVal &&
2028 aStrBuf.getLength() == expVal.getLength()
2033 void append_001_003()
2035 OString expVal( kTestStr37 );
2036 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2037 OString input2( kTestStr23 );
2039 aStrBuf.append( input2 );
2041 CPPUNIT_ASSERT_MESSAGE
2043 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2044 aStrBuf.getStr()== expVal &&
2045 aStrBuf.getLength() == expVal.getLength()
2050 void append_001_004()
2052 OString expVal( kTestStr7 );
2053 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2054 OString input2;
2056 aStrBuf.append( input2 );
2058 CPPUNIT_ASSERT_MESSAGE
2060 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2061 aStrBuf.getStr()== expVal &&
2062 aStrBuf.getLength() == expVal.getLength()
2067 void append_001_005()
2069 OString expVal( kTestStr7 );
2070 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2071 OString input2( kTestStr7 );
2073 aStrBuf.append( input2 );
2075 CPPUNIT_ASSERT_MESSAGE
2077 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2078 aStrBuf.getStr()== expVal &&
2079 aStrBuf.getLength() == expVal.getLength()
2084 void append_001_006()
2086 OString expVal( kTestStr2 );
2087 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2088 OString input2( kTestStr2 );
2090 aStrBuf.append( input2 );
2092 CPPUNIT_ASSERT_MESSAGE
2094 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2095 aStrBuf.getStr()== expVal &&
2096 aStrBuf.getLength() == expVal.getLength()
2101 void append_001_007()
2103 OString expVal( kTestStr1 );
2104 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2105 OString input2( kTestStr1 );
2107 aStrBuf.append( input2 );
2109 CPPUNIT_ASSERT_MESSAGE
2111 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2112 aStrBuf.getStr()== expVal &&
2113 aStrBuf.getLength() == expVal.getLength()
2118 void append_001_008()
2120 OString expVal;
2121 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2122 OString input2;
2124 aStrBuf.append( input2 );
2126 CPPUNIT_ASSERT_MESSAGE
2128 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2129 aStrBuf.getStr()== expVal &&
2130 aStrBuf.getLength() == expVal.getLength()
2135 void append_001_009()
2137 OString expVal( kTestStr7 );
2138 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2139 OString input2( kTestStr7 );
2141 aStrBuf.append( input2 );
2143 CPPUNIT_ASSERT_MESSAGE
2145 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2146 aStrBuf.getStr()== expVal &&
2147 aStrBuf.getLength() == expVal.getLength()
2152 void append_001_010()
2154 OString expVal( kTestStr2 );
2155 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2156 OString input2( kTestStr2 );
2158 aStrBuf.append( input2 );
2160 CPPUNIT_ASSERT_MESSAGE
2162 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2163 aStrBuf.getStr()== expVal &&
2164 aStrBuf.getLength() == expVal.getLength()
2169 void append_001_011()
2171 OString expVal( kTestStr1 );
2172 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2173 OString input2( kTestStr1 );
2175 aStrBuf.append( input2 );
2177 CPPUNIT_ASSERT_MESSAGE
2179 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2180 aStrBuf.getStr()== expVal &&
2181 aStrBuf.getLength() == expVal.getLength()
2186 void append_001_012()
2188 OString expVal;
2189 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2190 OString input2;
2192 aStrBuf.append( input2 );
2194 CPPUNIT_ASSERT_MESSAGE
2196 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2197 aStrBuf.getStr()== expVal &&
2198 aStrBuf.getLength() == expVal.getLength()
2203 void append_001_013()
2205 OString expVal( kTestStr7 );
2206 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2207 OString input2( kTestStr7 );
2209 aStrBuf.append( input2 );
2211 CPPUNIT_ASSERT_MESSAGE
2213 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2214 aStrBuf.getStr()== expVal &&
2215 aStrBuf.getLength() == expVal.getLength()
2220 void append_001_014()
2222 OString expVal( kTestStr2 );
2223 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2224 OString input2( kTestStr2 );
2226 aStrBuf.append( input2 );
2228 CPPUNIT_ASSERT_MESSAGE
2230 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2231 aStrBuf.getStr()== expVal &&
2232 aStrBuf.getLength() == expVal.getLength()
2237 void append_001_015()
2239 OString expVal( kTestStr1 );
2240 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2241 OString input2( kTestStr1 );
2243 aStrBuf.append( input2 );
2245 CPPUNIT_ASSERT_MESSAGE
2247 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2248 aStrBuf.getStr()== expVal &&
2249 aStrBuf.getLength() == expVal.getLength()
2254 void append_001_016()
2256 OString expVal;
2257 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2258 OString input2;
2260 aStrBuf.append( input2 );
2262 CPPUNIT_ASSERT_MESSAGE
2264 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2265 aStrBuf.getStr()== expVal &&
2266 aStrBuf.getLength() == expVal.getLength()
2271 void append_001_017()
2273 OString expVal( kTestStr29 );
2274 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2275 OString input2( kTestStr38 );
2277 aStrBuf.append( input2 );
2279 CPPUNIT_ASSERT_MESSAGE
2281 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2282 aStrBuf.getStr()== expVal &&
2283 aStrBuf.getLength() == expVal.getLength()
2288 void append_001_018()
2290 OString expVal( kTestStr39 );
2291 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2292 OString input2( kTestStr17 );
2294 aStrBuf.append( input2 );
2296 CPPUNIT_ASSERT_MESSAGE
2298 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2299 aStrBuf.getStr()== expVal &&
2300 aStrBuf.getLength() == expVal.getLength()
2305 void append_001_019()
2307 OString expVal( kTestStr40 );
2308 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2309 OString input2( kTestStr31 );
2311 aStrBuf.append( input2 );
2313 CPPUNIT_ASSERT_MESSAGE
2315 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2316 aStrBuf.getStr()== expVal &&
2317 aStrBuf.getLength() == expVal.getLength()
2322 void append_001_020()
2324 OString expVal( kTestStr28 );
2325 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2326 OString input2;
2328 aStrBuf.append( input2 );
2330 CPPUNIT_ASSERT_MESSAGE
2332 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2333 aStrBuf.getStr()== expVal &&
2334 aStrBuf.getLength() == expVal.getLength()
2339 #ifdef WITH_CORE
2340 void append_001_021()
2342 OString expVal;
2343 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
2344 OString input2;
2346 aStrBuf.append( input2 );
2348 CPPUNIT_ASSERT_MESSAGE
2350 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2351 aStrBuf.getStr()== expVal &&
2352 aStrBuf.getLength() == expVal.getLength()
2356 #endif
2358 CPPUNIT_TEST_SUITE( append_001 );
2359 CPPUNIT_TEST( append_001_001 );
2360 CPPUNIT_TEST( append_001_002 );
2361 CPPUNIT_TEST( append_001_003 );
2362 CPPUNIT_TEST( append_001_004 );
2363 CPPUNIT_TEST( append_001_005 );
2364 CPPUNIT_TEST( append_001_006 );
2365 CPPUNIT_TEST( append_001_007 );
2366 CPPUNIT_TEST( append_001_008 );
2367 CPPUNIT_TEST( append_001_009 );
2368 CPPUNIT_TEST( append_001_010 );
2369 CPPUNIT_TEST( append_001_011 );
2370 CPPUNIT_TEST( append_001_012 );
2371 CPPUNIT_TEST( append_001_013 );
2372 CPPUNIT_TEST( append_001_014 );
2373 CPPUNIT_TEST( append_001_015 );
2374 CPPUNIT_TEST( append_001_016 );
2375 CPPUNIT_TEST( append_001_017 );
2376 CPPUNIT_TEST( append_001_018 );
2377 CPPUNIT_TEST( append_001_019 );
2378 CPPUNIT_TEST( append_001_020 );
2379 #ifdef WITH_CORE
2380 CPPUNIT_TEST( append_001_021 );
2381 #endif
2382 CPPUNIT_TEST_SUITE_END();
2385 // -----------------------------------------------------------------------------
2387 class append_002 : public CppUnit::TestFixture
2389 OString* arrOUS[5];
2391 public:
2392 void setUp()
2394 arrOUS[0] = new OString( kTestStr7 );
2395 arrOUS[1] = new OString( );
2396 arrOUS[2] = new OString( kTestStr25 );
2397 arrOUS[3] = new OString( "\0" );
2398 arrOUS[4] = new OString( kTestStr28 );
2402 void tearDown()
2404 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
2405 delete arrOUS[3]; delete arrOUS[4];
2408 void append_002_001()
2410 OString expVal( kTestStr1 );
2411 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2412 const sal_Char* input = kTestStr8;
2414 aStrBuf.append( input );
2416 CPPUNIT_ASSERT_MESSAGE
2418 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2419 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2424 void append_002_002()
2426 OString expVal( kTestStr2 );
2427 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2428 const sal_Char* input = kTestStr36;
2430 aStrBuf.append( input );
2432 CPPUNIT_ASSERT_MESSAGE
2434 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2435 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2440 void append_002_003()
2442 OString expVal( kTestStr37 );
2443 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2444 const sal_Char* input = kTestStr23;
2446 aStrBuf.append( input );
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_002_004()
2458 OString expVal( kTestStr7 );
2459 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2460 const sal_Char* input = kTestStr25;
2462 aStrBuf.append( input );
2464 CPPUNIT_ASSERT_MESSAGE
2466 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2467 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2472 void append_002_005()
2474 OString expVal( kTestStr7 );
2475 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2476 const sal_Char* input = kTestStr7;
2478 aStrBuf.append( input );
2480 CPPUNIT_ASSERT_MESSAGE
2482 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2483 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2488 void append_002_006()
2490 OString expVal( kTestStr2 );
2491 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2492 const sal_Char* input = kTestStr2;
2494 aStrBuf.append( input );
2496 CPPUNIT_ASSERT_MESSAGE
2498 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2499 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2504 void append_002_007()
2506 OString expVal( kTestStr1 );
2507 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2508 const sal_Char* input = kTestStr1;
2510 aStrBuf.append( input );
2512 CPPUNIT_ASSERT_MESSAGE
2514 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2515 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2520 void append_002_008()
2522 OString expVal;
2523 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2524 const sal_Char* input = kTestStr25;
2526 aStrBuf.append( input );
2528 CPPUNIT_ASSERT_MESSAGE
2530 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2531 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2536 void append_002_009()
2538 OString expVal( kTestStr7 );
2539 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2540 const sal_Char* input = kTestStr7;
2542 aStrBuf.append( input );
2544 CPPUNIT_ASSERT_MESSAGE
2546 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2547 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2552 void append_002_010()
2554 OString expVal( kTestStr2 );
2555 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2556 const sal_Char* input = kTestStr2;
2558 aStrBuf.append( input );
2560 CPPUNIT_ASSERT_MESSAGE
2562 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2563 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2568 void append_002_011()
2570 OString expVal( kTestStr1 );
2571 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2572 const sal_Char* input = kTestStr1;
2574 aStrBuf.append( input );
2576 CPPUNIT_ASSERT_MESSAGE
2578 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2579 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2584 void append_002_012()
2586 OString expVal;
2587 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2588 const sal_Char* input = kTestStr25;
2590 aStrBuf.append( input );
2592 CPPUNIT_ASSERT_MESSAGE
2594 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2595 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2600 void append_002_013()
2602 OString expVal( kTestStr7 );
2603 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2604 const sal_Char* input = kTestStr7;
2606 aStrBuf.append( input );
2608 CPPUNIT_ASSERT_MESSAGE
2610 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2611 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2616 void append_002_014()
2618 OString expVal( kTestStr2 );
2619 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2620 const sal_Char* input = kTestStr2;
2622 aStrBuf.append( input );
2624 CPPUNIT_ASSERT_MESSAGE
2626 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2627 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2632 void append_002_015()
2634 OString expVal( kTestStr1 );
2635 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2636 const sal_Char* input = kTestStr1;
2638 aStrBuf.append( input );
2640 CPPUNIT_ASSERT_MESSAGE
2642 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2643 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2648 void append_002_016()
2650 OString expVal;
2651 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
2652 const sal_Char* input = kTestStr25;
2654 aStrBuf.append( input );
2656 CPPUNIT_ASSERT_MESSAGE
2658 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2659 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2664 void append_002_017()
2666 OString expVal( kTestStr29 );
2667 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2668 const sal_Char* input = kTestStr38;
2670 aStrBuf.append( input );
2672 CPPUNIT_ASSERT_MESSAGE
2674 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2675 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2680 void append_002_018()
2682 OString expVal( kTestStr39 );
2683 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2684 const sal_Char* input = kTestStr17;
2686 aStrBuf.append( input );
2688 CPPUNIT_ASSERT_MESSAGE
2690 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2691 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2696 void append_002_019()
2698 OString expVal( kTestStr40 );
2699 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2700 const sal_Char* input = kTestStr31;
2702 aStrBuf.append( input );
2704 CPPUNIT_ASSERT_MESSAGE
2706 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2707 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2712 void append_002_020()
2714 OString expVal( kTestStr28 );
2715 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
2716 const sal_Char* input = kTestStr25;
2718 aStrBuf.append( input );
2720 CPPUNIT_ASSERT_MESSAGE
2722 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2723 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2728 #ifdef WITH_CORE
2729 void append_002_021()
2731 OString expVal;
2732 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
2733 const sal_Char* input = kTestStr25;
2735 aStrBuf.append( input );
2737 CPPUNIT_ASSERT_MESSAGE
2739 "Appends the string(length equal to 0) to the string buffer(with INT_MAX)",
2740 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2744 #endif
2746 CPPUNIT_TEST_SUITE( append_002 );
2747 CPPUNIT_TEST( append_002_001 );
2748 CPPUNIT_TEST( append_002_002 );
2749 CPPUNIT_TEST( append_002_003 );
2750 CPPUNIT_TEST( append_002_004 );
2751 CPPUNIT_TEST( append_002_005 );
2752 CPPUNIT_TEST( append_002_006 );
2753 CPPUNIT_TEST( append_002_007 );
2754 CPPUNIT_TEST( append_002_008 );
2755 CPPUNIT_TEST( append_002_009 );
2756 CPPUNIT_TEST( append_002_010 );
2757 CPPUNIT_TEST( append_002_011 );
2758 CPPUNIT_TEST( append_002_012 );
2759 CPPUNIT_TEST( append_002_013 );
2760 CPPUNIT_TEST( append_002_014 );
2761 CPPUNIT_TEST( append_002_015 );
2762 CPPUNIT_TEST( append_002_016 );
2763 CPPUNIT_TEST( append_002_017 );
2764 CPPUNIT_TEST( append_002_018 );
2765 CPPUNIT_TEST( append_002_019 );
2766 CPPUNIT_TEST( append_002_020 );
2767 #ifdef WITH_CORE
2768 CPPUNIT_TEST( append_002_021 );
2769 #endif
2770 CPPUNIT_TEST_SUITE_END();
2772 // -----------------------------------------------------------------------------
2774 class append_003 : public CppUnit::TestFixture
2776 OString* arrOUS[5];
2778 public:
2779 void setUp()
2781 arrOUS[0] = new OString( kTestStr7 );
2782 arrOUS[1] = new OString( );
2783 arrOUS[2] = new OString( kTestStr25 );
2784 arrOUS[3] = new OString( "\0" );
2785 arrOUS[4] = new OString( kTestStr28 );
2789 void tearDown()
2791 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
2792 delete arrOUS[3]; delete arrOUS[4];
2795 void append_003_001()
2797 OString expVal( kTestStr1 );
2798 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2799 const sal_Char* input1 = kTestStr36;
2800 sal_Int32 input2 = 12;
2802 aStrBuf.append( input1, input2 );
2804 CPPUNIT_ASSERT_MESSAGE
2806 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2807 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2812 void append_003_002()
2814 OString expVal( kTestStr2 );
2815 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2816 const sal_Char* input1 = kTestStr36;
2817 sal_Int32 input2 = 28;
2819 aStrBuf.append( input1, input2 );
2821 CPPUNIT_ASSERT_MESSAGE
2823 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2824 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2829 void append_003_003()
2831 OString expVal( kTestStr37 );
2832 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2833 const sal_Char* input1 = kTestStr23;
2834 sal_Int32 input2 = 16;
2836 aStrBuf.append( input1, input2 );
2838 CPPUNIT_ASSERT_MESSAGE
2840 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2841 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2846 void append_003_004()
2848 OString expVal( kTestStr7 );
2849 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2850 const sal_Char* input1 = kTestStr2;
2851 sal_Int32 input2 = 0;
2853 aStrBuf.append( input1, input2 );
2855 CPPUNIT_ASSERT_MESSAGE
2857 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2858 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2863 void append_003_005()
2865 // LLA: this is an illegal test, the input2 value must non-negative
2866 // LLA: OString expVal( kTestStr41 );
2867 // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
2868 // LLA: const sal_Char* input1 = kTestStr2;
2869 // LLA: sal_Int32 input2 = -1;
2870 // LLA:
2871 // LLA: aStrBuf.append( input1, input2 );
2872 // LLA:
2873 // LLA: CPPUNIT_ASSERT_MESSAGE
2874 // LLA: (
2875 // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[0]",
2876 // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2877 // LLA: );
2881 void append_003_006()
2883 OString expVal( kTestStr7 );
2884 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2885 const sal_Char* input1 = kTestStr2;
2886 sal_Int32 input2 = 4;
2888 aStrBuf.append( input1, input2 );
2890 CPPUNIT_ASSERT_MESSAGE
2892 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2893 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2898 void append_003_007()
2900 OString expVal( kTestStr2 );
2901 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2902 const sal_Char* input1 = kTestStr2;
2903 sal_Int32 input2 = 32;
2905 aStrBuf.append( input1, input2 );
2907 CPPUNIT_ASSERT_MESSAGE
2909 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2910 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2915 void append_003_008()
2917 OString expVal( kTestStr1 );
2918 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2919 const sal_Char* input1 = kTestStr2;
2920 sal_Int32 input2 = 16;
2922 aStrBuf.append( input1, input2 );
2924 CPPUNIT_ASSERT_MESSAGE
2926 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2927 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2932 void append_003_009()
2934 OString expVal;
2935 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2936 const sal_Char* input1 = kTestStr2;
2937 sal_Int32 input2 = 0;
2939 aStrBuf.append( input1, input2 );
2941 CPPUNIT_ASSERT_MESSAGE
2943 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2944 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2949 void append_003_010()
2951 // LLA: this is an illegal test, the input2 value must non-negative
2952 // LLA: OString expVal;
2953 // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
2954 // LLA: const sal_Char* input1 = kTestStr2;
2955 // LLA: sal_Int32 input2 = -1;
2956 // LLA:
2957 // LLA: aStrBuf.append( input1, input2 );
2958 // LLA:
2959 // LLA: CPPUNIT_ASSERT_MESSAGE
2960 // LLA: (
2961 // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[1]",
2962 // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2963 // LLA: );
2966 void append_003_011()
2968 OString expVal( kTestStr7 );
2969 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2970 const sal_Char* input1 = kTestStr2;
2971 sal_Int32 input2 = 4;
2973 aStrBuf.append( input1, input2 );
2975 CPPUNIT_ASSERT_MESSAGE
2977 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2978 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
2983 void append_003_012()
2985 OString expVal( kTestStr2 );
2986 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
2987 const sal_Char* input1 = kTestStr2;
2988 sal_Int32 input2 = 32;
2990 aStrBuf.append( input1, input2 );
2992 CPPUNIT_ASSERT_MESSAGE
2994 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2995 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3000 void append_003_013()
3002 OString expVal( kTestStr1 );
3003 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3004 const sal_Char* input1 = kTestStr2;
3005 sal_Int32 input2 = 16;
3007 aStrBuf.append( input1, input2 );
3009 CPPUNIT_ASSERT_MESSAGE
3011 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
3012 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3017 void append_003_014()
3019 OString expVal;
3020 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3021 const sal_Char* input1 = kTestStr2;
3022 sal_Int32 input2 = 0;
3024 aStrBuf.append( input1, input2 );
3026 CPPUNIT_ASSERT_MESSAGE
3028 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
3029 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3034 void append_003_015()
3036 // LLA: this is an illegal test, the input2 value must non-negative
3037 // LLA: OString expVal;
3038 // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3039 // LLA: const sal_Char* input1 = kTestStr2;
3040 // LLA: sal_Int32 input2 = -1;
3041 // LLA:
3042 // LLA: aStrBuf.append( input1, input2 );
3043 // LLA:
3044 // LLA: CPPUNIT_ASSERT_MESSAGE
3045 // LLA: (
3046 // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[2]",
3047 // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3048 // LLA: );
3052 void append_003_016()
3054 OString expVal( kTestStr7 );
3055 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3056 const sal_Char* input1 = kTestStr2;
3057 sal_Int32 input2 = 4;
3059 aStrBuf.append( input1, input2 );
3061 CPPUNIT_ASSERT_MESSAGE
3063 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
3064 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3069 void append_003_017()
3071 OString expVal( kTestStr2 );
3072 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3073 const sal_Char* input1 = kTestStr2;
3074 sal_Int32 input2 = 32;
3076 aStrBuf.append( input1, input2 );
3078 CPPUNIT_ASSERT_MESSAGE
3080 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
3081 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3086 void append_003_018()
3088 OString expVal( kTestStr1 );
3089 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3090 const sal_Char* input1 = kTestStr2;
3091 sal_Int32 input2 = 16;
3093 aStrBuf.append( input1, input2 );
3095 CPPUNIT_ASSERT_MESSAGE
3097 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
3098 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3103 void append_003_019()
3105 OString expVal;
3106 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3107 const sal_Char* input1 = kTestStr2;
3108 sal_Int32 input2 = 0;
3110 aStrBuf.append( input1, input2 );
3112 CPPUNIT_ASSERT_MESSAGE
3114 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
3115 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3120 void append_003_020()
3122 // LLA: this is an illegal test, the input2 value must non-negative
3123 // LLA: OString expVal;
3124 // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3125 // LLA: const sal_Char* input1 = kTestStr2;
3126 // LLA: sal_Int32 input2 = -1;
3127 // LLA:
3128 // LLA: aStrBuf.append( input1, input2 );
3129 // LLA:
3130 // LLA: CPPUNIT_ASSERT_MESSAGE
3131 // LLA: (
3132 // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[3]",
3133 // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3134 // LLA: );
3138 void append_003_021()
3140 OString expVal( kTestStr29 );
3141 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3142 const sal_Char* input1 = kTestStr38;
3143 sal_Int32 input2 = 7;
3145 aStrBuf.append( input1, input2 );
3147 CPPUNIT_ASSERT_MESSAGE
3149 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
3150 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3155 void append_003_022()
3157 OString expVal( kTestStr39 );
3158 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3159 const sal_Char* input1 = kTestStr17;
3160 sal_Int32 input2 = 22;
3162 aStrBuf.append( input1, input2 );
3164 CPPUNIT_ASSERT_MESSAGE
3166 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
3167 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3172 void append_003_023()
3174 OString expVal( kTestStr40 );
3175 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3176 const sal_Char* input1 = kTestStr31;
3177 sal_Int32 input2 = 16;
3179 aStrBuf.append( input1, input2 );
3181 CPPUNIT_ASSERT_MESSAGE
3183 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
3184 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3189 void append_003_024()
3191 OString expVal( kTestStr28 );
3192 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3193 const sal_Char* input1 = kTestStr2;
3194 sal_Int32 input2 = 0;
3196 aStrBuf.append( input1, input2 );
3198 CPPUNIT_ASSERT_MESSAGE
3200 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
3201 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3206 void append_003_025()
3208 // LLA: this is an illegal test, the input2 value must non-negative
3209 // LLA: OString expVal( kTestStr42 );
3210 // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3211 // LLA: const sal_Char* input1 = kTestStr2;
3212 // LLA: sal_Int32 input2 = -1;
3213 // LLA:
3214 // LLA: aStrBuf.append( input1, input2 );
3215 // LLA:
3216 // LLA: CPPUNIT_ASSERT_MESSAGE
3217 // LLA: (
3218 // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[4]",
3219 // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3220 // LLA: );
3224 #ifdef WITH_CORE
3225 void append_003_026()
3227 OString expVal;
3228 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3229 const sal_Char* input1 = kTestStr25;
3230 sal_Int32 input2 = 0;
3232 aStrBuf.append( input1, input2 );
3234 CPPUNIT_ASSERT_MESSAGE
3236 "Appends the string(length equal to 0) to the string buffer(with INT_MAX)",
3237 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3241 #endif
3243 CPPUNIT_TEST_SUITE( append_003 );
3244 CPPUNIT_TEST( append_003_001 );
3245 CPPUNIT_TEST( append_003_002 );
3246 CPPUNIT_TEST( append_003_003 );
3247 CPPUNIT_TEST( append_003_004 );
3248 CPPUNIT_TEST( append_003_005 );
3249 CPPUNIT_TEST( append_003_006 );
3250 CPPUNIT_TEST( append_003_007 );
3251 CPPUNIT_TEST( append_003_008 );
3252 CPPUNIT_TEST( append_003_009 );
3253 CPPUNIT_TEST( append_003_010 );
3254 CPPUNIT_TEST( append_003_011 );
3255 CPPUNIT_TEST( append_003_012 );
3256 CPPUNIT_TEST( append_003_013 );
3257 CPPUNIT_TEST( append_003_014 );
3258 CPPUNIT_TEST( append_003_015 );
3259 CPPUNIT_TEST( append_003_016 );
3260 CPPUNIT_TEST( append_003_017 );
3261 CPPUNIT_TEST( append_003_018 );
3262 CPPUNIT_TEST( append_003_019 );
3263 CPPUNIT_TEST( append_003_020 );
3264 CPPUNIT_TEST( append_003_021 );
3265 CPPUNIT_TEST( append_003_022 );
3266 CPPUNIT_TEST( append_003_023 );
3267 CPPUNIT_TEST( append_003_024 );
3268 CPPUNIT_TEST( append_003_025 );
3269 #ifdef WITH_CORE
3270 CPPUNIT_TEST( append_003_026 );
3271 #endif
3272 CPPUNIT_TEST_SUITE_END();
3274 // -----------------------------------------------------------------------------
3276 class append_004 : public CppUnit::TestFixture
3278 OString* arrOUS[5];
3280 public:
3281 void setUp()
3283 arrOUS[0] = new OString( kTestStr7 );
3284 arrOUS[1] = new OString( );
3285 arrOUS[2] = new OString( kTestStr25 );
3286 arrOUS[3] = new OString( "\0" );
3287 arrOUS[4] = new OString( kTestStr28 );
3291 void tearDown()
3293 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
3294 delete arrOUS[3]; delete arrOUS[4];
3297 void append_004_001()
3299 OString expVal( kTestStr45 );
3300 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3301 sal_Bool input = sal_True;
3303 aStrBuf.append( input );
3305 CPPUNIT_ASSERT_MESSAGE
3307 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[0]",
3308 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3313 void append_004_002()
3315 OString expVal( kTestStr46 );
3316 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3317 sal_Bool input = sal_False;
3319 aStrBuf.append( input );
3321 CPPUNIT_ASSERT_MESSAGE
3323 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[0]",
3324 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3329 void append_004_003()
3331 OString expVal( kTestStr47 );
3332 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3333 sal_Bool input = sal_True;
3335 aStrBuf.append( input );
3337 CPPUNIT_ASSERT_MESSAGE
3339 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[1]",
3340 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3345 void append_004_004()
3347 OString expVal( kTestStr48 );
3348 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3349 sal_Bool input = sal_False;
3351 aStrBuf.append( input );
3353 CPPUNIT_ASSERT_MESSAGE
3355 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[1]",
3356 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3361 void append_004_005()
3363 OString expVal( kTestStr47 );
3364 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3365 sal_Bool input = sal_True;
3367 aStrBuf.append( input );
3369 CPPUNIT_ASSERT_MESSAGE
3371 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[2]",
3372 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3377 void append_004_006()
3379 OString expVal( kTestStr48 );
3380 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3381 sal_Bool input = sal_False;
3383 aStrBuf.append( input );
3385 CPPUNIT_ASSERT_MESSAGE
3387 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[2]",
3388 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3393 void append_004_007()
3395 OString expVal( kTestStr47 );
3396 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3397 sal_Bool input = sal_True;
3399 aStrBuf.append( input );
3401 CPPUNIT_ASSERT_MESSAGE
3403 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[3]",
3404 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3409 void append_004_008()
3411 OString expVal( kTestStr48 );
3412 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3413 sal_Bool input = sal_False;
3415 aStrBuf.append( input );
3417 CPPUNIT_ASSERT_MESSAGE
3419 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[3]",
3420 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3425 void append_004_009()
3427 OString expVal( kTestStr49 );
3428 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3429 sal_Bool input = sal_True;
3431 aStrBuf.append( input );
3433 CPPUNIT_ASSERT_MESSAGE
3435 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[4]",
3436 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3441 void append_004_010()
3443 OString expVal( kTestStr50 );
3444 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3445 sal_Bool input = sal_False;
3447 aStrBuf.append( input );
3449 CPPUNIT_ASSERT_MESSAGE
3451 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[4]",
3452 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3457 #ifdef WITH_CORE
3458 void append_004_011()
3460 OString expVal( kTestStr47 );
3461 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3462 sal_Bool input = sal_True;
3464 aStrBuf.append( input );
3466 CPPUNIT_ASSERT_MESSAGE
3468 "Appends the sal_Bool(sal_True) to the string buffer(with INT_MAX)",
3469 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3474 void append_004_012()
3476 OString expVal( kTestStr48 );
3477 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3478 sal_Bool input = sal_False;
3480 aStrBuf.append( input );
3482 CPPUNIT_ASSERT_MESSAGE
3484 "Appends the sal_Bool(sal_False) to the string buffer(with INT_MAX)",
3485 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3489 #endif
3491 CPPUNIT_TEST_SUITE( append_004 );
3492 CPPUNIT_TEST( append_004_001 );
3493 CPPUNIT_TEST( append_004_002 );
3494 CPPUNIT_TEST( append_004_003 );
3495 CPPUNIT_TEST( append_004_004 );
3496 CPPUNIT_TEST( append_004_005 );
3497 CPPUNIT_TEST( append_004_006 );
3498 CPPUNIT_TEST( append_004_007 );
3499 CPPUNIT_TEST( append_004_008 );
3500 CPPUNIT_TEST( append_004_009 );
3501 CPPUNIT_TEST( append_004_010 );
3502 #ifdef WITH_CORE
3503 CPPUNIT_TEST( append_004_011 );
3504 CPPUNIT_TEST( append_004_012 );
3505 #endif
3506 CPPUNIT_TEST_SUITE_END();
3508 //------------------------------------------------------------------------
3509 // testing the method append(sal_Char c)
3510 //------------------------------------------------------------------------
3511 class append_005 : public CppUnit::TestFixture
3513 OString* arrOUS[5];
3515 public:
3516 void setUp()
3518 arrOUS[0] = new OString( kTestStr7 );
3519 arrOUS[1] = new OString( );
3520 arrOUS[2] = new OString( kTestStr25 );
3521 arrOUS[3] = new OString( "\0" );
3522 arrOUS[4] = new OString( kTestStr28 );
3526 void tearDown()
3528 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
3529 delete arrOUS[3]; delete arrOUS[4];
3532 void append_001()
3534 OString expVal( kTestStr51 );
3535 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3536 sal_Char input = 'M';
3538 aStrBuf.append( input );
3540 CPPUNIT_ASSERT_MESSAGE
3542 "Appends the sal_Char(M) to the string buffer arrOUS[0]",
3543 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3548 void append_002()
3550 OString expVal( kTestStr143 );
3551 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3552 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3554 aStrBuf.append( input );
3556 CPPUNIT_ASSERT_MESSAGE
3558 "Appends the sal_Unicode(kSInt8Max) to the string buffer arrOUS[0]",
3559 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3564 void append_003()
3566 OString expVal( kTestStr27 );
3567 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3568 sal_Char input = 's';
3570 aStrBuf.append( input );
3572 CPPUNIT_ASSERT_MESSAGE
3574 "Appends the sal_Char(s) to the string buffer arrOUS[1]",
3575 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3580 void append_004()
3582 OString expVal( kTestStr144 );
3583 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
3584 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3586 aStrBuf.append( input );
3588 CPPUNIT_ASSERT_MESSAGE
3590 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[1]",
3591 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3596 void append_005_005()
3598 OString expVal( kTestStr27 );
3599 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3600 sal_Char input = 's';
3602 aStrBuf.append( input );
3604 CPPUNIT_ASSERT_MESSAGE
3606 "Appends the sal_Char(s) to the string buffer arrOUS[2]",
3607 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3612 void append_006()
3614 OString expVal( kTestStr144 );
3615 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
3616 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3618 aStrBuf.append( input );
3620 CPPUNIT_ASSERT_MESSAGE
3622 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[2]",
3623 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3628 void append_007()
3630 OString expVal( kTestStr27 );
3631 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3632 sal_Char input = 's';
3634 aStrBuf.append( input );
3636 CPPUNIT_ASSERT_MESSAGE
3638 "Appends the sal_Char(s) to the string buffer arrOUS[3]",
3639 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3644 void append_008()
3646 OString expVal( kTestStr144 );
3647 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
3648 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3650 aStrBuf.append( input );
3652 CPPUNIT_ASSERT_MESSAGE
3654 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[3]",
3655 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3660 void append_009()
3662 OString expVal( kTestStr56 );
3663 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3664 sal_Char input = 's';
3666 aStrBuf.append( input );
3668 CPPUNIT_ASSERT_MESSAGE
3670 "Appends the sal_Char(s) to the string buffer arrOUS[4]",
3671 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3676 void append_010()
3678 OString expVal( kTestStr145 );
3679 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
3680 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3682 aStrBuf.append( input );
3684 CPPUNIT_ASSERT_MESSAGE
3686 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[4]",
3687 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3692 #ifdef WITH_CORE
3693 void append_011()
3695 OString expVal( kTestStr27 );
3696 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3697 sal_Char input = 's';
3699 aStrBuf.append( input );
3701 CPPUNIT_ASSERT_MESSAGE
3703 "Appends the sal_Char(s) to the string buffer(with INT_MAX)",
3704 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3709 void append_012()
3711 OString expVal( kTestStr144 );
3712 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
3713 sal_Char input = static_cast<sal_Char>(SAL_MAX_UINT8);
3715 aStrBuf.append( input );
3717 CPPUNIT_ASSERT_MESSAGE
3719 "Appends the sal_Char(kSInt8Max) to the string buffer with INT_MAX)",
3720 ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() )
3724 #endif
3726 CPPUNIT_TEST_SUITE( append_005 );
3727 CPPUNIT_TEST( append_001 );
3728 CPPUNIT_TEST( append_002 );
3729 CPPUNIT_TEST( append_003 );
3730 CPPUNIT_TEST( append_004 );
3731 CPPUNIT_TEST( append_005_005 );
3732 CPPUNIT_TEST( append_006 );
3733 CPPUNIT_TEST( append_007 );
3734 CPPUNIT_TEST( append_008 );
3735 CPPUNIT_TEST( append_009 );
3736 CPPUNIT_TEST( append_010 );
3737 #ifdef WITH_CORE
3738 CPPUNIT_TEST( append_011 );
3739 CPPUNIT_TEST( append_012 );
3740 #endif
3741 CPPUNIT_TEST_SUITE_END();
3744 * Calls the method append(T, radix) and compares
3745 * returned OUString with OUString that passed in the array resArray.
3747 * @param T, type of argument, passed to append
3748 * @param resArray, array of result ustrings to compare to
3749 * @param n the number of elements in the array resArray (testcases)
3750 * @param pTestResult the instance of the class TestResult
3751 * @param inArray [optional], array of value that is passed as first argument
3752 * to append
3754 * @return true, if all returned OUString are equal to corresponding OUString in
3755 * resArray else, false.
3757 /*template <class T>
3758 sal_Bool test_append( const char** resArray, int n, sal_Int16 radix,
3759 const T *inArray, OStringBuffer &aStr1 )
3761 sal_Bool bRes = sal_True;
3763 //sal_Char methName[MAXBUFLENGTH];
3764 //sal_Char* pMeth = methName;
3765 sal_Int32 i;
3766 // static sal_Unicode aUchar[80]={0x12};
3768 for (i = 0; i < n; i++)
3771 OSL_ENSURE( i < 80, "ERROR: leave aUchar bound");
3773 // AStringToUStringCopy(aUchar,resArray[i]);
3775 ::rtl::OString aStr2(aStr1.getStr());
3776 ::rtl::OString aStr3( "-" );
3778 if (inArray == 0)
3780 aStr2 += OString(resArray[i]);
3781 aStr1.append((T)i, radix);
3783 else
3785 // sal_Unicode aStr4[100];
3786 if ( inArray[i] < 0 )
3788 aStr2 += aStr3;
3791 // if(AStringToUStringCopy(aStr4,resArray[i]))
3792 // {
3793 aStr2 += OString(resArray[i]);
3794 // }
3795 aStr1.append((T)inArray[i], radix);
3798 CPPUNIT_ASSERT_MESSAGE
3800 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3801 aStr1.getStr()== aStr2 &&
3802 aStr1.getLength() == aStr2.getLength()
3806 return (bRes);
3808 #define test_append_Int32 test_append<sal_Int32>
3809 #define test_append_Int64 test_append<sal_Int64>
3810 #define test_append_float test_append<float>
3811 #define test_append_double test_append<double>*/
3812 //------------------------------------------------------------------------
3813 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
3814 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
3815 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
3816 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
3817 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
3818 //------------------------------------------------------------------------
3819 class append_006_Int32 : public CppUnit::TestFixture
3821 OString* arrOUS[5];
3823 public:
3824 void setUp()
3826 arrOUS[0] = new OString( kTestStr7 );
3827 arrOUS[1] = new OString( );
3828 arrOUS[2] = new OString( kTestStr25 );
3829 arrOUS[3] = new OString( "\0" );
3830 arrOUS[4] = new OString( kTestStr28 );
3834 void tearDown()
3836 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
3837 delete arrOUS[3]; delete arrOUS[4];
3840 void append_001()
3842 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3843 OString expVal( aStrBuf.getStr() );
3844 sal_Int32 input = 0;
3845 sal_Int16 radix = 2;
3847 expVal += OString( "0" );
3848 aStrBuf.append( input, radix );
3850 /*test_append_Int32((const char**)kBinaryNumsStr,
3851 kBinaryNumsCount, kRadixBinary,
3852 0, aStrBuf );*/
3854 CPPUNIT_ASSERT_MESSAGE
3856 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3857 aStrBuf.getStr()== expVal &&
3858 aStrBuf.getLength() == expVal.getLength()
3863 void append_002()
3865 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3866 OString expVal( aStrBuf.getStr() );
3867 sal_Int32 input = 4;
3868 sal_Int16 radix = 2;
3870 expVal += OString( "100" );
3871 aStrBuf.append( input, radix );
3873 CPPUNIT_ASSERT_MESSAGE
3875 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3876 aStrBuf.getStr()== expVal &&
3877 aStrBuf.getLength() == expVal.getLength()
3882 void append_003()
3884 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3885 OString expVal( aStrBuf.getStr() );
3886 sal_Int32 input = 8;
3887 sal_Int16 radix = 2;
3889 expVal += OString( "1000" );
3890 aStrBuf.append( input, radix );
3892 CPPUNIT_ASSERT_MESSAGE
3894 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3895 aStrBuf.getStr()== expVal &&
3896 aStrBuf.getLength() == expVal.getLength()
3901 void append_004()
3903 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3904 OString expVal( aStrBuf.getStr() );
3905 sal_Int32 input = 15;
3906 sal_Int16 radix = 2;
3908 expVal += OString( "1111" );
3909 aStrBuf.append( input, radix );
3911 CPPUNIT_ASSERT_MESSAGE
3913 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3914 aStrBuf.getStr()== expVal &&
3915 aStrBuf.getLength() == expVal.getLength()
3920 void append_005()
3922 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3923 OString expVal( aStrBuf.getStr() );
3924 sal_Int32 input = 0;
3925 sal_Int16 radix = 8;
3927 expVal += OString( "0" );
3928 aStrBuf.append( input, radix );
3930 CPPUNIT_ASSERT_MESSAGE
3932 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3933 aStrBuf.getStr()== expVal &&
3934 aStrBuf.getLength() == expVal.getLength()
3939 void append_006()
3941 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3942 OString expVal( aStrBuf.getStr() );
3943 sal_Int32 input = 4;
3944 sal_Int16 radix = 8;
3946 expVal += OString( "4" );
3947 aStrBuf.append( input, radix );
3949 CPPUNIT_ASSERT_MESSAGE
3951 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3952 aStrBuf.getStr()== expVal &&
3953 aStrBuf.getLength() == expVal.getLength()
3958 void append_007()
3960 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3961 OString expVal( aStrBuf.getStr() );
3962 sal_Int32 input = 8;
3963 sal_Int16 radix = 8;
3965 expVal += OString( "10" );
3966 aStrBuf.append( input, radix );
3968 CPPUNIT_ASSERT_MESSAGE
3970 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3971 aStrBuf.getStr()== expVal &&
3972 aStrBuf.getLength() == expVal.getLength()
3977 void append_008()
3979 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3980 OString expVal( aStrBuf.getStr() );
3981 sal_Int32 input = 15;
3982 sal_Int16 radix = 8;
3984 expVal += OString( "17" );
3985 aStrBuf.append( input, radix );
3987 CPPUNIT_ASSERT_MESSAGE
3989 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3990 aStrBuf.getStr()== expVal &&
3991 aStrBuf.getLength() == expVal.getLength()
3996 void append_009()
3998 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
3999 OString expVal( aStrBuf.getStr() );
4000 sal_Int32 input = 0;
4001 sal_Int16 radix = 10;
4003 expVal += OString( "0" );
4004 aStrBuf.append( input, radix );
4006 CPPUNIT_ASSERT_MESSAGE
4008 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
4009 aStrBuf.getStr()== expVal &&
4010 aStrBuf.getLength() == expVal.getLength()
4015 void append_010()
4017 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4018 OString expVal( aStrBuf.getStr() );
4019 sal_Int32 input = 4;
4020 sal_Int16 radix = 10;
4022 expVal += OString( "4" );
4023 aStrBuf.append( input, radix );
4025 CPPUNIT_ASSERT_MESSAGE
4027 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
4028 aStrBuf.getStr()== expVal &&
4029 aStrBuf.getLength() == expVal.getLength()
4034 void append_011()
4036 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4037 OString expVal( aStrBuf.getStr() );
4038 sal_Int32 input = 8;
4039 sal_Int16 radix = 10;
4041 expVal += OString( "8" );
4042 aStrBuf.append( input, radix );
4044 CPPUNIT_ASSERT_MESSAGE
4046 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
4047 aStrBuf.getStr()== expVal &&
4048 aStrBuf.getLength() == expVal.getLength()
4053 void append_012()
4055 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4056 OString expVal( aStrBuf.getStr() );
4057 sal_Int32 input = 15;
4058 sal_Int16 radix = 10;
4060 expVal += OString( "15" );
4061 aStrBuf.append( input, radix );
4063 CPPUNIT_ASSERT_MESSAGE
4065 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
4066 aStrBuf.getStr()== expVal &&
4067 aStrBuf.getLength() == expVal.getLength()
4072 void append_013()
4074 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4075 OString expVal( aStrBuf.getStr() );
4076 sal_Int32 input = 0;
4077 sal_Int16 radix = 16;
4079 expVal += OString( "0" );
4080 aStrBuf.append( input, radix );
4082 CPPUNIT_ASSERT_MESSAGE
4084 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
4085 aStrBuf.getStr()== expVal &&
4086 aStrBuf.getLength() == expVal.getLength()
4091 void append_014()
4093 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4094 OString expVal( aStrBuf.getStr() );
4095 sal_Int32 input = 4;
4096 sal_Int16 radix = 16;
4098 expVal += OString( "4" );
4099 aStrBuf.append( input, radix );
4101 CPPUNIT_ASSERT_MESSAGE
4103 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
4104 aStrBuf.getStr()== expVal &&
4105 aStrBuf.getLength() == expVal.getLength()
4110 void append_015()
4112 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4113 OString expVal( aStrBuf.getStr() );
4114 sal_Int32 input = 8;
4115 sal_Int16 radix = 16;
4117 expVal += OString( "8" );
4118 aStrBuf.append( input, radix );
4120 CPPUNIT_ASSERT_MESSAGE
4122 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
4123 aStrBuf.getStr()== expVal &&
4124 aStrBuf.getLength() == expVal.getLength()
4129 void append_016()
4131 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4132 OString expVal( aStrBuf.getStr() );
4133 sal_Int32 input = 15;
4134 sal_Int16 radix = 16;
4136 expVal += OString( "f" );
4137 aStrBuf.append( input, radix );
4139 CPPUNIT_ASSERT_MESSAGE
4141 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
4142 aStrBuf.getStr()== expVal &&
4143 aStrBuf.getLength() == expVal.getLength()
4148 void append_017()
4150 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4151 OString expVal( aStrBuf.getStr() );
4152 sal_Int32 input = 0;
4153 sal_Int16 radix = 36;
4155 expVal += OString( "0" );
4156 aStrBuf.append( input, radix );
4158 CPPUNIT_ASSERT_MESSAGE
4160 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
4161 aStrBuf.getStr()== expVal &&
4162 aStrBuf.getLength() == expVal.getLength()
4167 void append_018()
4169 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4170 OString expVal( aStrBuf.getStr() );
4171 sal_Int32 input = 4;
4172 sal_Int16 radix = 36;
4174 expVal += OString( "4" );
4175 aStrBuf.append( input, radix );
4177 CPPUNIT_ASSERT_MESSAGE
4179 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
4180 aStrBuf.getStr()== expVal &&
4181 aStrBuf.getLength() == expVal.getLength()
4186 void append_019()
4188 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4189 OString expVal( aStrBuf.getStr() );
4190 sal_Int32 input = 8;
4191 sal_Int16 radix = 36;
4193 expVal += OString( "8" );
4194 aStrBuf.append( input, radix );
4196 CPPUNIT_ASSERT_MESSAGE
4198 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
4199 aStrBuf.getStr()== expVal &&
4200 aStrBuf.getLength() == expVal.getLength()
4205 void append_020()
4207 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
4208 OString expVal( aStrBuf.getStr() );
4209 sal_Int32 input = 35;
4210 sal_Int16 radix = 36;
4212 expVal += OString( "z" );
4213 aStrBuf.append( input, radix );
4215 CPPUNIT_ASSERT_MESSAGE
4217 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
4218 aStrBuf.getStr()== expVal &&
4219 aStrBuf.getLength() == expVal.getLength()
4224 void append_021()
4226 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4227 OString expVal( aStrBuf.getStr() );
4228 sal_Int32 input = 0;
4229 sal_Int16 radix = 2;
4231 expVal += OString( "0" );
4232 aStrBuf.append( input, radix );
4234 CPPUNIT_ASSERT_MESSAGE
4236 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
4237 aStrBuf.getStr()== expVal &&
4238 aStrBuf.getLength() == expVal.getLength()
4243 void append_022()
4245 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4246 OString expVal( aStrBuf.getStr() );
4247 sal_Int32 input = 4;
4248 sal_Int16 radix = 2;
4250 expVal += OString( "100" );
4251 aStrBuf.append( input, radix );
4253 CPPUNIT_ASSERT_MESSAGE
4255 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
4256 aStrBuf.getStr()== expVal &&
4257 aStrBuf.getLength() == expVal.getLength()
4262 void append_023()
4264 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4265 OString expVal( aStrBuf.getStr() );
4266 sal_Int32 input = 8;
4267 sal_Int16 radix = 2;
4269 expVal += OString( "1000" );
4270 aStrBuf.append( input, radix );
4272 CPPUNIT_ASSERT_MESSAGE
4274 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
4275 aStrBuf.getStr()== expVal &&
4276 aStrBuf.getLength() == expVal.getLength()
4281 void append_024()
4283 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4284 OString expVal( aStrBuf.getStr() );
4285 sal_Int32 input = 15;
4286 sal_Int16 radix = 2;
4288 expVal += OString( "1111" );
4289 aStrBuf.append( input, radix );
4291 CPPUNIT_ASSERT_MESSAGE
4293 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
4294 aStrBuf.getStr()== expVal &&
4295 aStrBuf.getLength() == expVal.getLength()
4300 void append_025()
4302 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4303 OString expVal( aStrBuf.getStr() );
4304 sal_Int32 input = 0;
4305 sal_Int16 radix = 8;
4307 expVal += OString( "0" );
4308 aStrBuf.append( input, radix );
4310 CPPUNIT_ASSERT_MESSAGE
4312 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
4313 aStrBuf.getStr()== expVal &&
4314 aStrBuf.getLength() == expVal.getLength()
4319 void append_026()
4321 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4322 OString expVal( aStrBuf.getStr() );
4323 sal_Int32 input = 4;
4324 sal_Int16 radix = 8;
4326 expVal += OString( "4" );
4327 aStrBuf.append( input, radix );
4329 CPPUNIT_ASSERT_MESSAGE
4331 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
4332 aStrBuf.getStr()== expVal &&
4333 aStrBuf.getLength() == expVal.getLength()
4338 void append_027()
4340 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4341 OString expVal( aStrBuf.getStr() );
4342 sal_Int32 input = 8;
4343 sal_Int16 radix = 8;
4345 expVal += OString( "10" );
4346 aStrBuf.append( input, radix );
4348 CPPUNIT_ASSERT_MESSAGE
4350 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
4351 aStrBuf.getStr()== expVal &&
4352 aStrBuf.getLength() == expVal.getLength()
4357 void append_028()
4359 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4360 OString expVal( aStrBuf.getStr() );
4361 sal_Int32 input = 15;
4362 sal_Int16 radix = 8;
4364 expVal += OString( "17" );
4365 aStrBuf.append( input, radix );
4367 CPPUNIT_ASSERT_MESSAGE
4369 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
4370 aStrBuf.getStr()== expVal &&
4371 aStrBuf.getLength() == expVal.getLength()
4376 void append_029()
4378 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4379 OString expVal( aStrBuf.getStr() );
4380 sal_Int32 input = 0;
4381 sal_Int16 radix = 10;
4383 expVal += OString( "0" );
4384 aStrBuf.append( input, radix );
4386 CPPUNIT_ASSERT_MESSAGE
4388 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
4389 aStrBuf.getStr()== expVal &&
4390 aStrBuf.getLength() == expVal.getLength()
4395 void append_030()
4397 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4398 OString expVal( aStrBuf.getStr() );
4399 sal_Int32 input = 4;
4400 sal_Int16 radix = 10;
4402 expVal += OString( "4" );
4403 aStrBuf.append( input, radix );
4405 CPPUNIT_ASSERT_MESSAGE
4407 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
4408 aStrBuf.getStr()== expVal &&
4409 aStrBuf.getLength() == expVal.getLength()
4414 void append_031()
4416 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4417 OString expVal( aStrBuf.getStr() );
4418 sal_Int32 input = 8;
4419 sal_Int16 radix = 10;
4421 expVal += OString( "8" );
4422 aStrBuf.append( input, radix );
4424 CPPUNIT_ASSERT_MESSAGE
4426 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
4427 aStrBuf.getStr()== expVal &&
4428 aStrBuf.getLength() == expVal.getLength()
4433 void append_032()
4435 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4436 OString expVal( aStrBuf.getStr() );
4437 sal_Int32 input = 15;
4438 sal_Int16 radix = 10;
4440 expVal += OString( "15" );
4441 aStrBuf.append( input, radix );
4443 CPPUNIT_ASSERT_MESSAGE
4445 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
4446 aStrBuf.getStr()== expVal &&
4447 aStrBuf.getLength() == expVal.getLength()
4452 void append_033()
4454 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4455 OString expVal( aStrBuf.getStr() );
4456 sal_Int32 input = 0;
4457 sal_Int16 radix = 16;
4459 expVal += OString( "0" );
4460 aStrBuf.append( input, radix );
4462 CPPUNIT_ASSERT_MESSAGE
4464 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
4465 aStrBuf.getStr()== expVal &&
4466 aStrBuf.getLength() == expVal.getLength()
4471 void append_034()
4473 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4474 OString expVal( aStrBuf.getStr() );
4475 sal_Int32 input = 4;
4476 sal_Int16 radix = 16;
4478 expVal += OString( "4" );
4479 aStrBuf.append( input, radix );
4481 CPPUNIT_ASSERT_MESSAGE
4483 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
4484 aStrBuf.getStr()== expVal &&
4485 aStrBuf.getLength() == expVal.getLength()
4490 void append_035()
4492 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4493 OString expVal( aStrBuf.getStr() );
4494 sal_Int32 input = 8;
4495 sal_Int16 radix = 16;
4497 expVal += OString( "8" );
4498 aStrBuf.append( input, radix );
4500 CPPUNIT_ASSERT_MESSAGE
4502 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
4503 aStrBuf.getStr()== expVal &&
4504 aStrBuf.getLength() == expVal.getLength()
4509 void append_036()
4511 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4512 OString expVal( aStrBuf.getStr() );
4513 sal_Int32 input = 15;
4514 sal_Int16 radix = 16;
4516 expVal += OString( "f" );
4517 aStrBuf.append( input, radix );
4519 CPPUNIT_ASSERT_MESSAGE
4521 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
4522 aStrBuf.getStr()== expVal &&
4523 aStrBuf.getLength() == expVal.getLength()
4528 void append_037()
4530 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4531 OString expVal( aStrBuf.getStr() );
4532 sal_Int32 input = 0;
4533 sal_Int16 radix = 36;
4535 expVal += OString( "0" );
4536 aStrBuf.append( input, radix );
4538 CPPUNIT_ASSERT_MESSAGE
4540 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
4541 aStrBuf.getStr()== expVal &&
4542 aStrBuf.getLength() == expVal.getLength()
4547 void append_038()
4549 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4550 OString expVal( aStrBuf.getStr() );
4551 sal_Int32 input = 4;
4552 sal_Int16 radix = 36;
4554 expVal += OString( "4" );
4555 aStrBuf.append( input, radix );
4557 CPPUNIT_ASSERT_MESSAGE
4559 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
4560 aStrBuf.getStr()== expVal &&
4561 aStrBuf.getLength() == expVal.getLength()
4566 void append_039()
4568 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4569 OString expVal( aStrBuf.getStr() );
4570 sal_Int32 input = 8;
4571 sal_Int16 radix = 36;
4573 expVal += OString( "8" );
4574 aStrBuf.append( input, radix );
4576 CPPUNIT_ASSERT_MESSAGE
4578 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
4579 aStrBuf.getStr()== expVal &&
4580 aStrBuf.getLength() == expVal.getLength()
4585 void append_040()
4587 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
4588 OString expVal( aStrBuf.getStr() );
4589 sal_Int32 input = 35;
4590 sal_Int16 radix = 36;
4592 expVal += OString( "z" );
4593 aStrBuf.append( input, radix );
4595 CPPUNIT_ASSERT_MESSAGE
4597 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
4598 aStrBuf.getStr()== expVal &&
4599 aStrBuf.getLength() == expVal.getLength()
4604 void append_041()
4606 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4607 OString expVal( aStrBuf.getStr() );
4608 sal_Int32 input = 0;
4609 sal_Int16 radix = 2;
4611 expVal += OString( "0" );
4612 aStrBuf.append( input, radix );
4614 CPPUNIT_ASSERT_MESSAGE
4616 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4617 aStrBuf.getStr()== expVal &&
4618 aStrBuf.getLength() == expVal.getLength()
4623 void append_042()
4625 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4626 OString expVal( aStrBuf.getStr() );
4627 sal_Int32 input = 4;
4628 sal_Int16 radix = 2;
4630 expVal += OString( "100" );
4631 aStrBuf.append( input, radix );
4633 CPPUNIT_ASSERT_MESSAGE
4635 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4636 aStrBuf.getStr()== expVal &&
4637 aStrBuf.getLength() == expVal.getLength()
4642 void append_043()
4644 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4645 OString expVal( aStrBuf.getStr() );
4646 sal_Int32 input = 8;
4647 sal_Int16 radix = 2;
4649 expVal += OString( "1000" );
4650 aStrBuf.append( input, radix );
4652 CPPUNIT_ASSERT_MESSAGE
4654 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4655 aStrBuf.getStr()== expVal &&
4656 aStrBuf.getLength() == expVal.getLength()
4661 void append_044()
4663 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4664 OString expVal( aStrBuf.getStr() );
4665 sal_Int32 input = 15;
4666 sal_Int16 radix = 2;
4668 expVal += OString( "1111" );
4669 aStrBuf.append( input, radix );
4671 CPPUNIT_ASSERT_MESSAGE
4673 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4674 aStrBuf.getStr()== expVal &&
4675 aStrBuf.getLength() == expVal.getLength()
4680 void append_045()
4682 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4683 OString expVal( aStrBuf.getStr() );
4684 sal_Int32 input = 0;
4685 sal_Int16 radix = 8;
4687 expVal += OString( "0" );
4688 aStrBuf.append( input, radix );
4690 CPPUNIT_ASSERT_MESSAGE
4692 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4693 aStrBuf.getStr()== expVal &&
4694 aStrBuf.getLength() == expVal.getLength()
4699 void append_046()
4701 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4702 OString expVal( aStrBuf.getStr() );
4703 sal_Int32 input = 4;
4704 sal_Int16 radix = 8;
4706 expVal += OString( "4" );
4707 aStrBuf.append( input, radix );
4709 CPPUNIT_ASSERT_MESSAGE
4711 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4712 aStrBuf.getStr()== expVal &&
4713 aStrBuf.getLength() == expVal.getLength()
4718 void append_047()
4720 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4721 OString expVal( aStrBuf.getStr() );
4722 sal_Int32 input = 8;
4723 sal_Int16 radix = 8;
4725 expVal += OString( "10" );
4726 aStrBuf.append( input, radix );
4728 CPPUNIT_ASSERT_MESSAGE
4730 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4731 aStrBuf.getStr()== expVal &&
4732 aStrBuf.getLength() == expVal.getLength()
4737 void append_048()
4739 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4740 OString expVal( aStrBuf.getStr() );
4741 sal_Int32 input = 15;
4742 sal_Int16 radix = 8;
4744 expVal += OString( "17" );
4745 aStrBuf.append( input, radix );
4747 CPPUNIT_ASSERT_MESSAGE
4749 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4750 aStrBuf.getStr()== expVal &&
4751 aStrBuf.getLength() == expVal.getLength()
4756 void append_049()
4758 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4759 OString expVal( aStrBuf.getStr() );
4760 sal_Int32 input = 0;
4761 sal_Int16 radix = 10;
4763 expVal += OString( "0" );
4764 aStrBuf.append( input, radix );
4766 CPPUNIT_ASSERT_MESSAGE
4768 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4769 aStrBuf.getStr()== expVal &&
4770 aStrBuf.getLength() == expVal.getLength()
4775 void append_050()
4777 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4778 OString expVal( aStrBuf.getStr() );
4779 sal_Int32 input = 4;
4780 sal_Int16 radix = 10;
4782 expVal += OString( "4" );
4783 aStrBuf.append( input, radix );
4785 CPPUNIT_ASSERT_MESSAGE
4787 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4788 aStrBuf.getStr()== expVal &&
4789 aStrBuf.getLength() == expVal.getLength()
4794 void append_051()
4796 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4797 OString expVal( aStrBuf.getStr() );
4798 sal_Int32 input = 8;
4799 sal_Int16 radix = 10;
4801 expVal += OString( "8" );
4802 aStrBuf.append( input, radix );
4804 CPPUNIT_ASSERT_MESSAGE
4806 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4807 aStrBuf.getStr()== expVal &&
4808 aStrBuf.getLength() == expVal.getLength()
4813 void append_052()
4815 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4816 OString expVal( aStrBuf.getStr() );
4817 sal_Int32 input = 15;
4818 sal_Int16 radix = 10;
4820 expVal += OString( "15" );
4821 aStrBuf.append( input, radix );
4823 CPPUNIT_ASSERT_MESSAGE
4825 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4826 aStrBuf.getStr()== expVal &&
4827 aStrBuf.getLength() == expVal.getLength()
4832 void append_053()
4834 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4835 OString expVal( aStrBuf.getStr() );
4836 sal_Int32 input = 0;
4837 sal_Int16 radix = 16;
4839 expVal += OString( "0" );
4840 aStrBuf.append( input, radix );
4842 CPPUNIT_ASSERT_MESSAGE
4844 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4845 aStrBuf.getStr()== expVal &&
4846 aStrBuf.getLength() == expVal.getLength()
4851 void append_054()
4853 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4854 OString expVal( aStrBuf.getStr() );
4855 sal_Int32 input = 4;
4856 sal_Int16 radix = 16;
4858 expVal += OString( "4" );
4859 aStrBuf.append( input, radix );
4861 CPPUNIT_ASSERT_MESSAGE
4863 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4864 aStrBuf.getStr()== expVal &&
4865 aStrBuf.getLength() == expVal.getLength()
4870 void append_055()
4872 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4873 OString expVal( aStrBuf.getStr() );
4874 sal_Int32 input = 8;
4875 sal_Int16 radix = 16;
4877 expVal += OString( "8" );
4878 aStrBuf.append( input, radix );
4880 CPPUNIT_ASSERT_MESSAGE
4882 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4883 aStrBuf.getStr()== expVal &&
4884 aStrBuf.getLength() == expVal.getLength()
4889 void append_056()
4891 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4892 OString expVal( aStrBuf.getStr() );
4893 sal_Int32 input = 15;
4894 sal_Int16 radix = 16;
4896 expVal += OString( "f" );
4897 aStrBuf.append( input, radix );
4899 CPPUNIT_ASSERT_MESSAGE
4901 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4902 aStrBuf.getStr()== expVal &&
4903 aStrBuf.getLength() == expVal.getLength()
4908 void append_057()
4910 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4911 OString expVal( aStrBuf.getStr() );
4912 sal_Int32 input = 0;
4913 sal_Int16 radix = 36;
4915 expVal += OString( "0" );
4916 aStrBuf.append( input, radix );
4918 CPPUNIT_ASSERT_MESSAGE
4920 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4921 aStrBuf.getStr()== expVal &&
4922 aStrBuf.getLength() == expVal.getLength()
4927 void append_058()
4929 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4930 OString expVal( aStrBuf.getStr() );
4931 sal_Int32 input = 4;
4932 sal_Int16 radix = 36;
4934 expVal += OString( "4" );
4935 aStrBuf.append( input, radix );
4937 CPPUNIT_ASSERT_MESSAGE
4939 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4940 aStrBuf.getStr()== expVal &&
4941 aStrBuf.getLength() == expVal.getLength()
4946 void append_059()
4948 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4949 OString expVal( aStrBuf.getStr() );
4950 sal_Int32 input = 8;
4951 sal_Int16 radix = 36;
4953 expVal += OString( "8" );
4954 aStrBuf.append( input, radix );
4956 CPPUNIT_ASSERT_MESSAGE
4958 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4959 aStrBuf.getStr()== expVal &&
4960 aStrBuf.getLength() == expVal.getLength()
4965 void append_060()
4967 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
4968 OString expVal( aStrBuf.getStr() );
4969 sal_Int32 input = 35;
4970 sal_Int16 radix = 36;
4972 expVal += OString( "z" );
4973 aStrBuf.append( input, radix );
4975 CPPUNIT_ASSERT_MESSAGE
4977 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4978 aStrBuf.getStr()== expVal &&
4979 aStrBuf.getLength() == expVal.getLength()
4984 void append_061()
4986 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
4987 OString expVal( aStrBuf.getStr() );
4988 sal_Int32 input = 0;
4989 sal_Int16 radix = 2;
4991 expVal += OString( "0" );
4992 aStrBuf.append( input, radix );
4994 CPPUNIT_ASSERT_MESSAGE
4996 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4997 aStrBuf.getStr()== expVal &&
4998 aStrBuf.getLength() == expVal.getLength()
5003 void append_062()
5005 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5006 OString expVal( aStrBuf.getStr() );
5007 sal_Int32 input = 4;
5008 sal_Int16 radix = 2;
5010 expVal += OString( "100" );
5011 aStrBuf.append( input, radix );
5013 CPPUNIT_ASSERT_MESSAGE
5015 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
5016 aStrBuf.getStr()== expVal &&
5017 aStrBuf.getLength() == expVal.getLength()
5022 void append_063()
5024 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5025 OString expVal( aStrBuf.getStr() );
5026 sal_Int32 input = 8;
5027 sal_Int16 radix = 2;
5029 expVal += OString( "1000" );
5030 aStrBuf.append( input, radix );
5032 CPPUNIT_ASSERT_MESSAGE
5034 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
5035 aStrBuf.getStr()== expVal &&
5036 aStrBuf.getLength() == expVal.getLength()
5041 void append_064()
5043 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5044 OString expVal( aStrBuf.getStr() );
5045 sal_Int32 input = 15;
5046 sal_Int16 radix = 2;
5048 expVal += OString( "1111" );
5049 aStrBuf.append( input, radix );
5051 CPPUNIT_ASSERT_MESSAGE
5053 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
5054 aStrBuf.getStr()== expVal &&
5055 aStrBuf.getLength() == expVal.getLength()
5060 void append_065()
5062 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5063 OString expVal( aStrBuf.getStr() );
5064 sal_Int32 input = 0;
5065 sal_Int16 radix = 8;
5067 expVal += OString( "0" );
5068 aStrBuf.append( input, radix );
5070 CPPUNIT_ASSERT_MESSAGE
5072 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
5073 aStrBuf.getStr()== expVal &&
5074 aStrBuf.getLength() == expVal.getLength()
5079 void append_066()
5081 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5082 OString expVal( aStrBuf.getStr() );
5083 sal_Int32 input = 4;
5084 sal_Int16 radix = 8;
5086 expVal += OString( "4" );
5087 aStrBuf.append( input, radix );
5089 CPPUNIT_ASSERT_MESSAGE
5091 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
5092 aStrBuf.getStr()== expVal &&
5093 aStrBuf.getLength() == expVal.getLength()
5098 void append_067()
5100 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5101 OString expVal( aStrBuf.getStr() );
5102 sal_Int32 input = 8;
5103 sal_Int16 radix = 8;
5105 expVal += OString( "10" );
5106 aStrBuf.append( input, radix );
5108 CPPUNIT_ASSERT_MESSAGE
5110 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
5111 aStrBuf.getStr()== expVal &&
5112 aStrBuf.getLength() == expVal.getLength()
5117 void append_068()
5119 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5120 OString expVal( aStrBuf.getStr() );
5121 sal_Int32 input = 15;
5122 sal_Int16 radix = 8;
5124 expVal += OString( "17" );
5125 aStrBuf.append( input, radix );
5127 CPPUNIT_ASSERT_MESSAGE
5129 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
5130 aStrBuf.getStr()== expVal &&
5131 aStrBuf.getLength() == expVal.getLength()
5136 void append_069()
5138 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5139 OString expVal( aStrBuf.getStr() );
5140 sal_Int32 input = 0;
5141 sal_Int16 radix = 10;
5143 expVal += OString( "0" );
5144 aStrBuf.append( input, radix );
5146 CPPUNIT_ASSERT_MESSAGE
5148 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
5149 aStrBuf.getStr()== expVal &&
5150 aStrBuf.getLength() == expVal.getLength()
5155 void append_070()
5157 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5158 OString expVal( aStrBuf.getStr() );
5159 sal_Int32 input = 4;
5160 sal_Int16 radix = 10;
5162 expVal += OString( "4" );
5163 aStrBuf.append( input, radix );
5165 CPPUNIT_ASSERT_MESSAGE
5167 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
5168 aStrBuf.getStr()== expVal &&
5169 aStrBuf.getLength() == expVal.getLength()
5174 void append_071()
5176 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5177 OString expVal( aStrBuf.getStr() );
5178 sal_Int32 input = 8;
5179 sal_Int16 radix = 10;
5181 expVal += OString( "8" );
5182 aStrBuf.append( input, radix );
5184 CPPUNIT_ASSERT_MESSAGE
5186 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
5187 aStrBuf.getStr()== expVal &&
5188 aStrBuf.getLength() == expVal.getLength()
5193 void append_072()
5195 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5196 OString expVal( aStrBuf.getStr() );
5197 sal_Int32 input = 15;
5198 sal_Int16 radix = 10;
5200 expVal += OString( "15" );
5201 aStrBuf.append( input, radix );
5203 CPPUNIT_ASSERT_MESSAGE
5205 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
5206 aStrBuf.getStr()== expVal &&
5207 aStrBuf.getLength() == expVal.getLength()
5212 void append_073()
5214 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5215 OString expVal( aStrBuf.getStr() );
5216 sal_Int32 input = 0;
5217 sal_Int16 radix = 16;
5219 expVal += OString( "0" );
5220 aStrBuf.append( input, radix );
5222 CPPUNIT_ASSERT_MESSAGE
5224 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
5225 aStrBuf.getStr()== expVal &&
5226 aStrBuf.getLength() == expVal.getLength()
5231 void append_074()
5233 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5234 OString expVal( aStrBuf.getStr() );
5235 sal_Int32 input = 4;
5236 sal_Int16 radix = 16;
5238 expVal += OString( "4" );
5239 aStrBuf.append( input, radix );
5241 CPPUNIT_ASSERT_MESSAGE
5243 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
5244 aStrBuf.getStr()== expVal &&
5245 aStrBuf.getLength() == expVal.getLength()
5250 void append_075()
5252 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5253 OString expVal( aStrBuf.getStr() );
5254 sal_Int32 input = 8;
5255 sal_Int16 radix = 16;
5257 expVal += OString( "8" );
5258 aStrBuf.append( input, radix );
5260 CPPUNIT_ASSERT_MESSAGE
5262 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
5263 aStrBuf.getStr()== expVal &&
5264 aStrBuf.getLength() == expVal.getLength()
5269 void append_076()
5271 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5272 OString expVal( aStrBuf.getStr() );
5273 sal_Int32 input = 15;
5274 sal_Int16 radix = 16;
5276 expVal += OString( "f" );
5277 aStrBuf.append( input, radix );
5279 CPPUNIT_ASSERT_MESSAGE
5281 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
5282 aStrBuf.getStr()== expVal &&
5283 aStrBuf.getLength() == expVal.getLength()
5288 void append_077()
5290 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5291 OString expVal( aStrBuf.getStr() );
5292 sal_Int32 input = 0;
5293 sal_Int16 radix = 36;
5295 expVal += OString( "0" );
5296 aStrBuf.append( input, radix );
5298 CPPUNIT_ASSERT_MESSAGE
5300 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
5301 aStrBuf.getStr()== expVal &&
5302 aStrBuf.getLength() == expVal.getLength()
5307 void append_078()
5309 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5310 OString expVal( aStrBuf.getStr() );
5311 sal_Int32 input = 4;
5312 sal_Int16 radix = 36;
5314 expVal += OString( "4" );
5315 aStrBuf.append( input, radix );
5317 CPPUNIT_ASSERT_MESSAGE
5319 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
5320 aStrBuf.getStr()== expVal &&
5321 aStrBuf.getLength() == expVal.getLength()
5326 void append_079()
5328 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5329 OString expVal( aStrBuf.getStr() );
5330 sal_Int32 input = 8;
5331 sal_Int16 radix = 36;
5333 expVal += OString( "8" );
5334 aStrBuf.append( input, radix );
5336 CPPUNIT_ASSERT_MESSAGE
5338 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
5339 aStrBuf.getStr()== expVal &&
5340 aStrBuf.getLength() == expVal.getLength()
5345 void append_080()
5347 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
5348 OString expVal( aStrBuf.getStr() );
5349 sal_Int32 input = 35;
5350 sal_Int16 radix = 36;
5352 expVal += OString( "z" );
5353 aStrBuf.append( input, radix );
5355 CPPUNIT_ASSERT_MESSAGE
5357 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
5358 aStrBuf.getStr()== expVal &&
5359 aStrBuf.getLength() == expVal.getLength()
5364 void append_081()
5366 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5367 OString expVal( aStrBuf.getStr() );
5368 sal_Int32 input = 0;
5369 sal_Int16 radix = 2;
5371 expVal += OString( "0" );
5372 aStrBuf.append( input, radix );
5374 CPPUNIT_ASSERT_MESSAGE
5376 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
5377 aStrBuf.getStr()== expVal &&
5378 aStrBuf.getLength() == expVal.getLength()
5383 void append_082()
5385 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5386 OString expVal( aStrBuf.getStr() );
5387 sal_Int32 input = 4;
5388 sal_Int16 radix = 2;
5390 expVal += OString( "100" );
5391 aStrBuf.append( input, radix );
5393 CPPUNIT_ASSERT_MESSAGE
5395 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
5396 aStrBuf.getStr()== expVal &&
5397 aStrBuf.getLength() == expVal.getLength()
5402 void append_083()
5404 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5405 OString expVal( aStrBuf.getStr() );
5406 sal_Int32 input = 8;
5407 sal_Int16 radix = 2;
5409 expVal += OString( "1000" );
5410 aStrBuf.append( input, radix );
5412 CPPUNIT_ASSERT_MESSAGE
5414 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
5415 aStrBuf.getStr()== expVal &&
5416 aStrBuf.getLength() == expVal.getLength()
5421 void append_084()
5423 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5424 OString expVal( aStrBuf.getStr() );
5425 sal_Int32 input = 15;
5426 sal_Int16 radix = 2;
5428 expVal += OString( "1111" );
5429 aStrBuf.append( input, radix );
5431 CPPUNIT_ASSERT_MESSAGE
5433 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
5434 aStrBuf.getStr()== expVal &&
5435 aStrBuf.getLength() == expVal.getLength()
5440 void append_085()
5442 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5443 OString expVal( aStrBuf.getStr() );
5444 sal_Int32 input = 0;
5445 sal_Int16 radix = 8;
5447 expVal += OString( "0" );
5448 aStrBuf.append( input, radix );
5450 CPPUNIT_ASSERT_MESSAGE
5452 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
5453 aStrBuf.getStr()== expVal &&
5454 aStrBuf.getLength() == expVal.getLength()
5459 void append_086()
5461 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5462 OString expVal( aStrBuf.getStr() );
5463 sal_Int32 input = 4;
5464 sal_Int16 radix = 8;
5466 expVal += OString( "4" );
5467 aStrBuf.append( input, radix );
5469 CPPUNIT_ASSERT_MESSAGE
5471 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
5472 aStrBuf.getStr()== expVal &&
5473 aStrBuf.getLength() == expVal.getLength()
5478 void append_087()
5480 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5481 OString expVal( aStrBuf.getStr() );
5482 sal_Int32 input = 8;
5483 sal_Int16 radix = 8;
5485 expVal += OString( "10" );
5486 aStrBuf.append( input, radix );
5488 CPPUNIT_ASSERT_MESSAGE
5490 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
5491 aStrBuf.getStr()== expVal &&
5492 aStrBuf.getLength() == expVal.getLength()
5497 void append_088()
5499 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5500 OString expVal( aStrBuf.getStr() );
5501 sal_Int32 input = 15;
5502 sal_Int16 radix = 8;
5504 expVal += OString( "17" );
5505 aStrBuf.append( input, radix );
5507 CPPUNIT_ASSERT_MESSAGE
5509 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
5510 aStrBuf.getStr()== expVal &&
5511 aStrBuf.getLength() == expVal.getLength()
5516 void append_089()
5518 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5519 OString expVal( aStrBuf.getStr() );
5520 sal_Int32 input = 0;
5521 sal_Int16 radix = 10;
5523 expVal += OString( "0" );
5524 aStrBuf.append( input, radix );
5526 CPPUNIT_ASSERT_MESSAGE
5528 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
5529 aStrBuf.getStr()== expVal &&
5530 aStrBuf.getLength() == expVal.getLength()
5535 void append_090()
5537 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5538 OString expVal( aStrBuf.getStr() );
5539 sal_Int32 input = 4;
5540 sal_Int16 radix = 10;
5542 expVal += OString( "4" );
5543 aStrBuf.append( input, radix );
5545 CPPUNIT_ASSERT_MESSAGE
5547 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
5548 aStrBuf.getStr()== expVal &&
5549 aStrBuf.getLength() == expVal.getLength()
5554 void append_091()
5556 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5557 OString expVal( aStrBuf.getStr() );
5558 sal_Int32 input = 8;
5559 sal_Int16 radix = 10;
5561 expVal += OString( "8" );
5562 aStrBuf.append( input, radix );
5564 CPPUNIT_ASSERT_MESSAGE
5566 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
5567 aStrBuf.getStr()== expVal &&
5568 aStrBuf.getLength() == expVal.getLength()
5573 void append_092()
5575 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5576 OString expVal( aStrBuf.getStr() );
5577 sal_Int32 input = 15;
5578 sal_Int16 radix = 10;
5580 expVal += OString( "15" );
5581 aStrBuf.append( input, radix );
5583 CPPUNIT_ASSERT_MESSAGE
5585 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
5586 aStrBuf.getStr()== expVal &&
5587 aStrBuf.getLength() == expVal.getLength()
5592 void append_093()
5594 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5595 OString expVal( aStrBuf.getStr() );
5596 sal_Int32 input = 0;
5597 sal_Int16 radix = 16;
5599 expVal += OString( "0" );
5600 aStrBuf.append( input, radix );
5602 CPPUNIT_ASSERT_MESSAGE
5604 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5605 aStrBuf.getStr()== expVal &&
5606 aStrBuf.getLength() == expVal.getLength()
5611 void append_094()
5613 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5614 OString expVal( aStrBuf.getStr() );
5615 sal_Int32 input = 4;
5616 sal_Int16 radix = 16;
5618 expVal += OString( "4" );
5619 aStrBuf.append( input, radix );
5621 CPPUNIT_ASSERT_MESSAGE
5623 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5624 aStrBuf.getStr()== expVal &&
5625 aStrBuf.getLength() == expVal.getLength()
5630 void append_095()
5632 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5633 OString expVal( aStrBuf.getStr() );
5634 sal_Int32 input = 8;
5635 sal_Int16 radix = 16;
5637 expVal += OString( "8" );
5638 aStrBuf.append( input, radix );
5640 CPPUNIT_ASSERT_MESSAGE
5642 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5643 aStrBuf.getStr()== expVal &&
5644 aStrBuf.getLength() == expVal.getLength()
5649 void append_096()
5651 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5652 OString expVal( aStrBuf.getStr() );
5653 sal_Int32 input = 15;
5654 sal_Int16 radix = 16;
5656 expVal += OString( "f" );
5657 aStrBuf.append( input, radix );
5659 CPPUNIT_ASSERT_MESSAGE
5661 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5662 aStrBuf.getStr()== expVal &&
5663 aStrBuf.getLength() == expVal.getLength()
5668 void append_097()
5670 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5671 OString expVal( aStrBuf.getStr() );
5672 sal_Int32 input = 0;
5673 sal_Int16 radix = 36;
5675 expVal += OString( "0" );
5676 aStrBuf.append( input, radix );
5678 CPPUNIT_ASSERT_MESSAGE
5680 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5681 aStrBuf.getStr()== expVal &&
5682 aStrBuf.getLength() == expVal.getLength()
5687 void append_098()
5689 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5690 OString expVal( aStrBuf.getStr() );
5691 sal_Int32 input = 4;
5692 sal_Int16 radix = 36;
5694 expVal += OString( "4" );
5695 aStrBuf.append( input, radix );
5697 CPPUNIT_ASSERT_MESSAGE
5699 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5700 aStrBuf.getStr()== expVal &&
5701 aStrBuf.getLength() == expVal.getLength()
5706 void append_099()
5708 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5709 OString expVal( aStrBuf.getStr() );
5710 sal_Int32 input = 8;
5711 sal_Int16 radix = 36;
5713 expVal += OString( "8" );
5714 aStrBuf.append( input, radix );
5716 CPPUNIT_ASSERT_MESSAGE
5718 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5719 aStrBuf.getStr()== expVal &&
5720 aStrBuf.getLength() == expVal.getLength()
5725 void append_100()
5727 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
5728 OString expVal( aStrBuf.getStr() );
5729 sal_Int32 input = 35;
5730 sal_Int16 radix = 36;
5732 expVal += OString( "z" );
5733 aStrBuf.append( input, radix );
5735 CPPUNIT_ASSERT_MESSAGE
5737 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5738 aStrBuf.getStr()== expVal &&
5739 aStrBuf.getLength() == expVal.getLength()
5744 CPPUNIT_TEST_SUITE( append_006_Int32 );
5745 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
5746 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
5747 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
5748 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
5749 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
5750 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
5751 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
5752 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
5753 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
5754 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
5755 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
5756 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
5757 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
5758 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
5759 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
5760 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
5761 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
5762 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
5763 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
5764 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
5765 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
5766 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
5767 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
5768 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
5769 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
5770 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
5771 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
5772 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
5773 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
5774 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
5775 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
5776 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
5777 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
5778 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
5779 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
5780 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
5781 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
5782 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
5783 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
5784 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
5785 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
5786 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
5787 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
5788 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
5789 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
5790 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
5791 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
5792 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
5793 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
5794 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
5795 CPPUNIT_TEST_SUITE_END();
5797 //------------------------------------------------------------------------
5798 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
5799 // where i = large constants
5800 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
5801 // where i = large constants
5802 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
5803 // where i = large constants
5804 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
5805 // where i = large constants
5806 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
5807 // where i = large constants
5808 //------------------------------------------------------------------------
5809 class append_006_Int32_Bounderies : public CppUnit::TestFixture
5811 OString* arrOUS[5];
5813 public:
5814 void setUp()
5816 arrOUS[0] = new OString( kTestStr7 );
5817 arrOUS[1] = new OString( );
5818 arrOUS[2] = new OString( kTestStr25 );
5819 arrOUS[3] = new OString( "\0" );
5820 arrOUS[4] = new OString( kTestStr28 );
5824 void tearDown()
5826 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
5827 delete arrOUS[3]; delete arrOUS[4];
5830 void append_001()
5832 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5833 OString expVal( aStrBuf.getStr() );
5834 sal_Int32 input = kSInt8Max;
5835 sal_Int16 radix = 2;
5837 expVal += OString( "1111111" );
5838 aStrBuf.append( input, radix );
5840 CPPUNIT_ASSERT_MESSAGE
5842 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5843 aStrBuf.getStr()== expVal &&
5844 aStrBuf.getLength() == expVal.getLength()
5849 void append_002()
5851 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5852 OString expVal( aStrBuf.getStr() );
5853 sal_Int32 input = kSInt32Max;
5854 sal_Int16 radix = 2;
5856 expVal += OString( "1111111111111111111111111111111" );
5857 aStrBuf.append( input, radix );
5859 CPPUNIT_ASSERT_MESSAGE
5861 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5862 aStrBuf.getStr()== expVal &&
5863 aStrBuf.getLength() == expVal.getLength()
5868 void append_003()
5870 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5871 OString expVal( aStrBuf.getStr() );
5872 sal_Int32 input = kSInt8Max;
5873 sal_Int16 radix = 8;
5875 expVal += OString( "177" );
5876 aStrBuf.append( input, radix );
5878 CPPUNIT_ASSERT_MESSAGE
5880 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5881 aStrBuf.getStr()== expVal &&
5882 aStrBuf.getLength() == expVal.getLength()
5887 void append_004()
5889 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5890 OString expVal( aStrBuf.getStr() );
5891 sal_Int32 input = kSInt32Max;
5892 sal_Int16 radix = 8;
5894 expVal += OString( "17777777777" );
5895 aStrBuf.append( input, radix );
5897 CPPUNIT_ASSERT_MESSAGE
5899 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5900 aStrBuf.getStr()== expVal &&
5901 aStrBuf.getLength() == expVal.getLength()
5906 void append_005()
5908 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5909 OString expVal( aStrBuf.getStr() );
5910 sal_Int32 input = kSInt8Max;
5911 sal_Int16 radix = 10;
5913 expVal += OString( "127" );
5914 aStrBuf.append( input, radix );
5916 CPPUNIT_ASSERT_MESSAGE
5918 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5919 aStrBuf.getStr()== expVal &&
5920 aStrBuf.getLength() == expVal.getLength()
5925 void append_006()
5927 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5928 OString expVal( aStrBuf.getStr() );
5929 sal_Int32 input = kSInt32Max;
5930 sal_Int16 radix = 10;
5932 expVal += OString( "2147483647" );
5933 aStrBuf.append( input, radix );
5935 CPPUNIT_ASSERT_MESSAGE
5937 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5938 aStrBuf.getStr()== expVal &&
5939 aStrBuf.getLength() == expVal.getLength()
5944 void append_007()
5946 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5947 OString expVal( aStrBuf.getStr() );
5948 sal_Int32 input = kSInt8Max;
5949 sal_Int16 radix = 16;
5951 expVal += OString( "7f" );
5952 aStrBuf.append( input, radix );
5954 CPPUNIT_ASSERT_MESSAGE
5956 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5957 aStrBuf.getStr()== expVal &&
5958 aStrBuf.getLength() == expVal.getLength()
5963 void append_008()
5965 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5966 OString expVal( aStrBuf.getStr() );
5967 sal_Int32 input = kSInt32Max;
5968 sal_Int16 radix = 16;
5970 expVal += OString( "7fffffff" );
5971 aStrBuf.append( input, radix );
5973 CPPUNIT_ASSERT_MESSAGE
5975 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5976 aStrBuf.getStr()== expVal &&
5977 aStrBuf.getLength() == expVal.getLength()
5982 void append_009()
5984 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
5985 OString expVal( aStrBuf.getStr() );
5986 sal_Int32 input = kSInt8Max;
5987 sal_Int16 radix = 36;
5989 expVal += OString( "3j" );
5990 aStrBuf.append( input, radix );
5992 CPPUNIT_ASSERT_MESSAGE
5994 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5995 aStrBuf.getStr()== expVal &&
5996 aStrBuf.getLength() == expVal.getLength()
6001 void append_010()
6003 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6004 OString expVal( aStrBuf.getStr() );
6005 sal_Int32 input = kSInt32Max;
6006 sal_Int16 radix = 36;
6008 expVal += OString( "zik0zj" );
6009 aStrBuf.append( input, radix );
6011 CPPUNIT_ASSERT_MESSAGE
6013 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
6014 aStrBuf.getStr()== expVal &&
6015 aStrBuf.getLength() == expVal.getLength()
6020 void append_011()
6022 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6023 OString expVal( aStrBuf.getStr() );
6024 sal_Int32 input = kSInt8Max;
6025 sal_Int16 radix = 2;
6027 expVal += OString( "1111111" );
6028 aStrBuf.append( input, radix );
6030 CPPUNIT_ASSERT_MESSAGE
6032 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
6033 aStrBuf.getStr()== expVal &&
6034 aStrBuf.getLength() == expVal.getLength()
6039 void append_012()
6041 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6042 OString expVal( aStrBuf.getStr() );
6043 sal_Int32 input = kSInt32Max;
6044 sal_Int16 radix = 2;
6046 expVal += OString( "1111111111111111111111111111111" );
6047 aStrBuf.append( input, radix );
6049 CPPUNIT_ASSERT_MESSAGE
6051 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
6052 aStrBuf.getStr()== expVal &&
6053 aStrBuf.getLength() == expVal.getLength()
6058 void append_013()
6060 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6061 OString expVal( aStrBuf.getStr() );
6062 sal_Int32 input = kSInt8Max;
6063 sal_Int16 radix = 8;
6065 expVal += OString( "177" );
6066 aStrBuf.append( input, radix );
6068 CPPUNIT_ASSERT_MESSAGE
6070 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
6071 aStrBuf.getStr()== expVal &&
6072 aStrBuf.getLength() == expVal.getLength()
6077 void append_014()
6079 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6080 OString expVal( aStrBuf.getStr() );
6081 sal_Int32 input = kSInt32Max;
6082 sal_Int16 radix = 8;
6084 expVal += OString( "17777777777" );
6085 aStrBuf.append( input, radix );
6087 CPPUNIT_ASSERT_MESSAGE
6089 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
6090 aStrBuf.getStr()== expVal &&
6091 aStrBuf.getLength() == expVal.getLength()
6096 void append_015()
6098 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6099 OString expVal( aStrBuf.getStr() );
6100 sal_Int32 input = kSInt8Max;
6101 sal_Int16 radix = 10;
6103 expVal += OString( "127" );
6104 aStrBuf.append( input, radix );
6106 CPPUNIT_ASSERT_MESSAGE
6108 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
6109 aStrBuf.getStr()== expVal &&
6110 aStrBuf.getLength() == expVal.getLength()
6115 void append_016()
6117 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6118 OString expVal( aStrBuf.getStr() );
6119 sal_Int32 input = kSInt32Max;
6120 sal_Int16 radix = 10;
6122 expVal += OString( "2147483647" );
6123 aStrBuf.append( input, radix );
6125 CPPUNIT_ASSERT_MESSAGE
6127 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
6128 aStrBuf.getStr()== expVal &&
6129 aStrBuf.getLength() == expVal.getLength()
6134 void append_017()
6136 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6137 OString expVal( aStrBuf.getStr() );
6138 sal_Int32 input = kSInt8Max;
6139 sal_Int16 radix = 16;
6141 expVal += OString( "7f" );
6142 aStrBuf.append( input, radix );
6144 CPPUNIT_ASSERT_MESSAGE
6146 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
6147 aStrBuf.getStr()== expVal &&
6148 aStrBuf.getLength() == expVal.getLength()
6153 void append_018()
6155 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6156 OString expVal( aStrBuf.getStr() );
6157 sal_Int32 input = kSInt32Max;
6158 sal_Int16 radix = 16;
6160 expVal += OString( "7fffffff" );
6161 aStrBuf.append( input, radix );
6163 CPPUNIT_ASSERT_MESSAGE
6165 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
6166 aStrBuf.getStr()== expVal &&
6167 aStrBuf.getLength() == expVal.getLength()
6172 void append_019()
6174 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6175 OString expVal( aStrBuf.getStr() );
6176 sal_Int32 input = kSInt8Max;
6177 sal_Int16 radix = 36;
6179 expVal += OString( "3j" );
6180 aStrBuf.append( input, radix );
6182 CPPUNIT_ASSERT_MESSAGE
6184 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
6185 aStrBuf.getStr()== expVal &&
6186 aStrBuf.getLength() == expVal.getLength()
6191 void append_020()
6193 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
6194 OString expVal( aStrBuf.getStr() );
6195 sal_Int32 input = kSInt32Max;
6196 sal_Int16 radix = 36;
6198 expVal += OString( "zik0zj" );
6199 aStrBuf.append( input, radix );
6201 CPPUNIT_ASSERT_MESSAGE
6203 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
6204 aStrBuf.getStr()== expVal &&
6205 aStrBuf.getLength() == expVal.getLength()
6210 void append_021()
6212 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6213 OString expVal( aStrBuf.getStr() );
6214 sal_Int32 input = kSInt8Max;
6215 sal_Int16 radix = 2;
6217 expVal += OString( "1111111" );
6218 aStrBuf.append( input, radix );
6220 CPPUNIT_ASSERT_MESSAGE
6222 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
6223 aStrBuf.getStr()== expVal &&
6224 aStrBuf.getLength() == expVal.getLength()
6229 void append_022()
6231 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6232 OString expVal( aStrBuf.getStr() );
6233 sal_Int32 input = kSInt32Max;
6234 sal_Int16 radix = 2;
6236 expVal += OString( "1111111111111111111111111111111" );
6237 aStrBuf.append( input, radix );
6239 CPPUNIT_ASSERT_MESSAGE
6241 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
6242 aStrBuf.getStr()== expVal &&
6243 aStrBuf.getLength() == expVal.getLength()
6248 void append_023()
6250 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6251 OString expVal( aStrBuf.getStr() );
6252 sal_Int32 input = kSInt8Max;
6253 sal_Int16 radix = 8;
6255 expVal += OString( "177" );
6256 aStrBuf.append( input, radix );
6258 CPPUNIT_ASSERT_MESSAGE
6260 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
6261 aStrBuf.getStr()== expVal &&
6262 aStrBuf.getLength() == expVal.getLength()
6267 void append_024()
6269 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6270 OString expVal( aStrBuf.getStr() );
6271 sal_Int32 input = kSInt32Max;
6272 sal_Int16 radix = 8;
6274 expVal += OString( "17777777777" );
6275 aStrBuf.append( input, radix );
6277 CPPUNIT_ASSERT_MESSAGE
6279 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
6280 aStrBuf.getStr()== expVal &&
6281 aStrBuf.getLength() == expVal.getLength()
6286 void append_025()
6288 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6289 OString expVal( aStrBuf.getStr() );
6290 sal_Int32 input = kSInt8Max;
6291 sal_Int16 radix = 10;
6293 expVal += OString( "127" );
6294 aStrBuf.append( input, radix );
6296 CPPUNIT_ASSERT_MESSAGE
6298 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
6299 aStrBuf.getStr()== expVal &&
6300 aStrBuf.getLength() == expVal.getLength()
6305 void append_026()
6307 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6308 OString expVal( aStrBuf.getStr() );
6309 sal_Int32 input = kSInt32Max;
6310 sal_Int16 radix = 10;
6312 expVal += OString( "2147483647" );
6313 aStrBuf.append( input, radix );
6315 CPPUNIT_ASSERT_MESSAGE
6317 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
6318 aStrBuf.getStr()== expVal &&
6319 aStrBuf.getLength() == expVal.getLength()
6324 void append_027()
6326 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6327 OString expVal( aStrBuf.getStr() );
6328 sal_Int32 input = kSInt8Max;
6329 sal_Int16 radix = 16;
6331 expVal += OString( "7f" );
6332 aStrBuf.append( input, radix );
6334 CPPUNIT_ASSERT_MESSAGE
6336 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
6337 aStrBuf.getStr()== expVal &&
6338 aStrBuf.getLength() == expVal.getLength()
6343 void append_028()
6345 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6346 OString expVal( aStrBuf.getStr() );
6347 sal_Int32 input = kSInt32Max;
6348 sal_Int16 radix = 16;
6350 expVal += OString( "7fffffff" );
6351 aStrBuf.append( input, radix );
6353 CPPUNIT_ASSERT_MESSAGE
6355 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
6356 aStrBuf.getStr()== expVal &&
6357 aStrBuf.getLength() == expVal.getLength()
6362 void append_029()
6364 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6365 OString expVal( aStrBuf.getStr() );
6366 sal_Int32 input = kSInt8Max;
6367 sal_Int16 radix = 36;
6369 expVal += OString( "3j" );
6370 aStrBuf.append( input, radix );
6372 CPPUNIT_ASSERT_MESSAGE
6374 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
6375 aStrBuf.getStr()== expVal &&
6376 aStrBuf.getLength() == expVal.getLength()
6381 void append_030()
6383 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
6384 OString expVal( aStrBuf.getStr() );
6385 sal_Int32 input = kSInt32Max;
6386 sal_Int16 radix = 36;
6388 expVal += OString( "zik0zj" );
6389 aStrBuf.append( input, radix );
6391 CPPUNIT_ASSERT_MESSAGE
6393 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
6394 aStrBuf.getStr()== expVal &&
6395 aStrBuf.getLength() == expVal.getLength()
6400 void append_031()
6402 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6403 OString expVal( aStrBuf.getStr() );
6404 sal_Int32 input = kSInt8Max;
6405 sal_Int16 radix = 2;
6407 expVal += OString( "1111111" );
6408 aStrBuf.append( input, radix );
6410 CPPUNIT_ASSERT_MESSAGE
6412 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
6413 aStrBuf.getStr()== expVal &&
6414 aStrBuf.getLength() == expVal.getLength()
6419 void append_032()
6421 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6422 OString expVal( aStrBuf.getStr() );
6423 sal_Int32 input = kSInt32Max;
6424 sal_Int16 radix = 2;
6426 expVal += OString( "1111111111111111111111111111111" );
6427 aStrBuf.append( input, radix );
6429 CPPUNIT_ASSERT_MESSAGE
6431 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
6432 aStrBuf.getStr()== expVal &&
6433 aStrBuf.getLength() == expVal.getLength()
6438 void append_033()
6440 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6441 OString expVal( aStrBuf.getStr() );
6442 sal_Int32 input = kSInt8Max;
6443 sal_Int16 radix = 8;
6445 expVal += OString( "177" );
6446 aStrBuf.append( input, radix );
6448 CPPUNIT_ASSERT_MESSAGE
6450 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
6451 aStrBuf.getStr()== expVal &&
6452 aStrBuf.getLength() == expVal.getLength()
6457 void append_034()
6459 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6460 OString expVal( aStrBuf.getStr() );
6461 sal_Int32 input = kSInt32Max;
6462 sal_Int16 radix = 8;
6464 expVal += OString( "17777777777" );
6465 aStrBuf.append( input, radix );
6467 CPPUNIT_ASSERT_MESSAGE
6469 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
6470 aStrBuf.getStr()== expVal &&
6471 aStrBuf.getLength() == expVal.getLength()
6476 void append_035()
6478 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6479 OString expVal( aStrBuf.getStr() );
6480 sal_Int32 input = kSInt8Max;
6481 sal_Int16 radix = 10;
6483 expVal += OString( "127" );
6484 aStrBuf.append( input, radix );
6486 CPPUNIT_ASSERT_MESSAGE
6488 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
6489 aStrBuf.getStr()== expVal &&
6490 aStrBuf.getLength() == expVal.getLength()
6495 void append_036()
6497 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6498 OString expVal( aStrBuf.getStr() );
6499 sal_Int32 input = kSInt32Max;
6500 sal_Int16 radix = 10;
6502 expVal += OString( "2147483647" );
6503 aStrBuf.append( input, radix );
6505 CPPUNIT_ASSERT_MESSAGE
6507 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
6508 aStrBuf.getStr()== expVal &&
6509 aStrBuf.getLength() == expVal.getLength()
6514 void append_037()
6516 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6517 OString expVal( aStrBuf.getStr() );
6518 sal_Int32 input = kSInt8Max;
6519 sal_Int16 radix = 16;
6521 expVal += OString( "7f" );
6522 aStrBuf.append( input, radix );
6524 CPPUNIT_ASSERT_MESSAGE
6526 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
6527 aStrBuf.getStr()== expVal &&
6528 aStrBuf.getLength() == expVal.getLength()
6533 void append_038()
6535 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6536 OString expVal( aStrBuf.getStr() );
6537 sal_Int32 input = kSInt32Max;
6538 sal_Int16 radix = 16;
6540 expVal += OString( "7fffffff" );
6541 aStrBuf.append( input, radix );
6543 CPPUNIT_ASSERT_MESSAGE
6545 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
6546 aStrBuf.getStr()== expVal &&
6547 aStrBuf.getLength() == expVal.getLength()
6552 void append_039()
6554 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6555 OString expVal( aStrBuf.getStr() );
6556 sal_Int32 input = kSInt8Max;
6557 sal_Int16 radix = 36;
6559 expVal += OString( "3j" );
6560 aStrBuf.append( input, radix );
6562 CPPUNIT_ASSERT_MESSAGE
6564 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
6565 aStrBuf.getStr()== expVal &&
6566 aStrBuf.getLength() == expVal.getLength()
6571 void append_040()
6573 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
6574 OString expVal( aStrBuf.getStr() );
6575 sal_Int32 input = kSInt32Max;
6576 sal_Int16 radix = 36;
6578 expVal += OString( "zik0zj" );
6579 aStrBuf.append( input, radix );
6581 CPPUNIT_ASSERT_MESSAGE
6583 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
6584 aStrBuf.getStr()== expVal &&
6585 aStrBuf.getLength() == expVal.getLength()
6590 void append_041()
6592 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6593 OString expVal( aStrBuf.getStr() );
6594 sal_Int32 input = kSInt8Max;
6595 sal_Int16 radix = 2;
6597 expVal += OString( "1111111" );
6598 aStrBuf.append( input, radix );
6600 CPPUNIT_ASSERT_MESSAGE
6602 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
6603 aStrBuf.getStr()== expVal &&
6604 aStrBuf.getLength() == expVal.getLength()
6609 void append_042()
6611 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6612 OString expVal( aStrBuf.getStr() );
6613 sal_Int32 input = kSInt32Max;
6614 sal_Int16 radix = 2;
6616 expVal += OString( "1111111111111111111111111111111" );
6617 aStrBuf.append( input, radix );
6619 CPPUNIT_ASSERT_MESSAGE
6621 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
6622 aStrBuf.getStr()== expVal &&
6623 aStrBuf.getLength() == expVal.getLength()
6628 void append_043()
6630 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6631 OString expVal( aStrBuf.getStr() );
6632 sal_Int32 input = kSInt8Max;
6633 sal_Int16 radix = 8;
6635 expVal += OString( "177" );
6636 aStrBuf.append( input, radix );
6638 CPPUNIT_ASSERT_MESSAGE
6640 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
6641 aStrBuf.getStr()== expVal &&
6642 aStrBuf.getLength() == expVal.getLength()
6647 void append_044()
6649 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6650 OString expVal( aStrBuf.getStr() );
6651 sal_Int32 input = kSInt32Max;
6652 sal_Int16 radix = 8;
6654 expVal += OString( "17777777777" );
6655 aStrBuf.append( input, radix );
6657 CPPUNIT_ASSERT_MESSAGE
6659 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
6660 aStrBuf.getStr()== expVal &&
6661 aStrBuf.getLength() == expVal.getLength()
6666 void append_045()
6668 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6669 OString expVal( aStrBuf.getStr() );
6670 sal_Int32 input = kSInt8Max;
6671 sal_Int16 radix = 10;
6673 expVal += OString( "127" );
6674 aStrBuf.append( input, radix );
6676 CPPUNIT_ASSERT_MESSAGE
6678 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
6679 aStrBuf.getStr()== expVal &&
6680 aStrBuf.getLength() == expVal.getLength()
6685 void append_046()
6687 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6688 OString expVal( aStrBuf.getStr() );
6689 sal_Int32 input = kSInt32Max;
6690 sal_Int16 radix = 10;
6692 expVal += OString( "2147483647" );
6693 aStrBuf.append( input, radix );
6695 CPPUNIT_ASSERT_MESSAGE
6697 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
6698 aStrBuf.getStr()== expVal &&
6699 aStrBuf.getLength() == expVal.getLength()
6704 void append_047()
6706 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6707 OString expVal( aStrBuf.getStr() );
6708 sal_Int32 input = kSInt8Max;
6709 sal_Int16 radix = 16;
6711 expVal += OString( "7f" );
6712 aStrBuf.append( input, radix );
6714 CPPUNIT_ASSERT_MESSAGE
6716 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
6717 aStrBuf.getStr()== expVal &&
6718 aStrBuf.getLength() == expVal.getLength()
6723 void append_048()
6725 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6726 OString expVal( aStrBuf.getStr() );
6727 sal_Int32 input = kSInt32Max;
6728 sal_Int16 radix = 16;
6730 expVal += OString( "7fffffff" );
6731 aStrBuf.append( input, radix );
6733 CPPUNIT_ASSERT_MESSAGE
6735 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
6736 aStrBuf.getStr()== expVal &&
6737 aStrBuf.getLength() == expVal.getLength()
6742 void append_049()
6744 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6745 OString expVal( aStrBuf.getStr() );
6746 sal_Int32 input = kSInt8Max;
6747 sal_Int16 radix = 36;
6749 expVal += OString( "3j" );
6750 aStrBuf.append( input, radix );
6752 CPPUNIT_ASSERT_MESSAGE
6754 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
6755 aStrBuf.getStr()== expVal &&
6756 aStrBuf.getLength() == expVal.getLength()
6761 void append_050()
6763 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
6764 OString expVal( aStrBuf.getStr() );
6765 sal_Int32 input = kSInt32Max;
6766 sal_Int16 radix = 36;
6768 expVal += OString( "zik0zj" );
6769 aStrBuf.append( input, radix );
6771 CPPUNIT_ASSERT_MESSAGE
6773 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
6774 aStrBuf.getStr()== expVal &&
6775 aStrBuf.getLength() == expVal.getLength()
6780 CPPUNIT_TEST_SUITE( append_006_Int32_Bounderies );
6781 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
6782 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
6783 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
6784 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
6785 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
6786 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
6787 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
6788 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
6789 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
6790 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
6791 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
6792 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
6793 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
6794 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
6795 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
6796 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
6797 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
6798 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
6799 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
6800 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
6801 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
6802 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
6803 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
6804 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
6805 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
6806 CPPUNIT_TEST_SUITE_END();
6808 //------------------------------------------------------------------------
6809 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
6810 // for negative value
6811 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
6812 // for negative value
6813 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
6814 // for negative value
6815 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
6816 // for negative value
6817 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
6818 // for negative value
6819 //------------------------------------------------------------------------
6820 class append_006_Int32_Negative : public CppUnit::TestFixture
6822 OString* arrOUS[5];
6824 public:
6825 void setUp()
6827 arrOUS[0] = new OString( kTestStr7 );
6828 arrOUS[1] = new OString( );
6829 arrOUS[2] = new OString( kTestStr25 );
6830 arrOUS[3] = new OString( "\0" );
6831 arrOUS[4] = new OString( kTestStr28 );
6835 void tearDown()
6837 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
6838 delete arrOUS[3]; delete arrOUS[4];
6841 void append_001()
6843 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6844 OString expVal( aStrBuf.getStr() );
6845 sal_Int32 input = -0;
6846 sal_Int16 radix = 2;
6848 expVal += OString( "0" );
6849 aStrBuf.append( input, radix );
6851 CPPUNIT_ASSERT_MESSAGE
6853 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6854 aStrBuf.getStr()== expVal &&
6855 aStrBuf.getLength() == expVal.getLength()
6860 void append_002()
6862 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6863 OString expVal( aStrBuf.getStr() );
6864 sal_Int32 input = -4;
6865 sal_Int16 radix = 2;
6867 expVal += OString( "-" );
6868 expVal += OString( "100" );
6869 aStrBuf.append( input, radix );
6871 CPPUNIT_ASSERT_MESSAGE
6873 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6874 aStrBuf.getStr()== expVal &&
6875 aStrBuf.getLength() == expVal.getLength()
6880 void append_003()
6882 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6883 OString expVal( aStrBuf.getStr() );
6884 sal_Int32 input = -8;
6885 sal_Int16 radix = 2;
6887 expVal += OString( "-" );
6888 expVal += OString( "1000" );
6889 aStrBuf.append( input, radix );
6891 CPPUNIT_ASSERT_MESSAGE
6893 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6894 aStrBuf.getStr()== expVal &&
6895 aStrBuf.getLength() == expVal.getLength()
6900 void append_004()
6902 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6903 OString expVal( aStrBuf.getStr() );
6904 sal_Int32 input = -15;
6905 sal_Int16 radix = 2;
6907 expVal += OString( "-" );
6908 expVal += OString( "1111" );
6909 aStrBuf.append( input, radix );
6911 CPPUNIT_ASSERT_MESSAGE
6913 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6914 aStrBuf.getStr()== expVal &&
6915 aStrBuf.getLength() == expVal.getLength()
6920 void append_005()
6922 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6923 OString expVal( aStrBuf.getStr() );
6924 sal_Int32 input = -0;
6925 sal_Int16 radix = 8;
6927 expVal += OString( "0" );
6928 aStrBuf.append( input, radix );
6930 CPPUNIT_ASSERT_MESSAGE
6932 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6933 aStrBuf.getStr()== expVal &&
6934 aStrBuf.getLength() == expVal.getLength()
6939 void append_006()
6941 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6942 OString expVal( aStrBuf.getStr() );
6943 sal_Int32 input = -4;
6944 sal_Int16 radix = 8;
6946 expVal += OString( "-" );
6947 expVal += OString( "4" );
6948 aStrBuf.append( input, radix );
6950 CPPUNIT_ASSERT_MESSAGE
6952 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6953 aStrBuf.getStr()== expVal &&
6954 aStrBuf.getLength() == expVal.getLength()
6959 void append_007()
6961 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6962 OString expVal( aStrBuf.getStr() );
6963 sal_Int32 input = -8;
6964 sal_Int16 radix = 8;
6966 expVal += OString( "-" );
6967 expVal += OString( "10" );
6968 aStrBuf.append( input, radix );
6970 CPPUNIT_ASSERT_MESSAGE
6972 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6973 aStrBuf.getStr()== expVal &&
6974 aStrBuf.getLength() == expVal.getLength()
6979 void append_008()
6981 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
6982 OString expVal( aStrBuf.getStr() );
6983 sal_Int32 input = -15;
6984 sal_Int16 radix = 8;
6986 expVal += OString( "-" );
6987 expVal += OString( "17" );
6988 aStrBuf.append( input, radix );
6990 CPPUNIT_ASSERT_MESSAGE
6992 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6993 aStrBuf.getStr()== expVal &&
6994 aStrBuf.getLength() == expVal.getLength()
6999 void append_009()
7001 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7002 OString expVal( aStrBuf.getStr() );
7003 sal_Int32 input = -0;
7004 sal_Int16 radix = 10;
7006 expVal += OString( "0" );
7007 aStrBuf.append( input, radix );
7009 CPPUNIT_ASSERT_MESSAGE
7011 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
7012 aStrBuf.getStr()== expVal &&
7013 aStrBuf.getLength() == expVal.getLength()
7018 void append_010()
7020 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7021 OString expVal( aStrBuf.getStr() );
7022 sal_Int32 input = -4;
7023 sal_Int16 radix = 10;
7025 expVal += OString( "-" );
7026 expVal += OString( "4" );
7027 aStrBuf.append( input, radix );
7029 CPPUNIT_ASSERT_MESSAGE
7031 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
7032 aStrBuf.getStr()== expVal &&
7033 aStrBuf.getLength() == expVal.getLength()
7038 void append_011()
7040 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7041 OString expVal( aStrBuf.getStr() );
7042 sal_Int32 input = -8;
7043 sal_Int16 radix = 10;
7045 expVal += OString( "-" );
7046 expVal += OString( "8" );
7047 aStrBuf.append( input, radix );
7049 CPPUNIT_ASSERT_MESSAGE
7051 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
7052 aStrBuf.getStr()== expVal &&
7053 aStrBuf.getLength() == expVal.getLength()
7058 void append_012()
7060 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7061 OString expVal( aStrBuf.getStr() );
7062 sal_Int32 input = -15;
7063 sal_Int16 radix = 10;
7065 expVal += OString( "-" );
7066 expVal += OString( "15" );
7067 aStrBuf.append( input, radix );
7069 CPPUNIT_ASSERT_MESSAGE
7071 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
7072 aStrBuf.getStr()== expVal &&
7073 aStrBuf.getLength() == expVal.getLength()
7078 void append_013()
7080 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7081 OString expVal( aStrBuf.getStr() );
7082 sal_Int32 input = -0;
7083 sal_Int16 radix = 16;
7085 expVal += OString( "0" );
7086 aStrBuf.append( input, radix );
7088 CPPUNIT_ASSERT_MESSAGE
7090 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
7091 aStrBuf.getStr()== expVal &&
7092 aStrBuf.getLength() == expVal.getLength()
7097 void append_014()
7099 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7100 OString expVal( aStrBuf.getStr() );
7101 sal_Int32 input = -4;
7102 sal_Int16 radix = 16;
7104 expVal += OString( "-" );
7105 expVal += OString( "4" );
7106 aStrBuf.append( input, radix );
7108 CPPUNIT_ASSERT_MESSAGE
7110 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
7111 aStrBuf.getStr()== expVal &&
7112 aStrBuf.getLength() == expVal.getLength()
7117 void append_015()
7119 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7120 OString expVal( aStrBuf.getStr() );
7121 sal_Int32 input = -8;
7122 sal_Int16 radix = 16;
7124 expVal += OString( "-" );
7125 expVal += OString( "8" );
7126 aStrBuf.append( input, radix );
7128 CPPUNIT_ASSERT_MESSAGE
7130 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
7131 aStrBuf.getStr()== expVal &&
7132 aStrBuf.getLength() == expVal.getLength()
7137 void append_016()
7139 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7140 OString expVal( aStrBuf.getStr() );
7141 sal_Int32 input = -15;
7142 sal_Int16 radix = 16;
7144 expVal += OString( "-" );
7145 expVal += OString( "f" );
7146 aStrBuf.append( input, radix );
7148 CPPUNIT_ASSERT_MESSAGE
7150 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
7151 aStrBuf.getStr()== expVal &&
7152 aStrBuf.getLength() == expVal.getLength()
7157 void append_017()
7159 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7160 OString expVal( aStrBuf.getStr() );
7161 sal_Int32 input = -0;
7162 sal_Int16 radix = 36;
7164 expVal += OString( "0" );
7165 aStrBuf.append( input, radix );
7167 CPPUNIT_ASSERT_MESSAGE
7169 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
7170 aStrBuf.getStr()== expVal &&
7171 aStrBuf.getLength() == expVal.getLength()
7176 void append_018()
7178 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7179 OString expVal( aStrBuf.getStr() );
7180 sal_Int32 input = -4;
7181 sal_Int16 radix = 36;
7183 expVal += OString( "-" );
7184 expVal += OString( "4" );
7185 aStrBuf.append( input, radix );
7187 CPPUNIT_ASSERT_MESSAGE
7189 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
7190 aStrBuf.getStr()== expVal &&
7191 aStrBuf.getLength() == expVal.getLength()
7196 void append_019()
7198 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7199 OString expVal( aStrBuf.getStr() );
7200 sal_Int32 input = -8;
7201 sal_Int16 radix = 36;
7203 expVal += OString( "-" );
7204 expVal += OString( "8" );
7205 aStrBuf.append( input, radix );
7207 CPPUNIT_ASSERT_MESSAGE
7209 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
7210 aStrBuf.getStr()== expVal &&
7211 aStrBuf.getLength() == expVal.getLength()
7216 void append_020()
7218 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
7219 OString expVal( aStrBuf.getStr() );
7220 sal_Int32 input = -35;
7221 sal_Int16 radix = 36;
7223 expVal += OString( "-" );
7224 expVal += OString( "z" );
7225 aStrBuf.append( input, radix );
7227 CPPUNIT_ASSERT_MESSAGE
7229 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
7230 aStrBuf.getStr()== expVal &&
7231 aStrBuf.getLength() == expVal.getLength()
7236 void append_021()
7238 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7239 OString expVal( aStrBuf.getStr() );
7240 sal_Int32 input = -0;
7241 sal_Int16 radix = 2;
7243 expVal += OString( "0" );
7244 aStrBuf.append( input, radix );
7246 CPPUNIT_ASSERT_MESSAGE
7248 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
7249 aStrBuf.getStr()== expVal &&
7250 aStrBuf.getLength() == expVal.getLength()
7255 void append_022()
7257 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7258 OString expVal( aStrBuf.getStr() );
7259 sal_Int32 input = -4;
7260 sal_Int16 radix = 2;
7262 expVal += OString( "-" );
7263 expVal += OString( "100" );
7264 aStrBuf.append( input, radix );
7266 CPPUNIT_ASSERT_MESSAGE
7268 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
7269 aStrBuf.getStr()== expVal &&
7270 aStrBuf.getLength() == expVal.getLength()
7275 void append_023()
7277 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7278 OString expVal( aStrBuf.getStr() );
7279 sal_Int32 input = -8;
7280 sal_Int16 radix = 2;
7282 expVal += OString( "-" );
7283 expVal += OString( "1000" );
7284 aStrBuf.append( input, radix );
7286 CPPUNIT_ASSERT_MESSAGE
7288 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
7289 aStrBuf.getStr()== expVal &&
7290 aStrBuf.getLength() == expVal.getLength()
7295 void append_024()
7297 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7298 OString expVal( aStrBuf.getStr() );
7299 sal_Int32 input = -15;
7300 sal_Int16 radix = 2;
7302 expVal += OString( "-" );
7303 expVal += OString( "1111" );
7304 aStrBuf.append( input, radix );
7306 CPPUNIT_ASSERT_MESSAGE
7308 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
7309 aStrBuf.getStr()== expVal &&
7310 aStrBuf.getLength() == expVal.getLength()
7315 void append_025()
7317 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7318 OString expVal( aStrBuf.getStr() );
7319 sal_Int32 input = -0;
7320 sal_Int16 radix = 8;
7322 expVal += OString( "0" );
7323 aStrBuf.append( input, radix );
7325 CPPUNIT_ASSERT_MESSAGE
7327 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
7328 aStrBuf.getStr()== expVal &&
7329 aStrBuf.getLength() == expVal.getLength()
7334 void append_026()
7336 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7337 OString expVal( aStrBuf.getStr() );
7338 sal_Int32 input = -4;
7339 sal_Int16 radix = 8;
7341 expVal += OString( "-" );
7342 expVal += OString( "4" );
7343 aStrBuf.append( input, radix );
7345 CPPUNIT_ASSERT_MESSAGE
7347 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
7348 aStrBuf.getStr()== expVal &&
7349 aStrBuf.getLength() == expVal.getLength()
7354 void append_027()
7356 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7357 OString expVal( aStrBuf.getStr() );
7358 sal_Int32 input = -8;
7359 sal_Int16 radix = 8;
7361 expVal += OString( "-" );
7362 expVal += OString( "10" );
7363 aStrBuf.append( input, radix );
7365 CPPUNIT_ASSERT_MESSAGE
7367 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
7368 aStrBuf.getStr()== expVal &&
7369 aStrBuf.getLength() == expVal.getLength()
7374 void append_028()
7376 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7377 OString expVal( aStrBuf.getStr() );
7378 sal_Int32 input = -15;
7379 sal_Int16 radix = 8;
7381 expVal += OString( "-" );
7382 expVal += OString( "17" );
7383 aStrBuf.append( input, radix );
7385 CPPUNIT_ASSERT_MESSAGE
7387 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
7388 aStrBuf.getStr()== expVal &&
7389 aStrBuf.getLength() == expVal.getLength()
7394 void append_029()
7396 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7397 OString expVal( aStrBuf.getStr() );
7398 sal_Int32 input = -0;
7399 sal_Int16 radix = 10;
7401 expVal += OString( "0" );
7402 aStrBuf.append( input, radix );
7404 CPPUNIT_ASSERT_MESSAGE
7406 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
7407 aStrBuf.getStr()== expVal &&
7408 aStrBuf.getLength() == expVal.getLength()
7413 void append_030()
7415 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7416 OString expVal( aStrBuf.getStr() );
7417 sal_Int32 input = -4;
7418 sal_Int16 radix = 10;
7420 expVal += OString( "-" );
7421 expVal += OString( "4" );
7422 aStrBuf.append( input, radix );
7424 CPPUNIT_ASSERT_MESSAGE
7426 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
7427 aStrBuf.getStr()== expVal &&
7428 aStrBuf.getLength() == expVal.getLength()
7433 void append_031()
7435 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7436 OString expVal( aStrBuf.getStr() );
7437 sal_Int32 input = -8;
7438 sal_Int16 radix = 10;
7440 expVal += OString( "-" );
7441 expVal += OString( "8" );
7442 aStrBuf.append( input, radix );
7444 CPPUNIT_ASSERT_MESSAGE
7446 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
7447 aStrBuf.getStr()== expVal &&
7448 aStrBuf.getLength() == expVal.getLength()
7453 void append_032()
7455 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7456 OString expVal( aStrBuf.getStr() );
7457 sal_Int32 input = -15;
7458 sal_Int16 radix = 10;
7460 expVal += OString( "-" );
7461 expVal += OString( "15" );
7462 aStrBuf.append( input, radix );
7464 CPPUNIT_ASSERT_MESSAGE
7466 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
7467 aStrBuf.getStr()== expVal &&
7468 aStrBuf.getLength() == expVal.getLength()
7473 void append_033()
7475 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7476 OString expVal( aStrBuf.getStr() );
7477 sal_Int32 input = -0;
7478 sal_Int16 radix = 16;
7480 expVal += OString( "0" );
7481 aStrBuf.append( input, radix );
7483 CPPUNIT_ASSERT_MESSAGE
7485 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
7486 aStrBuf.getStr()== expVal &&
7487 aStrBuf.getLength() == expVal.getLength()
7492 void append_034()
7494 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7495 OString expVal( aStrBuf.getStr() );
7496 sal_Int32 input = -4;
7497 sal_Int16 radix = 16;
7499 expVal += OString( "-" );
7500 expVal += OString( "4" );
7501 aStrBuf.append( input, radix );
7503 CPPUNIT_ASSERT_MESSAGE
7505 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
7506 aStrBuf.getStr()== expVal &&
7507 aStrBuf.getLength() == expVal.getLength()
7512 void append_035()
7514 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7515 OString expVal( aStrBuf.getStr() );
7516 sal_Int32 input = -8;
7517 sal_Int16 radix = 16;
7519 expVal += OString( "-" );
7520 expVal += OString( "8" );
7521 aStrBuf.append( input, radix );
7523 CPPUNIT_ASSERT_MESSAGE
7525 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
7526 aStrBuf.getStr()== expVal &&
7527 aStrBuf.getLength() == expVal.getLength()
7532 void append_036()
7534 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7535 OString expVal( aStrBuf.getStr() );
7536 sal_Int32 input = -15;
7537 sal_Int16 radix = 16;
7539 expVal += OString( "-" );
7540 expVal += OString( "f" );
7541 aStrBuf.append( input, radix );
7543 CPPUNIT_ASSERT_MESSAGE
7545 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
7546 aStrBuf.getStr()== expVal &&
7547 aStrBuf.getLength() == expVal.getLength()
7552 void append_037()
7554 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7555 OString expVal( aStrBuf.getStr() );
7556 sal_Int32 input = -0;
7557 sal_Int16 radix = 36;
7559 expVal += OString( "0" );
7560 aStrBuf.append( input, radix );
7562 CPPUNIT_ASSERT_MESSAGE
7564 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7565 aStrBuf.getStr()== expVal &&
7566 aStrBuf.getLength() == expVal.getLength()
7571 void append_038()
7573 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7574 OString expVal( aStrBuf.getStr() );
7575 sal_Int32 input = -4;
7576 sal_Int16 radix = 36;
7578 expVal += OString( "-" );
7579 expVal += OString( "4" );
7580 aStrBuf.append( input, radix );
7582 CPPUNIT_ASSERT_MESSAGE
7584 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7585 aStrBuf.getStr()== expVal &&
7586 aStrBuf.getLength() == expVal.getLength()
7591 void append_039()
7593 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7594 OString expVal( aStrBuf.getStr() );
7595 sal_Int32 input = -8;
7596 sal_Int16 radix = 36;
7598 expVal += OString( "-" );
7599 expVal += OString( "8" );
7600 aStrBuf.append( input, radix );
7602 CPPUNIT_ASSERT_MESSAGE
7604 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7605 aStrBuf.getStr()== expVal &&
7606 aStrBuf.getLength() == expVal.getLength()
7611 void append_040()
7613 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
7614 OString expVal( aStrBuf.getStr() );
7615 sal_Int32 input = -35;
7616 sal_Int16 radix = 36;
7618 expVal += OString( "-" );
7619 expVal += OString( "z" );
7620 aStrBuf.append( input, radix );
7622 CPPUNIT_ASSERT_MESSAGE
7624 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7625 aStrBuf.getStr()== expVal &&
7626 aStrBuf.getLength() == expVal.getLength()
7631 void append_041()
7633 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7634 OString expVal( aStrBuf.getStr() );
7635 sal_Int32 input = -0;
7636 sal_Int16 radix = 2;
7638 expVal += OString( "0" );
7639 aStrBuf.append( input, radix );
7641 CPPUNIT_ASSERT_MESSAGE
7643 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7644 aStrBuf.getStr()== expVal &&
7645 aStrBuf.getLength() == expVal.getLength()
7650 void append_042()
7652 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7653 OString expVal( aStrBuf.getStr() );
7654 sal_Int32 input = -4;
7655 sal_Int16 radix = 2;
7657 expVal += OString( "-" );
7658 expVal += OString( "100" );
7659 aStrBuf.append( input, radix );
7661 CPPUNIT_ASSERT_MESSAGE
7663 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7664 aStrBuf.getStr()== expVal &&
7665 aStrBuf.getLength() == expVal.getLength()
7670 void append_043()
7672 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7673 OString expVal( aStrBuf.getStr() );
7674 sal_Int32 input = -8;
7675 sal_Int16 radix = 2;
7677 expVal += OString( "-" );
7678 expVal += OString( "1000" );
7679 aStrBuf.append( input, radix );
7681 CPPUNIT_ASSERT_MESSAGE
7683 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7684 aStrBuf.getStr()== expVal &&
7685 aStrBuf.getLength() == expVal.getLength()
7690 void append_044()
7692 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7693 OString expVal( aStrBuf.getStr() );
7694 sal_Int32 input = -15;
7695 sal_Int16 radix = 2;
7697 expVal += OString( "-" );
7698 expVal += OString( "1111" );
7699 aStrBuf.append( input, radix );
7701 CPPUNIT_ASSERT_MESSAGE
7703 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7704 aStrBuf.getStr()== expVal &&
7705 aStrBuf.getLength() == expVal.getLength()
7710 void append_045()
7712 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7713 OString expVal( aStrBuf.getStr() );
7714 sal_Int32 input = -0;
7715 sal_Int16 radix = 8;
7717 expVal += OString( "0" );
7718 aStrBuf.append( input, radix );
7720 CPPUNIT_ASSERT_MESSAGE
7722 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7723 aStrBuf.getStr()== expVal &&
7724 aStrBuf.getLength() == expVal.getLength()
7729 void append_046()
7731 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7732 OString expVal( aStrBuf.getStr() );
7733 sal_Int32 input = -4;
7734 sal_Int16 radix = 8;
7736 expVal += OString( "-" );
7737 expVal += OString( "4" );
7738 aStrBuf.append( input, radix );
7740 CPPUNIT_ASSERT_MESSAGE
7742 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7743 aStrBuf.getStr()== expVal &&
7744 aStrBuf.getLength() == expVal.getLength()
7749 void append_047()
7751 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7752 OString expVal( aStrBuf.getStr() );
7753 sal_Int32 input = -8;
7754 sal_Int16 radix = 8;
7756 expVal += OString( "-" );
7757 expVal += OString( "10" );
7758 aStrBuf.append( input, radix );
7760 CPPUNIT_ASSERT_MESSAGE
7762 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7763 aStrBuf.getStr()== expVal &&
7764 aStrBuf.getLength() == expVal.getLength()
7769 void append_048()
7771 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7772 OString expVal( aStrBuf.getStr() );
7773 sal_Int32 input = -15;
7774 sal_Int16 radix = 8;
7776 expVal += OString( "-" );
7777 expVal += OString( "17" );
7778 aStrBuf.append( input, radix );
7780 CPPUNIT_ASSERT_MESSAGE
7782 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7783 aStrBuf.getStr()== expVal &&
7784 aStrBuf.getLength() == expVal.getLength()
7789 void append_049()
7791 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7792 OString expVal( aStrBuf.getStr() );
7793 sal_Int32 input = -0;
7794 sal_Int16 radix = 10;
7796 expVal += OString( "0" );
7797 aStrBuf.append( input, radix );
7799 CPPUNIT_ASSERT_MESSAGE
7801 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7802 aStrBuf.getStr()== expVal &&
7803 aStrBuf.getLength() == expVal.getLength()
7808 void append_050()
7810 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7811 OString expVal( aStrBuf.getStr() );
7812 sal_Int32 input = -4;
7813 sal_Int16 radix = 10;
7815 expVal += OString( "-" );
7816 expVal += OString( "4" );
7817 aStrBuf.append( input, radix );
7819 CPPUNIT_ASSERT_MESSAGE
7821 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7822 aStrBuf.getStr()== expVal &&
7823 aStrBuf.getLength() == expVal.getLength()
7828 void append_051()
7830 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7831 OString expVal( aStrBuf.getStr() );
7832 sal_Int32 input = -8;
7833 sal_Int16 radix = 10;
7835 expVal += OString( "-" );
7836 expVal += OString( "8" );
7837 aStrBuf.append( input, radix );
7839 CPPUNIT_ASSERT_MESSAGE
7841 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7842 aStrBuf.getStr()== expVal &&
7843 aStrBuf.getLength() == expVal.getLength()
7848 void append_052()
7850 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7851 OString expVal( aStrBuf.getStr() );
7852 sal_Int32 input = -15;
7853 sal_Int16 radix = 10;
7855 expVal += OString( "-" );
7856 expVal += OString( "15" );
7857 aStrBuf.append( input, radix );
7859 CPPUNIT_ASSERT_MESSAGE
7861 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7862 aStrBuf.getStr()== expVal &&
7863 aStrBuf.getLength() == expVal.getLength()
7868 void append_053()
7870 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7871 OString expVal( aStrBuf.getStr() );
7872 sal_Int32 input = -0;
7873 sal_Int16 radix = 16;
7875 expVal += OString( "0" );
7876 aStrBuf.append( input, radix );
7878 CPPUNIT_ASSERT_MESSAGE
7880 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7881 aStrBuf.getStr()== expVal &&
7882 aStrBuf.getLength() == expVal.getLength()
7887 void append_054()
7889 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7890 OString expVal( aStrBuf.getStr() );
7891 sal_Int32 input = -4;
7892 sal_Int16 radix = 16;
7894 expVal += OString( "-" );
7895 expVal += OString( "4" );
7896 aStrBuf.append( input, radix );
7898 CPPUNIT_ASSERT_MESSAGE
7900 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7901 aStrBuf.getStr()== expVal &&
7902 aStrBuf.getLength() == expVal.getLength()
7907 void append_055()
7909 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7910 OString expVal( aStrBuf.getStr() );
7911 sal_Int32 input = -8;
7912 sal_Int16 radix = 16;
7914 expVal += OString( "-" );
7915 expVal += OString( "8" );
7916 aStrBuf.append( input, radix );
7918 CPPUNIT_ASSERT_MESSAGE
7920 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7921 aStrBuf.getStr()== expVal &&
7922 aStrBuf.getLength() == expVal.getLength()
7927 void append_056()
7929 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7930 OString expVal( aStrBuf.getStr() );
7931 sal_Int32 input = -15;
7932 sal_Int16 radix = 16;
7934 expVal += OString( "-" );
7935 expVal += OString( "f" );
7936 aStrBuf.append( input, radix );
7938 CPPUNIT_ASSERT_MESSAGE
7940 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7941 aStrBuf.getStr()== expVal &&
7942 aStrBuf.getLength() == expVal.getLength()
7947 void append_057()
7949 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7950 OString expVal( aStrBuf.getStr() );
7951 sal_Int32 input = -0;
7952 sal_Int16 radix = 36;
7954 expVal += OString( "0" );
7955 aStrBuf.append( input, radix );
7957 CPPUNIT_ASSERT_MESSAGE
7959 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7960 aStrBuf.getStr()== expVal &&
7961 aStrBuf.getLength() == expVal.getLength()
7966 void append_058()
7968 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7969 OString expVal( aStrBuf.getStr() );
7970 sal_Int32 input = -4;
7971 sal_Int16 radix = 36;
7973 expVal += OString( "-" );
7974 expVal += OString( "4" );
7975 aStrBuf.append( input, radix );
7977 CPPUNIT_ASSERT_MESSAGE
7979 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7980 aStrBuf.getStr()== expVal &&
7981 aStrBuf.getLength() == expVal.getLength()
7986 void append_059()
7988 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
7989 OString expVal( aStrBuf.getStr() );
7990 sal_Int32 input = -8;
7991 sal_Int16 radix = 36;
7993 expVal += OString( "-" );
7994 expVal += OString( "8" );
7995 aStrBuf.append( input, radix );
7997 CPPUNIT_ASSERT_MESSAGE
7999 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
8000 aStrBuf.getStr()== expVal &&
8001 aStrBuf.getLength() == expVal.getLength()
8006 void append_060()
8008 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8009 OString expVal( aStrBuf.getStr() );
8010 sal_Int32 input = -35;
8011 sal_Int16 radix = 36;
8013 expVal += OString( "-" );
8014 expVal += OString( "z" );
8015 aStrBuf.append( input, radix );
8017 CPPUNIT_ASSERT_MESSAGE
8019 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
8020 aStrBuf.getStr()== expVal &&
8021 aStrBuf.getLength() == expVal.getLength()
8026 void append_061()
8028 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8029 OString expVal( aStrBuf.getStr() );
8030 sal_Int32 input = -0;
8031 sal_Int16 radix = 2;
8033 expVal += OString( "0" );
8034 aStrBuf.append( input, radix );
8036 CPPUNIT_ASSERT_MESSAGE
8038 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
8039 aStrBuf.getStr()== expVal &&
8040 aStrBuf.getLength() == expVal.getLength()
8045 void append_062()
8047 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8048 OString expVal( aStrBuf.getStr() );
8049 sal_Int32 input = -4;
8050 sal_Int16 radix = 2;
8052 expVal += OString( "-" );
8053 expVal += OString( "100" );
8054 aStrBuf.append( input, radix );
8056 CPPUNIT_ASSERT_MESSAGE
8058 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
8059 aStrBuf.getStr()== expVal &&
8060 aStrBuf.getLength() == expVal.getLength()
8065 void append_063()
8067 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8068 OString expVal( aStrBuf.getStr() );
8069 sal_Int32 input = -8;
8070 sal_Int16 radix = 2;
8072 expVal += OString( "-" );
8073 expVal += OString( "1000" );
8074 aStrBuf.append( input, radix );
8076 CPPUNIT_ASSERT_MESSAGE
8078 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
8079 aStrBuf.getStr()== expVal &&
8080 aStrBuf.getLength() == expVal.getLength()
8085 void append_064()
8087 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8088 OString expVal( aStrBuf.getStr() );
8089 sal_Int32 input = -15;
8090 sal_Int16 radix = 2;
8092 expVal += OString( "-" );
8093 expVal += OString( "1111" );
8094 aStrBuf.append( input, radix );
8096 CPPUNIT_ASSERT_MESSAGE
8098 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
8099 aStrBuf.getStr()== expVal &&
8100 aStrBuf.getLength() == expVal.getLength()
8105 void append_065()
8107 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8108 OString expVal( aStrBuf.getStr() );
8109 sal_Int32 input = -0;
8110 sal_Int16 radix = 8;
8112 expVal += OString( "0" );
8113 aStrBuf.append( input, radix );
8115 CPPUNIT_ASSERT_MESSAGE
8117 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
8118 aStrBuf.getStr()== expVal &&
8119 aStrBuf.getLength() == expVal.getLength()
8124 void append_066()
8126 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8127 OString expVal( aStrBuf.getStr() );
8128 sal_Int32 input = -4;
8129 sal_Int16 radix = 8;
8131 expVal += OString( "-" );
8132 expVal += OString( "4" );
8133 aStrBuf.append( input, radix );
8135 CPPUNIT_ASSERT_MESSAGE
8137 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
8138 aStrBuf.getStr()== expVal &&
8139 aStrBuf.getLength() == expVal.getLength()
8144 void append_067()
8146 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8147 OString expVal( aStrBuf.getStr() );
8148 sal_Int32 input = -8;
8149 sal_Int16 radix = 8;
8151 expVal += OString( "-" );
8152 expVal += OString( "10" );
8153 aStrBuf.append( input, radix );
8155 CPPUNIT_ASSERT_MESSAGE
8157 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
8158 aStrBuf.getStr()== expVal &&
8159 aStrBuf.getLength() == expVal.getLength()
8164 void append_068()
8166 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8167 OString expVal( aStrBuf.getStr() );
8168 sal_Int32 input = -15;
8169 sal_Int16 radix = 8;
8171 expVal += OString( "-" );
8172 expVal += OString( "17" );
8173 aStrBuf.append( input, radix );
8175 CPPUNIT_ASSERT_MESSAGE
8177 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
8178 aStrBuf.getStr()== expVal &&
8179 aStrBuf.getLength() == expVal.getLength()
8184 void append_069()
8186 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8187 OString expVal( aStrBuf.getStr() );
8188 sal_Int32 input = -0;
8189 sal_Int16 radix = 10;
8191 expVal += OString( "0" );
8192 aStrBuf.append( input, radix );
8194 CPPUNIT_ASSERT_MESSAGE
8196 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
8197 aStrBuf.getStr()== expVal &&
8198 aStrBuf.getLength() == expVal.getLength()
8203 void append_070()
8205 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8206 OString expVal( aStrBuf.getStr() );
8207 sal_Int32 input = -4;
8208 sal_Int16 radix = 10;
8210 expVal += OString( "-" );
8211 expVal += OString( "4" );
8212 aStrBuf.append( input, radix );
8214 CPPUNIT_ASSERT_MESSAGE
8216 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
8217 aStrBuf.getStr()== expVal &&
8218 aStrBuf.getLength() == expVal.getLength()
8223 void append_071()
8225 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8226 OString expVal( aStrBuf.getStr() );
8227 sal_Int32 input = -8;
8228 sal_Int16 radix = 10;
8230 expVal += OString( "-" );
8231 expVal += OString( "8" );
8232 aStrBuf.append( input, radix );
8234 CPPUNIT_ASSERT_MESSAGE
8236 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
8237 aStrBuf.getStr()== expVal &&
8238 aStrBuf.getLength() == expVal.getLength()
8243 void append_072()
8245 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8246 OString expVal( aStrBuf.getStr() );
8247 sal_Int32 input = -15;
8248 sal_Int16 radix = 10;
8250 expVal += OString( "-" );
8251 expVal += OString( "15" );
8252 aStrBuf.append( input, radix );
8254 CPPUNIT_ASSERT_MESSAGE
8256 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
8257 aStrBuf.getStr()== expVal &&
8258 aStrBuf.getLength() == expVal.getLength()
8263 void append_073()
8265 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8266 OString expVal( aStrBuf.getStr() );
8267 sal_Int32 input = -0;
8268 sal_Int16 radix = 16;
8270 expVal += OString( "0" );
8271 aStrBuf.append( input, radix );
8273 CPPUNIT_ASSERT_MESSAGE
8275 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
8276 aStrBuf.getStr()== expVal &&
8277 aStrBuf.getLength() == expVal.getLength()
8282 void append_074()
8284 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8285 OString expVal( aStrBuf.getStr() );
8286 sal_Int32 input = -4;
8287 sal_Int16 radix = 16;
8289 expVal += OString( "-" );
8290 expVal += OString( "4" );
8291 aStrBuf.append( input, radix );
8293 CPPUNIT_ASSERT_MESSAGE
8295 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
8296 aStrBuf.getStr()== expVal &&
8297 aStrBuf.getLength() == expVal.getLength()
8302 void append_075()
8304 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8305 OString expVal( aStrBuf.getStr() );
8306 sal_Int32 input = -8;
8307 sal_Int16 radix = 16;
8309 expVal += OString( "-" );
8310 expVal += OString( "8" );
8311 aStrBuf.append( input, radix );
8313 CPPUNIT_ASSERT_MESSAGE
8315 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
8316 aStrBuf.getStr()== expVal &&
8317 aStrBuf.getLength() == expVal.getLength()
8322 void append_076()
8324 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8325 OString expVal( aStrBuf.getStr() );
8326 sal_Int32 input = -15;
8327 sal_Int16 radix = 16;
8329 expVal += OString( "-" );
8330 expVal += OString( "f" );
8331 aStrBuf.append( input, radix );
8333 CPPUNIT_ASSERT_MESSAGE
8335 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
8336 aStrBuf.getStr()== expVal &&
8337 aStrBuf.getLength() == expVal.getLength()
8342 void append_077()
8344 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8345 OString expVal( aStrBuf.getStr() );
8346 sal_Int32 input = -0;
8347 sal_Int16 radix = 36;
8349 expVal += OString( "0" );
8350 aStrBuf.append( input, radix );
8352 CPPUNIT_ASSERT_MESSAGE
8354 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
8355 aStrBuf.getStr()== expVal &&
8356 aStrBuf.getLength() == expVal.getLength()
8361 void append_078()
8363 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8364 OString expVal( aStrBuf.getStr() );
8365 sal_Int32 input = -4;
8366 sal_Int16 radix = 36;
8368 expVal += OString( "-" );
8369 expVal += OString( "4" );
8370 aStrBuf.append( input, radix );
8372 CPPUNIT_ASSERT_MESSAGE
8374 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
8375 aStrBuf.getStr()== expVal &&
8376 aStrBuf.getLength() == expVal.getLength()
8381 void append_079()
8383 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8384 OString expVal( aStrBuf.getStr() );
8385 sal_Int32 input = -8;
8386 sal_Int16 radix = 36;
8388 expVal += OString( "-" );
8389 expVal += OString( "8" );
8390 aStrBuf.append( input, radix );
8392 CPPUNIT_ASSERT_MESSAGE
8394 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
8395 aStrBuf.getStr()== expVal &&
8396 aStrBuf.getLength() == expVal.getLength()
8401 void append_080()
8403 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8404 OString expVal( aStrBuf.getStr() );
8405 sal_Int32 input = -35;
8406 sal_Int16 radix = 36;
8408 expVal += OString( "-" );
8409 expVal += OString( "z" );
8410 aStrBuf.append( input, radix );
8412 CPPUNIT_ASSERT_MESSAGE
8414 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
8415 aStrBuf.getStr()== expVal &&
8416 aStrBuf.getLength() == expVal.getLength()
8421 void append_081()
8423 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8424 OString expVal( aStrBuf.getStr() );
8425 sal_Int32 input = -0;
8426 sal_Int16 radix = 2;
8428 expVal += OString( "0" );
8429 aStrBuf.append( input, radix );
8431 CPPUNIT_ASSERT_MESSAGE
8433 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
8434 aStrBuf.getStr()== expVal &&
8435 aStrBuf.getLength() == expVal.getLength()
8440 void append_082()
8442 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8443 OString expVal( aStrBuf.getStr() );
8444 sal_Int32 input = -4;
8445 sal_Int16 radix = 2;
8447 expVal += OString( "-" );
8448 expVal += OString( "100" );
8449 aStrBuf.append( input, radix );
8451 CPPUNIT_ASSERT_MESSAGE
8453 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
8454 aStrBuf.getStr()== expVal &&
8455 aStrBuf.getLength() == expVal.getLength()
8460 void append_083()
8462 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8463 OString expVal( aStrBuf.getStr() );
8464 sal_Int32 input = -8;
8465 sal_Int16 radix = 2;
8467 expVal += OString( "-" );
8468 expVal += OString( "1000" );
8469 aStrBuf.append( input, radix );
8471 CPPUNIT_ASSERT_MESSAGE
8473 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
8474 aStrBuf.getStr()== expVal &&
8475 aStrBuf.getLength() == expVal.getLength()
8480 void append_084()
8482 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8483 OString expVal( aStrBuf.getStr() );
8484 sal_Int32 input = -15;
8485 sal_Int16 radix = 2;
8487 expVal += OString( "-" );
8488 expVal += OString( "1111" );
8489 aStrBuf.append( input, radix );
8491 CPPUNIT_ASSERT_MESSAGE
8493 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
8494 aStrBuf.getStr()== expVal &&
8495 aStrBuf.getLength() == expVal.getLength()
8500 void append_085()
8502 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8503 OString expVal( aStrBuf.getStr() );
8504 sal_Int32 input = -0;
8505 sal_Int16 radix = 8;
8507 expVal += OString( "0" );
8508 aStrBuf.append( input, radix );
8510 CPPUNIT_ASSERT_MESSAGE
8512 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
8513 aStrBuf.getStr()== expVal &&
8514 aStrBuf.getLength() == expVal.getLength()
8519 void append_086()
8521 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8522 OString expVal( aStrBuf.getStr() );
8523 sal_Int32 input = -4;
8524 sal_Int16 radix = 8;
8526 expVal += OString( "-" );
8527 expVal += OString( "4" );
8528 aStrBuf.append( input, radix );
8530 CPPUNIT_ASSERT_MESSAGE
8532 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
8533 aStrBuf.getStr()== expVal &&
8534 aStrBuf.getLength() == expVal.getLength()
8539 void append_087()
8541 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8542 OString expVal( aStrBuf.getStr() );
8543 sal_Int32 input = -8;
8544 sal_Int16 radix = 8;
8546 expVal += OString( "-" );
8547 expVal += OString( "10" );
8548 aStrBuf.append( input, radix );
8550 CPPUNIT_ASSERT_MESSAGE
8552 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
8553 aStrBuf.getStr()== expVal &&
8554 aStrBuf.getLength() == expVal.getLength()
8559 void append_088()
8561 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8562 OString expVal( aStrBuf.getStr() );
8563 sal_Int32 input = -15;
8564 sal_Int16 radix = 8;
8566 expVal += OString( "-" );
8567 expVal += OString( "17" );
8568 aStrBuf.append( input, radix );
8570 CPPUNIT_ASSERT_MESSAGE
8572 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
8573 aStrBuf.getStr()== expVal &&
8574 aStrBuf.getLength() == expVal.getLength()
8579 void append_089()
8581 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8582 OString expVal( aStrBuf.getStr() );
8583 sal_Int32 input = -0;
8584 sal_Int16 radix = 10;
8586 expVal += OString( "0" );
8587 aStrBuf.append( input, radix );
8589 CPPUNIT_ASSERT_MESSAGE
8591 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8592 aStrBuf.getStr()== expVal &&
8593 aStrBuf.getLength() == expVal.getLength()
8598 void append_090()
8600 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8601 OString expVal( aStrBuf.getStr() );
8602 sal_Int32 input = -4;
8603 sal_Int16 radix = 10;
8605 expVal += OString( "-" );
8606 expVal += OString( "4" );
8607 aStrBuf.append( input, radix );
8609 CPPUNIT_ASSERT_MESSAGE
8611 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8612 aStrBuf.getStr()== expVal &&
8613 aStrBuf.getLength() == expVal.getLength()
8618 void append_091()
8620 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8621 OString expVal( aStrBuf.getStr() );
8622 sal_Int32 input = -8;
8623 sal_Int16 radix = 10;
8625 expVal += OString( "-" );
8626 expVal += OString( "8" );
8627 aStrBuf.append( input, radix );
8629 CPPUNIT_ASSERT_MESSAGE
8631 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8632 aStrBuf.getStr()== expVal &&
8633 aStrBuf.getLength() == expVal.getLength()
8638 void append_092()
8640 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8641 OString expVal( aStrBuf.getStr() );
8642 sal_Int32 input = -15;
8643 sal_Int16 radix = 10;
8645 expVal += OString( "-" );
8646 expVal += OString( "15" );
8647 aStrBuf.append( input, radix );
8649 CPPUNIT_ASSERT_MESSAGE
8651 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8652 aStrBuf.getStr()== expVal &&
8653 aStrBuf.getLength() == expVal.getLength()
8658 void append_093()
8660 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8661 OString expVal( aStrBuf.getStr() );
8662 sal_Int32 input = -0;
8663 sal_Int16 radix = 16;
8665 expVal += OString( "0" );
8666 aStrBuf.append( input, radix );
8668 CPPUNIT_ASSERT_MESSAGE
8670 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8671 aStrBuf.getStr()== expVal &&
8672 aStrBuf.getLength() == expVal.getLength()
8677 void append_094()
8679 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8680 OString expVal( aStrBuf.getStr() );
8681 sal_Int32 input = -4;
8682 sal_Int16 radix = 16;
8684 expVal += OString( "-" );
8685 expVal += OString( "4" );
8686 aStrBuf.append( input, radix );
8688 CPPUNIT_ASSERT_MESSAGE
8690 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8691 aStrBuf.getStr()== expVal &&
8692 aStrBuf.getLength() == expVal.getLength()
8697 void append_095()
8699 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8700 OString expVal( aStrBuf.getStr() );
8701 sal_Int32 input = -8;
8702 sal_Int16 radix = 16;
8704 expVal += OString( "-" );
8705 expVal += OString( "8" );
8706 aStrBuf.append( input, radix );
8708 CPPUNIT_ASSERT_MESSAGE
8710 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8711 aStrBuf.getStr()== expVal &&
8712 aStrBuf.getLength() == expVal.getLength()
8717 void append_096()
8719 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8720 OString expVal( aStrBuf.getStr() );
8721 sal_Int32 input = -15;
8722 sal_Int16 radix = 16;
8724 expVal += OString( "-" );
8725 expVal += OString( "f" );
8726 aStrBuf.append( input, radix );
8728 CPPUNIT_ASSERT_MESSAGE
8730 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8731 aStrBuf.getStr()== expVal &&
8732 aStrBuf.getLength() == expVal.getLength()
8737 void append_097()
8739 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8740 OString expVal( aStrBuf.getStr() );
8741 sal_Int32 input = -0;
8742 sal_Int16 radix = 36;
8744 expVal += OString( "0" );
8745 aStrBuf.append( input, radix );
8747 CPPUNIT_ASSERT_MESSAGE
8749 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8750 aStrBuf.getStr()== expVal &&
8751 aStrBuf.getLength() == expVal.getLength()
8756 void append_098()
8758 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8759 OString expVal( aStrBuf.getStr() );
8760 sal_Int32 input = -4;
8761 sal_Int16 radix = 36;
8763 expVal += OString( "-" );
8764 expVal += OString( "4" );
8765 aStrBuf.append( input, radix );
8767 CPPUNIT_ASSERT_MESSAGE
8769 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8770 aStrBuf.getStr()== expVal &&
8771 aStrBuf.getLength() == expVal.getLength()
8776 void append_099()
8778 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8779 OString expVal( aStrBuf.getStr() );
8780 sal_Int32 input = -8;
8781 sal_Int16 radix = 36;
8783 expVal += OString( "-" );
8784 expVal += OString( "8" );
8785 aStrBuf.append( input, radix );
8787 CPPUNIT_ASSERT_MESSAGE
8789 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8790 aStrBuf.getStr()== expVal &&
8791 aStrBuf.getLength() == expVal.getLength()
8796 void append_100()
8798 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8799 OString expVal( aStrBuf.getStr() );
8800 sal_Int32 input = -35;
8801 sal_Int16 radix = 36;
8803 expVal += OString( "-" );
8804 expVal += OString( "z" );
8805 aStrBuf.append( input, radix );
8807 CPPUNIT_ASSERT_MESSAGE
8809 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8810 aStrBuf.getStr()== expVal &&
8811 aStrBuf.getLength() == expVal.getLength()
8816 CPPUNIT_TEST_SUITE( append_006_Int32_Negative );
8817 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
8818 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
8819 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
8820 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
8821 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
8822 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
8823 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
8824 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
8825 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
8826 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
8827 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
8828 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
8829 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
8830 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
8831 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
8832 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
8833 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
8834 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
8835 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
8836 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
8837 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
8838 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
8839 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
8840 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
8841 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
8842 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
8843 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
8844 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
8845 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
8846 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
8847 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
8848 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
8849 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
8850 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
8851 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
8852 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
8853 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
8854 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
8855 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
8856 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
8857 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
8858 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
8859 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
8860 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
8861 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
8862 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
8863 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
8864 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
8865 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
8866 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
8867 CPPUNIT_TEST_SUITE_END();
8869 //------------------------------------------------------------------------
8870 // testing the method append( sal_Int32 i, sal_Int16 radix ) where radix = -5
8871 //------------------------------------------------------------------------
8872 class append_006_Int32_WrongRadix : public CppUnit::TestFixture
8874 OString* arrOUS[5];
8875 sal_Int32 intVal;
8877 public:
8878 void setUp()
8880 arrOUS[0] = new OString( kTestStr7 );
8881 arrOUS[1] = new OString( );
8882 arrOUS[2] = new OString( kTestStr25 );
8883 arrOUS[3] = new OString( "\0" );
8884 arrOUS[4] = new OString( kTestStr28 );
8885 intVal = 11;
8889 void tearDown()
8891 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
8892 delete arrOUS[3]; delete arrOUS[4];
8895 void append_001()
8897 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
8898 OString expVal( kTestStr59 );
8900 aStrBuf.append( intVal, -5 );
8902 CPPUNIT_ASSERT_MESSAGE
8904 "Appends the WrongRadix to the string buffer arrOUS[0]",
8905 sal_True
8910 void append_002()
8912 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
8913 OString expVal( kTestStr60 );
8915 aStrBuf.append( intVal, -5 );
8917 CPPUNIT_ASSERT_MESSAGE
8919 "Appends the WrongRadix to the string buffer arrOUS[1]",
8920 sal_True
8925 void append_003()
8927 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
8928 OString expVal( kTestStr60 );
8930 aStrBuf.append( intVal, -5 );
8932 CPPUNIT_ASSERT_MESSAGE
8934 "Appends the WrongRadix to the string buffer arrOUS[2]",
8935 sal_True
8940 void append_004()
8942 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
8943 OString expVal( kTestStr60 );
8945 aStrBuf.append( intVal, -5 );
8947 CPPUNIT_ASSERT_MESSAGE
8949 "Appends the WrongRadix to the string buffer arrOUS[3]",
8950 sal_True
8955 void append_005()
8957 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
8958 OString expVal( kTestStr61 );
8960 aStrBuf.append( intVal, -5 );
8962 CPPUNIT_ASSERT_MESSAGE
8964 "Appends the WrongRadix to the string buffer arrOUS[4]",
8965 sal_True
8969 #ifdef WITH_CORE
8970 void append_006()
8972 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
8973 OString expVal( kTestStr60 );
8975 aStrBuf.append( intVal, -5 );
8977 CPPUNIT_ASSERT_MESSAGE
8979 "Appends the WrongRadix to the string buffer(with INT_MAX)",
8980 sal_True
8984 #endif
8986 CPPUNIT_TEST_SUITE( append_006_Int32_WrongRadix );
8987 CPPUNIT_TEST( append_001 );
8988 CPPUNIT_TEST( append_002 );
8989 CPPUNIT_TEST( append_003 );
8990 CPPUNIT_TEST( append_004 );
8991 CPPUNIT_TEST( append_005 );
8992 #ifdef WITH_CORE
8993 CPPUNIT_TEST( append_006 );
8994 #endif
8995 CPPUNIT_TEST_SUITE_END();
8997 //------------------------------------------------------------------------
8998 class append_006_Int32_defaultParam : public CppUnit::TestFixture
9000 OString* arrOUS[5];
9002 public:
9003 void setUp()
9005 arrOUS[0] = new OString( kTestStr7 );
9006 arrOUS[1] = new OString( );
9007 arrOUS[2] = new OString( kTestStr25 );
9008 arrOUS[3] = new OString( "\0" );
9009 arrOUS[4] = new OString( kTestStr28 );
9013 void tearDown()
9015 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
9016 delete arrOUS[3]; delete arrOUS[4];
9019 void append_001()
9021 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9022 OString expVal( kTestStr59 );
9023 sal_Int32 input = 11;
9025 aStrBuf.append( input );
9027 CPPUNIT_ASSERT_MESSAGE
9029 "input Int32 11 and return OStringBuffer[0]+11",
9030 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9035 void append_002()
9037 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9038 OString expVal( kTestStr62 );
9039 sal_Int32 input = 0;
9041 aStrBuf.append( input );
9043 CPPUNIT_ASSERT_MESSAGE
9045 "input Int32 0 and return OStringBuffer[0]+0",
9046 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9051 void append_003()
9053 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9054 OString expVal( kTestStr63 );
9055 sal_Int32 input = -11;
9057 aStrBuf.append( input );
9059 CPPUNIT_ASSERT_MESSAGE
9061 "input Int32 -11 and return OStringBuffer[0]+(-11)",
9062 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9067 void append_004()
9069 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9070 OString expVal( kTestStr64 );
9071 sal_Int32 input = 2147483647;
9073 aStrBuf.append( input );
9075 CPPUNIT_ASSERT_MESSAGE
9077 "input Int32 2147483647 and return OStringBuffer[0]+2147483647",
9078 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9083 void append_005()
9085 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9086 OString expVal( kTestStr65 );
9087 sal_Int32 input = kNonSInt32Max;
9089 aStrBuf.append( input );
9091 CPPUNIT_ASSERT_MESSAGE
9093 "input Int32 -2147483648 and return OStringBuffer[0]+(-2147483648)",
9094 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9099 void append_006()
9101 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9102 OString expVal( kTestStr60 );
9103 sal_Int32 input = 11;
9105 aStrBuf.append( input );
9107 CPPUNIT_ASSERT_MESSAGE
9109 "input Int32 11 and return OStringBuffer[1]+11",
9110 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9115 void append_007()
9117 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9118 OString expVal( kTestStr66 );
9119 sal_Int32 input = 0;
9121 aStrBuf.append( input );
9123 CPPUNIT_ASSERT_MESSAGE
9125 "input Int32 0 and return OStringBuffer[1]+0",
9126 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9131 void append_008()
9133 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9134 OString expVal( kTestStr67 );
9135 sal_Int32 input = -11;
9137 aStrBuf.append( input );
9139 CPPUNIT_ASSERT_MESSAGE
9141 "input Int32 -11 and return OStringBuffer[1]+(-11)",
9142 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9147 void append_009()
9149 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9150 OString expVal( kTestStr68 );
9151 sal_Int32 input = 2147483647;
9153 aStrBuf.append( input );
9155 CPPUNIT_ASSERT_MESSAGE
9157 "input Int32 2147483647 and return OStringBuffer[1]+2147483647",
9158 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9163 void append_010()
9165 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9166 OString expVal( kTestStr69 );
9167 sal_Int32 input = SAL_MIN_INT32 /*-2147483648*/;
9169 aStrBuf.append( input );
9171 CPPUNIT_ASSERT_MESSAGE
9173 "input Int32 -2147483648 and return OStringBuffer[1]+(-2147483648)",
9174 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9179 void append_011()
9181 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9182 OString expVal( kTestStr60 );
9183 sal_Int32 input = 11;
9185 aStrBuf.append( input );
9187 CPPUNIT_ASSERT_MESSAGE
9189 "input Int32 11 and return OStringBuffer[2]+11",
9190 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9195 void append_012()
9197 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9198 OString expVal( kTestStr66 );
9199 sal_Int32 input = 0;
9201 aStrBuf.append( input );
9203 CPPUNIT_ASSERT_MESSAGE
9205 "input Int32 0 and return OUStringBuffer[2]+0",
9206 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9211 void append_013()
9213 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9214 OString expVal( kTestStr67 );
9215 sal_Int32 input = -11;
9217 aStrBuf.append( input );
9219 CPPUNIT_ASSERT_MESSAGE
9221 "input Int32 -11 and return OUStringBuffer[2]+(-11)",
9222 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9227 void append_014()
9229 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9230 OString expVal( kTestStr68 );
9231 sal_Int32 input = 2147483647;
9233 aStrBuf.append( input );
9235 CPPUNIT_ASSERT_MESSAGE
9237 "input Int32 2147483647 and return OStringBuffer[2]+2147483647",
9238 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9243 void append_015()
9245 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
9246 OString expVal( kTestStr69 );
9247 sal_Int32 input = SAL_MIN_INT32;
9249 aStrBuf.append( input );
9251 CPPUNIT_ASSERT_MESSAGE
9253 "input Int32 -2147483648 and return OStringBuffer[2]+(-2147483648)",
9254 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9259 void append_016()
9261 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
9262 OString expVal( kTestStr60 );
9263 sal_Int32 input = 11;
9265 aStrBuf.append( input );
9267 CPPUNIT_ASSERT_MESSAGE
9269 "input Int32 11 and return OStringBuffer[3]+11",
9270 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9275 void append_017()
9277 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
9278 OString expVal( kTestStr66 );
9279 sal_Int32 input = 0;
9281 aStrBuf.append( input );
9283 CPPUNIT_ASSERT_MESSAGE
9285 "input Int32 0 and return OStringBuffer[3]+0",
9286 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9291 void append_018()
9293 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
9294 OString expVal( kTestStr67 );
9295 sal_Int32 input = -11;
9297 aStrBuf.append( input );
9299 CPPUNIT_ASSERT_MESSAGE
9301 "input Int32 -11 and return OStringBuffer[3]+(-11)",
9302 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9307 void append_019()
9309 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
9310 OString expVal( kTestStr68 );
9311 sal_Int32 input = 2147483647;
9313 aStrBuf.append( input );
9315 CPPUNIT_ASSERT_MESSAGE
9317 "input Int32 2147483647 and return OStringBuffer[3]+2147483647",
9318 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9323 void append_020()
9325 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
9326 OString expVal( kTestStr69 );
9327 sal_Int32 input = SAL_MIN_INT32;
9329 aStrBuf.append( input );
9331 CPPUNIT_ASSERT_MESSAGE
9333 "input Int32 -2147483648 and return OStringBuffer[3]+(-2147483648)",
9334 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9339 void append_021()
9341 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
9342 OString expVal( kTestStr61 );
9343 sal_Int32 input = 11;
9345 aStrBuf.append( input );
9347 CPPUNIT_ASSERT_MESSAGE
9349 "input Int32 11 and return OStringBuffer[4]+11",
9350 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9355 void append_022()
9357 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
9358 OString expVal( kTestStr70 );
9359 sal_Int32 input = 0;
9361 aStrBuf.append( input );
9363 CPPUNIT_ASSERT_MESSAGE
9365 "input Int32 0 and return OStringBuffer[4]+0",
9366 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9371 void append_023()
9373 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
9374 OString expVal( kTestStr71 );
9375 sal_Int32 input = -11;
9377 aStrBuf.append( input );
9379 CPPUNIT_ASSERT_MESSAGE
9381 "input Int32 -11 and return OStringBuffer[4]+(-11)",
9382 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9387 void append_024()
9389 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
9390 OString expVal( kTestStr72 );
9391 sal_Int32 input = 2147483647;
9393 aStrBuf.append( input );
9395 CPPUNIT_ASSERT_MESSAGE
9397 "input Int32 2147483647 and return OStringBuffer[4]+2147483647",
9398 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9403 void append_025()
9405 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
9406 OString expVal( kTestStr73 );
9407 sal_Int32 input = SAL_MIN_INT32;
9409 aStrBuf.append( input );
9411 CPPUNIT_ASSERT_MESSAGE
9413 "input Int32 -2147483648 and return OStringBuffer[4]+(-2147483648)",
9414 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9418 #ifdef WITH_CORE
9419 void append_026()
9421 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
9422 OString expVal( kTestStr60 );
9423 sal_Int32 input = 11;
9425 aStrBuf.append( input );
9427 CPPUNIT_ASSERT_MESSAGE
9429 "input Int32 11 and return OStringBuffer(kSInt32Max)+11",
9430 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9435 void append_027()
9437 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
9438 OString expVal( kTestStr66 );
9439 sal_Int32 input = 0;
9441 aStrBuf.append( input );
9443 CPPUNIT_ASSERT_MESSAGE
9445 "input Int32 0 and return OStringBuffer(kSInt32Max)+0",
9446 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9451 void append_028()
9453 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
9454 OString expVal( kTestStr67 );
9455 sal_Int32 input = -11;
9457 aStrBuf.append( input );
9459 CPPUNIT_ASSERT_MESSAGE
9461 "input Int32 -11 and return OStringBuffer(kSInt32Max)+(-11)",
9462 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9467 void append_029()
9469 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
9470 OString expVal( kTestStr68 );
9471 sal_Int32 input = 2147483647;
9473 aStrBuf.append( input );
9475 CPPUNIT_ASSERT_MESSAGE
9477 "input Int32 2147483647 and return OStringBuffer(kSInt32Max)+2147483647",
9478 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9483 void append_030()
9485 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
9486 OString expVal( kTestStr69 );
9487 sal_Int32 input = SAL_MIN_INT32;
9489 aStrBuf.append( input );
9491 CPPUNIT_ASSERT_MESSAGE
9493 "input Int32 -2147483648 and return OStringBuffer(kSInt32Max)+(-2147483648)",
9494 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
9498 #endif
9500 CPPUNIT_TEST_SUITE( append_006_Int32_defaultParam );
9501 CPPUNIT_TEST( append_001 );
9502 CPPUNIT_TEST( append_002 );
9503 CPPUNIT_TEST( append_003 );
9504 CPPUNIT_TEST( append_004 );
9505 CPPUNIT_TEST( append_005 );
9506 CPPUNIT_TEST( append_006 );
9507 CPPUNIT_TEST( append_007 );
9508 CPPUNIT_TEST( append_008 );
9509 CPPUNIT_TEST( append_009 );
9510 CPPUNIT_TEST( append_010 );
9511 CPPUNIT_TEST( append_011 );
9512 CPPUNIT_TEST( append_012 );
9513 CPPUNIT_TEST( append_013 );
9514 CPPUNIT_TEST( append_014 );
9515 CPPUNIT_TEST( append_015 );
9516 CPPUNIT_TEST( append_016 );
9517 CPPUNIT_TEST( append_017 );
9518 CPPUNIT_TEST( append_018 );
9519 CPPUNIT_TEST( append_019 );
9520 CPPUNIT_TEST( append_020 );
9521 CPPUNIT_TEST( append_021 );
9522 CPPUNIT_TEST( append_022 );
9523 CPPUNIT_TEST( append_023 );
9524 CPPUNIT_TEST( append_024 );
9525 CPPUNIT_TEST( append_025 );
9526 #ifdef WITH_CORE
9527 CPPUNIT_TEST( append_026 );
9528 CPPUNIT_TEST( append_027 );
9529 CPPUNIT_TEST( append_028 );
9530 CPPUNIT_TEST( append_029 );
9531 CPPUNIT_TEST( append_030 );
9532 #endif
9533 CPPUNIT_TEST_SUITE_END();
9535 //------------------------------------------------------------------------
9536 // testing the method append( sal_Int64 l, sal_Int16 radix=2 )
9537 // testing the method append( sal_Int64 l, sal_Int16 radix=8 )
9538 // testing the method append( sal_Int64 l, sal_Int16 radix=10 )
9539 // testing the method append( sal_Int64 l, sal_Int16 radix=16 )
9540 // testing the method append( sal_Int64 l, sal_Int16 radix=36 )
9541 //------------------------------------------------------------------------
9542 class append_007_Int64 : public CppUnit::TestFixture
9544 OString* arrOUS[5];
9546 public:
9547 void setUp()
9549 arrOUS[0] = new OString( kTestStr7 );
9550 arrOUS[1] = new OString( );
9551 arrOUS[2] = new OString( kTestStr25 );
9552 arrOUS[3] = new OString( "\0" );
9553 arrOUS[4] = new OString( kTestStr28 );
9557 void tearDown()
9559 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
9560 delete arrOUS[3]; delete arrOUS[4];
9563 void append_001()
9565 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9566 OString expVal( aStrBuf.getStr() );
9567 sal_Int64 input = 0;
9568 sal_Int16 radix = 2;
9570 expVal += OString( "0" );
9571 aStrBuf.append( input, radix );
9573 CPPUNIT_ASSERT_MESSAGE
9575 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9576 aStrBuf.getStr()== expVal &&
9577 aStrBuf.getLength() == expVal.getLength()
9582 void append_002()
9584 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9585 OString expVal( aStrBuf.getStr() );
9586 sal_Int64 input = 4;
9587 sal_Int16 radix = 2;
9589 expVal += OString( "100" );
9590 aStrBuf.append( input, radix );
9592 CPPUNIT_ASSERT_MESSAGE
9594 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9595 aStrBuf.getStr()== expVal &&
9596 aStrBuf.getLength() == expVal.getLength()
9601 void append_003()
9603 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9604 OString expVal( aStrBuf.getStr() );
9605 sal_Int64 input = 8;
9606 sal_Int16 radix = 2;
9608 expVal += OString( "1000" );
9609 aStrBuf.append( input, radix );
9611 CPPUNIT_ASSERT_MESSAGE
9613 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9614 aStrBuf.getStr()== expVal &&
9615 aStrBuf.getLength() == expVal.getLength()
9620 void append_004()
9622 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9623 OString expVal( aStrBuf.getStr() );
9624 sal_Int64 input = 15;
9625 sal_Int16 radix = 2;
9627 expVal += OString( "1111" );
9628 aStrBuf.append( input, radix );
9630 CPPUNIT_ASSERT_MESSAGE
9632 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9633 aStrBuf.getStr()== expVal &&
9634 aStrBuf.getLength() == expVal.getLength()
9639 void append_005()
9641 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9642 OString expVal( aStrBuf.getStr() );
9643 sal_Int64 input = 0;
9644 sal_Int16 radix = 8;
9646 expVal += OString( "0" );
9647 aStrBuf.append( input, radix );
9649 CPPUNIT_ASSERT_MESSAGE
9651 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9652 aStrBuf.getStr()== expVal &&
9653 aStrBuf.getLength() == expVal.getLength()
9658 void append_006()
9660 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9661 OString expVal( aStrBuf.getStr() );
9662 sal_Int64 input = 4;
9663 sal_Int16 radix = 8;
9665 expVal += OString( "4" );
9666 aStrBuf.append( input, radix );
9668 CPPUNIT_ASSERT_MESSAGE
9670 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9671 aStrBuf.getStr()== expVal &&
9672 aStrBuf.getLength() == expVal.getLength()
9677 void append_007()
9679 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9680 OString expVal( aStrBuf.getStr() );
9681 sal_Int64 input = 8;
9682 sal_Int16 radix = 8;
9684 expVal += OString( "10" );
9685 aStrBuf.append( input, radix );
9687 CPPUNIT_ASSERT_MESSAGE
9689 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9690 aStrBuf.getStr()== expVal &&
9691 aStrBuf.getLength() == expVal.getLength()
9696 void append_008()
9698 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9699 OString expVal( aStrBuf.getStr() );
9700 sal_Int64 input = 15;
9701 sal_Int16 radix = 8;
9703 expVal += OString( "17" );
9704 aStrBuf.append( input, radix );
9706 CPPUNIT_ASSERT_MESSAGE
9708 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9709 aStrBuf.getStr()== expVal &&
9710 aStrBuf.getLength() == expVal.getLength()
9715 void append_009()
9717 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9718 OString expVal( aStrBuf.getStr() );
9719 sal_Int64 input = 0;
9720 sal_Int16 radix = 10;
9722 expVal += OString( "0" );
9723 aStrBuf.append( input, radix );
9725 CPPUNIT_ASSERT_MESSAGE
9727 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9728 aStrBuf.getStr()== expVal &&
9729 aStrBuf.getLength() == expVal.getLength()
9734 void append_010()
9736 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9737 OString expVal( aStrBuf.getStr() );
9738 sal_Int64 input = 4;
9739 sal_Int16 radix = 10;
9741 expVal += OString( "4" );
9742 aStrBuf.append( input, radix );
9744 CPPUNIT_ASSERT_MESSAGE
9746 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9747 aStrBuf.getStr()== expVal &&
9748 aStrBuf.getLength() == expVal.getLength()
9753 void append_011()
9755 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9756 OString expVal( aStrBuf.getStr() );
9757 sal_Int64 input = 8;
9758 sal_Int16 radix = 10;
9760 expVal += OString( "8" );
9761 aStrBuf.append( input, radix );
9763 CPPUNIT_ASSERT_MESSAGE
9765 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9766 aStrBuf.getStr()== expVal &&
9767 aStrBuf.getLength() == expVal.getLength()
9772 void append_012()
9774 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9775 OString expVal( aStrBuf.getStr() );
9776 sal_Int64 input = 15;
9777 sal_Int16 radix = 10;
9779 expVal += OString( "15" );
9780 aStrBuf.append( input, radix );
9782 CPPUNIT_ASSERT_MESSAGE
9784 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9785 aStrBuf.getStr()== expVal &&
9786 aStrBuf.getLength() == expVal.getLength()
9791 void append_013()
9793 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9794 OString expVal( aStrBuf.getStr() );
9795 sal_Int64 input = 0;
9796 sal_Int16 radix = 16;
9798 expVal += OString( "0" );
9799 aStrBuf.append( input, radix );
9801 CPPUNIT_ASSERT_MESSAGE
9803 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9804 aStrBuf.getStr()== expVal &&
9805 aStrBuf.getLength() == expVal.getLength()
9810 void append_014()
9812 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9813 OString expVal( aStrBuf.getStr() );
9814 sal_Int64 input = 4;
9815 sal_Int16 radix = 16;
9817 expVal += OString( "4" );
9818 aStrBuf.append( input, radix );
9820 CPPUNIT_ASSERT_MESSAGE
9822 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9823 aStrBuf.getStr()== expVal &&
9824 aStrBuf.getLength() == expVal.getLength()
9829 void append_015()
9831 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9832 OString expVal( aStrBuf.getStr() );
9833 sal_Int64 input = 8;
9834 sal_Int16 radix = 16;
9836 expVal += OString( "8" );
9837 aStrBuf.append( input, radix );
9839 CPPUNIT_ASSERT_MESSAGE
9841 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9842 aStrBuf.getStr()== expVal &&
9843 aStrBuf.getLength() == expVal.getLength()
9848 void append_016()
9850 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9851 OString expVal( aStrBuf.getStr() );
9852 sal_Int64 input = 15;
9853 sal_Int16 radix = 16;
9855 expVal += OString( "f" );
9856 aStrBuf.append( input, radix );
9858 CPPUNIT_ASSERT_MESSAGE
9860 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9861 aStrBuf.getStr()== expVal &&
9862 aStrBuf.getLength() == expVal.getLength()
9867 void append_017()
9869 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9870 OString expVal( aStrBuf.getStr() );
9871 sal_Int64 input = 0;
9872 sal_Int16 radix = 36;
9874 expVal += OString( "0" );
9875 aStrBuf.append( input, radix );
9877 CPPUNIT_ASSERT_MESSAGE
9879 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9880 aStrBuf.getStr()== expVal &&
9881 aStrBuf.getLength() == expVal.getLength()
9886 void append_018()
9888 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9889 OString expVal( aStrBuf.getStr() );
9890 sal_Int64 input = 4;
9891 sal_Int16 radix = 36;
9893 expVal += OString( "4" );
9894 aStrBuf.append( input, radix );
9896 CPPUNIT_ASSERT_MESSAGE
9898 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9899 aStrBuf.getStr()== expVal &&
9900 aStrBuf.getLength() == expVal.getLength()
9905 void append_019()
9907 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9908 OString expVal( aStrBuf.getStr() );
9909 sal_Int64 input = 8;
9910 sal_Int16 radix = 36;
9912 expVal += OString( "8" );
9913 aStrBuf.append( input, radix );
9915 CPPUNIT_ASSERT_MESSAGE
9917 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9918 aStrBuf.getStr()== expVal &&
9919 aStrBuf.getLength() == expVal.getLength()
9924 void append_020()
9926 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
9927 OString expVal( aStrBuf.getStr() );
9928 sal_Int64 input = 35;
9929 sal_Int16 radix = 36;
9931 expVal += OString( "z" );
9932 aStrBuf.append( input, radix );
9934 CPPUNIT_ASSERT_MESSAGE
9936 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9937 aStrBuf.getStr()== expVal &&
9938 aStrBuf.getLength() == expVal.getLength()
9943 void append_021()
9945 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9946 OString expVal( aStrBuf.getStr() );
9947 sal_Int64 input = 0;
9948 sal_Int16 radix = 2;
9950 expVal += OString( "0" );
9951 aStrBuf.append( input, radix );
9953 CPPUNIT_ASSERT_MESSAGE
9955 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9956 aStrBuf.getStr()== expVal &&
9957 aStrBuf.getLength() == expVal.getLength()
9962 void append_022()
9964 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9965 OString expVal( aStrBuf.getStr() );
9966 sal_Int64 input = 4;
9967 sal_Int16 radix = 2;
9969 expVal += OString( "100" );
9970 aStrBuf.append( input, radix );
9972 CPPUNIT_ASSERT_MESSAGE
9974 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9975 aStrBuf.getStr()== expVal &&
9976 aStrBuf.getLength() == expVal.getLength()
9981 void append_023()
9983 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
9984 OString expVal( aStrBuf.getStr() );
9985 sal_Int64 input = 8;
9986 sal_Int16 radix = 2;
9988 expVal += OString( "1000" );
9989 aStrBuf.append( input, radix );
9991 CPPUNIT_ASSERT_MESSAGE
9993 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9994 aStrBuf.getStr()== expVal &&
9995 aStrBuf.getLength() == expVal.getLength()
10000 void append_024()
10002 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10003 OString expVal( aStrBuf.getStr() );
10004 sal_Int64 input = 15;
10005 sal_Int16 radix = 2;
10007 expVal += OString( "1111" );
10008 aStrBuf.append( input, radix );
10010 CPPUNIT_ASSERT_MESSAGE
10012 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
10013 aStrBuf.getStr()== expVal &&
10014 aStrBuf.getLength() == expVal.getLength()
10019 void append_025()
10021 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10022 OString expVal( aStrBuf.getStr() );
10023 sal_Int64 input = 0;
10024 sal_Int16 radix = 8;
10026 expVal += OString( "0" );
10027 aStrBuf.append( input, radix );
10029 CPPUNIT_ASSERT_MESSAGE
10031 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
10032 aStrBuf.getStr()== expVal &&
10033 aStrBuf.getLength() == expVal.getLength()
10038 void append_026()
10040 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10041 OString expVal( aStrBuf.getStr() );
10042 sal_Int64 input = 4;
10043 sal_Int16 radix = 8;
10045 expVal += OString( "4" );
10046 aStrBuf.append( input, radix );
10048 CPPUNIT_ASSERT_MESSAGE
10050 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
10051 aStrBuf.getStr()== expVal &&
10052 aStrBuf.getLength() == expVal.getLength()
10057 void append_027()
10059 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10060 OString expVal( aStrBuf.getStr() );
10061 sal_Int64 input = 8;
10062 sal_Int16 radix = 8;
10064 expVal += OString( "10" );
10065 aStrBuf.append( input, radix );
10067 CPPUNIT_ASSERT_MESSAGE
10069 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
10070 aStrBuf.getStr()== expVal &&
10071 aStrBuf.getLength() == expVal.getLength()
10076 void append_028()
10078 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10079 OString expVal( aStrBuf.getStr() );
10080 sal_Int64 input = 15;
10081 sal_Int16 radix = 8;
10083 expVal += OString( "17" );
10084 aStrBuf.append( input, radix );
10086 CPPUNIT_ASSERT_MESSAGE
10088 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
10089 aStrBuf.getStr()== expVal &&
10090 aStrBuf.getLength() == expVal.getLength()
10095 void append_029()
10097 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10098 OString expVal( aStrBuf.getStr() );
10099 sal_Int64 input = 0;
10100 sal_Int16 radix = 10;
10102 expVal += OString( "0" );
10103 aStrBuf.append( input, radix );
10105 CPPUNIT_ASSERT_MESSAGE
10107 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
10108 aStrBuf.getStr()== expVal &&
10109 aStrBuf.getLength() == expVal.getLength()
10114 void append_030()
10116 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10117 OString expVal( aStrBuf.getStr() );
10118 sal_Int64 input = 4;
10119 sal_Int16 radix = 10;
10121 expVal += OString( "4" );
10122 aStrBuf.append( input, radix );
10124 CPPUNIT_ASSERT_MESSAGE
10126 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
10127 aStrBuf.getStr()== expVal &&
10128 aStrBuf.getLength() == expVal.getLength()
10133 void append_031()
10135 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10136 OString expVal( aStrBuf.getStr() );
10137 sal_Int64 input = 8;
10138 sal_Int16 radix = 10;
10140 expVal += OString( "8" );
10141 aStrBuf.append( input, radix );
10143 CPPUNIT_ASSERT_MESSAGE
10145 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
10146 aStrBuf.getStr()== expVal &&
10147 aStrBuf.getLength() == expVal.getLength()
10152 void append_032()
10154 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10155 OString expVal( aStrBuf.getStr() );
10156 sal_Int64 input = 15;
10157 sal_Int16 radix = 10;
10159 expVal += OString( "15" );
10160 aStrBuf.append( input, radix );
10162 CPPUNIT_ASSERT_MESSAGE
10164 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
10165 aStrBuf.getStr()== expVal &&
10166 aStrBuf.getLength() == expVal.getLength()
10171 void append_033()
10173 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10174 OString expVal( aStrBuf.getStr() );
10175 sal_Int64 input = 0;
10176 sal_Int16 radix = 16;
10178 expVal += OString( "0" );
10179 aStrBuf.append( input, radix );
10181 CPPUNIT_ASSERT_MESSAGE
10183 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
10184 aStrBuf.getStr()== expVal &&
10185 aStrBuf.getLength() == expVal.getLength()
10190 void append_034()
10192 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10193 OString expVal( aStrBuf.getStr() );
10194 sal_Int64 input = 4;
10195 sal_Int16 radix = 16;
10197 expVal += OString( "4" );
10198 aStrBuf.append( input, radix );
10200 CPPUNIT_ASSERT_MESSAGE
10202 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
10203 aStrBuf.getStr()== expVal &&
10204 aStrBuf.getLength() == expVal.getLength()
10209 void append_035()
10211 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10212 OString expVal( aStrBuf.getStr() );
10213 sal_Int64 input = 8;
10214 sal_Int16 radix = 16;
10216 expVal += OString( "8" );
10217 aStrBuf.append( input, radix );
10219 CPPUNIT_ASSERT_MESSAGE
10221 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
10222 aStrBuf.getStr()== expVal &&
10223 aStrBuf.getLength() == expVal.getLength()
10228 void append_036()
10230 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10231 OString expVal( aStrBuf.getStr() );
10232 sal_Int64 input = 15;
10233 sal_Int16 radix = 16;
10235 expVal += OString( "f" );
10236 aStrBuf.append( input, radix );
10238 CPPUNIT_ASSERT_MESSAGE
10240 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
10241 aStrBuf.getStr()== expVal &&
10242 aStrBuf.getLength() == expVal.getLength()
10247 void append_037()
10249 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10250 OString expVal( aStrBuf.getStr() );
10251 sal_Int64 input = 0;
10252 sal_Int16 radix = 36;
10254 expVal += OString( "0" );
10255 aStrBuf.append( input, radix );
10257 CPPUNIT_ASSERT_MESSAGE
10259 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
10260 aStrBuf.getStr()== expVal &&
10261 aStrBuf.getLength() == expVal.getLength()
10266 void append_038()
10268 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10269 OString expVal( aStrBuf.getStr() );
10270 sal_Int64 input = 4;
10271 sal_Int16 radix = 36;
10273 expVal += OString( "4" );
10274 aStrBuf.append( input, radix );
10276 CPPUNIT_ASSERT_MESSAGE
10278 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
10279 aStrBuf.getStr()== expVal &&
10280 aStrBuf.getLength() == expVal.getLength()
10285 void append_039()
10287 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10288 OString expVal( aStrBuf.getStr() );
10289 sal_Int64 input = 8;
10290 sal_Int16 radix = 36;
10292 expVal += OString( "8" );
10293 aStrBuf.append( input, radix );
10295 CPPUNIT_ASSERT_MESSAGE
10297 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
10298 aStrBuf.getStr()== expVal &&
10299 aStrBuf.getLength() == expVal.getLength()
10304 void append_040()
10306 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
10307 OString expVal( aStrBuf.getStr() );
10308 sal_Int64 input = 35;
10309 sal_Int16 radix = 36;
10311 expVal += OString( "z" );
10312 aStrBuf.append( input, radix );
10314 CPPUNIT_ASSERT_MESSAGE
10316 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
10317 aStrBuf.getStr()== expVal &&
10318 aStrBuf.getLength() == expVal.getLength()
10323 void append_041()
10325 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10326 OString expVal( aStrBuf.getStr() );
10327 sal_Int64 input = 0;
10328 sal_Int16 radix = 2;
10330 expVal += OString( "0" );
10331 aStrBuf.append( input, radix );
10333 CPPUNIT_ASSERT_MESSAGE
10335 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
10336 aStrBuf.getStr()== expVal &&
10337 aStrBuf.getLength() == expVal.getLength()
10342 void append_042()
10344 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10345 OString expVal( aStrBuf.getStr() );
10346 sal_Int64 input = 4;
10347 sal_Int16 radix = 2;
10349 expVal += OString( "100" );
10350 aStrBuf.append( input, radix );
10352 CPPUNIT_ASSERT_MESSAGE
10354 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
10355 aStrBuf.getStr()== expVal &&
10356 aStrBuf.getLength() == expVal.getLength()
10361 void append_043()
10363 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10364 OString expVal( aStrBuf.getStr() );
10365 sal_Int64 input = 8;
10366 sal_Int16 radix = 2;
10368 expVal += OString( "1000" );
10369 aStrBuf.append( input, radix );
10371 CPPUNIT_ASSERT_MESSAGE
10373 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
10374 aStrBuf.getStr()== expVal &&
10375 aStrBuf.getLength() == expVal.getLength()
10380 void append_044()
10382 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10383 OString expVal( aStrBuf.getStr() );
10384 sal_Int64 input = 15;
10385 sal_Int16 radix = 2;
10387 expVal += OString( "1111" );
10388 aStrBuf.append( input, radix );
10390 CPPUNIT_ASSERT_MESSAGE
10392 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
10393 aStrBuf.getStr()== expVal &&
10394 aStrBuf.getLength() == expVal.getLength()
10399 void append_045()
10401 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10402 OString expVal( aStrBuf.getStr() );
10403 sal_Int64 input = 0;
10404 sal_Int16 radix = 8;
10406 expVal += OString( "0" );
10407 aStrBuf.append( input, radix );
10409 CPPUNIT_ASSERT_MESSAGE
10411 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
10412 aStrBuf.getStr()== expVal &&
10413 aStrBuf.getLength() == expVal.getLength()
10418 void append_046()
10420 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10421 OString expVal( aStrBuf.getStr() );
10422 sal_Int64 input = 4;
10423 sal_Int16 radix = 8;
10425 expVal += OString( "4" );
10426 aStrBuf.append( input, radix );
10428 CPPUNIT_ASSERT_MESSAGE
10430 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
10431 aStrBuf.getStr()== expVal &&
10432 aStrBuf.getLength() == expVal.getLength()
10437 void append_047()
10439 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10440 OString expVal( aStrBuf.getStr() );
10441 sal_Int64 input = 8;
10442 sal_Int16 radix = 8;
10444 expVal += OString( "10" );
10445 aStrBuf.append( input, radix );
10447 CPPUNIT_ASSERT_MESSAGE
10449 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
10450 aStrBuf.getStr()== expVal &&
10451 aStrBuf.getLength() == expVal.getLength()
10456 void append_048()
10458 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10459 OString expVal( aStrBuf.getStr() );
10460 sal_Int64 input = 15;
10461 sal_Int16 radix = 8;
10463 expVal += OString( "17" );
10464 aStrBuf.append( input, radix );
10466 CPPUNIT_ASSERT_MESSAGE
10468 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
10469 aStrBuf.getStr()== expVal &&
10470 aStrBuf.getLength() == expVal.getLength()
10475 void append_049()
10477 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10478 OString expVal( aStrBuf.getStr() );
10479 sal_Int64 input = 0;
10480 sal_Int16 radix = 10;
10482 expVal += OString( "0" );
10483 aStrBuf.append( input, radix );
10485 CPPUNIT_ASSERT_MESSAGE
10487 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
10488 aStrBuf.getStr()== expVal &&
10489 aStrBuf.getLength() == expVal.getLength()
10494 void append_050()
10496 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10497 OString expVal( aStrBuf.getStr() );
10498 sal_Int64 input = 4;
10499 sal_Int16 radix = 10;
10501 expVal += OString( "4" );
10502 aStrBuf.append( input, radix );
10504 CPPUNIT_ASSERT_MESSAGE
10506 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
10507 aStrBuf.getStr()== expVal &&
10508 aStrBuf.getLength() == expVal.getLength()
10513 void append_051()
10515 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10516 OString expVal( aStrBuf.getStr() );
10517 sal_Int64 input = 8;
10518 sal_Int16 radix = 10;
10520 expVal += OString( "8" );
10521 aStrBuf.append( input, radix );
10523 CPPUNIT_ASSERT_MESSAGE
10525 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
10526 aStrBuf.getStr()== expVal &&
10527 aStrBuf.getLength() == expVal.getLength()
10532 void append_052()
10534 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10535 OString expVal( aStrBuf.getStr() );
10536 sal_Int64 input = 15;
10537 sal_Int16 radix = 10;
10539 expVal += OString( "15" );
10540 aStrBuf.append( input, radix );
10542 CPPUNIT_ASSERT_MESSAGE
10544 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
10545 aStrBuf.getStr()== expVal &&
10546 aStrBuf.getLength() == expVal.getLength()
10551 void append_053()
10553 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10554 OString expVal( aStrBuf.getStr() );
10555 sal_Int64 input = 0;
10556 sal_Int16 radix = 16;
10558 expVal += OString( "0" );
10559 aStrBuf.append( input, radix );
10561 CPPUNIT_ASSERT_MESSAGE
10563 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10564 aStrBuf.getStr()== expVal &&
10565 aStrBuf.getLength() == expVal.getLength()
10570 void append_054()
10572 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10573 OString expVal( aStrBuf.getStr() );
10574 sal_Int64 input = 4;
10575 sal_Int16 radix = 16;
10577 expVal += OString( "4" );
10578 aStrBuf.append( input, radix );
10580 CPPUNIT_ASSERT_MESSAGE
10582 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10583 aStrBuf.getStr()== expVal &&
10584 aStrBuf.getLength() == expVal.getLength()
10589 void append_055()
10591 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10592 OString expVal( aStrBuf.getStr() );
10593 sal_Int64 input = 8;
10594 sal_Int16 radix = 16;
10596 expVal += OString( "8" );
10597 aStrBuf.append( input, radix );
10599 CPPUNIT_ASSERT_MESSAGE
10601 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10602 aStrBuf.getStr()== expVal &&
10603 aStrBuf.getLength() == expVal.getLength()
10608 void append_056()
10610 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10611 OString expVal( aStrBuf.getStr() );
10612 sal_Int64 input = 15;
10613 sal_Int16 radix = 16;
10615 expVal += OString( "f" );
10616 aStrBuf.append( input, radix );
10618 CPPUNIT_ASSERT_MESSAGE
10620 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10621 aStrBuf.getStr()== expVal &&
10622 aStrBuf.getLength() == expVal.getLength()
10627 void append_057()
10629 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10630 OString expVal( aStrBuf.getStr() );
10631 sal_Int64 input = 0;
10632 sal_Int16 radix = 36;
10634 expVal += OString( "0" );
10635 aStrBuf.append( input, radix );
10637 CPPUNIT_ASSERT_MESSAGE
10639 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10640 aStrBuf.getStr()== expVal &&
10641 aStrBuf.getLength() == expVal.getLength()
10646 void append_058()
10648 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10649 OString expVal( aStrBuf.getStr() );
10650 sal_Int64 input = 4;
10651 sal_Int16 radix = 36;
10653 expVal += OString( "4" );
10654 aStrBuf.append( input, radix );
10656 CPPUNIT_ASSERT_MESSAGE
10658 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10659 aStrBuf.getStr()== expVal &&
10660 aStrBuf.getLength() == expVal.getLength()
10665 void append_059()
10667 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10668 OString expVal( aStrBuf.getStr() );
10669 sal_Int64 input = 8;
10670 sal_Int16 radix = 36;
10672 expVal += OString( "8" );
10673 aStrBuf.append( input, radix );
10675 CPPUNIT_ASSERT_MESSAGE
10677 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10678 aStrBuf.getStr()== expVal &&
10679 aStrBuf.getLength() == expVal.getLength()
10684 void append_060()
10686 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
10687 OString expVal( aStrBuf.getStr() );
10688 sal_Int64 input = 35;
10689 sal_Int16 radix = 36;
10691 expVal += OString( "z" );
10692 aStrBuf.append( input, radix );
10694 CPPUNIT_ASSERT_MESSAGE
10696 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10697 aStrBuf.getStr()== expVal &&
10698 aStrBuf.getLength() == expVal.getLength()
10703 void append_061()
10705 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10706 OString expVal( aStrBuf.getStr() );
10707 sal_Int64 input = 0;
10708 sal_Int16 radix = 2;
10710 expVal += OString( "0" );
10711 aStrBuf.append( input, radix );
10713 CPPUNIT_ASSERT_MESSAGE
10715 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10716 aStrBuf.getStr()== expVal &&
10717 aStrBuf.getLength() == expVal.getLength()
10722 void append_062()
10724 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10725 OString expVal( aStrBuf.getStr() );
10726 sal_Int64 input = 4;
10727 sal_Int16 radix = 2;
10729 expVal += OString( "100" );
10730 aStrBuf.append( input, radix );
10732 CPPUNIT_ASSERT_MESSAGE
10734 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10735 aStrBuf.getStr()== expVal &&
10736 aStrBuf.getLength() == expVal.getLength()
10741 void append_063()
10743 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10744 OString expVal( aStrBuf.getStr() );
10745 sal_Int64 input = 8;
10746 sal_Int16 radix = 2;
10748 expVal += OString( "1000" );
10749 aStrBuf.append( input, radix );
10751 CPPUNIT_ASSERT_MESSAGE
10753 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10754 aStrBuf.getStr()== expVal &&
10755 aStrBuf.getLength() == expVal.getLength()
10760 void append_064()
10762 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10763 OString expVal( aStrBuf.getStr() );
10764 sal_Int64 input = 15;
10765 sal_Int16 radix = 2;
10767 expVal += OString( "1111" );
10768 aStrBuf.append( input, radix );
10770 CPPUNIT_ASSERT_MESSAGE
10772 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10773 aStrBuf.getStr()== expVal &&
10774 aStrBuf.getLength() == expVal.getLength()
10779 void append_065()
10781 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10782 OString expVal( aStrBuf.getStr() );
10783 sal_Int64 input = 0;
10784 sal_Int16 radix = 8;
10786 expVal += OString( "0" );
10787 aStrBuf.append( input, radix );
10789 CPPUNIT_ASSERT_MESSAGE
10791 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10792 aStrBuf.getStr()== expVal &&
10793 aStrBuf.getLength() == expVal.getLength()
10798 void append_066()
10800 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10801 OString expVal( aStrBuf.getStr() );
10802 sal_Int64 input = 4;
10803 sal_Int16 radix = 8;
10805 expVal += OString( "4" );
10806 aStrBuf.append( input, radix );
10808 CPPUNIT_ASSERT_MESSAGE
10810 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10811 aStrBuf.getStr()== expVal &&
10812 aStrBuf.getLength() == expVal.getLength()
10817 void append_067()
10819 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10820 OString expVal( aStrBuf.getStr() );
10821 sal_Int64 input = 8;
10822 sal_Int16 radix = 8;
10824 expVal += OString( "10" );
10825 aStrBuf.append( input, radix );
10827 CPPUNIT_ASSERT_MESSAGE
10829 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10830 aStrBuf.getStr()== expVal &&
10831 aStrBuf.getLength() == expVal.getLength()
10836 void append_068()
10838 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10839 OString expVal( aStrBuf.getStr() );
10840 sal_Int64 input = 15;
10841 sal_Int16 radix = 8;
10843 expVal += OString( "17" );
10844 aStrBuf.append( input, radix );
10846 CPPUNIT_ASSERT_MESSAGE
10848 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10849 aStrBuf.getStr()== expVal &&
10850 aStrBuf.getLength() == expVal.getLength()
10855 void append_069()
10857 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10858 OString expVal( aStrBuf.getStr() );
10859 sal_Int64 input = 0;
10860 sal_Int16 radix = 10;
10862 expVal += OString( "0" );
10863 aStrBuf.append( input, radix );
10865 CPPUNIT_ASSERT_MESSAGE
10867 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10868 aStrBuf.getStr()== expVal &&
10869 aStrBuf.getLength() == expVal.getLength()
10874 void append_070()
10876 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10877 OString expVal( aStrBuf.getStr() );
10878 sal_Int64 input = 4;
10879 sal_Int16 radix = 10;
10881 expVal += OString( "4" );
10882 aStrBuf.append( input, radix );
10884 CPPUNIT_ASSERT_MESSAGE
10886 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10887 aStrBuf.getStr()== expVal &&
10888 aStrBuf.getLength() == expVal.getLength()
10893 void append_071()
10895 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10896 OString expVal( aStrBuf.getStr() );
10897 sal_Int64 input = 8;
10898 sal_Int16 radix = 10;
10900 expVal += OString( "8" );
10901 aStrBuf.append( input, radix );
10903 CPPUNIT_ASSERT_MESSAGE
10905 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10906 aStrBuf.getStr()== expVal &&
10907 aStrBuf.getLength() == expVal.getLength()
10912 void append_072()
10914 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10915 OString expVal( aStrBuf.getStr() );
10916 sal_Int64 input = 15;
10917 sal_Int16 radix = 10;
10919 expVal += OString( "15" );
10920 aStrBuf.append( input, radix );
10922 CPPUNIT_ASSERT_MESSAGE
10924 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10925 aStrBuf.getStr()== expVal &&
10926 aStrBuf.getLength() == expVal.getLength()
10931 void append_073()
10933 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10934 OString expVal( aStrBuf.getStr() );
10935 sal_Int64 input = 0;
10936 sal_Int16 radix = 16;
10938 expVal += OString( "0" );
10939 aStrBuf.append( input, radix );
10941 CPPUNIT_ASSERT_MESSAGE
10943 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10944 aStrBuf.getStr()== expVal &&
10945 aStrBuf.getLength() == expVal.getLength()
10950 void append_074()
10952 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10953 OString expVal( aStrBuf.getStr() );
10954 sal_Int64 input = 4;
10955 sal_Int16 radix = 16;
10957 expVal += OString( "4" );
10958 aStrBuf.append( input, radix );
10960 CPPUNIT_ASSERT_MESSAGE
10962 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10963 aStrBuf.getStr()== expVal &&
10964 aStrBuf.getLength() == expVal.getLength()
10969 void append_075()
10971 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10972 OString expVal( aStrBuf.getStr() );
10973 sal_Int64 input = 8;
10974 sal_Int16 radix = 16;
10976 expVal += OString( "8" );
10977 aStrBuf.append( input, radix );
10979 CPPUNIT_ASSERT_MESSAGE
10981 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10982 aStrBuf.getStr()== expVal &&
10983 aStrBuf.getLength() == expVal.getLength()
10988 void append_076()
10990 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
10991 OString expVal( aStrBuf.getStr() );
10992 sal_Int64 input = 15;
10993 sal_Int16 radix = 16;
10995 expVal += OString( "f" );
10996 aStrBuf.append( input, radix );
10998 CPPUNIT_ASSERT_MESSAGE
11000 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
11001 aStrBuf.getStr()== expVal &&
11002 aStrBuf.getLength() == expVal.getLength()
11007 void append_077()
11009 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11010 OString expVal( aStrBuf.getStr() );
11011 sal_Int64 input = 0;
11012 sal_Int16 radix = 36;
11014 expVal += OString( "0" );
11015 aStrBuf.append( input, radix );
11017 CPPUNIT_ASSERT_MESSAGE
11019 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
11020 aStrBuf.getStr()== expVal &&
11021 aStrBuf.getLength() == expVal.getLength()
11026 void append_078()
11028 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11029 OString expVal( aStrBuf.getStr() );
11030 sal_Int64 input = 4;
11031 sal_Int16 radix = 36;
11033 expVal += OString( "4" );
11034 aStrBuf.append( input, radix );
11036 CPPUNIT_ASSERT_MESSAGE
11038 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
11039 aStrBuf.getStr()== expVal &&
11040 aStrBuf.getLength() == expVal.getLength()
11045 void append_079()
11047 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11048 OString expVal( aStrBuf.getStr() );
11049 sal_Int64 input = 8;
11050 sal_Int16 radix = 36;
11052 expVal += OString( "8" );
11053 aStrBuf.append( input, radix );
11055 CPPUNIT_ASSERT_MESSAGE
11057 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
11058 aStrBuf.getStr()== expVal &&
11059 aStrBuf.getLength() == expVal.getLength()
11064 void append_080()
11066 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
11067 OString expVal( aStrBuf.getStr() );
11068 sal_Int64 input = 35;
11069 sal_Int16 radix = 36;
11071 expVal += OString( "z" );
11072 aStrBuf.append( input, radix );
11074 CPPUNIT_ASSERT_MESSAGE
11076 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
11077 aStrBuf.getStr()== expVal &&
11078 aStrBuf.getLength() == expVal.getLength()
11083 void append_081()
11085 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11086 OString expVal( aStrBuf.getStr() );
11087 sal_Int64 input = 0;
11088 sal_Int16 radix = 2;
11090 expVal += OString( "0" );
11091 aStrBuf.append( input, radix );
11093 CPPUNIT_ASSERT_MESSAGE
11095 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
11096 aStrBuf.getStr()== expVal &&
11097 aStrBuf.getLength() == expVal.getLength()
11102 void append_082()
11104 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11105 OString expVal( aStrBuf.getStr() );
11106 sal_Int64 input = 4;
11107 sal_Int16 radix = 2;
11109 expVal += OString( "100" );
11110 aStrBuf.append( input, radix );
11112 CPPUNIT_ASSERT_MESSAGE
11114 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
11115 aStrBuf.getStr()== expVal &&
11116 aStrBuf.getLength() == expVal.getLength()
11121 void append_083()
11123 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11124 OString expVal( aStrBuf.getStr() );
11125 sal_Int64 input = 8;
11126 sal_Int16 radix = 2;
11128 expVal += OString( "1000" );
11129 aStrBuf.append( input, radix );
11131 CPPUNIT_ASSERT_MESSAGE
11133 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
11134 aStrBuf.getStr()== expVal &&
11135 aStrBuf.getLength() == expVal.getLength()
11140 void append_084()
11142 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11143 OString expVal( aStrBuf.getStr() );
11144 sal_Int64 input = 15;
11145 sal_Int16 radix = 2;
11147 expVal += OString( "1111" );
11148 aStrBuf.append( input, radix );
11150 CPPUNIT_ASSERT_MESSAGE
11152 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
11153 aStrBuf.getStr()== expVal &&
11154 aStrBuf.getLength() == expVal.getLength()
11159 void append_085()
11161 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11162 OString expVal( aStrBuf.getStr() );
11163 sal_Int64 input = 0;
11164 sal_Int16 radix = 8;
11166 expVal += OString( "0" );
11167 aStrBuf.append( input, radix );
11169 CPPUNIT_ASSERT_MESSAGE
11171 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
11172 aStrBuf.getStr()== expVal &&
11173 aStrBuf.getLength() == expVal.getLength()
11178 void append_086()
11180 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11181 OString expVal( aStrBuf.getStr() );
11182 sal_Int64 input = 4;
11183 sal_Int16 radix = 8;
11185 expVal += OString( "4" );
11186 aStrBuf.append( input, radix );
11188 CPPUNIT_ASSERT_MESSAGE
11190 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
11191 aStrBuf.getStr()== expVal &&
11192 aStrBuf.getLength() == expVal.getLength()
11197 void append_087()
11199 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11200 OString expVal( aStrBuf.getStr() );
11201 sal_Int64 input = 8;
11202 sal_Int16 radix = 8;
11204 expVal += OString( "10" );
11205 aStrBuf.append( input, radix );
11207 CPPUNIT_ASSERT_MESSAGE
11209 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
11210 aStrBuf.getStr()== expVal &&
11211 aStrBuf.getLength() == expVal.getLength()
11216 void append_088()
11218 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11219 OString expVal( aStrBuf.getStr() );
11220 sal_Int64 input = 15;
11221 sal_Int16 radix = 8;
11223 expVal += OString( "17" );
11224 aStrBuf.append( input, radix );
11226 CPPUNIT_ASSERT_MESSAGE
11228 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
11229 aStrBuf.getStr()== expVal &&
11230 aStrBuf.getLength() == expVal.getLength()
11235 void append_089()
11237 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11238 OString expVal( aStrBuf.getStr() );
11239 sal_Int64 input = 0;
11240 sal_Int16 radix = 10;
11242 expVal += OString( "0" );
11243 aStrBuf.append( input, radix );
11245 CPPUNIT_ASSERT_MESSAGE
11247 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
11248 aStrBuf.getStr()== expVal &&
11249 aStrBuf.getLength() == expVal.getLength()
11254 void append_090()
11256 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11257 OString expVal( aStrBuf.getStr() );
11258 sal_Int64 input = 4;
11259 sal_Int16 radix = 10;
11261 expVal += OString( "4" );
11262 aStrBuf.append( input, radix );
11264 CPPUNIT_ASSERT_MESSAGE
11266 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
11267 aStrBuf.getStr()== expVal &&
11268 aStrBuf.getLength() == expVal.getLength()
11273 void append_091()
11275 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11276 OString expVal( aStrBuf.getStr() );
11277 sal_Int64 input = 8;
11278 sal_Int16 radix = 10;
11280 expVal += OString( "8" );
11281 aStrBuf.append( input, radix );
11283 CPPUNIT_ASSERT_MESSAGE
11285 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
11286 aStrBuf.getStr()== expVal &&
11287 aStrBuf.getLength() == expVal.getLength()
11292 void append_092()
11294 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11295 OString expVal( aStrBuf.getStr() );
11296 sal_Int64 input = 15;
11297 sal_Int16 radix = 10;
11299 expVal += OString( "15" );
11300 aStrBuf.append( input, radix );
11302 CPPUNIT_ASSERT_MESSAGE
11304 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
11305 aStrBuf.getStr()== expVal &&
11306 aStrBuf.getLength() == expVal.getLength()
11311 void append_093()
11313 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11314 OString expVal( aStrBuf.getStr() );
11315 sal_Int64 input = 0;
11316 sal_Int16 radix = 16;
11318 expVal += OString( "0" );
11319 aStrBuf.append( input, radix );
11321 CPPUNIT_ASSERT_MESSAGE
11323 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
11324 aStrBuf.getStr()== expVal &&
11325 aStrBuf.getLength() == expVal.getLength()
11330 void append_094()
11332 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11333 OString expVal( aStrBuf.getStr() );
11334 sal_Int64 input = 4;
11335 sal_Int16 radix = 16;
11337 expVal += OString( "4" );
11338 aStrBuf.append( input, radix );
11340 CPPUNIT_ASSERT_MESSAGE
11342 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
11343 aStrBuf.getStr()== expVal &&
11344 aStrBuf.getLength() == expVal.getLength()
11349 void append_095()
11351 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11352 OString expVal( aStrBuf.getStr() );
11353 sal_Int64 input = 8;
11354 sal_Int16 radix = 16;
11356 expVal += OString( "8" );
11357 aStrBuf.append( input, radix );
11359 CPPUNIT_ASSERT_MESSAGE
11361 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
11362 aStrBuf.getStr()== expVal &&
11363 aStrBuf.getLength() == expVal.getLength()
11368 void append_096()
11370 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11371 OString expVal( aStrBuf.getStr() );
11372 sal_Int64 input = 15;
11373 sal_Int16 radix = 16;
11375 expVal += OString( "f" );
11376 aStrBuf.append( input, radix );
11378 CPPUNIT_ASSERT_MESSAGE
11380 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
11381 aStrBuf.getStr()== expVal &&
11382 aStrBuf.getLength() == expVal.getLength()
11387 void append_097()
11389 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11390 OString expVal( aStrBuf.getStr() );
11391 sal_Int64 input = 0;
11392 sal_Int16 radix = 36;
11394 expVal += OString( "0" );
11395 aStrBuf.append( input, radix );
11397 CPPUNIT_ASSERT_MESSAGE
11399 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
11400 aStrBuf.getStr()== expVal &&
11401 aStrBuf.getLength() == expVal.getLength()
11406 void append_098()
11408 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11409 OString expVal( aStrBuf.getStr() );
11410 sal_Int64 input = 4;
11411 sal_Int16 radix = 36;
11413 expVal += OString( "4" );
11414 aStrBuf.append( input, radix );
11416 CPPUNIT_ASSERT_MESSAGE
11418 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
11419 aStrBuf.getStr()== expVal &&
11420 aStrBuf.getLength() == expVal.getLength()
11425 void append_099()
11427 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11428 OString expVal( aStrBuf.getStr() );
11429 sal_Int64 input = 8;
11430 sal_Int16 radix = 36;
11432 expVal += OString( "8" );
11433 aStrBuf.append( input, radix );
11435 CPPUNIT_ASSERT_MESSAGE
11437 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
11438 aStrBuf.getStr()== expVal &&
11439 aStrBuf.getLength() == expVal.getLength()
11444 void append_100()
11446 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
11447 OString expVal( aStrBuf.getStr() );
11448 sal_Int64 input = 35;
11449 sal_Int16 radix = 36;
11451 expVal += OString( "z" );
11452 aStrBuf.append( input, radix );
11454 CPPUNIT_ASSERT_MESSAGE
11456 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
11457 aStrBuf.getStr()== expVal &&
11458 aStrBuf.getLength() == expVal.getLength()
11463 CPPUNIT_TEST_SUITE( append_007_Int64 );
11464 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
11465 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
11466 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
11467 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
11468 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
11469 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
11470 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
11471 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
11472 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
11473 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
11474 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
11475 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
11476 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
11477 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
11478 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
11479 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
11480 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
11481 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
11482 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
11483 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
11484 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
11485 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
11486 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
11487 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
11488 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
11489 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
11490 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
11491 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
11492 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
11493 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
11494 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
11495 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
11496 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
11497 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
11498 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
11499 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
11500 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
11501 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
11502 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
11503 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
11504 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
11505 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
11506 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
11507 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
11508 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
11509 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
11510 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
11511 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
11512 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
11513 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
11514 CPPUNIT_TEST_SUITE_END();
11516 //------------------------------------------------------------------------
11517 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
11518 // where i = large constants
11519 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
11520 // where i = large constants
11521 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
11522 // where i = large constants
11523 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
11524 // where i = large constants
11525 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
11526 // where i = large constants
11527 //------------------------------------------------------------------------
11528 class append_007_Int64_Bounderies : public CppUnit::TestFixture
11530 OString* arrOUS[5];
11532 public:
11533 void setUp()
11535 arrOUS[0] = new OString( kTestStr7 );
11536 arrOUS[1] = new OString( );
11537 arrOUS[2] = new OString( kTestStr25 );
11538 arrOUS[3] = new OString( "\0" );
11539 arrOUS[4] = new OString( kTestStr28 );
11543 void tearDown()
11545 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
11546 delete arrOUS[3]; delete arrOUS[4];
11549 void append_001()
11551 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11552 OString expVal( aStrBuf.getStr() );
11553 sal_Int64 input = kSInt8Max;
11554 sal_Int16 radix = 2;
11556 expVal += OString( "1111111" );
11557 aStrBuf.append( input, radix );
11559 CPPUNIT_ASSERT_MESSAGE
11561 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
11562 aStrBuf.getStr()== expVal &&
11563 aStrBuf.getLength() == expVal.getLength()
11568 void append_002()
11570 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11571 OString expVal( aStrBuf.getStr() );
11572 sal_Int64 input = kSInt64Max;
11573 sal_Int16 radix = 2;
11575 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11576 aStrBuf.append( input, radix );
11578 CPPUNIT_ASSERT_MESSAGE
11580 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
11581 aStrBuf.getStr()== expVal &&
11582 aStrBuf.getLength() == expVal.getLength()
11587 void append_003()
11589 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11590 OString expVal( aStrBuf.getStr() );
11591 sal_Int64 input = kSInt8Max;
11592 sal_Int16 radix = 8;
11594 expVal += OString( "177" );
11595 aStrBuf.append( input, radix );
11597 CPPUNIT_ASSERT_MESSAGE
11599 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
11600 aStrBuf.getStr()== expVal &&
11601 aStrBuf.getLength() == expVal.getLength()
11606 void append_004()
11608 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11609 OString expVal( aStrBuf.getStr() );
11610 sal_Int64 input = kSInt64Max;
11611 sal_Int16 radix = 8;
11613 expVal += OString( "777777777777777777777" );
11614 aStrBuf.append( input, radix );
11616 CPPUNIT_ASSERT_MESSAGE
11618 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
11619 aStrBuf.getStr()== expVal &&
11620 aStrBuf.getLength() == expVal.getLength()
11625 void append_005()
11627 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11628 OString expVal( aStrBuf.getStr() );
11629 sal_Int64 input = kSInt8Max;
11630 sal_Int16 radix = 10;
11632 expVal += OString( "127" );
11633 aStrBuf.append( input, radix );
11635 CPPUNIT_ASSERT_MESSAGE
11637 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
11638 aStrBuf.getStr()== expVal &&
11639 aStrBuf.getLength() == expVal.getLength()
11644 void append_006()
11646 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11647 OString expVal( aStrBuf.getStr() );
11648 sal_Int64 input = kSInt64Max;
11649 sal_Int16 radix = 10;
11651 expVal += OString( "9223372036854775807" );
11652 aStrBuf.append( input, radix );
11654 CPPUNIT_ASSERT_MESSAGE
11656 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
11657 aStrBuf.getStr()== expVal &&
11658 aStrBuf.getLength() == expVal.getLength()
11663 void append_007()
11665 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11666 OString expVal( aStrBuf.getStr() );
11667 sal_Int64 input = kSInt8Max;
11668 sal_Int16 radix = 16;
11670 expVal += OString( "7f" );
11671 aStrBuf.append( input, radix );
11673 CPPUNIT_ASSERT_MESSAGE
11675 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
11676 aStrBuf.getStr()== expVal &&
11677 aStrBuf.getLength() == expVal.getLength()
11682 void append_008()
11684 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11685 OString expVal( aStrBuf.getStr() );
11686 sal_Int64 input = kSInt64Max;
11687 sal_Int16 radix = 16;
11689 expVal += OString( "7fffffffffffffff" );
11690 aStrBuf.append( input, radix );
11692 CPPUNIT_ASSERT_MESSAGE
11694 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
11695 aStrBuf.getStr()== expVal &&
11696 aStrBuf.getLength() == expVal.getLength()
11701 void append_009()
11703 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11704 OString expVal( aStrBuf.getStr() );
11705 sal_Int64 input = kSInt8Max;
11706 sal_Int16 radix = 36;
11708 expVal += OString( "3j" );
11709 aStrBuf.append( input, radix );
11711 CPPUNIT_ASSERT_MESSAGE
11713 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
11714 aStrBuf.getStr()== expVal &&
11715 aStrBuf.getLength() == expVal.getLength()
11720 void append_010()
11722 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
11723 OString expVal( aStrBuf.getStr() );
11724 sal_Int64 input = kSInt64Max;
11725 sal_Int16 radix = 36;
11727 expVal += OString( "1y2p0ij32e8e7" );
11728 aStrBuf.append( input, radix );
11730 CPPUNIT_ASSERT_MESSAGE
11732 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
11733 aStrBuf.getStr()== expVal &&
11734 aStrBuf.getLength() == expVal.getLength()
11739 void append_011()
11741 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11742 OString expVal( aStrBuf.getStr() );
11743 sal_Int64 input = kSInt8Max;
11744 sal_Int16 radix = 2;
11746 expVal += OString( "1111111" );
11747 aStrBuf.append( input, radix );
11749 CPPUNIT_ASSERT_MESSAGE
11751 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
11752 aStrBuf.getStr()== expVal &&
11753 aStrBuf.getLength() == expVal.getLength()
11758 void append_012()
11760 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11761 OString expVal( aStrBuf.getStr() );
11762 sal_Int64 input = kSInt64Max;
11763 sal_Int16 radix = 2;
11765 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11766 aStrBuf.append( input, radix );
11768 CPPUNIT_ASSERT_MESSAGE
11770 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
11771 aStrBuf.getStr()== expVal &&
11772 aStrBuf.getLength() == expVal.getLength()
11777 void append_013()
11779 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11780 OString expVal( aStrBuf.getStr() );
11781 sal_Int64 input = kSInt8Max;
11782 sal_Int16 radix = 8;
11784 expVal += OString( "177" );
11785 aStrBuf.append( input, radix );
11787 CPPUNIT_ASSERT_MESSAGE
11789 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
11790 aStrBuf.getStr()== expVal &&
11791 aStrBuf.getLength() == expVal.getLength()
11796 void append_014()
11798 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11799 OString expVal( aStrBuf.getStr() );
11800 sal_Int64 input = kSInt64Max;
11801 sal_Int16 radix = 8;
11803 expVal += OString( "777777777777777777777" );
11804 aStrBuf.append( input, radix );
11806 CPPUNIT_ASSERT_MESSAGE
11808 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
11809 aStrBuf.getStr()== expVal &&
11810 aStrBuf.getLength() == expVal.getLength()
11815 void append_015()
11817 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11818 OString expVal( aStrBuf.getStr() );
11819 sal_Int64 input = kSInt8Max;
11820 sal_Int16 radix = 10;
11822 expVal += OString( "127" );
11823 aStrBuf.append( input, radix );
11825 CPPUNIT_ASSERT_MESSAGE
11827 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
11828 aStrBuf.getStr()== expVal &&
11829 aStrBuf.getLength() == expVal.getLength()
11834 void append_016()
11836 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11837 OString expVal( aStrBuf.getStr() );
11838 sal_Int64 input = kSInt64Max;
11839 sal_Int16 radix = 10;
11841 expVal += OString( "9223372036854775807" );
11842 aStrBuf.append( input, radix );
11844 CPPUNIT_ASSERT_MESSAGE
11846 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
11847 aStrBuf.getStr()== expVal &&
11848 aStrBuf.getLength() == expVal.getLength()
11853 void append_017()
11855 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11856 OString expVal( aStrBuf.getStr() );
11857 sal_Int64 input = kSInt8Max;
11858 sal_Int16 radix = 16;
11860 expVal += OString( "7f" );
11861 aStrBuf.append( input, radix );
11863 CPPUNIT_ASSERT_MESSAGE
11865 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
11866 aStrBuf.getStr()== expVal &&
11867 aStrBuf.getLength() == expVal.getLength()
11872 void append_018()
11874 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11875 OString expVal( aStrBuf.getStr() );
11876 sal_Int64 input = kSInt64Max;
11877 sal_Int16 radix = 16;
11879 expVal += OString( "7fffffffffffffff" );
11880 aStrBuf.append( input, radix );
11882 CPPUNIT_ASSERT_MESSAGE
11884 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
11885 aStrBuf.getStr()== expVal &&
11886 aStrBuf.getLength() == expVal.getLength()
11891 void append_019()
11893 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11894 OString expVal( aStrBuf.getStr() );
11895 sal_Int64 input = kSInt8Max;
11896 sal_Int16 radix = 36;
11898 expVal += OString( "3j" );
11899 aStrBuf.append( input, radix );
11901 CPPUNIT_ASSERT_MESSAGE
11903 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
11904 aStrBuf.getStr()== expVal &&
11905 aStrBuf.getLength() == expVal.getLength()
11910 void append_020()
11912 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
11913 OString expVal( aStrBuf.getStr() );
11914 sal_Int64 input = kSInt64Max;
11915 sal_Int16 radix = 36;
11917 expVal += OString( "1y2p0ij32e8e7" );
11918 aStrBuf.append( input, radix );
11920 CPPUNIT_ASSERT_MESSAGE
11922 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
11923 aStrBuf.getStr()== expVal &&
11924 aStrBuf.getLength() == expVal.getLength()
11929 void append_021()
11931 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11932 OString expVal( aStrBuf.getStr() );
11933 sal_Int64 input = kSInt8Max;
11934 sal_Int16 radix = 2;
11936 expVal += OString( "1111111" );
11937 aStrBuf.append( input, radix );
11939 CPPUNIT_ASSERT_MESSAGE
11941 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11942 aStrBuf.getStr()== expVal &&
11943 aStrBuf.getLength() == expVal.getLength()
11948 void append_022()
11950 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11951 OString expVal( aStrBuf.getStr() );
11952 sal_Int64 input = kSInt64Max;
11953 sal_Int16 radix = 2;
11955 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
11956 aStrBuf.append( input, radix );
11958 CPPUNIT_ASSERT_MESSAGE
11960 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11961 aStrBuf.getStr()== expVal &&
11962 aStrBuf.getLength() == expVal.getLength()
11967 void append_023()
11969 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11970 OString expVal( aStrBuf.getStr() );
11971 sal_Int64 input = kSInt8Max;
11972 sal_Int16 radix = 8;
11974 expVal += OString( "177" );
11975 aStrBuf.append( input, radix );
11977 CPPUNIT_ASSERT_MESSAGE
11979 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11980 aStrBuf.getStr()== expVal &&
11981 aStrBuf.getLength() == expVal.getLength()
11986 void append_024()
11988 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
11989 OString expVal( aStrBuf.getStr() );
11990 sal_Int64 input = kSInt64Max;
11991 sal_Int16 radix = 8;
11993 expVal += OString( "777777777777777777777" );
11994 aStrBuf.append( input, radix );
11996 CPPUNIT_ASSERT_MESSAGE
11998 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11999 aStrBuf.getStr()== expVal &&
12000 aStrBuf.getLength() == expVal.getLength()
12005 void append_025()
12007 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12008 OString expVal( aStrBuf.getStr() );
12009 sal_Int64 input = kSInt8Max;
12010 sal_Int16 radix = 10;
12012 expVal += OString( "127" );
12013 aStrBuf.append( input, radix );
12015 CPPUNIT_ASSERT_MESSAGE
12017 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
12018 aStrBuf.getStr()== expVal &&
12019 aStrBuf.getLength() == expVal.getLength()
12024 void append_026()
12026 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12027 OString expVal( aStrBuf.getStr() );
12028 sal_Int64 input = kSInt64Max;
12029 sal_Int16 radix = 10;
12031 expVal += OString( "9223372036854775807" );
12032 aStrBuf.append( input, radix );
12034 CPPUNIT_ASSERT_MESSAGE
12036 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
12037 aStrBuf.getStr()== expVal &&
12038 aStrBuf.getLength() == expVal.getLength()
12043 void append_027()
12045 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12046 OString expVal( aStrBuf.getStr() );
12047 sal_Int64 input = kSInt8Max;
12048 sal_Int16 radix = 16;
12050 expVal += OString( "7f" );
12051 aStrBuf.append( input, radix );
12053 CPPUNIT_ASSERT_MESSAGE
12055 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
12056 aStrBuf.getStr()== expVal &&
12057 aStrBuf.getLength() == expVal.getLength()
12062 void append_028()
12064 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12065 OString expVal( aStrBuf.getStr() );
12066 sal_Int64 input = kSInt64Max;
12067 sal_Int16 radix = 16;
12069 expVal += OString( "7fffffffffffffff" );
12070 aStrBuf.append( input, radix );
12072 CPPUNIT_ASSERT_MESSAGE
12074 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
12075 aStrBuf.getStr()== expVal &&
12076 aStrBuf.getLength() == expVal.getLength()
12081 void append_029()
12083 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12084 OString expVal( aStrBuf.getStr() );
12085 sal_Int64 input = kSInt8Max;
12086 sal_Int16 radix = 36;
12088 expVal += OString( "3j" );
12089 aStrBuf.append( input, radix );
12091 CPPUNIT_ASSERT_MESSAGE
12093 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
12094 aStrBuf.getStr()== expVal &&
12095 aStrBuf.getLength() == expVal.getLength()
12100 void append_030()
12102 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
12103 OString expVal( aStrBuf.getStr() );
12104 sal_Int64 input = kSInt64Max;
12105 sal_Int16 radix = 36;
12107 expVal += OString( "1y2p0ij32e8e7" );
12108 aStrBuf.append( input, radix );
12110 CPPUNIT_ASSERT_MESSAGE
12112 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
12113 aStrBuf.getStr()== expVal &&
12114 aStrBuf.getLength() == expVal.getLength()
12119 void append_031()
12121 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12122 OString expVal( aStrBuf.getStr() );
12123 sal_Int64 input = kSInt8Max;
12124 sal_Int16 radix = 2;
12126 expVal += OString( "1111111" );
12127 aStrBuf.append( input, radix );
12129 CPPUNIT_ASSERT_MESSAGE
12131 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
12132 aStrBuf.getStr()== expVal &&
12133 aStrBuf.getLength() == expVal.getLength()
12138 void append_032()
12140 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12141 OString expVal( aStrBuf.getStr() );
12142 sal_Int64 input = kSInt64Max;
12143 sal_Int16 radix = 2;
12145 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
12146 aStrBuf.append( input, radix );
12148 CPPUNIT_ASSERT_MESSAGE
12150 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
12151 aStrBuf.getStr()== expVal &&
12152 aStrBuf.getLength() == expVal.getLength()
12157 void append_033()
12159 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12160 OString expVal( aStrBuf.getStr() );
12161 sal_Int64 input = kSInt8Max;
12162 sal_Int16 radix = 8;
12164 expVal += OString( "177" );
12165 aStrBuf.append( input, radix );
12167 CPPUNIT_ASSERT_MESSAGE
12169 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
12170 aStrBuf.getStr()== expVal &&
12171 aStrBuf.getLength() == expVal.getLength()
12176 void append_034()
12178 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12179 OString expVal( aStrBuf.getStr() );
12180 sal_Int64 input = kSInt64Max;
12181 sal_Int16 radix = 8;
12183 expVal += OString( "777777777777777777777" );
12184 aStrBuf.append( input, radix );
12186 CPPUNIT_ASSERT_MESSAGE
12188 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
12189 aStrBuf.getStr()== expVal &&
12190 aStrBuf.getLength() == expVal.getLength()
12195 void append_035()
12197 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12198 OString expVal( aStrBuf.getStr() );
12199 sal_Int64 input = kSInt8Max;
12200 sal_Int16 radix = 10;
12202 expVal += OString( "127" );
12203 aStrBuf.append( input, radix );
12205 CPPUNIT_ASSERT_MESSAGE
12207 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
12208 aStrBuf.getStr()== expVal &&
12209 aStrBuf.getLength() == expVal.getLength()
12214 void append_036()
12216 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12217 OString expVal( aStrBuf.getStr() );
12218 sal_Int64 input = kSInt64Max;
12219 sal_Int16 radix = 10;
12221 expVal += OString( "9223372036854775807" );
12222 aStrBuf.append( input, radix );
12224 CPPUNIT_ASSERT_MESSAGE
12226 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
12227 aStrBuf.getStr()== expVal &&
12228 aStrBuf.getLength() == expVal.getLength()
12233 void append_037()
12235 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12236 OString expVal( aStrBuf.getStr() );
12237 sal_Int64 input = kSInt8Max;
12238 sal_Int16 radix = 16;
12240 expVal += OString( "7f" );
12241 aStrBuf.append( input, radix );
12243 CPPUNIT_ASSERT_MESSAGE
12245 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
12246 aStrBuf.getStr()== expVal &&
12247 aStrBuf.getLength() == expVal.getLength()
12252 void append_038()
12254 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12255 OString expVal( aStrBuf.getStr() );
12256 sal_Int64 input = kSInt64Max;
12257 sal_Int16 radix = 16;
12259 expVal += OString( "7fffffffffffffff" );
12260 aStrBuf.append( input, radix );
12262 CPPUNIT_ASSERT_MESSAGE
12264 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
12265 aStrBuf.getStr()== expVal &&
12266 aStrBuf.getLength() == expVal.getLength()
12271 void append_039()
12273 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12274 OString expVal( aStrBuf.getStr() );
12275 sal_Int64 input = kSInt8Max;
12276 sal_Int16 radix = 36;
12278 expVal += OString( "3j" );
12279 aStrBuf.append( input, radix );
12281 CPPUNIT_ASSERT_MESSAGE
12283 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
12284 aStrBuf.getStr()== expVal &&
12285 aStrBuf.getLength() == expVal.getLength()
12290 void append_040()
12292 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
12293 OString expVal( aStrBuf.getStr() );
12294 sal_Int64 input = kSInt64Max;
12295 sal_Int16 radix = 36;
12297 expVal += OString( "1y2p0ij32e8e7" );
12298 aStrBuf.append( input, radix );
12300 CPPUNIT_ASSERT_MESSAGE
12302 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
12303 aStrBuf.getStr()== expVal &&
12304 aStrBuf.getLength() == expVal.getLength()
12309 void append_041()
12311 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12312 OString expVal( aStrBuf.getStr() );
12313 sal_Int64 input = kSInt8Max;
12314 sal_Int16 radix = 2;
12316 expVal += OString( "1111111" );
12317 aStrBuf.append( input, radix );
12319 CPPUNIT_ASSERT_MESSAGE
12321 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
12322 aStrBuf.getStr()== expVal &&
12323 aStrBuf.getLength() == expVal.getLength()
12328 void append_042()
12330 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12331 OString expVal( aStrBuf.getStr() );
12332 sal_Int64 input = kSInt64Max;
12333 sal_Int16 radix = 2;
12335 expVal += OString( "111111111111111111111111111111111111111111111111111111111111111" );
12336 aStrBuf.append( input, radix );
12338 CPPUNIT_ASSERT_MESSAGE
12340 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
12341 aStrBuf.getStr()== expVal &&
12342 aStrBuf.getLength() == expVal.getLength()
12347 void append_043()
12349 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12350 OString expVal( aStrBuf.getStr() );
12351 sal_Int64 input = kSInt8Max;
12352 sal_Int16 radix = 8;
12354 expVal += OString( "177" );
12355 aStrBuf.append( input, radix );
12357 CPPUNIT_ASSERT_MESSAGE
12359 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
12360 aStrBuf.getStr()== expVal &&
12361 aStrBuf.getLength() == expVal.getLength()
12366 void append_044()
12368 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12369 OString expVal( aStrBuf.getStr() );
12370 sal_Int64 input = kSInt64Max;
12371 sal_Int16 radix = 8;
12373 expVal += OString( "777777777777777777777" );
12374 aStrBuf.append( input, radix );
12376 CPPUNIT_ASSERT_MESSAGE
12378 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
12379 aStrBuf.getStr()== expVal &&
12380 aStrBuf.getLength() == expVal.getLength()
12385 void append_045()
12387 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12388 OString expVal( aStrBuf.getStr() );
12389 sal_Int64 input = kSInt8Max;
12390 sal_Int16 radix = 10;
12392 expVal += OString( "127" );
12393 aStrBuf.append( input, radix );
12395 CPPUNIT_ASSERT_MESSAGE
12397 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
12398 aStrBuf.getStr()== expVal &&
12399 aStrBuf.getLength() == expVal.getLength()
12404 void append_046()
12406 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12407 OString expVal( aStrBuf.getStr() );
12408 sal_Int64 input = kSInt64Max;
12409 sal_Int16 radix = 10;
12411 expVal += OString( "9223372036854775807" );
12412 aStrBuf.append( input, radix );
12414 CPPUNIT_ASSERT_MESSAGE
12416 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
12417 aStrBuf.getStr()== expVal &&
12418 aStrBuf.getLength() == expVal.getLength()
12423 void append_047()
12425 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12426 OString expVal( aStrBuf.getStr() );
12427 sal_Int64 input = kSInt8Max;
12428 sal_Int16 radix = 16;
12430 expVal += OString( "7f" );
12431 aStrBuf.append( input, radix );
12433 CPPUNIT_ASSERT_MESSAGE
12435 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
12436 aStrBuf.getStr()== expVal &&
12437 aStrBuf.getLength() == expVal.getLength()
12442 void append_048()
12444 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12445 OString expVal( aStrBuf.getStr() );
12446 sal_Int64 input = kSInt64Max;
12447 sal_Int16 radix = 16;
12449 expVal += OString( "7fffffffffffffff" );
12450 aStrBuf.append( input, radix );
12452 CPPUNIT_ASSERT_MESSAGE
12454 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
12455 aStrBuf.getStr()== expVal &&
12456 aStrBuf.getLength() == expVal.getLength()
12461 void append_049()
12463 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12464 OString expVal( aStrBuf.getStr() );
12465 sal_Int64 input = kSInt8Max;
12466 sal_Int16 radix = 36;
12468 expVal += OString( "3j" );
12469 aStrBuf.append( input, radix );
12471 CPPUNIT_ASSERT_MESSAGE
12473 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
12474 aStrBuf.getStr()== expVal &&
12475 aStrBuf.getLength() == expVal.getLength()
12480 void append_050()
12482 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
12483 OString expVal( aStrBuf.getStr() );
12484 sal_Int64 input = kSInt64Max;
12485 sal_Int16 radix = 36;
12487 expVal += OString( "1y2p0ij32e8e7" );
12488 aStrBuf.append( input, radix );
12490 CPPUNIT_ASSERT_MESSAGE
12492 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
12493 aStrBuf.getStr()== expVal &&
12494 aStrBuf.getLength() == expVal.getLength()
12499 CPPUNIT_TEST_SUITE( append_007_Int64_Bounderies );
12500 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
12501 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
12502 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
12503 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
12504 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
12505 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
12506 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
12507 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
12508 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
12509 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
12510 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
12511 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
12512 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
12513 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
12514 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
12515 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
12516 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
12517 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
12518 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
12519 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
12520 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
12521 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
12522 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
12523 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
12524 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
12525 CPPUNIT_TEST_SUITE_END();
12527 //------------------------------------------------------------------------
12528 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
12529 // for negative value
12530 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
12531 // for negative value
12532 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
12533 // for negative value
12534 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
12535 // for negative value
12536 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
12537 // for negative value
12538 //------------------------------------------------------------------------
12539 class append_007_Int64_Negative : public CppUnit::TestFixture
12541 OString* arrOUS[5];
12543 public:
12544 void setUp()
12546 arrOUS[0] = new OString( kTestStr7 );
12547 arrOUS[1] = new OString( );
12548 arrOUS[2] = new OString( kTestStr25 );
12549 arrOUS[3] = new OString( "\0" );
12550 arrOUS[4] = new OString( kTestStr28 );
12554 void tearDown()
12556 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
12557 delete arrOUS[3]; delete arrOUS[4];
12560 void append_001()
12562 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12563 OString expVal( aStrBuf.getStr() );
12564 sal_Int64 input = -0;
12565 sal_Int16 radix = 2;
12567 expVal += OString( "0" );
12568 aStrBuf.append( input, radix );
12570 CPPUNIT_ASSERT_MESSAGE
12572 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12573 aStrBuf.getStr()== expVal &&
12574 aStrBuf.getLength() == expVal.getLength()
12579 void append_002()
12581 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12582 OString expVal( aStrBuf.getStr() );
12583 sal_Int64 input = -4;
12584 sal_Int16 radix = 2;
12586 expVal += OString( "-" );
12587 expVal += OString( "100" );
12588 aStrBuf.append( input, radix );
12590 CPPUNIT_ASSERT_MESSAGE
12592 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12593 aStrBuf.getStr()== expVal &&
12594 aStrBuf.getLength() == expVal.getLength()
12599 void append_003()
12601 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12602 OString expVal( aStrBuf.getStr() );
12603 sal_Int64 input = -8;
12604 sal_Int16 radix = 2;
12606 expVal += OString( "-" );
12607 expVal += OString( "1000" );
12608 aStrBuf.append( input, radix );
12610 CPPUNIT_ASSERT_MESSAGE
12612 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12613 aStrBuf.getStr()== expVal &&
12614 aStrBuf.getLength() == expVal.getLength()
12619 void append_004()
12621 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12622 OString expVal( aStrBuf.getStr() );
12623 sal_Int64 input = -15;
12624 sal_Int16 radix = 2;
12626 expVal += OString( "-" );
12627 expVal += OString( "1111" );
12628 aStrBuf.append( input, radix );
12630 CPPUNIT_ASSERT_MESSAGE
12632 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12633 aStrBuf.getStr()== expVal &&
12634 aStrBuf.getLength() == expVal.getLength()
12639 void append_005()
12641 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12642 OString expVal( aStrBuf.getStr() );
12643 sal_Int64 input = -0;
12644 sal_Int16 radix = 8;
12646 expVal += OString( "0" );
12647 aStrBuf.append( input, radix );
12649 CPPUNIT_ASSERT_MESSAGE
12651 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12652 aStrBuf.getStr()== expVal &&
12653 aStrBuf.getLength() == expVal.getLength()
12658 void append_006()
12660 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12661 OString expVal( aStrBuf.getStr() );
12662 sal_Int64 input = -4;
12663 sal_Int16 radix = 8;
12665 expVal += OString( "-" );
12666 expVal += OString( "4" );
12667 aStrBuf.append( input, radix );
12669 CPPUNIT_ASSERT_MESSAGE
12671 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12672 aStrBuf.getStr()== expVal &&
12673 aStrBuf.getLength() == expVal.getLength()
12678 void append_007()
12680 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12681 OString expVal( aStrBuf.getStr() );
12682 sal_Int64 input = -8;
12683 sal_Int16 radix = 8;
12685 expVal += OString( "-" );
12686 expVal += OString( "10" );
12687 aStrBuf.append( input, radix );
12689 CPPUNIT_ASSERT_MESSAGE
12691 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12692 aStrBuf.getStr()== expVal &&
12693 aStrBuf.getLength() == expVal.getLength()
12698 void append_008()
12700 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12701 OString expVal( aStrBuf.getStr() );
12702 sal_Int64 input = -15;
12703 sal_Int16 radix = 8;
12705 expVal += OString( "-" );
12706 expVal += OString( "17" );
12707 aStrBuf.append( input, radix );
12709 CPPUNIT_ASSERT_MESSAGE
12711 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12712 aStrBuf.getStr()== expVal &&
12713 aStrBuf.getLength() == expVal.getLength()
12718 void append_009()
12720 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12721 OString expVal( aStrBuf.getStr() );
12722 sal_Int64 input = -0;
12723 sal_Int16 radix = 10;
12725 expVal += OString( "0" );
12726 aStrBuf.append( input, radix );
12728 CPPUNIT_ASSERT_MESSAGE
12730 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12731 aStrBuf.getStr()== expVal &&
12732 aStrBuf.getLength() == expVal.getLength()
12737 void append_010()
12739 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12740 OString expVal( aStrBuf.getStr() );
12741 sal_Int64 input = -4;
12742 sal_Int16 radix = 10;
12744 expVal += OString( "-" );
12745 expVal += OString( "4" );
12746 aStrBuf.append( input, radix );
12748 CPPUNIT_ASSERT_MESSAGE
12750 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12751 aStrBuf.getStr()== expVal &&
12752 aStrBuf.getLength() == expVal.getLength()
12757 void append_011()
12759 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12760 OString expVal( aStrBuf.getStr() );
12761 sal_Int64 input = -8;
12762 sal_Int16 radix = 10;
12764 expVal += OString( "-" );
12765 expVal += OString( "8" );
12766 aStrBuf.append( input, radix );
12768 CPPUNIT_ASSERT_MESSAGE
12770 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12771 aStrBuf.getStr()== expVal &&
12772 aStrBuf.getLength() == expVal.getLength()
12777 void append_012()
12779 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12780 OString expVal( aStrBuf.getStr() );
12781 sal_Int64 input = -15;
12782 sal_Int16 radix = 10;
12784 expVal += OString( "-" );
12785 expVal += OString( "15" );
12786 aStrBuf.append( input, radix );
12788 CPPUNIT_ASSERT_MESSAGE
12790 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12791 aStrBuf.getStr()== expVal &&
12792 aStrBuf.getLength() == expVal.getLength()
12797 void append_013()
12799 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12800 OString expVal( aStrBuf.getStr() );
12801 sal_Int64 input = -0;
12802 sal_Int16 radix = 16;
12804 expVal += OString( "0" );
12805 aStrBuf.append( input, radix );
12807 CPPUNIT_ASSERT_MESSAGE
12809 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12810 aStrBuf.getStr()== expVal &&
12811 aStrBuf.getLength() == expVal.getLength()
12816 void append_014()
12818 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12819 OString expVal( aStrBuf.getStr() );
12820 sal_Int64 input = -4;
12821 sal_Int16 radix = 16;
12823 expVal += OString( "-" );
12824 expVal += OString( "4" );
12825 aStrBuf.append( input, radix );
12827 CPPUNIT_ASSERT_MESSAGE
12829 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12830 aStrBuf.getStr()== expVal &&
12831 aStrBuf.getLength() == expVal.getLength()
12836 void append_015()
12838 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12839 OString expVal( aStrBuf.getStr() );
12840 sal_Int64 input = -8;
12841 sal_Int16 radix = 16;
12843 expVal += OString( "-" );
12844 expVal += OString( "8" );
12845 aStrBuf.append( input, radix );
12847 CPPUNIT_ASSERT_MESSAGE
12849 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12850 aStrBuf.getStr()== expVal &&
12851 aStrBuf.getLength() == expVal.getLength()
12856 void append_016()
12858 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12859 OString expVal( aStrBuf.getStr() );
12860 sal_Int64 input = -15;
12861 sal_Int16 radix = 16;
12863 expVal += OString( "-" );
12864 expVal += OString( "f" );
12865 aStrBuf.append( input, radix );
12867 CPPUNIT_ASSERT_MESSAGE
12869 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12870 aStrBuf.getStr()== expVal &&
12871 aStrBuf.getLength() == expVal.getLength()
12876 void append_017()
12878 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12879 OString expVal( aStrBuf.getStr() );
12880 sal_Int64 input = -0;
12881 sal_Int16 radix = 36;
12883 expVal += OString( "0" );
12884 aStrBuf.append( input, radix );
12886 CPPUNIT_ASSERT_MESSAGE
12888 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12889 aStrBuf.getStr()== expVal &&
12890 aStrBuf.getLength() == expVal.getLength()
12895 void append_018()
12897 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12898 OString expVal( aStrBuf.getStr() );
12899 sal_Int64 input = -4;
12900 sal_Int16 radix = 36;
12902 expVal += OString( "-" );
12903 expVal += OString( "4" );
12904 aStrBuf.append( input, radix );
12906 CPPUNIT_ASSERT_MESSAGE
12908 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12909 aStrBuf.getStr()== expVal &&
12910 aStrBuf.getLength() == expVal.getLength()
12915 void append_019()
12917 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12918 OString expVal( aStrBuf.getStr() );
12919 sal_Int64 input = -8;
12920 sal_Int16 radix = 36;
12922 expVal += OString( "-" );
12923 expVal += OString( "8" );
12924 aStrBuf.append( input, radix );
12926 CPPUNIT_ASSERT_MESSAGE
12928 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12929 aStrBuf.getStr()== expVal &&
12930 aStrBuf.getLength() == expVal.getLength()
12935 void append_020()
12937 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
12938 OString expVal( aStrBuf.getStr() );
12939 sal_Int64 input = -35;
12940 sal_Int16 radix = 36;
12942 expVal += OString( "-" );
12943 expVal += OString( "z" );
12944 aStrBuf.append( input, radix );
12946 CPPUNIT_ASSERT_MESSAGE
12948 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12949 aStrBuf.getStr()== expVal &&
12950 aStrBuf.getLength() == expVal.getLength()
12955 void append_021()
12957 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12958 OString expVal( aStrBuf.getStr() );
12959 sal_Int64 input = -0;
12960 sal_Int16 radix = 2;
12962 expVal += OString( "0" );
12963 aStrBuf.append( input, radix );
12965 CPPUNIT_ASSERT_MESSAGE
12967 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12968 aStrBuf.getStr()== expVal &&
12969 aStrBuf.getLength() == expVal.getLength()
12974 void append_022()
12976 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12977 OString expVal( aStrBuf.getStr() );
12978 sal_Int64 input = -4;
12979 sal_Int16 radix = 2;
12981 expVal += OString( "-" );
12982 expVal += OString( "100" );
12983 aStrBuf.append( input, radix );
12985 CPPUNIT_ASSERT_MESSAGE
12987 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12988 aStrBuf.getStr()== expVal &&
12989 aStrBuf.getLength() == expVal.getLength()
12994 void append_023()
12996 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
12997 OString expVal( aStrBuf.getStr() );
12998 sal_Int64 input = -8;
12999 sal_Int16 radix = 2;
13001 expVal += OString( "-" );
13002 expVal += OString( "1000" );
13003 aStrBuf.append( input, radix );
13005 CPPUNIT_ASSERT_MESSAGE
13007 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
13008 aStrBuf.getStr()== expVal &&
13009 aStrBuf.getLength() == expVal.getLength()
13014 void append_024()
13016 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13017 OString expVal( aStrBuf.getStr() );
13018 sal_Int64 input = -15;
13019 sal_Int16 radix = 2;
13021 expVal += OString( "-" );
13022 expVal += OString( "1111" );
13023 aStrBuf.append( input, radix );
13025 CPPUNIT_ASSERT_MESSAGE
13027 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
13028 aStrBuf.getStr()== expVal &&
13029 aStrBuf.getLength() == expVal.getLength()
13034 void append_025()
13036 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13037 OString expVal( aStrBuf.getStr() );
13038 sal_Int64 input = -0;
13039 sal_Int16 radix = 8;
13041 expVal += OString( "0" );
13042 aStrBuf.append( input, radix );
13044 CPPUNIT_ASSERT_MESSAGE
13046 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
13047 aStrBuf.getStr()== expVal &&
13048 aStrBuf.getLength() == expVal.getLength()
13053 void append_026()
13055 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13056 OString expVal( aStrBuf.getStr() );
13057 sal_Int64 input = -4;
13058 sal_Int16 radix = 8;
13060 expVal += OString( "-" );
13061 expVal += OString( "4" );
13062 aStrBuf.append( input, radix );
13064 CPPUNIT_ASSERT_MESSAGE
13066 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
13067 aStrBuf.getStr()== expVal &&
13068 aStrBuf.getLength() == expVal.getLength()
13073 void append_027()
13075 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13076 OString expVal( aStrBuf.getStr() );
13077 sal_Int64 input = -8;
13078 sal_Int16 radix = 8;
13080 expVal += OString( "-" );
13081 expVal += OString( "10" );
13082 aStrBuf.append( input, radix );
13084 CPPUNIT_ASSERT_MESSAGE
13086 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
13087 aStrBuf.getStr()== expVal &&
13088 aStrBuf.getLength() == expVal.getLength()
13093 void append_028()
13095 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13096 OString expVal( aStrBuf.getStr() );
13097 sal_Int64 input = -15;
13098 sal_Int16 radix = 8;
13100 expVal += OString( "-" );
13101 expVal += OString( "17" );
13102 aStrBuf.append( input, radix );
13104 CPPUNIT_ASSERT_MESSAGE
13106 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
13107 aStrBuf.getStr()== expVal &&
13108 aStrBuf.getLength() == expVal.getLength()
13113 void append_029()
13115 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13116 OString expVal( aStrBuf.getStr() );
13117 sal_Int64 input = -0;
13118 sal_Int16 radix = 10;
13120 expVal += OString( "0" );
13121 aStrBuf.append( input, radix );
13123 CPPUNIT_ASSERT_MESSAGE
13125 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
13126 aStrBuf.getStr()== expVal &&
13127 aStrBuf.getLength() == expVal.getLength()
13132 void append_030()
13134 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13135 OString expVal( aStrBuf.getStr() );
13136 sal_Int64 input = -4;
13137 sal_Int16 radix = 10;
13139 expVal += OString( "-" );
13140 expVal += OString( "4" );
13141 aStrBuf.append( input, radix );
13143 CPPUNIT_ASSERT_MESSAGE
13145 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
13146 aStrBuf.getStr()== expVal &&
13147 aStrBuf.getLength() == expVal.getLength()
13152 void append_031()
13154 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13155 OString expVal( aStrBuf.getStr() );
13156 sal_Int64 input = -8;
13157 sal_Int16 radix = 10;
13159 expVal += OString( "-" );
13160 expVal += OString( "8" );
13161 aStrBuf.append( input, radix );
13163 CPPUNIT_ASSERT_MESSAGE
13165 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
13166 aStrBuf.getStr()== expVal &&
13167 aStrBuf.getLength() == expVal.getLength()
13172 void append_032()
13174 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13175 OString expVal( aStrBuf.getStr() );
13176 sal_Int64 input = -15;
13177 sal_Int16 radix = 10;
13179 expVal += OString( "-" );
13180 expVal += OString( "15" );
13181 aStrBuf.append( input, radix );
13183 CPPUNIT_ASSERT_MESSAGE
13185 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
13186 aStrBuf.getStr()== expVal &&
13187 aStrBuf.getLength() == expVal.getLength()
13192 void append_033()
13194 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13195 OString expVal( aStrBuf.getStr() );
13196 sal_Int64 input = -0;
13197 sal_Int16 radix = 16;
13199 expVal += OString( "0" );
13200 aStrBuf.append( input, radix );
13202 CPPUNIT_ASSERT_MESSAGE
13204 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
13205 aStrBuf.getStr()== expVal &&
13206 aStrBuf.getLength() == expVal.getLength()
13211 void append_034()
13213 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13214 OString expVal( aStrBuf.getStr() );
13215 sal_Int64 input = -4;
13216 sal_Int16 radix = 16;
13218 expVal += OString( "-" );
13219 expVal += OString( "4" );
13220 aStrBuf.append( input, radix );
13222 CPPUNIT_ASSERT_MESSAGE
13224 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
13225 aStrBuf.getStr()== expVal &&
13226 aStrBuf.getLength() == expVal.getLength()
13231 void append_035()
13233 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13234 OString expVal( aStrBuf.getStr() );
13235 sal_Int64 input = -8;
13236 sal_Int16 radix = 16;
13238 expVal += OString( "-" );
13239 expVal += OString( "8" );
13240 aStrBuf.append( input, radix );
13242 CPPUNIT_ASSERT_MESSAGE
13244 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
13245 aStrBuf.getStr()== expVal &&
13246 aStrBuf.getLength() == expVal.getLength()
13251 void append_036()
13253 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13254 OString expVal( aStrBuf.getStr() );
13255 sal_Int64 input = -15;
13256 sal_Int16 radix = 16;
13258 expVal += OString( "-" );
13259 expVal += OString( "f" );
13260 aStrBuf.append( input, radix );
13262 CPPUNIT_ASSERT_MESSAGE
13264 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
13265 aStrBuf.getStr()== expVal &&
13266 aStrBuf.getLength() == expVal.getLength()
13271 void append_037()
13273 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13274 OString expVal( aStrBuf.getStr() );
13275 sal_Int64 input = -0;
13276 sal_Int16 radix = 36;
13278 expVal += OString( "0" );
13279 aStrBuf.append( input, radix );
13281 CPPUNIT_ASSERT_MESSAGE
13283 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
13284 aStrBuf.getStr()== expVal &&
13285 aStrBuf.getLength() == expVal.getLength()
13290 void append_038()
13292 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13293 OString expVal( aStrBuf.getStr() );
13294 sal_Int64 input = -4;
13295 sal_Int16 radix = 36;
13297 expVal += OString( "-" );
13298 expVal += OString( "4" );
13299 aStrBuf.append( input, radix );
13301 CPPUNIT_ASSERT_MESSAGE
13303 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
13304 aStrBuf.getStr()== expVal &&
13305 aStrBuf.getLength() == expVal.getLength()
13310 void append_039()
13312 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13313 OString expVal( aStrBuf.getStr() );
13314 sal_Int64 input = -8;
13315 sal_Int16 radix = 36;
13317 expVal += OString( "-" );
13318 expVal += OString( "8" );
13319 aStrBuf.append( input, radix );
13321 CPPUNIT_ASSERT_MESSAGE
13323 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
13324 aStrBuf.getStr()== expVal &&
13325 aStrBuf.getLength() == expVal.getLength()
13330 void append_040()
13332 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
13333 OString expVal( aStrBuf.getStr() );
13334 sal_Int64 input = -35;
13335 sal_Int16 radix = 36;
13337 expVal += OString( "-" );
13338 expVal += OString( "z" );
13339 aStrBuf.append( input, radix );
13341 CPPUNIT_ASSERT_MESSAGE
13343 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
13344 aStrBuf.getStr()== expVal &&
13345 aStrBuf.getLength() == expVal.getLength()
13350 void append_041()
13352 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13353 OString expVal( aStrBuf.getStr() );
13354 sal_Int64 input = -0;
13355 sal_Int16 radix = 2;
13357 expVal += OString( "0" );
13358 aStrBuf.append( input, radix );
13360 CPPUNIT_ASSERT_MESSAGE
13362 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
13363 aStrBuf.getStr()== expVal &&
13364 aStrBuf.getLength() == expVal.getLength()
13369 void append_042()
13371 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13372 OString expVal( aStrBuf.getStr() );
13373 sal_Int64 input = -4;
13374 sal_Int16 radix = 2;
13376 expVal += OString( "-" );
13377 expVal += OString( "100" );
13378 aStrBuf.append( input, radix );
13380 CPPUNIT_ASSERT_MESSAGE
13382 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
13383 aStrBuf.getStr()== expVal &&
13384 aStrBuf.getLength() == expVal.getLength()
13389 void append_043()
13391 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13392 OString expVal( aStrBuf.getStr() );
13393 sal_Int64 input = -8;
13394 sal_Int16 radix = 2;
13396 expVal += OString( "-" );
13397 expVal += OString( "1000" );
13398 aStrBuf.append( input, radix );
13400 CPPUNIT_ASSERT_MESSAGE
13402 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
13403 aStrBuf.getStr()== expVal &&
13404 aStrBuf.getLength() == expVal.getLength()
13409 void append_044()
13411 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13412 OString expVal( aStrBuf.getStr() );
13413 sal_Int64 input = -15;
13414 sal_Int16 radix = 2;
13416 expVal += OString( "-" );
13417 expVal += OString( "1111" );
13418 aStrBuf.append( input, radix );
13420 CPPUNIT_ASSERT_MESSAGE
13422 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
13423 aStrBuf.getStr()== expVal &&
13424 aStrBuf.getLength() == expVal.getLength()
13429 void append_045()
13431 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13432 OString expVal( aStrBuf.getStr() );
13433 sal_Int64 input = -0;
13434 sal_Int16 radix = 8;
13436 expVal += OString( "0" );
13437 aStrBuf.append( input, radix );
13439 CPPUNIT_ASSERT_MESSAGE
13441 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
13442 aStrBuf.getStr()== expVal &&
13443 aStrBuf.getLength() == expVal.getLength()
13448 void append_046()
13450 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13451 OString expVal( aStrBuf.getStr() );
13452 sal_Int64 input = -4;
13453 sal_Int16 radix = 8;
13455 expVal += OString( "-" );
13456 expVal += OString( "4" );
13457 aStrBuf.append( input, radix );
13459 CPPUNIT_ASSERT_MESSAGE
13461 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
13462 aStrBuf.getStr()== expVal &&
13463 aStrBuf.getLength() == expVal.getLength()
13468 void append_047()
13470 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13471 OString expVal( aStrBuf.getStr() );
13472 sal_Int64 input = -8;
13473 sal_Int16 radix = 8;
13475 expVal += OString( "-" );
13476 expVal += OString( "10" );
13477 aStrBuf.append( input, radix );
13479 CPPUNIT_ASSERT_MESSAGE
13481 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
13482 aStrBuf.getStr()== expVal &&
13483 aStrBuf.getLength() == expVal.getLength()
13488 void append_048()
13490 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13491 OString expVal( aStrBuf.getStr() );
13492 sal_Int64 input = -15;
13493 sal_Int16 radix = 8;
13495 expVal += OString( "-" );
13496 expVal += OString( "17" );
13497 aStrBuf.append( input, radix );
13499 CPPUNIT_ASSERT_MESSAGE
13501 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
13502 aStrBuf.getStr()== expVal &&
13503 aStrBuf.getLength() == expVal.getLength()
13508 void append_049()
13510 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13511 OString expVal( aStrBuf.getStr() );
13512 sal_Int64 input = -0;
13513 sal_Int16 radix = 10;
13515 expVal += OString( "0" );
13516 aStrBuf.append( input, radix );
13518 CPPUNIT_ASSERT_MESSAGE
13520 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13521 aStrBuf.getStr()== expVal &&
13522 aStrBuf.getLength() == expVal.getLength()
13527 void append_050()
13529 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13530 OString expVal( aStrBuf.getStr() );
13531 sal_Int64 input = -4;
13532 sal_Int16 radix = 10;
13534 expVal += OString( "-" );
13535 expVal += OString( "4" );
13536 aStrBuf.append( input, radix );
13538 CPPUNIT_ASSERT_MESSAGE
13540 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13541 aStrBuf.getStr()== expVal &&
13542 aStrBuf.getLength() == expVal.getLength()
13547 void append_051()
13549 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13550 OString expVal( aStrBuf.getStr() );
13551 sal_Int64 input = -8;
13552 sal_Int16 radix = 10;
13554 expVal += OString( "-" );
13555 expVal += OString( "8" );
13556 aStrBuf.append( input, radix );
13558 CPPUNIT_ASSERT_MESSAGE
13560 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13561 aStrBuf.getStr()== expVal &&
13562 aStrBuf.getLength() == expVal.getLength()
13567 void append_052()
13569 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13570 OString expVal( aStrBuf.getStr() );
13571 sal_Int64 input = -15;
13572 sal_Int16 radix = 10;
13574 expVal += OString( "-" );
13575 expVal += OString( "15" );
13576 aStrBuf.append( input, radix );
13578 CPPUNIT_ASSERT_MESSAGE
13580 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13581 aStrBuf.getStr()== expVal &&
13582 aStrBuf.getLength() == expVal.getLength()
13587 void append_053()
13589 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13590 OString expVal( aStrBuf.getStr() );
13591 sal_Int64 input = -0;
13592 sal_Int16 radix = 16;
13594 expVal += OString( "0" );
13595 aStrBuf.append( input, radix );
13597 CPPUNIT_ASSERT_MESSAGE
13599 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13600 aStrBuf.getStr()== expVal &&
13601 aStrBuf.getLength() == expVal.getLength()
13606 void append_054()
13608 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13609 OString expVal( aStrBuf.getStr() );
13610 sal_Int64 input = -4;
13611 sal_Int16 radix = 16;
13613 expVal += OString( "-" );
13614 expVal += OString( "4" );
13615 aStrBuf.append( input, radix );
13617 CPPUNIT_ASSERT_MESSAGE
13619 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13620 aStrBuf.getStr()== expVal &&
13621 aStrBuf.getLength() == expVal.getLength()
13626 void append_055()
13628 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13629 OString expVal( aStrBuf.getStr() );
13630 sal_Int64 input = -8;
13631 sal_Int16 radix = 16;
13633 expVal += OString( "-" );
13634 expVal += OString( "8" );
13635 aStrBuf.append( input, radix );
13637 CPPUNIT_ASSERT_MESSAGE
13639 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13640 aStrBuf.getStr()== expVal &&
13641 aStrBuf.getLength() == expVal.getLength()
13646 void append_056()
13648 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13649 OString expVal( aStrBuf.getStr() );
13650 sal_Int64 input = -15;
13651 sal_Int16 radix = 16;
13653 expVal += OString( "-" );
13654 expVal += OString( "f" );
13655 aStrBuf.append( input, radix );
13657 CPPUNIT_ASSERT_MESSAGE
13659 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13660 aStrBuf.getStr()== expVal &&
13661 aStrBuf.getLength() == expVal.getLength()
13666 void append_057()
13668 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13669 OString expVal( aStrBuf.getStr() );
13670 sal_Int64 input = -0;
13671 sal_Int16 radix = 36;
13673 expVal += OString( "0" );
13674 aStrBuf.append( input, radix );
13676 CPPUNIT_ASSERT_MESSAGE
13678 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13679 aStrBuf.getStr()== expVal &&
13680 aStrBuf.getLength() == expVal.getLength()
13685 void append_058()
13687 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13688 OString expVal( aStrBuf.getStr() );
13689 sal_Int64 input = -4;
13690 sal_Int16 radix = 36;
13692 expVal += OString( "-" );
13693 expVal += OString( "4" );
13694 aStrBuf.append( input, radix );
13696 CPPUNIT_ASSERT_MESSAGE
13698 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13699 aStrBuf.getStr()== expVal &&
13700 aStrBuf.getLength() == expVal.getLength()
13705 void append_059()
13707 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13708 OString expVal( aStrBuf.getStr() );
13709 sal_Int64 input = -8;
13710 sal_Int16 radix = 36;
13712 expVal += OString( "-" );
13713 expVal += OString( "8" );
13714 aStrBuf.append( input, radix );
13716 CPPUNIT_ASSERT_MESSAGE
13718 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13719 aStrBuf.getStr()== expVal &&
13720 aStrBuf.getLength() == expVal.getLength()
13725 void append_060()
13727 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
13728 OString expVal( aStrBuf.getStr() );
13729 sal_Int64 input = -35;
13730 sal_Int16 radix = 36;
13732 expVal += OString( "-" );
13733 expVal += OString( "z" );
13734 aStrBuf.append( input, radix );
13736 CPPUNIT_ASSERT_MESSAGE
13738 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13739 aStrBuf.getStr()== expVal &&
13740 aStrBuf.getLength() == expVal.getLength()
13745 void append_061()
13747 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13748 OString expVal( aStrBuf.getStr() );
13749 sal_Int64 input = -0;
13750 sal_Int16 radix = 2;
13752 expVal += OString( "0" );
13753 aStrBuf.append( input, radix );
13755 CPPUNIT_ASSERT_MESSAGE
13757 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13758 aStrBuf.getStr()== expVal &&
13759 aStrBuf.getLength() == expVal.getLength()
13764 void append_062()
13766 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13767 OString expVal( aStrBuf.getStr() );
13768 sal_Int64 input = -4;
13769 sal_Int16 radix = 2;
13771 expVal += OString( "-" );
13772 expVal += OString( "100" );
13773 aStrBuf.append( input, radix );
13775 CPPUNIT_ASSERT_MESSAGE
13777 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13778 aStrBuf.getStr()== expVal &&
13779 aStrBuf.getLength() == expVal.getLength()
13784 void append_063()
13786 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13787 OString expVal( aStrBuf.getStr() );
13788 sal_Int64 input = -8;
13789 sal_Int16 radix = 2;
13791 expVal += OString( "-" );
13792 expVal += OString( "1000" );
13793 aStrBuf.append( input, radix );
13795 CPPUNIT_ASSERT_MESSAGE
13797 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13798 aStrBuf.getStr()== expVal &&
13799 aStrBuf.getLength() == expVal.getLength()
13804 void append_064()
13806 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13807 OString expVal( aStrBuf.getStr() );
13808 sal_Int64 input = -15;
13809 sal_Int16 radix = 2;
13811 expVal += OString( "-" );
13812 expVal += OString( "1111" );
13813 aStrBuf.append( input, radix );
13815 CPPUNIT_ASSERT_MESSAGE
13817 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13818 aStrBuf.getStr()== expVal &&
13819 aStrBuf.getLength() == expVal.getLength()
13824 void append_065()
13826 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13827 OString expVal( aStrBuf.getStr() );
13828 sal_Int64 input = -0;
13829 sal_Int16 radix = 8;
13831 expVal += OString( "0" );
13832 aStrBuf.append( input, radix );
13834 CPPUNIT_ASSERT_MESSAGE
13836 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13837 aStrBuf.getStr()== expVal &&
13838 aStrBuf.getLength() == expVal.getLength()
13843 void append_066()
13845 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13846 OString expVal( aStrBuf.getStr() );
13847 sal_Int64 input = -4;
13848 sal_Int16 radix = 8;
13850 expVal += OString( "-" );
13851 expVal += OString( "4" );
13852 aStrBuf.append( input, radix );
13854 CPPUNIT_ASSERT_MESSAGE
13856 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13857 aStrBuf.getStr()== expVal &&
13858 aStrBuf.getLength() == expVal.getLength()
13863 void append_067()
13865 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13866 OString expVal( aStrBuf.getStr() );
13867 sal_Int64 input = -8;
13868 sal_Int16 radix = 8;
13870 expVal += OString( "-" );
13871 expVal += OString( "10" );
13872 aStrBuf.append( input, radix );
13874 CPPUNIT_ASSERT_MESSAGE
13876 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13877 aStrBuf.getStr()== expVal &&
13878 aStrBuf.getLength() == expVal.getLength()
13883 void append_068()
13885 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13886 OString expVal( aStrBuf.getStr() );
13887 sal_Int64 input = -15;
13888 sal_Int16 radix = 8;
13890 expVal += OString( "-" );
13891 expVal += OString( "17" );
13892 aStrBuf.append( input, radix );
13894 CPPUNIT_ASSERT_MESSAGE
13896 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13897 aStrBuf.getStr()== expVal &&
13898 aStrBuf.getLength() == expVal.getLength()
13903 void append_069()
13905 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13906 OString expVal( aStrBuf.getStr() );
13907 sal_Int64 input = -0;
13908 sal_Int16 radix = 10;
13910 expVal += OString( "0" );
13911 aStrBuf.append( input, radix );
13913 CPPUNIT_ASSERT_MESSAGE
13915 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13916 aStrBuf.getStr()== expVal &&
13917 aStrBuf.getLength() == expVal.getLength()
13922 void append_070()
13924 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13925 OString expVal( aStrBuf.getStr() );
13926 sal_Int64 input = -4;
13927 sal_Int16 radix = 10;
13929 expVal += OString( "-" );
13930 expVal += OString( "4" );
13931 aStrBuf.append( input, radix );
13933 CPPUNIT_ASSERT_MESSAGE
13935 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13936 aStrBuf.getStr()== expVal &&
13937 aStrBuf.getLength() == expVal.getLength()
13942 void append_071()
13944 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13945 OString expVal( aStrBuf.getStr() );
13946 sal_Int64 input = -8;
13947 sal_Int16 radix = 10;
13949 expVal += OString( "-" );
13950 expVal += OString( "8" );
13951 aStrBuf.append( input, radix );
13953 CPPUNIT_ASSERT_MESSAGE
13955 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13956 aStrBuf.getStr()== expVal &&
13957 aStrBuf.getLength() == expVal.getLength()
13962 void append_072()
13964 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13965 OString expVal( aStrBuf.getStr() );
13966 sal_Int64 input = -15;
13967 sal_Int16 radix = 10;
13969 expVal += OString( "-" );
13970 expVal += OString( "15" );
13971 aStrBuf.append( input, radix );
13973 CPPUNIT_ASSERT_MESSAGE
13975 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13976 aStrBuf.getStr()== expVal &&
13977 aStrBuf.getLength() == expVal.getLength()
13982 void append_073()
13984 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
13985 OString expVal( aStrBuf.getStr() );
13986 sal_Int64 input = -0;
13987 sal_Int16 radix = 16;
13989 expVal += OString( "0" );
13990 aStrBuf.append( input, radix );
13992 CPPUNIT_ASSERT_MESSAGE
13994 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13995 aStrBuf.getStr()== expVal &&
13996 aStrBuf.getLength() == expVal.getLength()
14001 void append_074()
14003 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14004 OString expVal( aStrBuf.getStr() );
14005 sal_Int64 input = -4;
14006 sal_Int16 radix = 16;
14008 expVal += OString( "-" );
14009 expVal += OString( "4" );
14010 aStrBuf.append( input, radix );
14012 CPPUNIT_ASSERT_MESSAGE
14014 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
14015 aStrBuf.getStr()== expVal &&
14016 aStrBuf.getLength() == expVal.getLength()
14021 void append_075()
14023 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14024 OString expVal( aStrBuf.getStr() );
14025 sal_Int64 input = -8;
14026 sal_Int16 radix = 16;
14028 expVal += OString( "-" );
14029 expVal += OString( "8" );
14030 aStrBuf.append( input, radix );
14032 CPPUNIT_ASSERT_MESSAGE
14034 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
14035 aStrBuf.getStr()== expVal &&
14036 aStrBuf.getLength() == expVal.getLength()
14041 void append_076()
14043 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14044 OString expVal( aStrBuf.getStr() );
14045 sal_Int64 input = -15;
14046 sal_Int16 radix = 16;
14048 expVal += OString( "-" );
14049 expVal += OString( "f" );
14050 aStrBuf.append( input, radix );
14052 CPPUNIT_ASSERT_MESSAGE
14054 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
14055 aStrBuf.getStr()== expVal &&
14056 aStrBuf.getLength() == expVal.getLength()
14061 void append_077()
14063 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14064 OString expVal( aStrBuf.getStr() );
14065 sal_Int64 input = -0;
14066 sal_Int16 radix = 36;
14068 expVal += OString( "0" );
14069 aStrBuf.append( input, radix );
14071 CPPUNIT_ASSERT_MESSAGE
14073 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
14074 aStrBuf.getStr()== expVal &&
14075 aStrBuf.getLength() == expVal.getLength()
14080 void append_078()
14082 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14083 OString expVal( aStrBuf.getStr() );
14084 sal_Int64 input = -4;
14085 sal_Int16 radix = 36;
14087 expVal += OString( "-" );
14088 expVal += OString( "4" );
14089 aStrBuf.append( input, radix );
14091 CPPUNIT_ASSERT_MESSAGE
14093 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
14094 aStrBuf.getStr()== expVal &&
14095 aStrBuf.getLength() == expVal.getLength()
14100 void append_079()
14102 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14103 OString expVal( aStrBuf.getStr() );
14104 sal_Int64 input = -8;
14105 sal_Int16 radix = 36;
14107 expVal += OString( "-" );
14108 expVal += OString( "8" );
14109 aStrBuf.append( input, radix );
14111 CPPUNIT_ASSERT_MESSAGE
14113 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
14114 aStrBuf.getStr()== expVal &&
14115 aStrBuf.getLength() == expVal.getLength()
14120 void append_080()
14122 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14123 OString expVal( aStrBuf.getStr() );
14124 sal_Int64 input = -35;
14125 sal_Int16 radix = 36;
14127 expVal += OString( "-" );
14128 expVal += OString( "z" );
14129 aStrBuf.append( input, radix );
14131 CPPUNIT_ASSERT_MESSAGE
14133 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
14134 aStrBuf.getStr()== expVal &&
14135 aStrBuf.getLength() == expVal.getLength()
14140 void append_081()
14142 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14143 OString expVal( aStrBuf.getStr() );
14144 sal_Int64 input = -0;
14145 sal_Int16 radix = 2;
14147 expVal += OString( "0" );
14148 aStrBuf.append( input, radix );
14150 CPPUNIT_ASSERT_MESSAGE
14152 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
14153 aStrBuf.getStr()== expVal &&
14154 aStrBuf.getLength() == expVal.getLength()
14159 void append_082()
14161 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14162 OString expVal( aStrBuf.getStr() );
14163 sal_Int64 input = -4;
14164 sal_Int16 radix = 2;
14166 expVal += OString( "-" );
14167 expVal += OString( "100" );
14168 aStrBuf.append( input, radix );
14170 CPPUNIT_ASSERT_MESSAGE
14172 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
14173 aStrBuf.getStr()== expVal &&
14174 aStrBuf.getLength() == expVal.getLength()
14179 void append_083()
14181 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14182 OString expVal( aStrBuf.getStr() );
14183 sal_Int64 input = -8;
14184 sal_Int16 radix = 2;
14186 expVal += OString( "-" );
14187 expVal += OString( "1000" );
14188 aStrBuf.append( input, radix );
14190 CPPUNIT_ASSERT_MESSAGE
14192 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
14193 aStrBuf.getStr()== expVal &&
14194 aStrBuf.getLength() == expVal.getLength()
14199 void append_084()
14201 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14202 OString expVal( aStrBuf.getStr() );
14203 sal_Int64 input = -15;
14204 sal_Int16 radix = 2;
14206 expVal += OString( "-" );
14207 expVal += OString( "1111" );
14208 aStrBuf.append( input, radix );
14210 CPPUNIT_ASSERT_MESSAGE
14212 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
14213 aStrBuf.getStr()== expVal &&
14214 aStrBuf.getLength() == expVal.getLength()
14219 void append_085()
14221 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14222 OString expVal( aStrBuf.getStr() );
14223 sal_Int64 input = -0;
14224 sal_Int16 radix = 8;
14226 expVal += OString( "0" );
14227 aStrBuf.append( input, radix );
14229 CPPUNIT_ASSERT_MESSAGE
14231 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
14232 aStrBuf.getStr()== expVal &&
14233 aStrBuf.getLength() == expVal.getLength()
14238 void append_086()
14240 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14241 OString expVal( aStrBuf.getStr() );
14242 sal_Int64 input = -4;
14243 sal_Int16 radix = 8;
14245 expVal += OString( "-" );
14246 expVal += OString( "4" );
14247 aStrBuf.append( input, radix );
14249 CPPUNIT_ASSERT_MESSAGE
14251 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
14252 aStrBuf.getStr()== expVal &&
14253 aStrBuf.getLength() == expVal.getLength()
14258 void append_087()
14260 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14261 OString expVal( aStrBuf.getStr() );
14262 sal_Int64 input = -8;
14263 sal_Int16 radix = 8;
14265 expVal += OString( "-" );
14266 expVal += OString( "10" );
14267 aStrBuf.append( input, radix );
14269 CPPUNIT_ASSERT_MESSAGE
14271 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
14272 aStrBuf.getStr()== expVal &&
14273 aStrBuf.getLength() == expVal.getLength()
14278 void append_088()
14280 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14281 OString expVal( aStrBuf.getStr() );
14282 sal_Int64 input = -15;
14283 sal_Int16 radix = 8;
14285 expVal += OString( "-" );
14286 expVal += OString( "17" );
14287 aStrBuf.append( input, radix );
14289 CPPUNIT_ASSERT_MESSAGE
14291 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
14292 aStrBuf.getStr()== expVal &&
14293 aStrBuf.getLength() == expVal.getLength()
14298 void append_089()
14300 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14301 OString expVal( aStrBuf.getStr() );
14302 sal_Int64 input = -0;
14303 sal_Int16 radix = 10;
14305 expVal += OString( "0" );
14306 aStrBuf.append( input, radix );
14308 CPPUNIT_ASSERT_MESSAGE
14310 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
14311 aStrBuf.getStr()== expVal &&
14312 aStrBuf.getLength() == expVal.getLength()
14317 void append_090()
14319 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14320 OString expVal( aStrBuf.getStr() );
14321 sal_Int64 input = -4;
14322 sal_Int16 radix = 10;
14324 expVal += OString( "-" );
14325 expVal += OString( "4" );
14326 aStrBuf.append( input, radix );
14328 CPPUNIT_ASSERT_MESSAGE
14330 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
14331 aStrBuf.getStr()== expVal &&
14332 aStrBuf.getLength() == expVal.getLength()
14337 void append_091()
14339 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14340 OString expVal( aStrBuf.getStr() );
14341 sal_Int64 input = -8;
14342 sal_Int16 radix = 10;
14344 expVal += OString( "-" );
14345 expVal += OString( "8" );
14346 aStrBuf.append( input, radix );
14348 CPPUNIT_ASSERT_MESSAGE
14350 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
14351 aStrBuf.getStr()== expVal &&
14352 aStrBuf.getLength() == expVal.getLength()
14357 void append_092()
14359 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14360 OString expVal( aStrBuf.getStr() );
14361 sal_Int64 input = -15;
14362 sal_Int16 radix = 10;
14364 expVal += OString( "-" );
14365 expVal += OString( "15" );
14366 aStrBuf.append( input, radix );
14368 CPPUNIT_ASSERT_MESSAGE
14370 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
14371 aStrBuf.getStr()== expVal &&
14372 aStrBuf.getLength() == expVal.getLength()
14377 void append_093()
14379 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14380 OString expVal( aStrBuf.getStr() );
14381 sal_Int64 input = -0;
14382 sal_Int16 radix = 16;
14384 expVal += OString( "0" );
14385 aStrBuf.append( input, radix );
14387 CPPUNIT_ASSERT_MESSAGE
14389 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
14390 aStrBuf.getStr()== expVal &&
14391 aStrBuf.getLength() == expVal.getLength()
14396 void append_094()
14398 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14399 OString expVal( aStrBuf.getStr() );
14400 sal_Int64 input = -4;
14401 sal_Int16 radix = 16;
14403 expVal += OString( "-" );
14404 expVal += OString( "4" );
14405 aStrBuf.append( input, radix );
14407 CPPUNIT_ASSERT_MESSAGE
14409 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
14410 aStrBuf.getStr()== expVal &&
14411 aStrBuf.getLength() == expVal.getLength()
14416 void append_095()
14418 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14419 OString expVal( aStrBuf.getStr() );
14420 sal_Int64 input = -8;
14421 sal_Int16 radix = 16;
14423 expVal += OString( "-" );
14424 expVal += OString( "8" );
14425 aStrBuf.append( input, radix );
14427 CPPUNIT_ASSERT_MESSAGE
14429 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
14430 aStrBuf.getStr()== expVal &&
14431 aStrBuf.getLength() == expVal.getLength()
14436 void append_096()
14438 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14439 OString expVal( aStrBuf.getStr() );
14440 sal_Int64 input = -15;
14441 sal_Int16 radix = 16;
14443 expVal += OString( "-" );
14444 expVal += OString( "f" );
14445 aStrBuf.append( input, radix );
14447 CPPUNIT_ASSERT_MESSAGE
14449 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
14450 aStrBuf.getStr()== expVal &&
14451 aStrBuf.getLength() == expVal.getLength()
14456 void append_097()
14458 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14459 OString expVal( aStrBuf.getStr() );
14460 sal_Int64 input = -0;
14461 sal_Int16 radix = 36;
14463 expVal += OString( "0" );
14464 aStrBuf.append( input, radix );
14466 CPPUNIT_ASSERT_MESSAGE
14468 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
14469 aStrBuf.getStr()== expVal &&
14470 aStrBuf.getLength() == expVal.getLength()
14475 void append_098()
14477 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14478 OString expVal( aStrBuf.getStr() );
14479 sal_Int64 input = -4;
14480 sal_Int16 radix = 36;
14482 expVal += OString( "-" );
14483 expVal += OString( "4" );
14484 aStrBuf.append( input, radix );
14486 CPPUNIT_ASSERT_MESSAGE
14488 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
14489 aStrBuf.getStr()== expVal &&
14490 aStrBuf.getLength() == expVal.getLength()
14495 void append_099()
14497 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14498 OString expVal( aStrBuf.getStr() );
14499 sal_Int64 input = -8;
14500 sal_Int16 radix = 36;
14502 expVal += OString( "-" );
14503 expVal += OString( "8" );
14504 aStrBuf.append( input, radix );
14506 CPPUNIT_ASSERT_MESSAGE
14508 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
14509 aStrBuf.getStr()== expVal &&
14510 aStrBuf.getLength() == expVal.getLength()
14515 void append_100()
14517 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14518 OString expVal( aStrBuf.getStr() );
14519 sal_Int64 input = -35;
14520 sal_Int16 radix = 36;
14522 expVal += OString( "-" );
14523 expVal += OString( "z" );
14524 aStrBuf.append( input, radix );
14526 CPPUNIT_ASSERT_MESSAGE
14528 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
14529 aStrBuf.getStr()== expVal &&
14530 aStrBuf.getLength() == expVal.getLength()
14535 CPPUNIT_TEST_SUITE( append_007_Int64_Negative );
14536 CPPUNIT_TEST( append_001 ); CPPUNIT_TEST( append_002 );
14537 CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 );
14538 CPPUNIT_TEST( append_005 ); CPPUNIT_TEST( append_006 );
14539 CPPUNIT_TEST( append_007 ); CPPUNIT_TEST( append_008 );
14540 CPPUNIT_TEST( append_009 ); CPPUNIT_TEST( append_010 );
14541 CPPUNIT_TEST( append_011 ); CPPUNIT_TEST( append_012 );
14542 CPPUNIT_TEST( append_013 ); CPPUNIT_TEST( append_014 );
14543 CPPUNIT_TEST( append_015 ); CPPUNIT_TEST( append_016 );
14544 CPPUNIT_TEST( append_017 ); CPPUNIT_TEST( append_018 );
14545 CPPUNIT_TEST( append_019 ); CPPUNIT_TEST( append_020 );
14546 CPPUNIT_TEST( append_021 ); CPPUNIT_TEST( append_022 );
14547 CPPUNIT_TEST( append_023 ); CPPUNIT_TEST( append_024 );
14548 CPPUNIT_TEST( append_025 ); CPPUNIT_TEST( append_026 );
14549 CPPUNIT_TEST( append_027 ); CPPUNIT_TEST( append_028 );
14550 CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 );
14551 CPPUNIT_TEST( append_031 ); CPPUNIT_TEST( append_032 );
14552 CPPUNIT_TEST( append_033 ); CPPUNIT_TEST( append_034 );
14553 CPPUNIT_TEST( append_035 ); CPPUNIT_TEST( append_036 );
14554 CPPUNIT_TEST( append_037 ); CPPUNIT_TEST( append_038 );
14555 CPPUNIT_TEST( append_039 ); CPPUNIT_TEST( append_040 );
14556 CPPUNIT_TEST( append_041 ); CPPUNIT_TEST( append_042 );
14557 CPPUNIT_TEST( append_043 ); CPPUNIT_TEST( append_044 );
14558 CPPUNIT_TEST( append_045 ); CPPUNIT_TEST( append_046 );
14559 CPPUNIT_TEST( append_047 ); CPPUNIT_TEST( append_048 );
14560 CPPUNIT_TEST( append_049 ); CPPUNIT_TEST( append_050 );
14561 CPPUNIT_TEST( append_051 ); CPPUNIT_TEST( append_052 );
14562 CPPUNIT_TEST( append_053 ); CPPUNIT_TEST( append_054 );
14563 CPPUNIT_TEST( append_055 ); CPPUNIT_TEST( append_056 );
14564 CPPUNIT_TEST( append_057 ); CPPUNIT_TEST( append_058 );
14565 CPPUNIT_TEST( append_059 ); CPPUNIT_TEST( append_060 );
14566 CPPUNIT_TEST( append_061 ); CPPUNIT_TEST( append_062 );
14567 CPPUNIT_TEST( append_063 ); CPPUNIT_TEST( append_064 );
14568 CPPUNIT_TEST( append_065 ); CPPUNIT_TEST( append_066 );
14569 CPPUNIT_TEST( append_067 ); CPPUNIT_TEST( append_068 );
14570 CPPUNIT_TEST( append_069 ); CPPUNIT_TEST( append_070 );
14571 CPPUNIT_TEST( append_071 ); CPPUNIT_TEST( append_072 );
14572 CPPUNIT_TEST( append_073 ); CPPUNIT_TEST( append_074 );
14573 CPPUNIT_TEST( append_075 ); CPPUNIT_TEST( append_076 );
14574 CPPUNIT_TEST( append_077 ); CPPUNIT_TEST( append_078 );
14575 CPPUNIT_TEST( append_079 ); CPPUNIT_TEST( append_080 );
14576 CPPUNIT_TEST( append_081 ); CPPUNIT_TEST( append_082 );
14577 CPPUNIT_TEST( append_083 ); CPPUNIT_TEST( append_084 );
14578 CPPUNIT_TEST( append_085 ); CPPUNIT_TEST( append_086 );
14579 CPPUNIT_TEST( append_087 ); CPPUNIT_TEST( append_088 );
14580 CPPUNIT_TEST( append_089 ); CPPUNIT_TEST( append_090 );
14581 CPPUNIT_TEST( append_091 ); CPPUNIT_TEST( append_092 );
14582 CPPUNIT_TEST( append_093 ); CPPUNIT_TEST( append_094 );
14583 CPPUNIT_TEST( append_095 ); CPPUNIT_TEST( append_096 );
14584 CPPUNIT_TEST( append_097 ); CPPUNIT_TEST( append_098 );
14585 CPPUNIT_TEST( append_099 ); CPPUNIT_TEST( append_100 );
14586 CPPUNIT_TEST_SUITE_END();
14588 //------------------------------------------------------------------------
14589 // testing the method append( sal_Int64 i, sal_Int16 radix ) where radix = -5
14590 //------------------------------------------------------------------------
14591 class append_007_Int64_WrongRadix : public CppUnit::TestFixture
14593 OString* arrOUS[5];
14594 sal_Int64 intVal;
14596 public:
14597 void setUp()
14599 arrOUS[0] = new OString( kTestStr7 );
14600 arrOUS[1] = new OString( );
14601 arrOUS[2] = new OString( kTestStr25 );
14602 arrOUS[3] = new OString( "\0" );
14603 arrOUS[4] = new OString( kTestStr28 );
14604 intVal = 11;
14608 void tearDown()
14610 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
14611 delete arrOUS[3]; delete arrOUS[4];
14614 void append_001()
14616 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14617 OString expVal( kTestStr59 );
14619 aStrBuf.append( intVal, -5 );
14621 CPPUNIT_ASSERT_MESSAGE
14623 "Appends the WrongRadix to the string buffer arrOUS[0]",
14624 sal_True
14629 void append_002()
14631 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14632 OString expVal( kTestStr60 );
14634 aStrBuf.append( intVal, -5 );
14636 CPPUNIT_ASSERT_MESSAGE
14638 "Appends the WrongRadix to the string buffer arrOUS[1]",
14639 sal_True
14644 void append_003()
14646 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14647 OString expVal( kTestStr60 );
14649 aStrBuf.append( intVal, -5 );
14651 CPPUNIT_ASSERT_MESSAGE
14653 "Appends the WrongRadix to the string buffer arrOUS[2]",
14654 sal_True
14659 void append_004()
14661 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14662 OString expVal( kTestStr60 );
14664 aStrBuf.append( intVal, -5 );
14666 CPPUNIT_ASSERT_MESSAGE
14668 "Appends the WrongRadix to the string buffer arrOUS[3]",
14669 sal_True
14674 void append_005()
14676 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
14677 OString expVal( kTestStr61 );
14679 aStrBuf.append( intVal, -5 );
14681 CPPUNIT_ASSERT_MESSAGE
14683 "Appends the WrongRadix to the string buffer arrOUS[4]",
14684 sal_True
14688 #ifdef WITH_CORE
14689 void append_006()
14691 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
14692 OString expVal( kTestStr60 );
14694 aStrBuf.append( intVal, -5 );
14696 CPPUNIT_ASSERT_MESSAGE
14698 "Appends the WrongRadix to the string buffer(with INT_MAX)",
14699 sal_True
14703 #endif
14705 CPPUNIT_TEST_SUITE( append_007_Int64_WrongRadix );
14706 CPPUNIT_TEST( append_001 );
14707 CPPUNIT_TEST( append_002 );
14708 CPPUNIT_TEST( append_003 );
14709 CPPUNIT_TEST( append_004 );
14710 CPPUNIT_TEST( append_005 );
14711 #ifdef WITH_CORE
14712 CPPUNIT_TEST( append_006 );
14713 #endif
14714 CPPUNIT_TEST_SUITE_END();
14716 //------------------------------------------------------------------------
14717 class append_007_Int64_defaultParam : public CppUnit::TestFixture
14719 OString* arrOUS[5];
14721 public:
14722 void setUp()
14724 arrOUS[0] = new OString( kTestStr7 );
14725 arrOUS[1] = new OString( );
14726 arrOUS[2] = new OString( kTestStr25 );
14727 arrOUS[3] = new OString( "\0" );
14728 arrOUS[4] = new OString( kTestStr28 );
14732 void tearDown()
14734 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
14735 delete arrOUS[3]; delete arrOUS[4];
14738 void append_001()
14740 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14741 OString expVal( kTestStr59 );
14742 sal_Int64 input = 11;
14744 aStrBuf.append( input );
14746 CPPUNIT_ASSERT_MESSAGE
14748 "input Int64 11 and return OStringBuffer[0]+11",
14749 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14754 void append_002()
14756 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14757 OString expVal( kTestStr62 );
14758 sal_Int64 input = 0;
14760 aStrBuf.append( input );
14762 CPPUNIT_ASSERT_MESSAGE
14764 "input Int64 0 and return OStringBuffer[0]+0",
14765 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14770 void append_003()
14772 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14773 OString expVal( kTestStr63 );
14774 sal_Int64 input = -11;
14776 aStrBuf.append( input );
14778 CPPUNIT_ASSERT_MESSAGE
14780 "input Int64 -11 and return OStringBuffer[0]+(-11)",
14781 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14786 void append_004()
14788 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14789 OString expVal( kTestStr116 );
14790 #if defined(UNX) || defined(OS2)
14791 sal_Int64 input = 9223372036854775807LL;
14792 #else
14793 sal_Int64 input = 9223372036854775807;
14794 #endif
14795 aStrBuf.append( input );
14797 CPPUNIT_ASSERT_MESSAGE
14799 "input Int64 9223372036854775807 and return OStringBuffer[0]+9223372036854775807",
14800 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14805 void append_005()
14807 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
14808 OString expVal( kTestStr117 );
14809 sal_Int64 input = SAL_MIN_INT64/*-9223372036854775808*/; // LLA: this is not the same :-( kNonSInt64Max;
14811 aStrBuf.append( input );
14813 sal_Bool bRes = expVal.equals( aStrBuf.getStr() );
14814 CPPUNIT_ASSERT_MESSAGE
14816 "input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)",
14817 bRes && aStrBuf.getLength() == expVal.getLength()
14822 void append_006()
14824 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14825 OString expVal( kTestStr60 );
14826 sal_Int64 input = 11;
14828 aStrBuf.append( input );
14830 CPPUNIT_ASSERT_MESSAGE
14832 "input Int64 11 and return OStringBuffer[1]+11",
14833 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14838 void append_007()
14840 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14841 OString expVal( kTestStr66 );
14842 sal_Int64 input = 0;
14844 aStrBuf.append( input );
14846 CPPUNIT_ASSERT_MESSAGE
14848 "input Int64 0 and return OStringBuffer[1]+0",
14849 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14854 void append_008()
14856 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14857 OString expVal( kTestStr67 );
14858 sal_Int64 input = -11;
14860 aStrBuf.append( input );
14862 CPPUNIT_ASSERT_MESSAGE
14864 "input Int64 -11 and return OStringBuffer[1]+(-11)",
14865 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14870 void append_009()
14872 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14873 OString expVal( kTestStr118 );
14874 #if defined(UNX) || defined(OS2)
14875 sal_Int64 input = 9223372036854775807LL;
14876 #else
14877 sal_Int64 input = 9223372036854775807;
14878 #endif
14879 aStrBuf.append( input );
14881 CPPUNIT_ASSERT_MESSAGE
14883 "input Int64 9223372036854775807 and return OStringBuffer[1]+9223372036854775807",
14884 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14889 void append_010()
14891 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
14892 OString expVal( kTestStr119 );
14893 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14895 aStrBuf.append( input );
14897 CPPUNIT_ASSERT_MESSAGE
14899 "input Int64 -9223372036854775808 and return OStringBuffer[1]+(-9223372036854775808)",
14900 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14905 void append_011()
14907 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14908 OString expVal( kTestStr60 );
14909 sal_Int64 input = 11;
14911 aStrBuf.append( input );
14913 CPPUNIT_ASSERT_MESSAGE
14915 "input Int64 11 and return OStringBuffer[2]+11",
14916 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14921 void append_012()
14923 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14924 OString expVal( kTestStr66 );
14925 sal_Int64 input = 0;
14927 aStrBuf.append( input );
14929 CPPUNIT_ASSERT_MESSAGE
14931 "input Int64 0 and return OUStringBuffer[2]+0",
14932 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14937 void append_013()
14939 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14940 OString expVal( kTestStr67 );
14941 sal_Int64 input = -11;
14943 aStrBuf.append( input );
14945 CPPUNIT_ASSERT_MESSAGE
14947 "input Int64 -11 and return OUStringBuffer[2]+(-11)",
14948 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14953 void append_014()
14955 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14956 OString expVal( kTestStr118 );
14957 #if defined(UNX) || defined(OS2)
14958 sal_Int64 input = 9223372036854775807LL;
14959 #else
14960 sal_Int64 input = 9223372036854775807;
14961 #endif
14962 aStrBuf.append( input );
14964 CPPUNIT_ASSERT_MESSAGE
14966 "input Int64 9223372036854775807 and return OStringBuffer[2]+9223372036854775807",
14967 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14972 void append_015()
14974 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
14975 OString expVal( kTestStr119 );
14976 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
14978 aStrBuf.append( input );
14980 CPPUNIT_ASSERT_MESSAGE
14982 "input Int64 -9223372036854775808 and return OStringBuffer[2]+(-9223372036854775808)",
14983 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
14988 void append_016()
14990 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
14991 OString expVal( kTestStr60 );
14992 sal_Int64 input = 11;
14994 aStrBuf.append( input );
14996 CPPUNIT_ASSERT_MESSAGE
14998 "input Int64 11 and return OStringBuffer[3]+11",
14999 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15004 void append_017()
15006 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15007 OString expVal( kTestStr66 );
15008 sal_Int64 input = 0;
15010 aStrBuf.append( input );
15012 CPPUNIT_ASSERT_MESSAGE
15014 "input Int64 0 and return OStringBuffer[3]+0",
15015 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15020 void append_018()
15022 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15023 OString expVal( kTestStr67 );
15024 sal_Int64 input = -11;
15026 aStrBuf.append( input );
15028 CPPUNIT_ASSERT_MESSAGE
15030 "input Int64 -11 and return OStringBuffer[3]+(-11)",
15031 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15036 void append_019()
15038 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15039 OString expVal( kTestStr118 );
15040 #if defined(UNX) || defined(OS2)
15041 sal_Int64 input = 9223372036854775807LL;
15042 #else
15043 sal_Int64 input = 9223372036854775807;
15044 #endif
15045 aStrBuf.append( input );
15047 CPPUNIT_ASSERT_MESSAGE
15049 "input Int64 9223372036854775807 and return OStringBuffer[3]+9223372036854775807",
15050 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15055 void append_020()
15057 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15058 OString expVal( kTestStr119 );
15059 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
15061 aStrBuf.append( input );
15063 CPPUNIT_ASSERT_MESSAGE
15065 "input Int64 -9223372036854775808 and return OStringBuffer[3]+(-9223372036854775808)",
15066 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15071 void append_021()
15073 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15074 OString expVal( kTestStr61 );
15075 sal_Int64 input = 11;
15077 aStrBuf.append( input );
15079 CPPUNIT_ASSERT_MESSAGE
15081 "input Int64 11 and return OStringBuffer[4]+11",
15082 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15087 void append_022()
15089 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15090 OString expVal( kTestStr70 );
15091 sal_Int64 input = 0;
15093 aStrBuf.append( input );
15095 CPPUNIT_ASSERT_MESSAGE
15097 "input Int64 0 and return OStringBuffer[4]+0",
15098 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15103 void append_023()
15105 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15106 OString expVal( kTestStr71 );
15107 sal_Int64 input = -11;
15109 aStrBuf.append( input );
15111 CPPUNIT_ASSERT_MESSAGE
15113 "input Int64 -11 and return OStringBuffer[4]+(-11)",
15114 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15119 void append_024()
15121 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15122 OString expVal( kTestStr120 );
15123 #if defined(UNX) || defined(OS2)
15124 sal_Int64 input = 9223372036854775807LL;
15125 #else
15126 sal_Int64 input = 9223372036854775807;
15127 #endif
15128 aStrBuf.append( input );
15130 CPPUNIT_ASSERT_MESSAGE
15132 "input Int64 9223372036854775807 and return OStringBuffer[4]+9223372036854775807",
15133 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15138 void append_025()
15140 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15141 OString expVal( kTestStr121 );
15142 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
15144 aStrBuf.append( input );
15146 CPPUNIT_ASSERT_MESSAGE
15148 "input Int64 -9223372036854775808 and return OStringBuffer[4]+(-9223372036854775808)",
15149 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15153 #ifdef WITH_CORE
15154 void append_026()
15156 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
15157 OString expVal( kTestStr60 );
15158 sal_Int64 input = 11;
15160 aStrBuf.append( input );
15162 CPPUNIT_ASSERT_MESSAGE
15164 "input Int64 11 and return OStringBuffer(kSInt64Max)+11",
15165 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15170 void append_027()
15172 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
15173 OString expVal( kTestStr66 );
15174 sal_Int64 input = 0;
15176 aStrBuf.append( input );
15178 CPPUNIT_ASSERT_MESSAGE
15180 "input Int64 0 and return OStringBuffer(kSInt64Max)+0",
15181 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15186 void append_028()
15188 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
15189 OString expVal( kTestStr67 );
15190 sal_Int64 input = -11;
15192 aStrBuf.append( input );
15194 CPPUNIT_ASSERT_MESSAGE
15196 "input Int64 -11 and return OStringBuffer(kSInt64Max)+(-11)",
15197 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15202 void append_029()
15204 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
15205 OString expVal( kTestStr118 );
15206 sal_Int64 input = 9223372036854775807;
15208 aStrBuf.append( input );
15210 CPPUNIT_ASSERT_MESSAGE
15212 "input Int64 9223372036854775807 and return OStringBuffer(kSInt64Max)+9223372036854775807",
15213 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15218 void append_030()
15220 ::rtl::OStringBuffer aStrBuf( kSInt64Max );
15221 OString expVal( kTestStr119 );
15222 sal_Int64 input = SAL_MIN_INT64; // LLA: this is not the same :-( kNonSInt64Max;
15224 aStrBuf.append( input );
15226 CPPUNIT_ASSERT_MESSAGE
15228 "input Int64 -9223372036854775808 and return OStringBuffer(kSInt64Max)+(-9223372036854775808)",
15229 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
15233 #endif
15235 CPPUNIT_TEST_SUITE( append_007_Int64_defaultParam );
15236 CPPUNIT_TEST( append_001 );
15237 CPPUNIT_TEST( append_002 );
15238 CPPUNIT_TEST( append_003 );
15239 CPPUNIT_TEST( append_004 );
15240 CPPUNIT_TEST( append_005 );
15241 CPPUNIT_TEST( append_006 );
15242 CPPUNIT_TEST( append_007 );
15243 CPPUNIT_TEST( append_008 );
15244 CPPUNIT_TEST( append_009 );
15245 CPPUNIT_TEST( append_010 );
15246 CPPUNIT_TEST( append_011 );
15247 CPPUNIT_TEST( append_012 );
15248 CPPUNIT_TEST( append_013 );
15249 CPPUNIT_TEST( append_014 );
15250 CPPUNIT_TEST( append_015 );
15251 CPPUNIT_TEST( append_016 );
15252 CPPUNIT_TEST( append_017 );
15253 CPPUNIT_TEST( append_018 );
15254 CPPUNIT_TEST( append_019 );
15255 CPPUNIT_TEST( append_020 );
15256 CPPUNIT_TEST( append_021 );
15257 CPPUNIT_TEST( append_022 );
15258 CPPUNIT_TEST( append_023 );
15259 CPPUNIT_TEST( append_024 );
15260 CPPUNIT_TEST( append_025 );
15261 #ifdef WITH_CORE
15262 CPPUNIT_TEST( append_026 );
15263 CPPUNIT_TEST( append_027 );
15264 CPPUNIT_TEST( append_028 );
15265 CPPUNIT_TEST( append_029 );
15266 CPPUNIT_TEST( append_030 );
15267 #endif
15268 CPPUNIT_TEST_SUITE_END();
15270 //------------------------------------------------------------------------
15271 // testing the method append( float f )
15272 //------------------------------------------------------------------------
15273 class checkfloat : public CppUnit::TestFixture
15275 public:
15276 bool checkIfStrBufContainAtPosTheFloat(rtl::OStringBuffer const& _sStrBuf, sal_Int32 _nLen, float _nFloat)
15278 OString sFloatValue;
15279 sFloatValue = rtl::OString::valueOf(_nFloat);
15281 OString sBufferString(_sStrBuf.getStr());
15282 sal_Int32 nPos = sBufferString.indexOf(sFloatValue);
15283 if ( nPos >= 0 && nPos == _nLen)
15285 return true;
15287 return false;
15290 // -----------------------------------------------------------------------------
15291 class append_008_float : public checkfloat
15293 OString* arrOUS[5];
15295 public:
15296 void setUp()
15298 arrOUS[0] = new OString( kTestStr7 );
15299 arrOUS[1] = new OString( );
15300 arrOUS[2] = new OString( kTestStr25 );
15301 arrOUS[3] = new OString( "\0" );
15302 arrOUS[4] = new OString( kTestStr28 );
15306 void tearDown()
15308 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
15309 delete arrOUS[3]; delete arrOUS[4];
15312 void append_001()
15314 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15315 // LLA: OString expVal( kTestStr74 );
15316 float input = (float)atof("3.0");
15318 // LLA:
15319 // the complex problem is here, that a float value is not really what we write.
15320 // So a 3.0 could also be 3 or 3.0 or 3.0000001 or 2.9999999
15321 // this has to be checked.
15322 sal_Int32 nLen = aStrBuf.getLength();
15323 aStrBuf.append( input );
15325 CPPUNIT_ASSERT_MESSAGE
15327 "arrOUS[0] append 3.0",
15328 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15333 void append_002()
15335 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15336 // LLA: OString expVal( kTestStr75 );
15337 float input = (float)atof("3.5");
15339 sal_Int32 nLen = aStrBuf.getLength();
15340 aStrBuf.append( input );
15342 CPPUNIT_ASSERT_MESSAGE
15344 "arrOUS[0] append 3.5",
15345 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15350 void append_003()
15352 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15353 // LLA: OString expVal( kTestStr76 );
15354 float input = (float)atof("3.0625");
15356 sal_Int32 nLen = aStrBuf.getLength();
15357 aStrBuf.append( input );
15359 CPPUNIT_ASSERT_MESSAGE
15361 "arrOUS[0] append 3.0625",
15362 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15367 void append_004()
15369 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15370 // LLA: OString expVal( kTestStr77 );
15371 float input = (float)atof("3.502525");
15373 sal_Int32 nLen = aStrBuf.getLength();
15374 aStrBuf.append( input );
15376 CPPUNIT_ASSERT_MESSAGE
15378 "arrOUS[0] append 3.502525",
15379 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15384 void append_005()
15386 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15387 // LLA: OString expVal( kTestStr78 );
15388 float input = (float)atof("3.141592");
15390 sal_Int32 nLen = aStrBuf.getLength();
15391 aStrBuf.append( input );
15393 CPPUNIT_ASSERT_MESSAGE
15395 "arrOUS[0] append 3.141592",
15396 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15401 void append_006()
15403 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15404 // LLA: OString expVal( kTestStr79 );
15405 float input = (float)atof("3.5025255");
15407 sal_Int32 nLen = aStrBuf.getLength();
15408 aStrBuf.append( input );
15410 CPPUNIT_ASSERT_MESSAGE
15412 "arrOUS[0] append 3.5025255",
15413 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15418 void append_007()
15420 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
15421 // LLA: OString expVal( kTestStr80 );
15422 float input = (float)atof("3.00390625");
15424 sal_Int32 nLen = aStrBuf.getLength();
15425 aStrBuf.append( input );
15427 CPPUNIT_ASSERT_MESSAGE
15429 "arrOUS[0] append 3.0039062",
15430 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15435 void append_008()
15437 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15438 // LLA: OString expVal( kTestStr81 );
15439 float input = (float)atof("3.0");
15441 sal_Int32 nLen = aStrBuf.getLength();
15442 aStrBuf.append( input );
15444 CPPUNIT_ASSERT_MESSAGE
15446 "arrOUS[1] append 3.0",
15447 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15452 void append_009()
15454 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15455 // LLA: OString expVal( kTestStr82 );
15456 float input = (float)atof("3.5");
15458 sal_Int32 nLen = aStrBuf.getLength();
15459 aStrBuf.append( input );
15461 CPPUNIT_ASSERT_MESSAGE
15463 "arrOUS[1] append 3.5",
15464 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15469 void append_010()
15471 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15472 // LLA: OString expVal( kTestStr83 );
15473 float input = (float)atof("3.0625");
15475 sal_Int32 nLen = aStrBuf.getLength();
15476 aStrBuf.append( input );
15478 CPPUNIT_ASSERT_MESSAGE
15480 "arrOUS[1] append 3.0625",
15481 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15486 void append_011()
15488 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15489 // LLA: OString expVal( kTestStr84 );
15490 float input = (float)atof("3.502525");
15492 sal_Int32 nLen = aStrBuf.getLength();
15493 aStrBuf.append( input );
15495 CPPUNIT_ASSERT_MESSAGE
15497 "arrOUS[1] append 3.502525",
15498 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15503 void append_012()
15505 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15506 // LLA: OString expVal( kTestStr85 );
15507 float input = (float)atof("3.141592");
15509 sal_Int32 nLen = aStrBuf.getLength();
15510 aStrBuf.append( input );
15512 CPPUNIT_ASSERT_MESSAGE
15514 "arrOUS[1] append 3.141592",
15515 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15520 void append_013()
15522 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15523 // LLA: OString expVal( kTestStr86 );
15524 float input = (float)atof("3.5025255");
15526 sal_Int32 nLen = aStrBuf.getLength();
15527 aStrBuf.append( input );
15529 CPPUNIT_ASSERT_MESSAGE
15531 "arrOUS[1] append 3.5025255",
15532 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15537 void append_014()
15539 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
15540 // LLA: OString expVal( kTestStr87 );
15541 float input = (float)atof("3.00390625");
15543 sal_Int32 nLen = aStrBuf.getLength();
15544 aStrBuf.append( input );
15546 CPPUNIT_ASSERT_MESSAGE
15548 "arrOUS[1] append 3.0039062",
15549 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15554 void append_015()
15556 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15557 // LLA: OString expVal( kTestStr81 );
15558 float input = (float)atof("3.0");
15560 sal_Int32 nLen = aStrBuf.getLength();
15561 aStrBuf.append( input );
15563 CPPUNIT_ASSERT_MESSAGE
15565 "arrOUS[2] append 3.0",
15566 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15571 void append_016()
15573 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15574 // LLA: OString expVal( kTestStr82 );
15575 float input = (float)atof("3.5");
15577 sal_Int32 nLen = aStrBuf.getLength();
15578 aStrBuf.append( input );
15580 CPPUNIT_ASSERT_MESSAGE
15582 "arrOUS[2] append 3.5",
15583 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15588 void append_017()
15590 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15591 // LLA: OString expVal( kTestStr83 );
15592 float input = (float)atof("3.0625");
15594 sal_Int32 nLen = aStrBuf.getLength();
15595 aStrBuf.append( input );
15597 CPPUNIT_ASSERT_MESSAGE
15599 "arrOUS[2] append 3.0625",
15600 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15605 void append_018()
15607 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15608 // LLA: OString expVal( kTestStr84 );
15609 float input = (float)atof("3.502525");
15611 sal_Int32 nLen = aStrBuf.getLength();
15612 aStrBuf.append( input );
15614 CPPUNIT_ASSERT_MESSAGE
15616 "arrOUS[2] append 3.502525",
15617 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15622 void append_019()
15624 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15625 // LLA: OString expVal( kTestStr85 );
15626 float input = (float)atof("3.141592");
15628 sal_Int32 nLen = aStrBuf.getLength();
15629 aStrBuf.append( input );
15631 CPPUNIT_ASSERT_MESSAGE
15633 "arrOUS[2] append 3.141592",
15634 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15639 void append_020()
15641 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15642 // LLA: OString expVal( kTestStr86 );
15643 float input = (float)atof("3.5025255");
15645 sal_Int32 nLen = aStrBuf.getLength();
15646 aStrBuf.append( input );
15648 CPPUNIT_ASSERT_MESSAGE
15650 "arrOUS[2] append 3.5025255",
15651 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15656 void append_021()
15658 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
15659 // LLA: OString expVal( kTestStr87 );
15660 float input = (float)atof("3.00390625");
15662 sal_Int32 nLen = aStrBuf.getLength();
15663 aStrBuf.append( input );
15665 CPPUNIT_ASSERT_MESSAGE
15667 "arrOUS[2] append 3.0039062",
15668 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15673 void append_022()
15675 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15676 // LLA: OString expVal( kTestStr81 );
15677 float input = (float)atof("3.0");
15679 sal_Int32 nLen = aStrBuf.getLength();
15680 aStrBuf.append( input );
15682 CPPUNIT_ASSERT_MESSAGE
15684 "arrOUS[3] append 3.0",
15685 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15690 void append_023()
15692 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15693 // LLA: OString expVal( kTestStr82 );
15694 float input = (float)atof("3.5");
15696 sal_Int32 nLen = aStrBuf.getLength();
15697 aStrBuf.append( input );
15699 CPPUNIT_ASSERT_MESSAGE
15701 "arrOUS[3] append 3.5",
15702 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15707 void append_024()
15709 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15710 // LLA: OString expVal( kTestStr83 );
15711 float input = (float)atof("3.0625");
15713 sal_Int32 nLen = aStrBuf.getLength();
15714 aStrBuf.append( input );
15716 CPPUNIT_ASSERT_MESSAGE
15718 "arrOUS[3] append 3.0625",
15719 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15724 void append_025()
15726 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15727 // LLA: OString expVal( kTestStr84 );
15728 float input = (float)atof("3.502525");
15730 sal_Int32 nLen = aStrBuf.getLength();
15731 aStrBuf.append( input );
15733 CPPUNIT_ASSERT_MESSAGE
15735 "arrOUS[3] append 3.502525",
15736 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15741 void append_026()
15743 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15744 // LLA: OString expVal( kTestStr85 );
15745 float input = (float)atof("3.141592");
15747 sal_Int32 nLen = aStrBuf.getLength();
15748 aStrBuf.append( input );
15750 CPPUNIT_ASSERT_MESSAGE
15752 "arrOUS[3] append 3.141592",
15753 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15758 void append_027()
15760 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15761 // LLA: OString expVal( kTestStr86 );
15762 float input = (float)atof("3.5025255");
15764 sal_Int32 nLen = aStrBuf.getLength();
15765 aStrBuf.append( input );
15767 CPPUNIT_ASSERT_MESSAGE
15769 "arrOUS[3] append 3.5025255",
15770 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15775 void append_028()
15777 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
15778 // LLA: OString expVal( kTestStr87 );
15779 float input = (float)atof("3.00390625");
15781 sal_Int32 nLen = aStrBuf.getLength();
15782 aStrBuf.append( input );
15784 CPPUNIT_ASSERT_MESSAGE
15786 "arrOUS[3] append 3.0039062",
15787 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15792 void append_029()
15794 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15795 // LLA: OString expVal( kTestStr88 );
15796 float input = (float)atof("3.0");
15798 sal_Int32 nLen = aStrBuf.getLength();
15799 aStrBuf.append( input );
15801 CPPUNIT_ASSERT_MESSAGE
15803 "arrOUS[4] append 3.0",
15804 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15809 void append_030()
15811 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15812 // LLA: OString expVal( kTestStr89 );
15813 float input = (float)atof("3.5");
15815 sal_Int32 nLen = aStrBuf.getLength();
15816 aStrBuf.append( input );
15818 CPPUNIT_ASSERT_MESSAGE
15820 "arrOUS[4] append 3.5",
15821 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15826 void append_031()
15828 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15829 // LLA: OString expVal( kTestStr90 );
15830 float input = (float)atof("3.0625");
15832 sal_Int32 nLen = aStrBuf.getLength();
15833 aStrBuf.append( input );
15835 CPPUNIT_ASSERT_MESSAGE
15837 "arrOUS[4] append 3.0625",
15838 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15843 void append_032()
15845 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15846 // LLA: OString expVal( kTestStr91 );
15847 float input = (float)atof("3.502525");
15849 sal_Int32 nLen = aStrBuf.getLength();
15850 aStrBuf.append( input );
15852 CPPUNIT_ASSERT_MESSAGE
15854 "arrOUS[4] append 3.502525",
15855 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15860 void append_033()
15862 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15863 // LLA: OString expVal( kTestStr92 );
15864 float input = (float)atof("3.141592");
15866 sal_Int32 nLen = aStrBuf.getLength();
15867 aStrBuf.append( input );
15869 CPPUNIT_ASSERT_MESSAGE
15871 "arrOUS[4] append 3.141592",
15872 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15877 void append_034()
15879 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15880 // LLA: OString expVal( kTestStr93 );
15881 float input = (float)atof("3.5025255");
15883 sal_Int32 nLen = aStrBuf.getLength();
15884 aStrBuf.append( input );
15886 CPPUNIT_ASSERT_MESSAGE
15888 "arrOUS[4] append 3.5025255",
15889 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15894 void append_035()
15896 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
15897 // LLA: OString expVal( kTestStr94 );
15898 float input = (float)atof("3.00390625");
15900 sal_Int32 nLen = aStrBuf.getLength();
15901 aStrBuf.append( input );
15903 CPPUNIT_ASSERT_MESSAGE
15905 "arrOUS[4] append 3.0039062",
15906 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15910 #ifdef WITH_CORE
15911 void append_036()
15913 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15914 // LLA: OString expVal( kTestStr81 );
15915 float input = (float)atof("3.0");
15917 sal_Int32 nLen = aStrBuf.getLength();
15918 aStrBuf.append( input );
15920 CPPUNIT_ASSERT_MESSAGE
15922 "OStringBuffer( kSInt32Max ) append 3.0",
15923 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15928 void append_037()
15930 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15931 // LLA: OString expVal( kTestStr82 );
15932 float input = (float)atof("3.5");
15934 sal_Int32 nLen = aStrBuf.getLength();
15935 aStrBuf.append( input );
15937 CPPUNIT_ASSERT_MESSAGE
15939 "OStringBuffer( kSInt32Max ) append 3.5",
15940 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15945 void append_038()
15947 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15948 // LLA: OString expVal( kTestStr83 );
15949 float input = (float)atof("3.0625");
15951 sal_Int32 nLen = aStrBuf.getLength();
15952 aStrBuf.append( input );
15954 CPPUNIT_ASSERT_MESSAGE
15956 "OStringBuffer( kSInt32Max ) append 3.0625",
15957 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15962 void append_039()
15964 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15965 // LLA: OString expVal( kTestStr84 );
15966 float input = (float)atof("3.502525");
15968 sal_Int32 nLen = aStrBuf.getLength();
15969 aStrBuf.append( input );
15971 CPPUNIT_ASSERT_MESSAGE
15973 "OStringBuffer( kSInt32Max ) append 3.502525",
15974 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15979 void append_040()
15981 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15982 // LLA: OString expVal( kTestStr85 );
15983 float input = (float)atof("3.141592");
15985 sal_Int32 nLen = aStrBuf.getLength();
15986 aStrBuf.append( input );
15988 CPPUNIT_ASSERT_MESSAGE
15990 "OStringBuffer( kSInt32Max ) append 3.141592",
15991 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
15996 void append_041()
15998 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
15999 // LLA: OString expVal( kTestStr86 );
16000 float input = (float)atof("3.5025255");
16002 sal_Int32 nLen = aStrBuf.getLength();
16003 aStrBuf.append( input );
16005 CPPUNIT_ASSERT_MESSAGE
16007 "OStringBuffer( kSInt32Max ) append 3.5025255",
16008 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16013 void append_042()
16015 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16016 // LLA: OString expVal( kTestStr87 );
16017 float input = (float)atof("3.00390625");
16019 sal_Int32 nLen = aStrBuf.getLength();
16020 aStrBuf.append( input );
16022 CPPUNIT_ASSERT_MESSAGE
16024 "OStringBuffer( kSInt32Max ) append 3.0039062",
16025 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16029 #endif
16031 CPPUNIT_TEST_SUITE( append_008_float );
16032 CPPUNIT_TEST( append_001 );
16033 CPPUNIT_TEST( append_002 );
16034 CPPUNIT_TEST( append_003 );
16035 CPPUNIT_TEST( append_004 );
16036 CPPUNIT_TEST( append_005 );
16037 CPPUNIT_TEST( append_006 );
16038 CPPUNIT_TEST( append_007 );
16039 CPPUNIT_TEST( append_008 );
16040 CPPUNIT_TEST( append_009 );
16041 CPPUNIT_TEST( append_010 );
16042 CPPUNIT_TEST( append_011 );
16043 CPPUNIT_TEST( append_012 );
16044 CPPUNIT_TEST( append_013 );
16045 CPPUNIT_TEST( append_014 );
16046 CPPUNIT_TEST( append_015 );
16047 CPPUNIT_TEST( append_016 );
16048 CPPUNIT_TEST( append_017 );
16049 CPPUNIT_TEST( append_018 );
16050 CPPUNIT_TEST( append_019 );
16051 CPPUNIT_TEST( append_020 );
16052 CPPUNIT_TEST( append_021 );
16053 CPPUNIT_TEST( append_022 );
16054 CPPUNIT_TEST( append_023 );
16055 CPPUNIT_TEST( append_024 );
16056 CPPUNIT_TEST( append_025 );
16057 #ifdef WITH_CORE
16058 CPPUNIT_TEST( append_026 );
16059 CPPUNIT_TEST( append_027 );
16060 CPPUNIT_TEST( append_028 );
16061 CPPUNIT_TEST( append_029 );
16062 CPPUNIT_TEST( append_030 );
16063 #endif
16064 CPPUNIT_TEST_SUITE_END();
16066 //------------------------------------------------------------------------
16067 // testing the method append( float f ) for negative value
16068 //------------------------------------------------------------------------
16069 class append_008_Float_Negative : public checkfloat
16071 OString* arrOUS[5];
16073 public:
16074 void setUp()
16076 arrOUS[0] = new OString( kTestStr7 );
16077 arrOUS[1] = new OString( );
16078 arrOUS[2] = new OString( kTestStr25 );
16079 arrOUS[3] = new OString( "\0" );
16080 arrOUS[4] = new OString( kTestStr28 );
16084 void tearDown()
16086 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
16087 delete arrOUS[3]; delete arrOUS[4];
16090 void append_001()
16092 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16093 // LLA: OString expVal( kTestStr95 );
16094 float input = (float)atof("-3.0");
16096 sal_Int32 nLen = aStrBuf.getLength();
16097 aStrBuf.append( input );
16099 CPPUNIT_ASSERT_MESSAGE
16101 "arrOUS[0] append -3.0",
16102 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16107 void append_002()
16109 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16110 // LLA: OString expVal( kTestStr96 );
16111 float input = (float)atof("-3.5");
16113 sal_Int32 nLen = aStrBuf.getLength();
16114 aStrBuf.append( input );
16116 CPPUNIT_ASSERT_MESSAGE
16118 "arrOUS[0] append -3.5",
16119 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16124 void append_003()
16126 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16127 // LLA: OString expVal( kTestStr97 );
16128 float input = (float)atof("-3.0625");
16130 sal_Int32 nLen = aStrBuf.getLength();
16131 aStrBuf.append( input );
16133 CPPUNIT_ASSERT_MESSAGE
16135 "arrOUS[0] append -3.0625",
16136 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16141 void append_004()
16143 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16144 // LLA: OString expVal( kTestStr98 );
16145 float input = (float)atof("-3.502525");
16147 sal_Int32 nLen = aStrBuf.getLength();
16148 aStrBuf.append( input );
16150 CPPUNIT_ASSERT_MESSAGE
16152 "arrOUS[0] append -3.502525",
16153 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16158 void append_005()
16160 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16161 // LLA: OString expVal( kTestStr99 );
16162 float input = (float)atof("-3.141592");
16164 sal_Int32 nLen = aStrBuf.getLength();
16165 aStrBuf.append( input );
16167 CPPUNIT_ASSERT_MESSAGE
16169 "arrOUS[0] append -3.141592",
16170 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16175 void append_006()
16177 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16178 // LLA: OString expVal( kTestStr100 );
16179 float input = (float)atof("-3.5025255");
16181 sal_Int32 nLen = aStrBuf.getLength();
16182 aStrBuf.append( input );
16184 CPPUNIT_ASSERT_MESSAGE
16186 "arrOUS[0] append -3.5025255",
16187 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16192 void append_007()
16194 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16195 // LLA: OString expVal( kTestStr101 );
16196 float input = (float)atof("-3.00390625");
16198 sal_Int32 nLen = aStrBuf.getLength();
16199 aStrBuf.append( input );
16201 CPPUNIT_ASSERT_MESSAGE
16203 "arrOUS[0] append -3.0039062",
16204 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16209 void append_008()
16211 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16212 // LLA: OString expVal( kTestStr102 );
16213 float input = (float)atof("-3.0");
16215 sal_Int32 nLen = aStrBuf.getLength();
16216 aStrBuf.append( input );
16218 CPPUNIT_ASSERT_MESSAGE
16220 "arrOUS[1] append -3.0",
16221 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16226 void append_009()
16228 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16229 // LLA: OString expVal( kTestStr103 );
16230 float input = (float)atof("-3.5");
16232 sal_Int32 nLen = aStrBuf.getLength();
16233 aStrBuf.append( input );
16235 CPPUNIT_ASSERT_MESSAGE
16237 "arrOUS[1] append -3.5",
16238 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16243 void append_010()
16245 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16246 // LLA: OString expVal( kTestStr104 );
16247 float input = (float)atof("-3.0625");
16249 sal_Int32 nLen = aStrBuf.getLength();
16250 aStrBuf.append( input );
16252 CPPUNIT_ASSERT_MESSAGE
16254 "arrOUS[1] append -3.0625",
16255 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16260 void append_011()
16262 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16263 // LLA: OString expVal( kTestStr105 );
16264 float input = (float)atof("-3.502525");
16266 sal_Int32 nLen = aStrBuf.getLength();
16267 aStrBuf.append( input );
16269 CPPUNIT_ASSERT_MESSAGE
16271 "arrOUS[1] append -3.502525",
16272 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16277 void append_012()
16279 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16280 // LLA: OString expVal( kTestStr106 );
16281 float input = (float)atof("-3.141592");
16283 sal_Int32 nLen = aStrBuf.getLength();
16284 aStrBuf.append( input );
16286 CPPUNIT_ASSERT_MESSAGE
16288 "arrOUS[1] append -3.141592",
16289 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16294 void append_013()
16296 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16297 // LLA: OString expVal( kTestStr107 );
16298 float input = (float)atof("-3.5025255");
16300 sal_Int32 nLen = aStrBuf.getLength();
16301 aStrBuf.append( input );
16303 CPPUNIT_ASSERT_MESSAGE
16305 "arrOUS[1] append -3.5025255",
16306 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16311 void append_014()
16313 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
16314 // LLA: OString expVal( kTestStr108 );
16315 float input = (float)atof("-3.00390625");
16317 sal_Int32 nLen = aStrBuf.getLength();
16318 aStrBuf.append( input );
16320 CPPUNIT_ASSERT_MESSAGE
16322 "arrOUS[1] append -3.0039062",
16323 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16328 void append_015()
16330 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16331 // LLA: OString expVal( kTestStr102 );
16332 float input = (float)atof("-3.0");
16334 sal_Int32 nLen = aStrBuf.getLength();
16335 aStrBuf.append( input );
16337 CPPUNIT_ASSERT_MESSAGE
16339 "arrOUS[2] append -3.0",
16340 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16345 void append_016()
16347 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16348 // LLA: OString expVal( kTestStr103 );
16349 float input = (float)atof("-3.5");
16351 sal_Int32 nLen = aStrBuf.getLength();
16352 aStrBuf.append( input );
16354 CPPUNIT_ASSERT_MESSAGE
16356 "arrOUS[2] append -3.5",
16357 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16362 void append_017()
16364 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16365 // LLA: OString expVal( kTestStr104 );
16366 float input = (float)atof("-3.0625");
16368 sal_Int32 nLen = aStrBuf.getLength();
16369 aStrBuf.append( input );
16371 CPPUNIT_ASSERT_MESSAGE
16373 "arrOUS[2] append -3.0625",
16374 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16379 void append_018()
16381 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16382 // LLA: OString expVal( kTestStr105 );
16383 float input = (float)atof("-3.502525");
16385 sal_Int32 nLen = aStrBuf.getLength();
16386 aStrBuf.append( input );
16388 CPPUNIT_ASSERT_MESSAGE
16390 "arrOUS[2] append -3.502525",
16391 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16396 void append_019()
16398 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16399 // LLA: OString expVal( kTestStr106 );
16400 float input = (float)atof("-3.141592");
16402 sal_Int32 nLen = aStrBuf.getLength();
16403 aStrBuf.append( input );
16405 CPPUNIT_ASSERT_MESSAGE
16407 "arrOUS[2] append -3.141592",
16408 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16413 void append_020()
16415 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16416 // LLA: OString expVal( kTestStr107 );
16417 float input = (float)atof("-3.5025255");
16419 sal_Int32 nLen = aStrBuf.getLength();
16420 aStrBuf.append( input );
16422 CPPUNIT_ASSERT_MESSAGE
16424 "arrOUS[2] append -3.5025255",
16425 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16430 void append_021()
16432 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
16433 // LLA: OString expVal( kTestStr108 );
16434 float input = (float)atof("-3.00390625");
16436 sal_Int32 nLen = aStrBuf.getLength();
16437 aStrBuf.append( input );
16439 CPPUNIT_ASSERT_MESSAGE
16441 "arrOUS[2] append -3.0039062",
16442 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16447 void append_022()
16449 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16450 // LLA: OString expVal( kTestStr102 );
16451 float input = (float)atof("-3.0");
16453 sal_Int32 nLen = aStrBuf.getLength();
16454 aStrBuf.append( input );
16456 CPPUNIT_ASSERT_MESSAGE
16458 "arrOUS[3] append -3.0",
16459 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16464 void append_023()
16466 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16467 // LLA: OString expVal( kTestStr103 );
16468 float input = (float)atof("-3.5");
16470 sal_Int32 nLen = aStrBuf.getLength();
16471 aStrBuf.append( input );
16473 CPPUNIT_ASSERT_MESSAGE
16475 "arrOUS[3] append -3.5",
16476 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16481 void append_024()
16483 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16484 // LLA: OString expVal( kTestStr104 );
16485 float input = (float)atof("-3.0625");
16487 sal_Int32 nLen = aStrBuf.getLength();
16488 aStrBuf.append( input );
16490 CPPUNIT_ASSERT_MESSAGE
16492 "arrOUS[3] append -3.0625",
16493 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16498 void append_025()
16500 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16501 // LLA: OString expVal( kTestStr105 );
16502 float input = (float)atof("-3.502525");
16504 sal_Int32 nLen = aStrBuf.getLength();
16505 aStrBuf.append( input );
16507 CPPUNIT_ASSERT_MESSAGE
16509 "arrOUS[3] append -3.502525",
16510 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16515 void append_026()
16517 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16518 // LLA: OString expVal( kTestStr106 );
16519 float input = (float)atof("-3.141592");
16521 sal_Int32 nLen = aStrBuf.getLength();
16522 aStrBuf.append( input );
16524 CPPUNIT_ASSERT_MESSAGE
16526 "arrOUS[3] append -3.141592",
16527 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16532 void append_027()
16534 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16535 // LLA: OString expVal( kTestStr107 );
16536 float input = (float)atof("-3.5025255");
16538 sal_Int32 nLen = aStrBuf.getLength();
16539 aStrBuf.append( input );
16541 CPPUNIT_ASSERT_MESSAGE
16543 "arrOUS[3] append -3.5025255",
16544 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16549 void append_028()
16551 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
16552 // LLA: OString expVal( kTestStr108 );
16553 float input = (float)atof("-3.00390625");
16555 sal_Int32 nLen = aStrBuf.getLength();
16556 aStrBuf.append( input );
16558 CPPUNIT_ASSERT_MESSAGE
16560 "arrOUS[3] append -3.0039062",
16561 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16566 void append_029()
16568 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16569 // LLA: OString expVal( kTestStr109 );
16570 float input = (float)atof("-3.0");
16572 sal_Int32 nLen = aStrBuf.getLength();
16573 aStrBuf.append( input );
16575 CPPUNIT_ASSERT_MESSAGE
16577 "arrOUS[4] append -3.0",
16578 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16583 void append_030()
16585 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16586 // LLA: OString expVal( kTestStr110 );
16587 float input = (float)atof("-3.5");
16589 sal_Int32 nLen = aStrBuf.getLength();
16590 aStrBuf.append( input );
16592 CPPUNIT_ASSERT_MESSAGE
16594 "arrOUS[4] append -3.5",
16595 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16600 void append_031()
16602 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16603 // LLA: OString expVal( kTestStr111 );
16604 float input = (float)atof("-3.0625");
16606 sal_Int32 nLen = aStrBuf.getLength();
16607 aStrBuf.append( input );
16609 CPPUNIT_ASSERT_MESSAGE
16611 "arrOUS[4] append -3.0625",
16612 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16617 void append_032()
16619 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16620 // LLA: OString expVal( kTestStr112 );
16621 float input = (float)atof("-3.502525");
16623 sal_Int32 nLen = aStrBuf.getLength();
16624 aStrBuf.append( input );
16626 CPPUNIT_ASSERT_MESSAGE
16628 "arrOUS[4] append -3.502525",
16629 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16634 void append_033()
16636 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16637 // LLA: OString expVal( kTestStr113 );
16638 float input = (float)atof("-3.141592");
16640 sal_Int32 nLen = aStrBuf.getLength();
16641 aStrBuf.append( input );
16643 CPPUNIT_ASSERT_MESSAGE
16645 "arrOUS[4] append -3.141592",
16646 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16651 void append_034()
16653 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16654 // LLA: OString expVal( kTestStr114 );
16655 float input = (float)atof("-3.5025255");
16657 sal_Int32 nLen = aStrBuf.getLength();
16658 aStrBuf.append( input );
16660 CPPUNIT_ASSERT_MESSAGE
16662 "arrOUS[4] append -3.5025255",
16663 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16668 void append_035()
16670 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
16671 // LLA: OString expVal( kTestStr115 );
16672 float input = (float)atof("-3.00390625");
16674 sal_Int32 nLen = aStrBuf.getLength();
16675 aStrBuf.append( input );
16677 CPPUNIT_ASSERT_MESSAGE
16679 "arrOUS[4] append -3.0039062",
16680 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16684 #ifdef WITH_CORE
16685 void append_036()
16687 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16688 // LLA: OString expVal( kTestStr102 );
16689 float input = (float)atof("-3.0");
16691 sal_Int32 nLen = aStrBuf.getLength();
16692 aStrBuf.append( input );
16694 CPPUNIT_ASSERT_MESSAGE
16696 "OStringBuffer( kSInt32Max ) append -3.0",
16697 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16702 void append_037()
16704 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16705 // LLA: OString expVal( kTestStr103 );
16706 float input = (float)atof("-3.5");
16708 sal_Int32 nLen = aStrBuf.getLength();
16709 aStrBuf.append( input );
16711 CPPUNIT_ASSERT_MESSAGE
16713 "OStringBuffer( kSInt32Max ) append -3.5",
16714 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16719 void append_038()
16721 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16722 // LLA: OString expVal( kTestStr104 );
16723 float input = (float)atof("-3.0625");
16725 sal_Int32 nLen = aStrBuf.getLength();
16726 aStrBuf.append( input );
16728 CPPUNIT_ASSERT_MESSAGE
16730 "OStringBuffer( kSInt32Max ) append -3.0625",
16731 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16736 void append_039()
16738 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16739 // LLA: OString expVal( kTestStr105 );
16740 float input = (float)atof("-3.502525");
16742 sal_Int32 nLen = aStrBuf.getLength();
16743 aStrBuf.append( input );
16745 CPPUNIT_ASSERT_MESSAGE
16747 "OStringBuffer( kSInt32Max ) append -3.502525",
16748 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16753 void append_040()
16755 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16756 // LLA: OString expVal( kTestStr106 );
16757 float input = (float)atof("-3.141592");
16759 sal_Int32 nLen = aStrBuf.getLength();
16760 aStrBuf.append( input );
16762 CPPUNIT_ASSERT_MESSAGE
16764 "OStringBuffer( kSInt32Max ) append -3.141592",
16765 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16770 void append_041()
16772 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16773 // LLA: OString expVal( kTestStr107 );
16774 float input = (float)atof("-3.5025255");
16776 sal_Int32 nLen = aStrBuf.getLength();
16777 aStrBuf.append( input );
16779 CPPUNIT_ASSERT_MESSAGE
16781 "OStringBuffer( kSInt32Max ) append -3.5025255",
16782 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16787 void append_042()
16789 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
16790 // LLA: OString expVal( kTestStr108 );
16791 float input = (float)atof("-3.00390625");
16793 sal_Int32 nLen = aStrBuf.getLength();
16794 aStrBuf.append( input );
16796 CPPUNIT_ASSERT_MESSAGE
16798 "OStringBuffer( kSInt32Max ) append -3.0039062",
16799 checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input)
16803 #endif
16805 CPPUNIT_TEST_SUITE( append_008_Float_Negative );
16806 CPPUNIT_TEST( append_001 );
16807 CPPUNIT_TEST( append_002 );
16808 CPPUNIT_TEST( append_003 );
16809 CPPUNIT_TEST( append_004 );
16810 CPPUNIT_TEST( append_005 );
16811 CPPUNIT_TEST( append_006 );
16812 CPPUNIT_TEST( append_007 );
16813 CPPUNIT_TEST( append_008 );
16814 CPPUNIT_TEST( append_009 );
16815 CPPUNIT_TEST( append_010 );
16816 CPPUNIT_TEST( append_011 );
16817 CPPUNIT_TEST( append_012 );
16818 CPPUNIT_TEST( append_013 );
16819 CPPUNIT_TEST( append_014 );
16820 CPPUNIT_TEST( append_015 );
16821 CPPUNIT_TEST( append_016 );
16822 CPPUNIT_TEST( append_017 );
16823 CPPUNIT_TEST( append_018 );
16824 CPPUNIT_TEST( append_019 );
16825 CPPUNIT_TEST( append_020 );
16826 CPPUNIT_TEST( append_021 );
16827 CPPUNIT_TEST( append_022 );
16828 CPPUNIT_TEST( append_023 );
16829 CPPUNIT_TEST( append_024 );
16830 CPPUNIT_TEST( append_025 );
16831 #ifdef WITH_CORE
16832 CPPUNIT_TEST( append_026 );
16833 CPPUNIT_TEST( append_027 );
16834 CPPUNIT_TEST( append_028 );
16835 CPPUNIT_TEST( append_029 );
16836 CPPUNIT_TEST( append_030 );
16837 #endif
16838 CPPUNIT_TEST_SUITE_END();
16840 //------------------------------------------------------------------------
16841 // testing the method append( double d )
16842 //------------------------------------------------------------------------
16844 class checkdouble : public CppUnit::TestFixture
16846 public:
16847 bool checkIfStrBufContainAtPosTheDouble(rtl::OStringBuffer const& _sStrBuf, sal_Int32 _nLen, double _nDouble)
16849 OString sDoubleValue;
16850 sDoubleValue = rtl::OString::valueOf(_nDouble);
16852 OString sBufferString(_sStrBuf.getStr());
16853 sal_Int32 nPos = sBufferString.indexOf(sDoubleValue);
16854 if ( nPos >= 0 && nPos == _nLen)
16856 return true;
16858 return false;
16862 class append_009_double : public checkdouble
16864 OString* arrOUS[5];
16866 public:
16867 void setUp()
16869 arrOUS[0] = new OString( kTestStr7 );
16870 arrOUS[1] = new OString( );
16871 arrOUS[2] = new OString( kTestStr25 );
16872 arrOUS[3] = new OString( "\0" );
16873 arrOUS[4] = new OString( kTestStr28 );
16877 void tearDown()
16879 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
16880 delete arrOUS[3]; delete arrOUS[4];
16883 void append_001()
16885 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16886 // LLA: OString expVal( kTestStr74 );
16887 double input = atof("3.0");
16889 sal_Int32 nLen = aStrBuf.getLength();
16890 aStrBuf.append( input );
16892 CPPUNIT_ASSERT_MESSAGE
16894 "arrOUS[0] append 3.0",
16895 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
16901 void append_002()
16903 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16904 OString expVal( kTestStr75 );
16905 double input = atof("3.5");
16907 aStrBuf.append( input );
16909 CPPUNIT_ASSERT_MESSAGE
16911 "arrOUS[0] append 3.5",
16912 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
16917 void append_003()
16919 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16920 OString expVal( kTestStr76 );
16921 double input = atof("3.0625");
16923 aStrBuf.append( input );
16925 CPPUNIT_ASSERT_MESSAGE
16927 "arrOUS[0] append 3.0625",
16928 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
16933 void append_004()
16935 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16936 OString expVal( kTestStr122 );
16937 double input = atof("3.1415926535");
16939 aStrBuf.append( input );
16941 CPPUNIT_ASSERT_MESSAGE
16943 "arrOUS[0] append 3.1415926535",
16944 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
16949 void append_005()
16951 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16952 OString expVal( kTestStr123 );
16953 double input = atof("3.141592653589793");
16955 aStrBuf.append( input );
16957 CPPUNIT_ASSERT_MESSAGE
16959 "arrOUS[0] append 3.141592653589793",
16960 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
16965 void append_006()
16967 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16968 OString expVal( kTestStr124 );
16969 double input = atof("3.14159265358979323");
16971 aStrBuf.append( input );
16973 CPPUNIT_ASSERT_MESSAGE
16975 "arrOUS[0] append 3.14159265358979323",
16976 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
16981 void append_007()
16983 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
16984 OString expVal( kTestStr125 );
16985 double input = atof("3.141592653589793238462643");
16987 aStrBuf.append( input );
16989 CPPUNIT_ASSERT_MESSAGE
16991 "arrOUS[0] append 3.141592653589793238462643",
16992 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
16997 void append_008()
16999 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17000 OString expVal( kTestStr81 );
17001 double input = atof("3.0");
17003 aStrBuf.append( input );
17005 CPPUNIT_ASSERT_MESSAGE
17007 "arrOUS[1] append 3.0",
17008 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17013 void append_009()
17015 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17016 OString expVal( kTestStr82 );
17017 double input = atof("3.5");
17019 aStrBuf.append( input );
17021 CPPUNIT_ASSERT_MESSAGE
17023 "arrOUS[1] append 3.5",
17024 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17029 void append_010()
17031 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17032 OString expVal( kTestStr83 );
17033 double input = atof("3.0625");
17035 aStrBuf.append( input );
17037 CPPUNIT_ASSERT_MESSAGE
17039 "arrOUS[1] append 3.0625",
17040 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17045 void append_011()
17047 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17048 OString expVal( kTestStr126 );
17049 double input = atof("3.1415926535");
17051 aStrBuf.append( input );
17053 CPPUNIT_ASSERT_MESSAGE
17055 "arrOUS[1] append 3.1415926535",
17056 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17061 void append_012()
17063 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17064 OString expVal( kTestStr127 );
17065 double input = atof("3.141592653589793");
17067 aStrBuf.append( input );
17068 OString *result = new OString( aStrBuf.getStr());
17069 double output = result->toDouble();
17070 OString *final = new OString();
17071 *final = final->valueOf(output);
17072 t_print("the OStringvalus is:");
17073 for(int m=0;m<final->getLength();m++)
17075 t_print("%c",final->pData->buffer[m]);
17077 t_print("\n");
17078 t_print("the OStringBuffer is %d\n", aStrBuf.getLength());
17079 t_print("the expVal is %d\n", expVal.getLength());
17080 t_print("the OStringbuffervalus is:");
17081 for(int j=0;j<aStrBuf.getLength();j++)
17083 t_print("%c",*(aStrBuf.getStr()+j));
17085 t_print("\n");
17086 t_print("the expVlavalus is:");
17087 for(int k=0;k<expVal.getLength();k++)
17089 t_print("%c",expVal.pData->buffer[k]);
17091 t_print("\n");
17092 CPPUNIT_ASSERT_MESSAGE
17094 "arrOUS[1] append 3.141592653589793",
17095 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17100 void append_013()
17102 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17103 OString expVal( kTestStr128 );
17104 double input = atof("3.14159265358979323");
17106 aStrBuf.append( input );
17108 CPPUNIT_ASSERT_MESSAGE
17110 "arrOUS[1] append 3.14159265358979323",
17111 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17116 void append_014()
17118 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17119 OString expVal( kTestStr129 );
17120 double input = atof("3.141592653589793238462643");
17122 aStrBuf.append( input );
17124 CPPUNIT_ASSERT_MESSAGE
17126 "arrOUS[1] append 3.141592653589793238462643",
17127 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17132 void append_015()
17134 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17135 OString expVal( kTestStr81 );
17136 double input = atof("3.0");
17138 aStrBuf.append( input );
17140 CPPUNIT_ASSERT_MESSAGE
17142 "arrOUS[2] append 3.0",
17143 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17148 void append_016()
17150 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17151 OString expVal( kTestStr82 );
17152 double input = atof("3.5");
17154 aStrBuf.append( input );
17156 CPPUNIT_ASSERT_MESSAGE
17158 "arrOUS[2] append 3.5",
17159 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17164 void append_017()
17166 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17167 OString expVal( kTestStr83 );
17168 double input = atof("3.0625");
17170 aStrBuf.append( input );
17172 CPPUNIT_ASSERT_MESSAGE
17174 "arrOUS[2] append 3.0625",
17175 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17180 void append_018()
17182 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17183 OString expVal( kTestStr126 );
17184 double input = atof("3.1415926535");
17186 aStrBuf.append( input );
17188 CPPUNIT_ASSERT_MESSAGE
17190 "arrOUS[2] append 3.1415926535",
17191 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17196 void append_019()
17198 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17199 OString expVal( kTestStr127 );
17200 double input = atof("3.141592653589793");
17202 aStrBuf.append( input );
17204 CPPUNIT_ASSERT_MESSAGE
17206 "arrOUS[2] append 3.141592653589793",
17207 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17212 void append_020()
17214 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17215 OString expVal( kTestStr128 );
17216 double input = atof("3.14159265358979323");
17218 aStrBuf.append( input );
17220 CPPUNIT_ASSERT_MESSAGE
17222 "arrOUS[2] append 3.14159265358979323",
17223 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17228 void append_021()
17230 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17231 OString expVal( kTestStr129 );
17232 double input = atof("3.141592653589793238462643");
17234 aStrBuf.append( input );
17236 CPPUNIT_ASSERT_MESSAGE
17238 "arrOUS[2] append 3.141592653589793238462643",
17239 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17244 void append_022()
17246 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17247 OString expVal( kTestStr81 );
17248 double input = atof("3.0");
17250 aStrBuf.append( input );
17252 CPPUNIT_ASSERT_MESSAGE
17254 "arrOUS[3] append 3.0",
17255 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17260 void append_023()
17262 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17263 OString expVal( kTestStr82 );
17264 double input = atof("3.5");
17266 aStrBuf.append( input );
17268 CPPUNIT_ASSERT_MESSAGE
17270 "arrOUS[3] append 3.5",
17271 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17276 void append_024()
17278 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17279 OString expVal( kTestStr83 );
17280 double input = atof("3.0625");
17282 aStrBuf.append( input );
17284 CPPUNIT_ASSERT_MESSAGE
17286 "arrOUS[3] append 3.0625",
17287 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17292 void append_025()
17294 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17295 OString expVal( kTestStr126 );
17296 double input = atof("3.1415926535");
17298 aStrBuf.append( input );
17300 CPPUNIT_ASSERT_MESSAGE
17302 "arrOUS[3] append 3.1415926535",
17303 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17308 void append_026()
17310 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17311 OString expVal( kTestStr127 );
17312 double input = atof("3.141592653589793");
17314 aStrBuf.append( input );
17316 CPPUNIT_ASSERT_MESSAGE
17318 "arrOUS[3] append 3.141592653589793",
17319 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17324 void append_027()
17326 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17327 OString expVal( kTestStr128 );
17328 double input = atof("3.14159265358979323");
17330 aStrBuf.append( input );
17332 CPPUNIT_ASSERT_MESSAGE
17334 "arrOUS[1] append 3.14159265358979323",
17335 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17340 void append_028()
17342 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
17343 OString expVal( kTestStr129 );
17344 double input = atof("3.141592653589793238462643");
17346 aStrBuf.append( input );
17348 CPPUNIT_ASSERT_MESSAGE
17350 "arrOUS[3] append 3.141592653589793238462643",
17351 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17356 void append_029()
17358 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17359 OString expVal( kTestStr88 );
17360 double input = atof("3.0");
17362 aStrBuf.append( input );
17364 CPPUNIT_ASSERT_MESSAGE
17366 "arrOUS[4] append 3.0",
17367 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17372 void append_030()
17374 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17375 OString expVal( kTestStr89 );
17376 double input = atof("3.5");
17378 aStrBuf.append( input );
17380 CPPUNIT_ASSERT_MESSAGE
17382 "arrOUS[4] append 3.5",
17383 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17388 void append_031()
17390 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17391 OString expVal( kTestStr90 );
17392 double input = atof("3.0625");
17394 aStrBuf.append( input );
17396 CPPUNIT_ASSERT_MESSAGE
17398 "arrOUS[4] append 3.0625",
17399 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17404 void append_032()
17406 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17407 OString expVal( kTestStr130 );
17408 double input = atof("3.1415926535");
17410 aStrBuf.append( input );
17412 CPPUNIT_ASSERT_MESSAGE
17414 "arrOUS[4] append 3.1415926535",
17415 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17420 void append_033()
17422 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17423 OString expVal( kTestStr131 );
17424 double input = atof("3.141592653589793");
17426 aStrBuf.append( input );
17428 CPPUNIT_ASSERT_MESSAGE
17430 "arrOUS[4] append 3.141592653589793",
17431 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17436 void append_034()
17438 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17439 OString expVal( kTestStr132 );
17440 double input = atof("3.14159265358979323");
17442 aStrBuf.append( input );
17444 CPPUNIT_ASSERT_MESSAGE
17446 "arrOUS[4] append 3.14159265358979323",
17447 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17452 void append_035()
17454 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
17455 // LLA: OString expVal( kTestStr133 );
17456 double input = atof("3.141592653589793238462643");
17458 sal_Int32 nLen = aStrBuf.getLength();
17459 aStrBuf.append( input );
17461 CPPUNIT_ASSERT_MESSAGE
17463 "arrOUS[4] append 3.141592653589793238462643",
17464 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
17469 #ifdef WITH_CORE
17470 void append_036()
17472 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17473 OString expVal( kTestStr81 );
17474 double input = atof("3.0");
17476 aStrBuf.append( input );
17478 CPPUNIT_ASSERT_MESSAGE
17480 "OStringBuffer( kSInt32Max ) append 3.0",
17481 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17486 void append_037()
17488 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17489 OString expVal( kTestStr82 );
17490 double input = atof("3.5");
17492 aStrBuf.append( input );
17494 CPPUNIT_ASSERT_MESSAGE
17496 "OStringBuffer( kSInt32Max ) append 3.5",
17497 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17502 void append_038()
17504 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17505 OString expVal( kTestStr83 );
17506 double input = atof("3.0625");
17508 aStrBuf.append( input );
17510 CPPUNIT_ASSERT_MESSAGE
17512 "OStringBuffer( kSInt32Max ) append 3.0625",
17513 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17518 void append_039()
17520 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17521 OString expVal( kTestStr126 );
17522 double input = atof("3.1415926535");
17524 aStrBuf.append( input );
17526 CPPUNIT_ASSERT_MESSAGE
17528 "OStringBuffer( kSInt32Max ) append 3.1415926535",
17529 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17534 void append_040()
17536 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17537 OString expVal( kTestStr127 );
17538 double input = atof("3.141592653589793";
17540 aStrBuf.append( input );
17542 CPPUNIT_ASSERT_MESSAGE
17544 "OStringBuffer( kSInt32Max ) append 3.141592653589793",
17545 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17550 void append_041()
17552 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17553 OString expVal( kTestStr128 );
17554 double input = atof("3.14159265358979323");
17556 aStrBuf.append( input );
17558 CPPUNIT_ASSERT_MESSAGE
17560 "OStringBuffer( kSInt32Max ) append 3.14159265358979323",
17561 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17566 void append_042()
17568 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
17569 OString expVal( kTestStr129 );
17570 double input = atof("3.141592653589793238462643");
17572 aStrBuf.append( input );
17574 CPPUNIT_ASSERT_MESSAGE
17576 "OStringBuffer( kSInt32Max ) append 3.141592653589793238462643",
17577 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17581 #endif
17583 CPPUNIT_TEST_SUITE( append_009_double );
17584 CPPUNIT_TEST( append_001 );
17586 CPPUNIT_TEST( append_002 );
17587 CPPUNIT_TEST( append_003 );
17588 CPPUNIT_TEST( append_004 );
17589 CPPUNIT_TEST( append_005 );
17590 CPPUNIT_TEST( append_006 );
17591 CPPUNIT_TEST( append_007 );
17592 CPPUNIT_TEST( append_008 );
17593 CPPUNIT_TEST( append_009 );
17594 CPPUNIT_TEST( append_010 );
17595 CPPUNIT_TEST( append_011 );
17596 CPPUNIT_TEST( append_012 );
17597 CPPUNIT_TEST( append_013 );
17598 CPPUNIT_TEST( append_014 );
17599 CPPUNIT_TEST( append_015 );
17600 CPPUNIT_TEST( append_016 );
17601 CPPUNIT_TEST( append_017 );
17602 CPPUNIT_TEST( append_018 );
17603 CPPUNIT_TEST( append_019 );
17604 CPPUNIT_TEST( append_020 );
17605 CPPUNIT_TEST( append_021 );
17606 CPPUNIT_TEST( append_022 );
17607 CPPUNIT_TEST( append_023 );
17608 CPPUNIT_TEST( append_024 );
17609 CPPUNIT_TEST( append_025 );
17610 #ifdef WITH_CORE
17611 CPPUNIT_TEST( append_026 );
17612 CPPUNIT_TEST( append_027 );
17613 CPPUNIT_TEST( append_028 );
17614 CPPUNIT_TEST( append_029 );
17615 CPPUNIT_TEST( append_030 );
17616 #endif
17618 CPPUNIT_TEST( append_035 );
17619 CPPUNIT_TEST_SUITE_END();
17621 //------------------------------------------------------------------------
17622 // testing the method append( double f ) for negative value
17623 //------------------------------------------------------------------------
17624 class append_009_Double_Negative : public checkdouble
17626 OString* arrOUS[5];
17628 public:
17629 void setUp()
17631 arrOUS[0] = new OString( kTestStr7 );
17632 arrOUS[1] = new OString( );
17633 arrOUS[2] = new OString( kTestStr25 );
17634 arrOUS[3] = new OString( "\0" );
17635 arrOUS[4] = new OString( kTestStr28 );
17639 void tearDown()
17641 delete arrOUS[0]; delete arrOUS[1]; delete arrOUS[2];
17642 delete arrOUS[3]; delete arrOUS[4];
17645 void append_001()
17647 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17648 // LLA: OString expVal( kTestStr95 );
17649 double input = atof("-3.0");
17651 sal_Int32 nLen = aStrBuf.getLength();
17652 aStrBuf.append( input );
17654 CPPUNIT_ASSERT_MESSAGE
17656 "arrOUS[0] append -3.0",
17657 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
17662 void append_002()
17664 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17665 OString expVal( kTestStr96 );
17666 double input = atof("-3.5");
17668 aStrBuf.append( input );
17670 CPPUNIT_ASSERT_MESSAGE
17672 "arrOUS[0] append -3.5",
17673 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17678 void append_003()
17680 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17681 OString expVal( kTestStr97 );
17682 double input = atof("-3.0625");
17684 aStrBuf.append( input );
17686 CPPUNIT_ASSERT_MESSAGE
17688 "arrOUS[0] append -3.0625",
17689 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17694 void append_004()
17696 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17697 OString expVal( kTestStr98 );
17698 double input = atof("-3.502525");
17700 aStrBuf.append( input );
17702 CPPUNIT_ASSERT_MESSAGE
17704 "arrOUS[0] append -3.502525",
17705 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17710 void append_005()
17712 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17713 OString expVal( kTestStr134 );
17714 double input = atof("-3.141592653589793");
17716 aStrBuf.append( input );
17718 CPPUNIT_ASSERT_MESSAGE
17720 "arrOUS[0] append -3.141592653589793",
17721 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17726 void append_006()
17728 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17729 OString expVal( kTestStr135 );
17730 double input = atof("-3.14159265358979323");
17732 aStrBuf.append( input );
17734 CPPUNIT_ASSERT_MESSAGE
17736 "arrOUS[0] append -3.14159265358979323",
17737 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17742 void append_007()
17744 ::rtl::OStringBuffer aStrBuf( *arrOUS[0] );
17745 OString expVal( kTestStr136 );
17746 double input = atof("-3.141592653589793238462643");
17748 aStrBuf.append( input );
17750 CPPUNIT_ASSERT_MESSAGE
17752 "arrOUS[0] append -3.141592653589793238462643",
17753 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17758 void append_008()
17760 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17761 OString expVal( kTestStr102 );
17762 double input = atof("-3.0");
17764 aStrBuf.append( input );
17766 CPPUNIT_ASSERT_MESSAGE
17768 "arrOUS[1] append -3.0",
17769 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17774 void append_009()
17776 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17777 OString expVal( kTestStr103 );
17778 double input = atof("-3.5");
17780 aStrBuf.append( input );
17782 CPPUNIT_ASSERT_MESSAGE
17784 "arrOUS[1] append -3.5",
17785 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17790 void append_010()
17792 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17793 OString expVal( kTestStr104 );
17794 double input = atof("-3.0625");
17796 aStrBuf.append( input );
17797 OString *result = new OString( aStrBuf.getStr());
17798 double output = result->toDouble();
17799 OString *final = new OString();
17800 *final = final->valueOf(output);
17801 t_print("the OStringvalus is:");
17802 for(int m=0;m<final->getLength();m++)
17804 t_print("%c",final->pData->buffer[m]);
17806 t_print("\n");
17807 t_print("the OStringBuffer is %d\n", aStrBuf.getLength());
17808 t_print("the expVal is %d\n", expVal.getLength());
17809 t_print("the OStringbuffervalus is:");
17810 for(int j=0;j<aStrBuf.getLength();j++)
17812 t_print("%c",*(aStrBuf.getStr()+j));
17814 t_print("\n");
17815 t_print("the expVlavalus is:");
17816 for(int k=0;k<expVal.getLength();k++)
17818 t_print("%c",expVal.pData->buffer[k]);
17820 t_print("\n");
17821 CPPUNIT_ASSERT_MESSAGE
17823 "arrOUS[1] append -3.0625",
17824 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17829 void append_011()
17831 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17832 OString expVal( kTestStr105 );
17833 double input = atof("-3.502525");
17835 aStrBuf.append( input );
17837 double output = atof("-3.50252");
17838 OString *final = new OString();
17839 *final = final->valueOf(output);
17840 t_print("the OStringvalus is:");
17841 for(int m=0;m<final->getLength();m++)
17843 t_print("%c",final->pData->buffer[m]);
17845 t_print("\n");
17846 t_print("the OStringBuffer is %d\n", aStrBuf.getLength());
17847 t_print("the expVal is %d\n", expVal.getLength());
17848 t_print("the OStringbuffervalus is:");
17849 for(int j=0;j<aStrBuf.getLength();j++)
17851 t_print("%c",*(aStrBuf.getStr()+j));
17853 t_print("\n");
17854 t_print("the expVlavalus is:");
17855 for(int k=0;k<expVal.getLength();k++)
17857 t_print("%c",expVal.pData->buffer[k]);
17859 t_print("\n");
17860 CPPUNIT_ASSERT_MESSAGE
17862 "arrOUS[1] append -3.502525",
17863 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17868 void append_012()
17870 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17871 OString expVal( kTestStr137 );
17872 double input = atof("-3.141592653589793");
17874 aStrBuf.append( input );
17876 CPPUNIT_ASSERT_MESSAGE
17878 "arrOUS[1] append -3.141592653589793",
17879 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17884 void append_013()
17886 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17887 OString expVal( kTestStr138 );
17888 double input = atof("-3.14159265358979323");
17890 aStrBuf.append( input );
17892 CPPUNIT_ASSERT_MESSAGE
17894 "arrOUS[1] append -3.14159265358979323",
17895 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17900 void append_014()
17902 ::rtl::OStringBuffer aStrBuf( *arrOUS[1] );
17903 OString expVal( kTestStr139 );
17904 double input = atof("-3.141592653589793238462643");
17906 aStrBuf.append( input );
17908 CPPUNIT_ASSERT_MESSAGE
17910 "arrOUS[1] append -3.141592653589793238462643",
17911 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17916 void append_015()
17918 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17919 OString expVal( kTestStr102 );
17920 double input = atof("-3.0");
17922 aStrBuf.append( input );
17924 CPPUNIT_ASSERT_MESSAGE
17926 "arrOUS[2] append -3.0",
17927 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17932 void append_016()
17934 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17935 OString expVal( kTestStr103 );
17936 double input = atof("-3.5");
17938 aStrBuf.append( input );
17940 CPPUNIT_ASSERT_MESSAGE
17942 "arrOUS[2] append -3.5",
17943 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17948 void append_017()
17950 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17951 OString expVal( kTestStr104 );
17952 double input = atof("-3.0625");
17954 aStrBuf.append( input );
17956 CPPUNIT_ASSERT_MESSAGE
17958 "arrOUS[2] append -3.0625",
17959 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17964 void append_018()
17966 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17967 OString expVal( kTestStr105 );
17968 double input = atof("-3.502525");
17970 aStrBuf.append( input );
17972 CPPUNIT_ASSERT_MESSAGE
17974 "arrOUS[2] append -3.502525",
17975 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17980 void append_019()
17982 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17983 OString expVal( kTestStr137 );
17984 double input = atof("-3.141592653589793");
17986 aStrBuf.append( input );
17988 CPPUNIT_ASSERT_MESSAGE
17990 "arrOUS[2] append -3.141592653589793",
17991 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
17996 void append_020()
17998 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
17999 OString expVal( kTestStr138 );
18000 double input = atof("-3.14159265358979323");
18002 aStrBuf.append( input );
18004 CPPUNIT_ASSERT_MESSAGE
18006 "arrOUS[2] append -3.14159265358979323",
18007 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18012 void append_021()
18014 ::rtl::OStringBuffer aStrBuf( *arrOUS[2] );
18015 OString expVal( kTestStr139 );
18016 double input = atof("-3.141592653589793238462643");
18018 aStrBuf.append( input );
18020 CPPUNIT_ASSERT_MESSAGE
18022 "arrOUS[2] append -3.141592653589793238462643",
18023 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18028 void append_022()
18030 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18031 OString expVal( kTestStr102 );
18032 double input = atof("-3.0");
18034 aStrBuf.append( input );
18036 CPPUNIT_ASSERT_MESSAGE
18038 "arrOUS[3] append -3.0",
18039 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18044 void append_023()
18046 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18047 OString expVal( kTestStr103 );
18048 double input = atof("-3.5");
18050 aStrBuf.append( input );
18052 CPPUNIT_ASSERT_MESSAGE
18054 "arrOUS[3] append -3.5",
18055 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18060 void append_024()
18062 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18063 OString expVal( kTestStr104 );
18064 double input = atof("-3.0625");
18066 aStrBuf.append( input );
18068 CPPUNIT_ASSERT_MESSAGE
18070 "arrOUS[3] append -3.0625",
18071 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18076 void append_025()
18078 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18079 OString expVal( kTestStr105 );
18080 double input = atof("-3.502525");
18082 aStrBuf.append( input );
18084 CPPUNIT_ASSERT_MESSAGE
18086 "arrOUS[3] append -3.502525",
18087 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18092 void append_026()
18094 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18095 OString expVal( kTestStr137 );
18096 double input = atof("-3.141592653589793");
18098 aStrBuf.append( input );
18100 CPPUNIT_ASSERT_MESSAGE
18102 "arrOUS[3] append -3.141592653589793",
18103 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18108 void append_027()
18110 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18111 OString expVal( kTestStr138 );
18112 double input = atof("-3.14159265358979323");
18114 aStrBuf.append( input );
18116 CPPUNIT_ASSERT_MESSAGE
18118 "arrOUS[1] append -3.14159265358979323",
18119 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18124 void append_028()
18126 ::rtl::OStringBuffer aStrBuf( *arrOUS[3] );
18127 OString expVal( kTestStr139 );
18128 double input = atof("-3.141592653589793238462643");
18130 aStrBuf.append( input );
18132 CPPUNIT_ASSERT_MESSAGE
18134 "arrOUS[3] append -3.141592653589793238462643",
18135 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18140 void append_029()
18142 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18143 OString expVal( kTestStr109 );
18144 double input = atof("-3.0");
18146 aStrBuf.append( input );
18148 CPPUNIT_ASSERT_MESSAGE
18150 "arrOUS[4] append -3.0",
18151 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18156 void append_030()
18158 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18159 OString expVal( kTestStr110 );
18160 double input = atof("-3.5");
18162 aStrBuf.append( input );
18164 CPPUNIT_ASSERT_MESSAGE
18166 "arrOUS[4] append -3.5",
18167 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18172 void append_031()
18174 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18175 OString expVal( kTestStr111 );
18176 double input = atof("-3.0625");
18178 aStrBuf.append( input );
18180 CPPUNIT_ASSERT_MESSAGE
18182 "arrOUS[4] append -3.0625",
18183 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18188 void append_032()
18190 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18191 OString expVal( kTestStr112 );
18192 double input = atof("-3.502525");
18194 aStrBuf.append( input );
18196 CPPUNIT_ASSERT_MESSAGE
18198 "arrOUS[4] append -3.502525",
18199 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18204 void append_033()
18206 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18207 OString expVal( kTestStr140 );
18208 double input = atof("-3.141592653589793");
18210 aStrBuf.append( input );
18212 CPPUNIT_ASSERT_MESSAGE
18214 "arrOUS[4] append -3.141592653589793",
18215 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18220 void append_034()
18222 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18223 OString expVal( kTestStr141 );
18224 double input = atof("-3.14159265358979323");
18226 aStrBuf.append( input );
18228 CPPUNIT_ASSERT_MESSAGE
18230 "arrOUS[4] append -3.14159265358979323",
18231 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18237 void append_035()
18239 ::rtl::OStringBuffer aStrBuf( *arrOUS[4] );
18240 // LLA: OString expVal( kTestStr142 );
18241 double input = atof("-3.141592653589793238462643");
18243 sal_Int32 nLen = aStrBuf.getLength();
18244 aStrBuf.append( input );
18246 CPPUNIT_ASSERT_MESSAGE
18248 "arrOUS[4] append -3.141592653589793238462643",
18249 checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input)
18254 #ifdef WITH_CORE
18255 void append_036()
18257 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18258 OString expVal( kTestStr102 );
18259 double input = atof("-3.0");
18261 aStrBuf.append( input );
18263 CPPUNIT_ASSERT_MESSAGE
18265 "OStringBuffer( kSInt32Max ) append -3.0",
18266 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18271 void append_037()
18273 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18274 OString expVal( kTestStr103 );
18275 double input = atof("-3.5");
18277 aStrBuf.append( input );
18279 CPPUNIT_ASSERT_MESSAGE
18281 "OStringBuffer( kSInt32Max ) append -3.5",
18282 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18287 void append_038()
18289 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18290 OString expVal( kTestStr104 );
18291 double input = atof("-3.0625");
18293 aStrBuf.append( input );
18295 CPPUNIT_ASSERT_MESSAGE
18297 "OStringBuffer( kSInt32Max ) append -3.0625",
18298 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18303 void append_039()
18305 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18306 OString expVal( kTestStr105 );
18307 double input = atof("-3.502525");
18309 aStrBuf.append( input );
18311 CPPUNIT_ASSERT_MESSAGE
18313 "OStringBuffer( kSInt32Max ) append -3.502525",
18314 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18319 void append_040()
18321 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18322 OString expVal( kTestStr137 );
18323 double input = atof("-3.141592653589793");
18325 aStrBuf.append( input );
18327 CPPUNIT_ASSERT_MESSAGE
18329 "OStringBuffer( kSInt32Max ) append -3.141592653589793",
18330 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18335 void append_041()
18337 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18338 OString expVal( kTestStr138 );
18339 double input = atof("-3.14159265358979323");
18341 aStrBuf.append( input );
18343 CPPUNIT_ASSERT_MESSAGE
18345 "OStringBuffer( kSInt32Max ) append -3.14159265358979323",
18346 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18351 void append_042()
18353 ::rtl::OStringBuffer aStrBuf( kSInt32Max );
18354 OString expVal( kTestStr139 );
18355 double input = atof("-3.141592653589793238462643");
18357 aStrBuf.append( input );
18359 CPPUNIT_ASSERT_MESSAGE
18361 "OStringBuffer( kSInt32Max ) append -3.141592653589793238462643",
18362 aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength()
18366 #endif
18368 CPPUNIT_TEST_SUITE( append_009_Double_Negative );
18369 CPPUNIT_TEST( append_001 );
18371 CPPUNIT_TEST( append_002 );
18372 CPPUNIT_TEST( append_003 );
18373 CPPUNIT_TEST( append_004 );
18374 CPPUNIT_TEST( append_005 );
18375 CPPUNIT_TEST( append_006 );
18376 CPPUNIT_TEST( append_007 );
18377 CPPUNIT_TEST( append_008 );
18378 CPPUNIT_TEST( append_009 );
18379 CPPUNIT_TEST( append_010 );
18380 CPPUNIT_TEST( append_011 );
18381 CPPUNIT_TEST( append_012 );
18382 CPPUNIT_TEST( append_013 );
18383 CPPUNIT_TEST( append_014 );
18384 CPPUNIT_TEST( append_015 );
18385 CPPUNIT_TEST( append_016 );
18386 CPPUNIT_TEST( append_017 );
18387 CPPUNIT_TEST( append_018 );
18388 CPPUNIT_TEST( append_019 );
18389 CPPUNIT_TEST( append_020 );
18390 CPPUNIT_TEST( append_021 );
18391 CPPUNIT_TEST( append_022 );
18392 CPPUNIT_TEST( append_023 );
18393 CPPUNIT_TEST( append_024 );
18394 CPPUNIT_TEST( append_025 );
18395 #ifdef WITH_CORE
18396 CPPUNIT_TEST( append_026 );
18397 CPPUNIT_TEST( append_027 );
18398 CPPUNIT_TEST( append_028 );
18399 CPPUNIT_TEST( append_029 );
18400 CPPUNIT_TEST( append_030 );
18401 #endif
18403 CPPUNIT_TEST( append_035 );
18404 CPPUNIT_TEST_SUITE_END();
18406 } // namespace rtl_OStringBuffer
18409 // -----------------------------------------------------------------------------
18410 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::ctors,
18411 "rtl_OStringBuffer");
18412 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::makeStringAndClear,
18413 "rtl_OStringBuffer");
18414 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::getLength,
18415 "rtl_OStringBuffer");
18416 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::getCapacity,
18417 "rtl_OStringBuffer");
18418 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::ensureCapacity,
18419 "rtl_OStringBuffer");
18420 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::setLength,
18421 "rtl_OStringBuffer");
18422 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::charAt,
18423 "rtl_OStringBuffer");
18424 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::csuc,
18425 "rtl_OStringBuffer");
18426 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::getStr,
18427 "rtl_OStringBuffer");
18428 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::setCharAt,
18429 "rtl_OStringBuffer");
18430 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_001,
18431 "rtl_OStringBuffer");
18432 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_002,
18433 "rtl_OStringBuffer");
18434 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_003,
18435 "rtl_OStringBuffer");
18436 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_004,
18437 "rtl_OStringBuffer");
18438 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_005,
18439 "rtl_OStringBuffer");
18440 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32,
18441 "rtl_OStringBuffer");
18442 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Bounderies,
18443 "rtl_OStringBuffer");
18444 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Negative,
18445 "rtl_OStringBuffer");
18446 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_WrongRadix,
18447 "rtl_OStringBuffer");
18448 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_defaultParam,
18449 "rtl_OStringBuffer");
18450 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64,
18451 "rtl_OStringBuffer");
18452 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Bounderies,
18453 "rtl_OStringBuffer");
18454 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Negative,
18455 "rtl_OStringBuffer");
18456 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_WrongRadix,
18457 "rtl_OStringBuffer");
18458 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_defaultParam,
18459 "rtl_OStringBuffer");
18460 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_008_float,
18461 "rtl_OStringBuffer");
18462 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative,
18463 "rtl_OStringBuffer");
18464 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_double,
18465 "rtl_OStringBuffer");
18466 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative,
18467 "rtl_OStringBuffer");
18469 // -----------------------------------------------------------------------------
18471 // this macro creates an empty function, which will called by the RegisterAllFunctions()
18472 // to let the user the possibility to also register some functions by hand.
18473 NOADDITIONAL;