1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/types.h>
21 #include <rtl/string.hxx>
22 #include "rtl_String_Const.h"
23 #include <rtl/strbuf.hxx>
25 #include <cppunit/TestAssert.h>
26 #include <cppunit/TestFixture.h>
27 #include <cppunit/extensions/HelperMacros.h>
28 #include <cppunit/plugin/TestPlugIn.h>
31 using ::rtl::OStringBuffer
;
33 // This file contains cppunit tests for the
34 // OString and OStringBuffer classes
36 // testing constructors
38 namespace rtl_OStringBuffer
40 class ctors
: public CppUnit::TestFixture
46 ::rtl::OStringBuffer aStrBuf
;
47 const sal_Char
* pStr
= aStrBuf
.getStr();
49 CPPUNIT_ASSERT_MESSAGE
51 "New OStringBuffer containing no characters",
54 CPPUNIT_ASSERT_EQUAL_MESSAGE
56 "New OStringBuffer containing no characters",
59 CPPUNIT_ASSERT_EQUAL_MESSAGE
61 "New OStringBuffer containing no characters",
62 sal_Int32(16), aStrBuf
.getCapacity()
68 ::rtl::OString
aStrtmp( kTestStr1
);
69 ::rtl::OStringBuffer
aStrBuftmp( aStrtmp
);
70 ::rtl::OStringBuffer
aStrBuf( aStrBuftmp
);
71 // sal_Bool res = cmpstr(aStrBuftmp.getStr(),aStrBuf.getStr());
73 sal_Int32 nLenStrBuftmp
= aStrBuftmp
.getLength();
75 rtl::OString
sStr(aStrBuftmp
.getStr());
76 bool res
= aStrtmp
== sStr
;
78 CPPUNIT_ASSERT_EQUAL_MESSAGE
80 "New OStringBuffer from another OStringBuffer",
81 nLenStrBuftmp
, aStrBuf
.getLength()
83 CPPUNIT_ASSERT_EQUAL_MESSAGE
85 "New OStringBuffer from another OStringBuffer",
86 aStrBuftmp
.getCapacity(), aStrBuf
.getCapacity()
88 CPPUNIT_ASSERT_MESSAGE
90 "New OStringBuffer from another OStringBuffer",
98 ::rtl::OStringBuffer
aStrBuf1(kTestStr2Len
);
99 ::rtl::OStringBuffer
aStrBuf2(0);
101 const sal_Char
* pStr1
= aStrBuf1
.getStr();
102 const sal_Char
* pStr2
= aStrBuf2
.getStr();
104 CPPUNIT_ASSERT_MESSAGE
106 "New OStringBuffer containing no characters and contain assigned capacity",
109 CPPUNIT_ASSERT_EQUAL_MESSAGE
111 "New OStringBuffer containing no characters and contain assigned capacity",
114 CPPUNIT_ASSERT_EQUAL_MESSAGE
116 "New OStringBuffer containing no characters and contain assigned capacity",
117 kTestStr2Len
, aStrBuf1
.getCapacity()
119 CPPUNIT_ASSERT_MESSAGE
121 "New OStringBuffer containing no characters and contain assigned capacity",
124 CPPUNIT_ASSERT_EQUAL_MESSAGE
126 "New OStringBuffer containing no characters and contain assigned capacity",
129 CPPUNIT_ASSERT_EQUAL_MESSAGE
131 "New OStringBuffer containing no characters and contain assigned capacity",
132 sal_Int32(0), aStrBuf2
.getCapacity()
139 // StringBuffer with created negative size are the
140 // same as empty StringBuffers
141 ::rtl::OStringBuffer
aStrBuf3(kNonSInt32Max
);
143 const sal_Char
* pStr
= aStrBuf3
.getStr();
145 CPPUNIT_ASSERT_MESSAGE
147 "New OStringBuffer containing no characters and contain assigned capacity",
150 CPPUNIT_ASSERT_EQUAL_MESSAGE
152 "New OStringBuffer containing no characters and contain assigned capacity",
155 CPPUNIT_ASSERT_EQUAL_MESSAGE
157 "New OStringBuffer containing no characters and contain assigned capacity",
158 kNonSInt32Max
, aStrBuf3
.getCapacity()
164 ::rtl::OString
aStrtmp( kTestStr1
);
165 ::rtl::OStringBuffer
aStrBuf( aStrtmp
);
166 sal_Int32 leg
= aStrBuf
.getLength();
168 CPPUNIT_ASSERT_EQUAL_MESSAGE
170 "New OStringBuffer from OString",
171 aStrtmp
, OString(aStrBuf
.getStr())
173 CPPUNIT_ASSERT_EQUAL_MESSAGE
175 "New OStringBuffer from OString",
176 aStrtmp
.pData
->length
, leg
178 CPPUNIT_ASSERT_EQUAL_MESSAGE
180 "New OStringBuffer from OString",
181 leg
+16, aStrBuf
.getCapacity()
187 rtl::OStringBuffer b1
;
188 auto dummy
= b1
.makeStringAndClear();
190 rtl::OStringBuffer
b2(b1
);
196 //pass in a const char*, get a temp
198 ::rtl::OStringBuffer
aStrBuf(kTestStr1
);
199 sal_Int32 leg
= aStrBuf
.getLength();
201 CPPUNIT_ASSERT_EQUAL_MESSAGE
203 "New OStringBuffer from const char*",
204 rtl_str_getLength(kTestStr1
), leg
206 CPPUNIT_ASSERT_EQUAL_MESSAGE
208 "New OStringBuffer from const char*",
209 leg
+16, aStrBuf
.getCapacity()
213 CPPUNIT_TEST_SUITE(ctors
);
214 CPPUNIT_TEST(ctor_001
);
215 CPPUNIT_TEST(ctor_002
);
216 CPPUNIT_TEST(ctor_003
);
217 CPPUNIT_TEST(ctor_003_1
);
218 CPPUNIT_TEST(ctor_004
);
219 CPPUNIT_TEST(ctor_005
);
220 CPPUNIT_TEST(ctor_006
);
221 CPPUNIT_TEST_SUITE_END();
224 class makeStringAndClear
: public CppUnit::TestFixture
229 void setUp() override
231 arrOUS
[0] = new OString( kTestStr1
);
232 arrOUS
[1] = new OString( kTestStr14
);
233 arrOUS
[2] = new OString( kTestStr25
);
234 arrOUS
[3] = new OString( kTestStr27
);
235 arrOUS
[4] = new OString( kTestStr29
);
236 arrOUS
[5] = new OString( "\0", 1 );
240 void tearDown() override
242 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
243 delete arrOUS
[3]; delete arrOUS
[4]; delete arrOUS
[5];
246 void makeStringAndClear_001()
248 ::rtl::OStringBuffer aStrBuf1
;
249 ::rtl::OString aStr1
;
251 bool lastRes
= (aStrBuf1
.makeStringAndClear() == aStr1
);
253 CPPUNIT_ASSERT_MESSAGE
255 "two empty strings(def. constructor)",
258 CPPUNIT_ASSERT_EQUAL_MESSAGE
260 "two empty strings(def. constructor)",
261 sal_Int32(0), aStrBuf1
.getCapacity()
263 CPPUNIT_ASSERT_EQUAL_MESSAGE
265 "two empty strings(def. constructor)",
266 '\0', *(aStrBuf1
.getStr())
271 void makeStringAndClear_002()
273 ::rtl::OStringBuffer
aStrBuf2(26);
274 ::rtl::OString aStr2
;
276 bool lastRes
= (aStrBuf2
.makeStringAndClear() == aStr2
);
278 CPPUNIT_ASSERT_MESSAGE
280 "two empty strings(with a argu)",
281 lastRes
&& ( aStrBuf2
.getCapacity() == 0 ) &&
282 ( *(aStrBuf2
.getStr()) == '\0' )
287 void makeStringAndClear_003()
289 ::rtl::OStringBuffer
aStrBuf3(*arrOUS
[0]);
290 ::rtl::OString
aStr3(*arrOUS
[0]);
292 bool lastRes
= (aStrBuf3
.makeStringAndClear() == aStr3
);
294 CPPUNIT_ASSERT_MESSAGE
297 lastRes
&& ( aStrBuf3
.getCapacity() == 0 ) &&
298 ( *(aStrBuf3
.getStr()) == '\0' )
303 void makeStringAndClear_004()
305 ::rtl::OStringBuffer
aStrBuf4(*arrOUS
[1]);
306 ::rtl::OString
aStr4(*arrOUS
[1]);
308 bool lastRes
= (aStrBuf4
.makeStringAndClear() == aStr4
);
310 CPPUNIT_ASSERT_MESSAGE
312 "string with space ",
313 lastRes
&& ( aStrBuf4
.getCapacity() == 0 ) &&
314 ( *(aStrBuf4
.getStr()) == '\0' )
318 void makeStringAndClear_005()
320 ::rtl::OStringBuffer
aStrBuf5(*arrOUS
[2]);
321 ::rtl::OString
aStr5(*arrOUS
[2]);
323 bool lastRes
= (aStrBuf5
.makeStringAndClear() == aStr5
);
325 CPPUNIT_ASSERT_MESSAGE
328 lastRes
&& ( aStrBuf5
.getCapacity() == 0 ) &&
329 ( *(aStrBuf5
.getStr()) == '\0' )
333 void makeStringAndClear_006()
335 ::rtl::OStringBuffer
aStrBuf6(*arrOUS
[3]);
336 ::rtl::OString
aStr6(*arrOUS
[3]);
338 bool lastRes
= (aStrBuf6
.makeStringAndClear() == aStr6
);
340 CPPUNIT_ASSERT_MESSAGE
342 "string with a character",
343 lastRes
&& ( aStrBuf6
.getCapacity() == 0 ) &&
344 ( *(aStrBuf6
.getStr()) == '\0' )
348 void makeStringAndClear_007()
350 ::rtl::OStringBuffer
aStrBuf7(*arrOUS
[4]);
351 ::rtl::OString
aStr7(*arrOUS
[4]);
353 bool lastRes
= (aStrBuf7
.makeStringAndClear() == aStr7
);
355 CPPUNIT_ASSERT_MESSAGE
357 "string with special characters",
358 lastRes
&& ( aStrBuf7
.getCapacity() == 0 ) &&
359 ( *(aStrBuf7
.getStr()) == '\0' )
363 void makeStringAndClear_008()
365 ::rtl::OStringBuffer
aStrBuf8(*arrOUS
[5]);
366 ::rtl::OString
aStr8(*arrOUS
[5]);
368 bool lastRes
= (aStrBuf8
.makeStringAndClear() == aStr8
);
370 CPPUNIT_ASSERT_MESSAGE
372 "string only with (\0)",
373 lastRes
&& ( aStrBuf8
.getCapacity() == 0 ) &&
374 ( *(aStrBuf8
.getStr()) == '\0' )
378 CPPUNIT_TEST_SUITE(makeStringAndClear
);
379 CPPUNIT_TEST(makeStringAndClear_001
);
380 CPPUNIT_TEST(makeStringAndClear_002
);
381 CPPUNIT_TEST(makeStringAndClear_003
);
382 CPPUNIT_TEST(makeStringAndClear_004
);
383 CPPUNIT_TEST(makeStringAndClear_005
);
384 CPPUNIT_TEST(makeStringAndClear_006
);
385 CPPUNIT_TEST(makeStringAndClear_007
);
386 CPPUNIT_TEST(makeStringAndClear_008
);
387 CPPUNIT_TEST_SUITE_END();
390 class remove
: public CppUnit::TestFixture
395 ::rtl::OStringBuffer
sb(
396 RTL_CONSTASCII_STRINGPARAM("Red Hat, Inc."));
399 CPPUNIT_ASSERT(sb
.toString().equalsL(
400 RTL_CONSTASCII_STRINGPARAM("Hat, Inc.")));
403 CPPUNIT_ASSERT(sb
.toString().equalsL(
404 RTL_CONSTASCII_STRINGPARAM("Hat")));
408 CPPUNIT_ASSERT(sb
.toString().isEmpty());
410 sb
.append(RTL_CONSTASCII_STRINGPARAM("Red Hat, Inc."));
414 CPPUNIT_ASSERT(sb
.toString().equalsL(
415 RTL_CONSTASCII_STRINGPARAM("Red")));
417 sb
.remove(0, sb
.getLength());
419 CPPUNIT_ASSERT(sb
.toString().isEmpty());
422 CPPUNIT_TEST_SUITE(remove
);
423 CPPUNIT_TEST(remove_001
);
424 CPPUNIT_TEST_SUITE_END();
427 class getLength
: public CppUnit::TestFixture
432 void setUp() override
434 arrOUS
[0] = new OString( kTestStr1
);
435 arrOUS
[1] = new OString( "1" );
436 arrOUS
[2] = new OString( );
437 arrOUS
[3] = new OString( "" );
438 arrOUS
[4] = new OString( "\0", 1 );
439 arrOUS
[5] = new OString( kTestStr2
);
443 void tearDown() override
445 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
446 delete arrOUS
[3]; delete arrOUS
[4]; delete arrOUS
[5];
451 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
452 sal_Int32 expVal
= kTestStr1Len
;
454 CPPUNIT_ASSERT_EQUAL_MESSAGE
456 "length of ascii string",
457 expVal
, aStrBuf
.getLength()
464 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
465 sal_Int32 expVal
= 1;
467 CPPUNIT_ASSERT_EQUAL_MESSAGE
469 "length of ascii string of size 1",
470 expVal
, aStrBuf
.getLength()
476 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
477 sal_Int32 expVal
= 0;
479 CPPUNIT_ASSERT_EQUAL_MESSAGE
481 "length of empty string",
482 expVal
, aStrBuf
.getLength()
488 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
489 sal_Int32 expVal
= 0;
491 CPPUNIT_ASSERT_EQUAL_MESSAGE
493 "length of empty string (empty ascii string arg)",
494 expVal
, aStrBuf
.getLength()
500 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
501 sal_Int32 expVal
= 1;
503 CPPUNIT_ASSERT_EQUAL_MESSAGE
505 "length of string with \\0 embedded",
506 expVal
, aStrBuf
.getLength()
512 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
513 sal_Int32 expVal
= kTestStr2Len
;
515 CPPUNIT_ASSERT_EQUAL_MESSAGE
517 "length(>16) of ascii string",
518 expVal
, aStrBuf
.getLength()
524 ::rtl::OStringBuffer aStrBuf
;
525 sal_Int32 expVal
= 0;
527 CPPUNIT_ASSERT_EQUAL_MESSAGE
529 "length of empty string (default constructor)",
530 expVal
, aStrBuf
.getLength()
536 ::rtl::OStringBuffer
aStrBuf( 26 );
537 sal_Int32 expVal
= 0;
539 CPPUNIT_ASSERT_EQUAL_MESSAGE
541 "length of empty string (with capacity)",
542 expVal
, aStrBuf
.getLength()
546 CPPUNIT_TEST_SUITE( getLength
);
547 CPPUNIT_TEST( getLength_001
);
548 CPPUNIT_TEST( getLength_002
);
549 CPPUNIT_TEST( getLength_003
);
550 CPPUNIT_TEST( getLength_004
);
551 CPPUNIT_TEST( getLength_005
);
552 CPPUNIT_TEST( getLength_006
);
553 CPPUNIT_TEST( getLength_007
);
554 CPPUNIT_TEST( getLength_008
);
555 CPPUNIT_TEST_SUITE_END();
558 class getCapacity
: public CppUnit::TestFixture
563 void setUp() override
565 arrOUS
[0] = new OString( kTestStr1
);
566 arrOUS
[1] = new OString( "1" );
567 arrOUS
[2] = new OString( );
568 arrOUS
[3] = new OString( "" );
569 arrOUS
[4] = new OString( "\0", 1 );
570 arrOUS
[5] = new OString( kTestStr2
);
574 void tearDown() override
576 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
577 delete arrOUS
[3]; delete arrOUS
[4]; delete arrOUS
[5];
580 void getCapacity_001()
582 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
583 sal_Int32 expVal
= kTestStr1Len
+16;
585 CPPUNIT_ASSERT_EQUAL_MESSAGE
587 "capacity of ascii string",
588 expVal
, aStrBuf
.getCapacity()
593 void getCapacity_002()
595 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
596 sal_Int32 expVal
= 1+16;
598 CPPUNIT_ASSERT_EQUAL_MESSAGE
600 "capacity of ascii string of size 1",
601 expVal
, aStrBuf
.getCapacity()
605 void getCapacity_003()
607 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
608 sal_Int32 expVal
= 0+16;
610 CPPUNIT_ASSERT_EQUAL_MESSAGE
612 "capacity of empty string",
613 expVal
, aStrBuf
.getCapacity()
617 void getCapacity_004()
619 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
620 sal_Int32 expVal
= 0+16;
622 CPPUNIT_ASSERT_EQUAL_MESSAGE
624 "capacity of empty string (empty ascii string arg)",
625 expVal
, aStrBuf
.getCapacity()
629 void getCapacity_005()
631 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
632 sal_Int32 expVal
= 1+16;
634 CPPUNIT_ASSERT_EQUAL_MESSAGE
636 "capacity of string with \\0 embedded",
637 expVal
, aStrBuf
.getCapacity()
641 void getCapacity_006()
643 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
644 sal_Int32 expVal
= kTestStr2Len
+16;
646 CPPUNIT_ASSERT_EQUAL_MESSAGE
648 "capacity(>16) of ascii string",
649 expVal
, aStrBuf
.getCapacity()
653 void getCapacity_007()
655 ::rtl::OStringBuffer aStrBuf
;
656 sal_Int32 expVal
= 16;
658 CPPUNIT_ASSERT_EQUAL_MESSAGE
660 "capacity of empty string (default constructor)",
661 expVal
, aStrBuf
.getCapacity()
665 void getCapacity_009()
667 ::rtl::OStringBuffer
aStrBuf( kNonSInt32Max
);
668 sal_Int32 expVal
= kNonSInt32Max
;
670 CPPUNIT_ASSERT_EQUAL_MESSAGE
672 "capacity of empty string (with capacity -2147483648)",
673 expVal
, aStrBuf
.getCapacity()
677 void getCapacity_010()
679 ::rtl::OStringBuffer
aStrBuf( 16 );
680 sal_Int32 expVal
= 16;
682 CPPUNIT_ASSERT_EQUAL_MESSAGE
684 "capacity of empty string (with capacity 16)",
685 expVal
, aStrBuf
.getCapacity()
689 void getCapacity_011()
691 ::rtl::OStringBuffer
aStrBuf( 6 );
692 sal_Int32 expVal
= 6;
694 CPPUNIT_ASSERT_EQUAL_MESSAGE
696 "capacity of empty string (with capacity 6)",
697 expVal
, aStrBuf
.getCapacity()
701 void getCapacity_012()
703 ::rtl::OStringBuffer
aStrBuf( 0 );
704 sal_Int32 expVal
= 0;
706 CPPUNIT_ASSERT_EQUAL_MESSAGE
708 "capacity of empty string (with capacity 0)",
709 expVal
, aStrBuf
.getCapacity()
713 void getCapacity_013()
715 ::rtl::OStringBuffer
aStrBuf( -2 );
716 sal_Int32 expVal
= -2;
718 CPPUNIT_ASSERT_EQUAL_MESSAGE
720 "capacity of empty string (with capacity -2)",
721 expVal
, aStrBuf
.getCapacity()
725 CPPUNIT_TEST_SUITE( getCapacity
);
726 CPPUNIT_TEST( getCapacity_001
);
727 CPPUNIT_TEST( getCapacity_002
);
728 CPPUNIT_TEST( getCapacity_003
);
729 CPPUNIT_TEST( getCapacity_004
);
730 CPPUNIT_TEST( getCapacity_005
);
731 CPPUNIT_TEST( getCapacity_006
);
732 CPPUNIT_TEST( getCapacity_007
);
733 CPPUNIT_TEST( getCapacity_009
);
734 CPPUNIT_TEST( getCapacity_010
);
735 CPPUNIT_TEST( getCapacity_011
);
736 CPPUNIT_TEST( getCapacity_012
);
737 CPPUNIT_TEST( getCapacity_013
);
738 CPPUNIT_TEST_SUITE_END();
741 class ensureCapacity
: public CppUnit::TestFixture
743 void ensureCapacity_001()
745 sal_Int32 expVal
= 16;
746 ::rtl::OStringBuffer aStrBuf
;
749 aStrBuf
.ensureCapacity( input
);
751 CPPUNIT_ASSERT_EQUAL_MESSAGE
753 "capacity equal to 16, minimum is 5",
754 expVal
, aStrBuf
.getCapacity()
759 void ensureCapacity_002()
761 sal_Int32 expVal
= 16;
762 ::rtl::OStringBuffer aStrBuf
;
763 sal_Int32 input
= -5;
765 aStrBuf
.ensureCapacity( input
);
767 CPPUNIT_ASSERT_EQUAL_MESSAGE
769 "capacity equal to 16, minimum is -5",
770 expVal
, aStrBuf
.getCapacity()
775 void ensureCapacity_003()
777 sal_Int32 expVal
= 16;
778 ::rtl::OStringBuffer aStrBuf
;
781 aStrBuf
.ensureCapacity( input
);
783 CPPUNIT_ASSERT_EQUAL_MESSAGE
785 "capacity equal to 16, minimum is 0",
786 expVal
, aStrBuf
.getCapacity()
791 void ensureCapacity_004() //the testcase is based on comments
793 sal_Int32 expVal
= 20;
794 ::rtl::OStringBuffer aStrBuf
;
795 sal_Int32 input
= 20;
797 aStrBuf
.ensureCapacity( input
);
799 CPPUNIT_ASSERT_EQUAL_MESSAGE
801 "capacity equal to 16, minimum is 20",
802 expVal
, aStrBuf
.getCapacity()
807 void ensureCapacity_005()
809 sal_Int32 expVal
= 50;
810 ::rtl::OStringBuffer aStrBuf
;
811 sal_Int32 input
= 50;
813 aStrBuf
.ensureCapacity( input
);
815 CPPUNIT_ASSERT_EQUAL_MESSAGE
817 "capacity equal to 16, minimum is 50",
818 expVal
, aStrBuf
.getCapacity()
823 void ensureCapacity_006()
825 sal_Int32 expVal
= 20;
826 ::rtl::OStringBuffer
aStrBuf( 6 );
827 sal_Int32 input
= 20;
829 aStrBuf
.ensureCapacity( input
);
831 CPPUNIT_ASSERT_EQUAL_MESSAGE
833 "capacity equal to 6, minimum is 20",
834 expVal
, aStrBuf
.getCapacity()
839 void ensureCapacity_007()
841 sal_Int32 expVal
= 6;
842 ::rtl::OStringBuffer
aStrBuf( 6 );
845 aStrBuf
.ensureCapacity( input
);
847 CPPUNIT_ASSERT_EQUAL_MESSAGE
849 "capacity equal to 6, minimum is 2",
850 expVal
, aStrBuf
.getCapacity()
855 void ensureCapacity_008()
857 sal_Int32 expVal
= 6;
858 ::rtl::OStringBuffer
aStrBuf( 6 );
859 sal_Int32 input
= -6;
861 aStrBuf
.ensureCapacity( input
);
863 CPPUNIT_ASSERT_EQUAL_MESSAGE
865 "capacity equal to 6, minimum is -6",
866 expVal
, aStrBuf
.getCapacity()
871 void ensureCapacity_009() //the testcase is based on comments
873 sal_Int32 expVal
= 10;
874 ::rtl::OStringBuffer
aStrBuf( 6 );
875 sal_Int32 input
= 10;
877 aStrBuf
.ensureCapacity( input
);
879 CPPUNIT_ASSERT_EQUAL_MESSAGE
881 "capacity equal to 6, minimum is -6",
882 expVal
, aStrBuf
.getCapacity()
887 void ensureCapacity_010()
889 sal_Int32 expVal
= 6;
890 ::rtl::OStringBuffer
aStrBuf( 0 );
893 aStrBuf
.ensureCapacity( input
);
895 CPPUNIT_ASSERT_EQUAL_MESSAGE
897 "capacity equal to 0, minimum is 6",
898 expVal
, aStrBuf
.getCapacity()
903 void ensureCapacity_011() //the testcase is based on comments
905 sal_Int32 expVal
= 2; // capacity is x = (str->length + 1) * 2; minimum < x ? x : minimum
906 ::rtl::OStringBuffer
aStrBuf( 0 );
909 aStrBuf
.ensureCapacity( input
);
911 CPPUNIT_ASSERT_EQUAL_MESSAGE
913 "capacity equal to 0, minimum is 1",
914 expVal
, aStrBuf
.getCapacity()
919 void ensureCapacity_012()
921 sal_Int32 expVal
= 0;
922 ::rtl::OStringBuffer
aStrBuf( 0 );
923 sal_Int32 input
= -1;
925 aStrBuf
.ensureCapacity( input
);
927 CPPUNIT_ASSERT_EQUAL_MESSAGE
929 "capacity equal to 0, minimum is -1",
930 expVal
, aStrBuf
.getCapacity()
935 void ensureCapacity_018()
937 sal_Int32 expVal
= 65535;
938 ::rtl::OStringBuffer
aStrBuf( kNonSInt32Max
);
939 sal_Int32 input
= 65535;
941 aStrBuf
.ensureCapacity( input
);
943 CPPUNIT_ASSERT_EQUAL_MESSAGE
945 "capacity equal to -2147483648, minimum is 65535",
946 expVal
, aStrBuf
.getCapacity()
951 void ensureCapacity_020()
953 sal_Int32 expVal
= 2;
954 ::rtl::OStringBuffer
aStrBuf( kNonSInt32Max
);
955 sal_Int32 input
= -1;
957 aStrBuf
.ensureCapacity( input
);
959 CPPUNIT_ASSERT_EQUAL_MESSAGE
961 "capacity equal to -2147483648, minimum is -1",
962 expVal
, aStrBuf
.getCapacity()
967 void ensureCapacity_021()
969 sal_Int32 expVal
= 2;
970 ::rtl::OStringBuffer
aStrBuf( kNonSInt32Max
);
973 aStrBuf
.ensureCapacity( input
);
975 CPPUNIT_ASSERT_EQUAL_MESSAGE
977 "capacity equal to -2147483648, minimum is 0",
978 expVal
, aStrBuf
.getCapacity()
983 void ensureCapacity_022()
985 sal_Int32 expVal
= kNonSInt32Max
;
986 ::rtl::OStringBuffer
aStrBuf( kNonSInt32Max
);
987 sal_Int32 input
= kNonSInt32Max
;
989 aStrBuf
.ensureCapacity( input
);
991 CPPUNIT_ASSERT_EQUAL_MESSAGE
993 "capacity equal to -2147483648, minimum is -2147483648",
994 expVal
, aStrBuf
.getCapacity()
999 CPPUNIT_TEST_SUITE( ensureCapacity
);
1000 CPPUNIT_TEST( ensureCapacity_001
);
1001 CPPUNIT_TEST( ensureCapacity_002
);
1002 CPPUNIT_TEST( ensureCapacity_003
);
1003 CPPUNIT_TEST( ensureCapacity_004
);
1004 CPPUNIT_TEST( ensureCapacity_005
);
1005 CPPUNIT_TEST( ensureCapacity_006
);
1006 CPPUNIT_TEST( ensureCapacity_007
);
1007 CPPUNIT_TEST( ensureCapacity_008
);
1008 CPPUNIT_TEST( ensureCapacity_009
);
1009 CPPUNIT_TEST( ensureCapacity_010
);
1010 CPPUNIT_TEST( ensureCapacity_011
);
1011 CPPUNIT_TEST( ensureCapacity_012
);
1012 CPPUNIT_TEST( ensureCapacity_018
);
1013 CPPUNIT_TEST( ensureCapacity_020
);
1014 CPPUNIT_TEST( ensureCapacity_021
);
1015 CPPUNIT_TEST( ensureCapacity_022
);
1016 CPPUNIT_TEST_SUITE_END();
1019 class setLength
: public CppUnit::TestFixture
1024 void setUp() override
1026 arrOUS
[0] = new OString( kTestStr1
);
1027 arrOUS
[1] = new OString( "1" );
1028 arrOUS
[2] = new OString( );
1029 arrOUS
[3] = new OString( "" );
1030 arrOUS
[4] = new OString( "\0", 1 );
1031 arrOUS
[5] = new OString( kTestStr2
);
1035 void tearDown() override
1037 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
1038 delete arrOUS
[3]; delete arrOUS
[4]; delete arrOUS
[5];
1041 void setLength_001()
1043 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1044 sal_Int32 expVal1
= 50;
1045 ::rtl::OString
expVal2( kTestStr1
);
1046 sal_Int32 expVal3
= 50;
1047 sal_Int32 input
= 50;
1049 aStrBuf
.setLength( input
);
1051 CPPUNIT_ASSERT_MESSAGE
1053 "newLength more than the capacity of OStringBuffer(kTestStr1)",
1054 aStrBuf
.getStr() == expVal2
&&
1055 aStrBuf
.getLength() == expVal1
&&
1056 aStrBuf
.getCapacity() == expVal3
1061 void setLength_002()
1063 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1064 sal_Int32 expVal1
= kTestStr13Len
;
1065 ::rtl::OString
expVal2( kTestStr1
);
1066 sal_Int32 expVal3
= 32;
1067 sal_Int32 input
= kTestStr13Len
;
1069 aStrBuf
.setLength( input
);
1071 CPPUNIT_ASSERT_MESSAGE
1073 "newLength more than the length of OStringBuffer(kTestStr1)",
1074 aStrBuf
.getStr() == expVal2
&&
1075 aStrBuf
.getLength() == expVal1
&&
1076 aStrBuf
.getCapacity() == expVal3
1081 void setLength_003()
1083 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1084 sal_Int32 expVal1
= kTestStr1Len
;
1085 ::rtl::OString
expVal2( kTestStr1
);
1086 sal_Int32 expVal3
= 32;
1087 sal_Int32 input
= kTestStr1Len
;
1089 aStrBuf
.setLength( input
);
1091 CPPUNIT_ASSERT_MESSAGE
1093 "newLength equal to the length of OStringBuffer(kTestStr1)",
1094 aStrBuf
.getStr() == expVal2
&&
1095 aStrBuf
.getLength() == expVal1
&&
1096 aStrBuf
.getCapacity() == expVal3
1101 void setLength_004()
1103 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1104 sal_Int32 expVal1
= kTestStr7Len
;
1105 ::rtl::OString
expVal2( kTestStr7
);
1106 sal_Int32 expVal3
= 32;
1107 sal_Int32 input
= kTestStr7Len
;
1109 aStrBuf
.setLength( input
);
1111 CPPUNIT_ASSERT_MESSAGE
1113 "newLength less than the length of OStringBuffer(kTestStr1)",
1114 aStrBuf
.getStr() == expVal2
&&
1115 aStrBuf
.getLength() == expVal1
&&
1116 aStrBuf
.getCapacity() == expVal3
1121 void setLength_005()
1123 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1124 sal_Int32 expVal1
= 0;
1125 ::rtl::OString expVal2
;
1126 sal_Int32 expVal3
= 32;
1127 sal_Int32 input
= 0;
1129 aStrBuf
.setLength( input
);
1131 CPPUNIT_ASSERT_MESSAGE
1133 "newLength equal to 0",
1134 aStrBuf
.getStr() == expVal2
&&
1135 aStrBuf
.getLength() == expVal1
&&
1136 aStrBuf
.getCapacity() == expVal3
1141 void setLength_006()
1143 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1144 sal_Int32 expVal1
= 25;
1145 ::rtl::OString
expVal2( *arrOUS
[1] );
1146 sal_Int32 expVal3
= 25;
1147 sal_Int32 input
= 25;
1149 aStrBuf
.setLength( input
);
1151 CPPUNIT_ASSERT_MESSAGE
1153 "newLength more than the capacity of OStringBuffer(1)",
1154 aStrBuf
.getStr() == expVal2
&&
1155 aStrBuf
.getLength() == expVal1
&&
1156 aStrBuf
.getCapacity() == expVal3
1161 void setLength_007()
1163 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1164 sal_Int32 expVal1
= kTestStr27Len
;
1165 ::rtl::OString
expVal2( *arrOUS
[1] );
1166 sal_Int32 expVal3
= 17;
1167 sal_Int32 input
= kTestStr27Len
;
1169 aStrBuf
.setLength( input
);
1171 CPPUNIT_ASSERT_MESSAGE
1173 "newLength equal to the length of OStringBuffer(1)",
1174 aStrBuf
.getStr() == expVal2
&&
1175 aStrBuf
.getLength() == expVal1
&&
1176 aStrBuf
.getCapacity() == expVal3
1181 void setLength_008()
1183 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1184 sal_Int32 expVal1
= 0;
1185 ::rtl::OString expVal2
;
1186 sal_Int32 expVal3
= 17;
1187 sal_Int32 input
= 0;
1189 aStrBuf
.setLength( input
);
1191 CPPUNIT_ASSERT_MESSAGE
1193 "newLength less than the length of OUStringBuffer(1)",
1194 aStrBuf
.getStr() == expVal2
&&
1195 aStrBuf
.getLength() == expVal1
&&
1196 aStrBuf
.getCapacity() == expVal3
1201 void setLength_009()
1203 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1204 sal_Int32 expVal1
= 20;
1205 ::rtl::OString expVal2
;
1206 sal_Int32 expVal3
= 20;
1207 sal_Int32 input
= 20;
1209 aStrBuf
.setLength( input
);
1211 CPPUNIT_ASSERT_MESSAGE
1213 "newLength more than the capacity of OStringBuffer()",
1214 aStrBuf
.getStr() == expVal2
&&
1215 aStrBuf
.getLength() == expVal1
&&
1216 aStrBuf
.getCapacity() == expVal3
1221 void setLength_010()
1223 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1224 sal_Int32 expVal1
= 3;
1225 ::rtl::OString expVal2
;
1226 sal_Int32 expVal3
= 16;
1227 sal_Int32 input
= 3;
1229 aStrBuf
.setLength( input
);
1231 CPPUNIT_ASSERT_MESSAGE
1233 "newLength more than the length of OStringBuffer()",
1234 aStrBuf
.getStr() == expVal2
&&
1235 aStrBuf
.getLength() == expVal1
&&
1236 aStrBuf
.getCapacity() == expVal3
1241 void setLength_011()
1243 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1244 sal_Int32 expVal1
= 0;
1245 ::rtl::OString expVal2
;
1246 sal_Int32 expVal3
= 16;
1247 sal_Int32 input
= 0;
1249 aStrBuf
.setLength( input
);
1251 CPPUNIT_ASSERT_MESSAGE
1253 "newLength more than the length of OStringBuffer()",
1254 aStrBuf
.getStr() == expVal2
&&
1255 aStrBuf
.getLength() == expVal1
&&
1256 aStrBuf
.getCapacity() == expVal3
1261 void setLength_012()
1263 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1264 sal_Int32 expVal1
= 20;
1265 ::rtl::OString expVal2
;
1266 sal_Int32 expVal3
= 20;
1267 sal_Int32 input
= 20;
1269 aStrBuf
.setLength( input
);
1271 CPPUNIT_ASSERT_MESSAGE
1273 "newLength more than the capacity of OStringBuffer("")",
1274 aStrBuf
.getStr() == expVal2
&&
1275 aStrBuf
.getLength() == expVal1
&&
1276 aStrBuf
.getCapacity() == expVal3
1281 void setLength_013()
1283 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1284 sal_Int32 expVal1
= 5;
1285 ::rtl::OString expVal2
;
1286 sal_Int32 expVal3
= 16;
1287 sal_Int32 input
= 5;
1289 aStrBuf
.setLength( input
);
1291 CPPUNIT_ASSERT_MESSAGE
1293 "newLength more than the length of OStringBuffer("")",
1294 aStrBuf
.getStr() == expVal2
&&
1295 aStrBuf
.getLength() == expVal1
&&
1296 aStrBuf
.getCapacity() == expVal3
1301 void setLength_014()
1303 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1304 sal_Int32 expVal1
= 0;
1305 ::rtl::OString expVal2
;
1306 sal_Int32 expVal3
= 16;
1307 sal_Int32 input
= 0;
1309 aStrBuf
.setLength( input
);
1311 CPPUNIT_ASSERT_MESSAGE
1313 "newLength less than the length of OStringBuffer("")",
1314 aStrBuf
.getStr() == expVal2
&&
1315 aStrBuf
.getLength() == expVal1
&&
1316 aStrBuf
.getCapacity() == expVal3
1321 void setLength_015()
1323 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1324 sal_Int32 expVal1
= 20;
1325 ::rtl::OString expVal2
;
1326 sal_Int32 expVal3
= 20;
1327 sal_Int32 input
= 20;
1329 aStrBuf
.setLength( input
);
1331 CPPUNIT_ASSERT_MESSAGE
1333 "newLength more than the length of OStringBuffer(\0)",
1334 aStrBuf
.getStr() == expVal2
&&
1335 aStrBuf
.getLength() == expVal1
&&
1336 aStrBuf
.getCapacity() == expVal3
1341 void setLength_016()
1343 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1344 sal_Int32 expVal1
= 5;
1345 ::rtl::OString expVal2
;
1346 sal_Int32 expVal3
= 17;
1347 sal_Int32 input
= 5;
1349 aStrBuf
.setLength( input
);
1351 CPPUNIT_ASSERT_MESSAGE
1353 "newLength more than the length of OStringBuffer(\0)",
1354 aStrBuf
.getStr() == expVal2
&&
1355 aStrBuf
.getLength() == expVal1
&&
1356 aStrBuf
.getCapacity() == expVal3
1361 void setLength_017()
1363 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1364 sal_Int32 expVal1
= 0;
1365 ::rtl::OString expVal2
;
1366 sal_Int32 expVal3
= 17;
1367 sal_Int32 input
= 0;
1369 aStrBuf
.setLength( input
);
1371 CPPUNIT_ASSERT_MESSAGE
1373 "newLength less than the length of OStringBuffer(\0)",
1374 aStrBuf
.getStr() == expVal2
&&
1375 aStrBuf
.getLength() == expVal1
&&
1376 aStrBuf
.getCapacity() == expVal3
1381 void setLength_018()
1383 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
1384 sal_Int32 expVal1
= 50;
1385 ::rtl::OString
expVal2( kTestStr2
);
1386 sal_Int32 expVal3
= 66;
1387 sal_Int32 input
= 50;
1389 aStrBuf
.setLength( input
);
1391 CPPUNIT_ASSERT_MESSAGE
1393 "newLength more than the capacity of OStringBuffer(kTestStr2)",
1394 aStrBuf
.getStr() == expVal2
&&
1395 aStrBuf
.getLength() == expVal1
&&
1396 aStrBuf
.getCapacity() == expVal3
1401 void setLength_019()
1403 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
1404 sal_Int32 expVal1
= 40;
1405 ::rtl::OString
expVal2(kTestStr2
);
1406 sal_Int32 expVal3
= 48;
1407 sal_Int32 input
= 40;
1409 aStrBuf
.setLength( input
);
1411 CPPUNIT_ASSERT_MESSAGE
1413 "newLength more than the length of OStringBuffer(kTestStr2)",
1414 aStrBuf
.getStr() == expVal2
&&
1415 aStrBuf
.getLength() == expVal1
&&
1416 aStrBuf
.getCapacity() == expVal3
1421 void setLength_020()
1423 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
1424 sal_Int32 expVal1
= kTestStr2Len
;
1425 ::rtl::OString
expVal2(kTestStr2
);
1426 sal_Int32 expVal3
= 48;
1427 sal_Int32 input
= kTestStr2Len
;
1429 aStrBuf
.setLength( input
);
1431 CPPUNIT_ASSERT_MESSAGE
1433 "newLength equal to the length of OUStringBuffer(kTestStr2)",
1434 aStrBuf
.getStr() == expVal2
&&
1435 aStrBuf
.getLength() == expVal1
&&
1436 aStrBuf
.getCapacity() == expVal3
1441 void setLength_021()
1443 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
1444 sal_Int32 expVal1
= kTestStr7Len
;
1445 ::rtl::OString
expVal2(kTestStr7
);
1446 sal_Int32 expVal3
= 48;
1447 sal_Int32 input
= kTestStr7Len
;
1449 aStrBuf
.setLength( input
);
1451 CPPUNIT_ASSERT_MESSAGE
1453 "newLength less than the length of OUStringBuffer(TestStr2)",
1454 aStrBuf
.getStr() == expVal2
&&
1455 aStrBuf
.getLength() == expVal1
&&
1456 aStrBuf
.getCapacity() == expVal3
1461 void setLength_022()
1463 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[5] );
1464 sal_Int32 expVal1
= 0;
1465 ::rtl::OString expVal2
;
1466 sal_Int32 expVal3
= 48;
1467 sal_Int32 input
= 0;
1469 aStrBuf
.setLength( input
);
1471 CPPUNIT_ASSERT_MESSAGE
1473 "newLength equal to 0",
1474 aStrBuf
.getStr() == expVal2
&&
1475 aStrBuf
.getLength() == expVal1
&&
1476 aStrBuf
.getCapacity() == expVal3
1481 CPPUNIT_TEST_SUITE( setLength
);
1482 CPPUNIT_TEST( setLength_001
);
1483 CPPUNIT_TEST( setLength_002
);
1484 CPPUNIT_TEST( setLength_003
);
1485 CPPUNIT_TEST( setLength_004
);
1486 CPPUNIT_TEST( setLength_005
);
1487 CPPUNIT_TEST( setLength_006
);
1488 CPPUNIT_TEST( setLength_007
);
1489 CPPUNIT_TEST( setLength_008
);
1490 CPPUNIT_TEST( setLength_009
);
1491 CPPUNIT_TEST( setLength_010
);
1492 CPPUNIT_TEST( setLength_011
);
1493 CPPUNIT_TEST( setLength_012
);
1494 CPPUNIT_TEST( setLength_013
);
1495 CPPUNIT_TEST( setLength_014
);
1496 CPPUNIT_TEST( setLength_015
);
1497 CPPUNIT_TEST( setLength_016
);
1498 CPPUNIT_TEST( setLength_017
);
1499 CPPUNIT_TEST( setLength_018
);
1500 CPPUNIT_TEST( setLength_019
);
1501 CPPUNIT_TEST( setLength_020
);
1502 CPPUNIT_TEST( setLength_021
);
1503 CPPUNIT_TEST( setLength_022
);
1504 CPPUNIT_TEST_SUITE_END();
1507 class csuc
: public CppUnit::TestFixture
1511 const sal_Char
* expVal
= kTestStr1
;
1512 ::rtl::OStringBuffer
aStrBuf( kTestStr1
);
1513 sal_Int32 cmpLen
= kTestStr1Len
;
1515 // LLA: wrong access! const sal_Char* pstr = *&aStrBuf;
1516 const sal_Char
* pstr
= aStrBuf
.getStr();
1517 int nEqual
= strncmp(pstr
, expVal
, cmpLen
);
1519 CPPUNIT_ASSERT_EQUAL_MESSAGE
1521 "test normal string",
1522 /* cmpstr( pstr, expVal, cmpLen ) */
1530 ::rtl::OStringBuffer aStrBuf
;
1532 // LLA: wrong access! const sal_Char* pstr = *&aStrBuf;
1533 const sal_Char
* pstr
= aStrBuf
.getStr();
1534 sal_Int32 nLen
= strlen(pstr
);
1536 CPPUNIT_ASSERT_EQUAL_MESSAGE
1538 "test empty string",
1539 // cmpstr( pstr, &expVal, cmpLen )
1540 static_cast<sal_Int32
>(0), nLen
1545 CPPUNIT_TEST_SUITE( csuc
);
1546 CPPUNIT_TEST( csuc_001
);
1547 CPPUNIT_TEST( csuc_002
);
1548 CPPUNIT_TEST_SUITE_END();
1551 class getStr
: public CppUnit::TestFixture
1555 const sal_Char
* expVal
= kTestStr1
;
1556 ::rtl::OStringBuffer
aStrBuf( kTestStr1
);
1557 sal_Int32 cmpLen
= kTestStr1Len
;
1559 const sal_Char
* pstr
= aStrBuf
.getStr();
1560 int nEqual
= strncmp(pstr
, expVal
, cmpLen
);
1562 CPPUNIT_ASSERT_EQUAL_MESSAGE
1564 "test normal string",
1572 ::rtl::OStringBuffer aStrBuf
;
1573 const sal_Char
* pstr
= aStrBuf
.getStr();
1574 CPPUNIT_ASSERT_MESSAGE
1576 "test empty string",
1583 CPPUNIT_TEST_SUITE( getStr
);
1584 CPPUNIT_TEST( getStr_001
);
1585 CPPUNIT_TEST( getStr_002
);
1586 CPPUNIT_TEST_SUITE_END();
1589 class append_001
: public CppUnit::TestFixture
1594 void setUp() override
1596 arrOUS
[0] = new OString( kTestStr7
);
1597 arrOUS
[1] = new OString( );
1598 arrOUS
[2] = new OString( kTestStr25
);
1599 arrOUS
[3] = new OString( "" );
1600 arrOUS
[4] = new OString( kTestStr28
);
1604 void tearDown() override
1606 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
1607 delete arrOUS
[3]; delete arrOUS
[4];
1610 void append_001_001()
1612 OString
expVal( kTestStr1
);
1613 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1614 OString
input2( kTestStr8
);
1616 aStrBuf
.append( input2
);
1618 CPPUNIT_ASSERT_MESSAGE
1620 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
1621 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1626 void append_001_002()
1628 OString
expVal( kTestStr2
);
1629 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1630 OString
input2( kTestStr36
);
1632 aStrBuf
.append( input2
);
1634 CPPUNIT_ASSERT_MESSAGE
1636 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
1637 aStrBuf
.getStr()== expVal
&&
1638 aStrBuf
.getLength() == expVal
.getLength()
1643 void append_001_003()
1645 OString
expVal( kTestStr37
);
1646 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1647 OString
input2( kTestStr23
);
1649 aStrBuf
.append( input2
);
1651 CPPUNIT_ASSERT_MESSAGE
1653 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
1654 aStrBuf
.getStr()== expVal
&&
1655 aStrBuf
.getLength() == expVal
.getLength()
1660 void append_001_004()
1662 OString
expVal( kTestStr7
);
1663 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
1666 aStrBuf
.append( input2
);
1668 CPPUNIT_ASSERT_MESSAGE
1670 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
1671 aStrBuf
.getStr()== expVal
&&
1672 aStrBuf
.getLength() == expVal
.getLength()
1677 void append_001_005()
1679 OString
expVal( kTestStr7
);
1680 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1681 OString
input2( kTestStr7
);
1683 aStrBuf
.append( input2
);
1685 CPPUNIT_ASSERT_MESSAGE
1687 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
1688 aStrBuf
.getStr()== expVal
&&
1689 aStrBuf
.getLength() == expVal
.getLength()
1694 void append_001_006()
1696 OString
expVal( kTestStr2
);
1697 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1698 OString
input2( kTestStr2
);
1700 aStrBuf
.append( input2
);
1702 CPPUNIT_ASSERT_MESSAGE
1704 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
1705 aStrBuf
.getStr()== expVal
&&
1706 aStrBuf
.getLength() == expVal
.getLength()
1711 void append_001_007()
1713 OString
expVal( kTestStr1
);
1714 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1715 OString
input2( kTestStr1
);
1717 aStrBuf
.append( input2
);
1719 CPPUNIT_ASSERT_MESSAGE
1721 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
1722 aStrBuf
.getStr()== expVal
&&
1723 aStrBuf
.getLength() == expVal
.getLength()
1728 void append_001_008()
1731 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
1734 aStrBuf
.append( input2
);
1736 CPPUNIT_ASSERT_MESSAGE
1738 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
1739 aStrBuf
.getStr()== expVal
&&
1740 aStrBuf
.getLength() == expVal
.getLength()
1745 void append_001_009()
1747 OString
expVal( kTestStr7
);
1748 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1749 OString
input2( kTestStr7
);
1751 aStrBuf
.append( input2
);
1753 CPPUNIT_ASSERT_MESSAGE
1755 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
1756 aStrBuf
.getStr()== expVal
&&
1757 aStrBuf
.getLength() == expVal
.getLength()
1762 void append_001_010()
1764 OString
expVal( kTestStr2
);
1765 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1766 OString
input2( kTestStr2
);
1768 aStrBuf
.append( input2
);
1770 CPPUNIT_ASSERT_MESSAGE
1772 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
1773 aStrBuf
.getStr()== expVal
&&
1774 aStrBuf
.getLength() == expVal
.getLength()
1779 void append_001_011()
1781 OString
expVal( kTestStr1
);
1782 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1783 OString
input2( kTestStr1
);
1785 aStrBuf
.append( input2
);
1787 CPPUNIT_ASSERT_MESSAGE
1789 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
1790 aStrBuf
.getStr()== expVal
&&
1791 aStrBuf
.getLength() == expVal
.getLength()
1796 void append_001_012()
1799 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
1802 aStrBuf
.append( input2
);
1804 CPPUNIT_ASSERT_MESSAGE
1806 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
1807 aStrBuf
.getStr()== expVal
&&
1808 aStrBuf
.getLength() == expVal
.getLength()
1813 void append_001_013()
1815 OString
expVal( kTestStr7
);
1816 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1817 OString
input2( kTestStr7
);
1819 aStrBuf
.append( input2
);
1821 CPPUNIT_ASSERT_MESSAGE
1823 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
1824 aStrBuf
.getStr()== expVal
&&
1825 aStrBuf
.getLength() == expVal
.getLength()
1830 void append_001_014()
1832 OString
expVal( kTestStr2
);
1833 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1834 OString
input2( kTestStr2
);
1836 aStrBuf
.append( input2
);
1838 CPPUNIT_ASSERT_MESSAGE
1840 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
1841 aStrBuf
.getStr()== expVal
&&
1842 aStrBuf
.getLength() == expVal
.getLength()
1847 void append_001_015()
1849 OString
expVal( kTestStr1
);
1850 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1851 OString
input2( kTestStr1
);
1853 aStrBuf
.append( input2
);
1855 CPPUNIT_ASSERT_MESSAGE
1857 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
1858 aStrBuf
.getStr()== expVal
&&
1859 aStrBuf
.getLength() == expVal
.getLength()
1864 void append_001_016()
1867 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
1870 aStrBuf
.append( input2
);
1872 CPPUNIT_ASSERT_MESSAGE
1874 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
1875 aStrBuf
.getStr()== expVal
&&
1876 aStrBuf
.getLength() == expVal
.getLength()
1881 void append_001_017()
1883 OString
expVal( kTestStr29
);
1884 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1885 OString
input2( kTestStr38
);
1887 aStrBuf
.append( input2
);
1889 CPPUNIT_ASSERT_MESSAGE
1891 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
1892 aStrBuf
.getStr()== expVal
&&
1893 aStrBuf
.getLength() == expVal
.getLength()
1898 void append_001_018()
1900 OString
expVal( kTestStr39
);
1901 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1902 OString
input2( kTestStr17
);
1904 aStrBuf
.append( input2
);
1906 CPPUNIT_ASSERT_MESSAGE
1908 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
1909 aStrBuf
.getStr()== expVal
&&
1910 aStrBuf
.getLength() == expVal
.getLength()
1915 void append_001_019()
1917 OString
expVal( kTestStr40
);
1918 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1919 OString
input2( kTestStr31
);
1921 aStrBuf
.append( input2
);
1923 CPPUNIT_ASSERT_MESSAGE
1925 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
1926 aStrBuf
.getStr()== expVal
&&
1927 aStrBuf
.getLength() == expVal
.getLength()
1932 void append_001_020()
1934 OString
expVal( kTestStr28
);
1935 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
1938 aStrBuf
.append( input2
);
1940 CPPUNIT_ASSERT_MESSAGE
1942 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
1943 aStrBuf
.getStr()== expVal
&&
1944 aStrBuf
.getLength() == expVal
.getLength()
1951 ::rtl::OStringBuffer
aStrBuf("hello world");
1953 aStrBuf
.append('\0');
1954 aStrBuf
.append('\1');
1955 aStrBuf
.append('\2');
1957 aStrBuf
.append("hello world");
1959 CPPUNIT_ASSERT_MESSAGE
1961 "should be able to append nulls",
1962 aStrBuf
.getLength() ==
1963 2 * RTL_CONSTASCII_LENGTH("hello world") + 3 &&
1964 aStrBuf
[RTL_CONSTASCII_LENGTH("hello world")] == 0 &&
1965 aStrBuf
[RTL_CONSTASCII_LENGTH("hello world")]+1 == 1 &&
1966 aStrBuf
[RTL_CONSTASCII_LENGTH("hello world")]+2 == 2
1971 CPPUNIT_TEST_SUITE( append_001
);
1972 CPPUNIT_TEST( append_001_001
);
1973 CPPUNIT_TEST( append_001_002
);
1974 CPPUNIT_TEST( append_001_003
);
1975 CPPUNIT_TEST( append_001_004
);
1976 CPPUNIT_TEST( append_001_005
);
1977 CPPUNIT_TEST( append_001_006
);
1978 CPPUNIT_TEST( append_001_007
);
1979 CPPUNIT_TEST( append_001_008
);
1980 CPPUNIT_TEST( append_001_009
);
1981 CPPUNIT_TEST( append_001_010
);
1982 CPPUNIT_TEST( append_001_011
);
1983 CPPUNIT_TEST( append_001_012
);
1984 CPPUNIT_TEST( append_001_013
);
1985 CPPUNIT_TEST( append_001_014
);
1986 CPPUNIT_TEST( append_001_015
);
1987 CPPUNIT_TEST( append_001_016
);
1988 CPPUNIT_TEST( append_001_017
);
1989 CPPUNIT_TEST( append_001_018
);
1990 CPPUNIT_TEST( append_001_019
);
1991 CPPUNIT_TEST( append_001_020
);
1992 CPPUNIT_TEST( append_null
);
1993 CPPUNIT_TEST_SUITE_END();
1996 class append_002
: public CppUnit::TestFixture
2001 void setUp() override
2003 arrOUS
[0] = new OString( kTestStr7
);
2004 arrOUS
[1] = new OString( );
2005 arrOUS
[2] = new OString( kTestStr25
);
2006 arrOUS
[3] = new OString( "" );
2007 arrOUS
[4] = new OString( kTestStr28
);
2011 void tearDown() override
2013 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
2014 delete arrOUS
[3]; delete arrOUS
[4];
2017 void append_002_001()
2019 OString
expVal( kTestStr1
);
2020 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2021 const sal_Char
* input
= kTestStr8
;
2023 aStrBuf
.append( input
);
2025 CPPUNIT_ASSERT_MESSAGE
2027 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2028 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2033 void append_002_002()
2035 OString
expVal( kTestStr2
);
2036 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2037 const sal_Char
* input
= kTestStr36
;
2039 aStrBuf
.append( input
);
2041 CPPUNIT_ASSERT_MESSAGE
2043 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2044 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2049 void append_002_003()
2051 OString
expVal( kTestStr37
);
2052 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2053 const sal_Char
* input
= kTestStr23
;
2055 aStrBuf
.append( input
);
2057 CPPUNIT_ASSERT_MESSAGE
2059 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2060 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2065 void append_002_004()
2067 OString
expVal( kTestStr7
);
2068 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2069 const sal_Char
* input
= kTestStr25
;
2071 aStrBuf
.append( input
);
2073 CPPUNIT_ASSERT_MESSAGE
2075 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2076 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2081 void append_002_005()
2083 OString
expVal( kTestStr7
);
2084 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2085 const sal_Char
* input
= kTestStr7
;
2087 aStrBuf
.append( input
);
2089 CPPUNIT_ASSERT_MESSAGE
2091 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2092 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2097 void append_002_006()
2099 OString
expVal( kTestStr2
);
2100 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2101 const sal_Char
* input
= kTestStr2
;
2103 aStrBuf
.append( input
);
2105 CPPUNIT_ASSERT_MESSAGE
2107 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2108 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2113 void append_002_007()
2115 OString
expVal( kTestStr1
);
2116 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2117 const sal_Char
* input
= kTestStr1
;
2119 aStrBuf
.append( input
);
2121 CPPUNIT_ASSERT_MESSAGE
2123 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2124 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2129 void append_002_008()
2132 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2133 const sal_Char
* input
= kTestStr25
;
2135 aStrBuf
.append( input
);
2137 CPPUNIT_ASSERT_MESSAGE
2139 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2140 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2145 void append_002_009()
2147 OString
expVal( kTestStr7
);
2148 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2149 const sal_Char
* input
= kTestStr7
;
2151 aStrBuf
.append( input
);
2153 CPPUNIT_ASSERT_MESSAGE
2155 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2156 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2161 void append_002_010()
2163 OString
expVal( kTestStr2
);
2164 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2165 const sal_Char
* input
= kTestStr2
;
2167 aStrBuf
.append( input
);
2169 CPPUNIT_ASSERT_MESSAGE
2171 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2172 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2177 void append_002_011()
2179 OString
expVal( kTestStr1
);
2180 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2181 const sal_Char
* input
= kTestStr1
;
2183 aStrBuf
.append( input
);
2185 CPPUNIT_ASSERT_MESSAGE
2187 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2188 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2193 void append_002_012()
2196 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2197 const sal_Char
* input
= kTestStr25
;
2199 aStrBuf
.append( input
);
2201 CPPUNIT_ASSERT_MESSAGE
2203 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2204 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2209 void append_002_013()
2211 OString
expVal( kTestStr7
);
2212 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2213 const sal_Char
* input
= kTestStr7
;
2215 aStrBuf
.append( input
);
2217 CPPUNIT_ASSERT_MESSAGE
2219 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2220 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2225 void append_002_014()
2227 OString
expVal( kTestStr2
);
2228 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2229 const sal_Char
* input
= kTestStr2
;
2231 aStrBuf
.append( input
);
2233 CPPUNIT_ASSERT_MESSAGE
2235 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2236 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2241 void append_002_015()
2243 OString
expVal( kTestStr1
);
2244 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2245 const sal_Char
* input
= kTestStr1
;
2247 aStrBuf
.append( input
);
2249 CPPUNIT_ASSERT_MESSAGE
2251 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2252 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2257 void append_002_016()
2260 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2261 const sal_Char
* input
= kTestStr25
;
2263 aStrBuf
.append( input
);
2265 CPPUNIT_ASSERT_MESSAGE
2267 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2268 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2273 void append_002_017()
2275 OString
expVal( kTestStr29
);
2276 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2277 const sal_Char
* input
= kTestStr38
;
2279 aStrBuf
.append( input
);
2281 CPPUNIT_ASSERT_MESSAGE
2283 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2284 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2289 void append_002_018()
2291 OString
expVal( kTestStr39
);
2292 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2293 const sal_Char
* input
= kTestStr17
;
2295 aStrBuf
.append( input
);
2297 CPPUNIT_ASSERT_MESSAGE
2299 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2300 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2305 void append_002_019()
2307 OString
expVal( kTestStr40
);
2308 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2309 const sal_Char
* input
= kTestStr31
;
2311 aStrBuf
.append( input
);
2313 CPPUNIT_ASSERT_MESSAGE
2315 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2316 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2321 void append_002_020()
2323 OString
expVal( kTestStr28
);
2324 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2325 const sal_Char
* input
= kTestStr25
;
2327 aStrBuf
.append( input
);
2329 CPPUNIT_ASSERT_MESSAGE
2331 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2332 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2338 void append_002_021()
2341 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
2342 const sal_Char
* input
= kTestStr25
;
2344 aStrBuf
.append( input
);
2346 CPPUNIT_ASSERT_MESSAGE
2348 "Appends the string(length equal to 0) to the string buffer(with INT_MAX)",
2349 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2355 CPPUNIT_TEST_SUITE( append_002
);
2356 CPPUNIT_TEST( append_002_001
);
2357 CPPUNIT_TEST( append_002_002
);
2358 CPPUNIT_TEST( append_002_003
);
2359 CPPUNIT_TEST( append_002_004
);
2360 CPPUNIT_TEST( append_002_005
);
2361 CPPUNIT_TEST( append_002_006
);
2362 CPPUNIT_TEST( append_002_007
);
2363 CPPUNIT_TEST( append_002_008
);
2364 CPPUNIT_TEST( append_002_009
);
2365 CPPUNIT_TEST( append_002_010
);
2366 CPPUNIT_TEST( append_002_011
);
2367 CPPUNIT_TEST( append_002_012
);
2368 CPPUNIT_TEST( append_002_013
);
2369 CPPUNIT_TEST( append_002_014
);
2370 CPPUNIT_TEST( append_002_015
);
2371 CPPUNIT_TEST( append_002_016
);
2372 CPPUNIT_TEST( append_002_017
);
2373 CPPUNIT_TEST( append_002_018
);
2374 CPPUNIT_TEST( append_002_019
);
2375 CPPUNIT_TEST( append_002_020
);
2377 CPPUNIT_TEST( append_002_021
);
2379 CPPUNIT_TEST_SUITE_END();
2382 class append_003
: public CppUnit::TestFixture
2387 void setUp() override
2389 arrOUS
[0] = new OString( kTestStr7
);
2390 arrOUS
[1] = new OString( );
2391 arrOUS
[2] = new OString( kTestStr25
);
2392 arrOUS
[3] = new OString( "" );
2393 arrOUS
[4] = new OString( kTestStr28
);
2397 void tearDown() override
2399 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
2400 delete arrOUS
[3]; delete arrOUS
[4];
2403 void append_003_001()
2405 OString
expVal( kTestStr1
);
2406 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2407 const sal_Char
* input1
= kTestStr36
;
2408 sal_Int32 input2
= 12;
2410 aStrBuf
.append( input1
, input2
);
2412 CPPUNIT_ASSERT_MESSAGE
2414 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2415 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2420 void append_003_002()
2422 OString
expVal( kTestStr2
);
2423 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2424 const sal_Char
* input1
= kTestStr36
;
2425 sal_Int32 input2
= 28;
2427 aStrBuf
.append( input1
, input2
);
2429 CPPUNIT_ASSERT_MESSAGE
2431 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2432 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2437 void append_003_003()
2439 OString
expVal( kTestStr37
);
2440 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2441 const sal_Char
* input1
= kTestStr23
;
2442 sal_Int32 input2
= 16;
2444 aStrBuf
.append( input1
, input2
);
2446 CPPUNIT_ASSERT_MESSAGE
2448 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2449 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2454 void append_003_004()
2456 OString
expVal( kTestStr7
);
2457 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2458 const sal_Char
* input1
= kTestStr2
;
2459 sal_Int32 input2
= 0;
2461 aStrBuf
.append( input1
, input2
);
2463 CPPUNIT_ASSERT_MESSAGE
2465 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2466 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2471 void append_003_006()
2473 OString
expVal( kTestStr7
);
2474 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2475 const sal_Char
* input1
= kTestStr2
;
2476 sal_Int32 input2
= 4;
2478 aStrBuf
.append( input1
, input2
);
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_003_007()
2490 OString
expVal( kTestStr2
);
2491 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2492 const sal_Char
* input1
= kTestStr2
;
2493 sal_Int32 input2
= 32;
2495 aStrBuf
.append( input1
, input2
);
2497 CPPUNIT_ASSERT_MESSAGE
2499 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2500 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2505 void append_003_008()
2507 OString
expVal( kTestStr1
);
2508 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2509 const sal_Char
* input1
= kTestStr2
;
2510 sal_Int32 input2
= 16;
2512 aStrBuf
.append( input1
, input2
);
2514 CPPUNIT_ASSERT_MESSAGE
2516 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2517 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2522 void append_003_009()
2525 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2526 const sal_Char
* input1
= kTestStr2
;
2527 sal_Int32 input2
= 0;
2529 aStrBuf
.append( input1
, input2
);
2531 CPPUNIT_ASSERT_MESSAGE
2533 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2534 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2539 void append_003_011()
2541 OString
expVal( kTestStr7
);
2542 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2543 const sal_Char
* input1
= kTestStr2
;
2544 sal_Int32 input2
= 4;
2546 aStrBuf
.append( input1
, input2
);
2548 CPPUNIT_ASSERT_MESSAGE
2550 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2551 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2556 void append_003_012()
2558 OString
expVal( kTestStr2
);
2559 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2560 const sal_Char
* input1
= kTestStr2
;
2561 sal_Int32 input2
= 32;
2563 aStrBuf
.append( input1
, input2
);
2565 CPPUNIT_ASSERT_MESSAGE
2567 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2568 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2573 void append_003_013()
2575 OString
expVal( kTestStr1
);
2576 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2577 const sal_Char
* input1
= kTestStr2
;
2578 sal_Int32 input2
= 16;
2580 aStrBuf
.append( input1
, input2
);
2582 CPPUNIT_ASSERT_MESSAGE
2584 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2585 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2590 void append_003_014()
2593 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2594 const sal_Char
* input1
= kTestStr2
;
2595 sal_Int32 input2
= 0;
2597 aStrBuf
.append( input1
, input2
);
2599 CPPUNIT_ASSERT_MESSAGE
2601 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2602 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2607 void append_003_016()
2609 OString
expVal( kTestStr7
);
2610 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2611 const sal_Char
* input1
= kTestStr2
;
2612 sal_Int32 input2
= 4;
2614 aStrBuf
.append( input1
, input2
);
2616 CPPUNIT_ASSERT_MESSAGE
2618 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2619 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2624 void append_003_017()
2626 OString
expVal( kTestStr2
);
2627 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2628 const sal_Char
* input1
= kTestStr2
;
2629 sal_Int32 input2
= 32;
2631 aStrBuf
.append( input1
, input2
);
2633 CPPUNIT_ASSERT_MESSAGE
2635 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2636 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2641 void append_003_018()
2643 OString
expVal( kTestStr1
);
2644 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2645 const sal_Char
* input1
= kTestStr2
;
2646 sal_Int32 input2
= 16;
2648 aStrBuf
.append( input1
, input2
);
2650 CPPUNIT_ASSERT_MESSAGE
2652 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2653 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2658 void append_003_019()
2661 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2662 const sal_Char
* input1
= kTestStr2
;
2663 sal_Int32 input2
= 0;
2665 aStrBuf
.append( input1
, input2
);
2667 CPPUNIT_ASSERT_MESSAGE
2669 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2670 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2675 void append_003_021()
2677 OString
expVal( kTestStr29
);
2678 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2679 const sal_Char
* input1
= kTestStr38
;
2680 sal_Int32 input2
= 7;
2682 aStrBuf
.append( input1
, input2
);
2684 CPPUNIT_ASSERT_MESSAGE
2686 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2687 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2692 void append_003_022()
2694 OString
expVal( kTestStr39
);
2695 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2696 const sal_Char
* input1
= kTestStr17
;
2697 sal_Int32 input2
= 22;
2699 aStrBuf
.append( input1
, input2
);
2701 CPPUNIT_ASSERT_MESSAGE
2703 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2704 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2709 void append_003_023()
2711 OString
expVal( kTestStr40
);
2712 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2713 const sal_Char
* input1
= kTestStr31
;
2714 sal_Int32 input2
= 16;
2716 aStrBuf
.append( input1
, input2
);
2718 CPPUNIT_ASSERT_MESSAGE
2720 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2721 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2726 void append_003_024()
2728 OString
expVal( kTestStr28
);
2729 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2730 const sal_Char
* input1
= kTestStr2
;
2731 sal_Int32 input2
= 0;
2733 aStrBuf
.append( input1
, input2
);
2735 CPPUNIT_ASSERT_MESSAGE
2737 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2738 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2743 CPPUNIT_TEST_SUITE( append_003
);
2744 CPPUNIT_TEST( append_003_001
);
2745 CPPUNIT_TEST( append_003_002
);
2746 CPPUNIT_TEST( append_003_003
);
2747 CPPUNIT_TEST( append_003_004
);
2748 CPPUNIT_TEST( append_003_006
);
2749 CPPUNIT_TEST( append_003_007
);
2750 CPPUNIT_TEST( append_003_008
);
2751 CPPUNIT_TEST( append_003_009
);
2752 CPPUNIT_TEST( append_003_011
);
2753 CPPUNIT_TEST( append_003_012
);
2754 CPPUNIT_TEST( append_003_013
);
2755 CPPUNIT_TEST( append_003_014
);
2756 CPPUNIT_TEST( append_003_016
);
2757 CPPUNIT_TEST( append_003_017
);
2758 CPPUNIT_TEST( append_003_018
);
2759 CPPUNIT_TEST( append_003_019
);
2760 CPPUNIT_TEST( append_003_021
);
2761 CPPUNIT_TEST( append_003_022
);
2762 CPPUNIT_TEST( append_003_023
);
2763 CPPUNIT_TEST( append_003_024
);
2764 CPPUNIT_TEST_SUITE_END();
2767 class append_004
: public CppUnit::TestFixture
2772 void setUp() override
2774 arrOUS
[0] = new OString( kTestStr7
);
2775 arrOUS
[1] = new OString( );
2776 arrOUS
[2] = new OString( kTestStr25
);
2777 arrOUS
[3] = new OString( "" );
2778 arrOUS
[4] = new OString( kTestStr28
);
2782 void tearDown() override
2784 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
2785 delete arrOUS
[3]; delete arrOUS
[4];
2788 void append_004_001()
2790 OString
expVal( kTestStr45
);
2791 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2794 aStrBuf
.append( input
);
2796 CPPUNIT_ASSERT_MESSAGE
2798 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[0]",
2799 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2804 void append_004_002()
2806 OString
expVal( kTestStr46
);
2807 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
2810 aStrBuf
.append( input
);
2812 CPPUNIT_ASSERT_MESSAGE
2814 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[0]",
2815 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2820 void append_004_003()
2822 OString
expVal( kTestStr47
);
2823 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2826 aStrBuf
.append( input
);
2828 CPPUNIT_ASSERT_MESSAGE
2830 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[1]",
2831 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2836 void append_004_004()
2838 OString
expVal( kTestStr48
);
2839 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
2842 aStrBuf
.append( input
);
2844 CPPUNIT_ASSERT_MESSAGE
2846 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[1]",
2847 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2852 void append_004_005()
2854 OString
expVal( kTestStr47
);
2855 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2858 aStrBuf
.append( input
);
2860 CPPUNIT_ASSERT_MESSAGE
2862 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[2]",
2863 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2868 void append_004_006()
2870 OString
expVal( kTestStr48
);
2871 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
2874 aStrBuf
.append( input
);
2876 CPPUNIT_ASSERT_MESSAGE
2878 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[2]",
2879 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2884 void append_004_007()
2886 OString
expVal( kTestStr47
);
2887 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2890 aStrBuf
.append( input
);
2892 CPPUNIT_ASSERT_MESSAGE
2894 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[3]",
2895 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2900 void append_004_008()
2902 OString
expVal( kTestStr48
);
2903 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
2906 aStrBuf
.append( input
);
2908 CPPUNIT_ASSERT_MESSAGE
2910 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[3]",
2911 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2916 void append_004_009()
2918 OString
expVal( kTestStr49
);
2919 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2922 aStrBuf
.append( input
);
2924 CPPUNIT_ASSERT_MESSAGE
2926 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[4]",
2927 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2932 void append_004_010()
2934 OString
expVal( kTestStr50
);
2935 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
2938 aStrBuf
.append( input
);
2940 CPPUNIT_ASSERT_MESSAGE
2942 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[4]",
2943 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2949 void append_004_011()
2951 OString
expVal( kTestStr47
);
2952 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
2953 sal_Bool input
= sal_True
;
2955 aStrBuf
.append( input
);
2957 CPPUNIT_ASSERT_MESSAGE
2959 "Appends the sal_Bool(sal_True) to the string buffer(with INT_MAX)",
2960 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2965 void append_004_012()
2967 OString
expVal( kTestStr48
);
2968 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
2969 sal_Bool input
= sal_False
;
2971 aStrBuf
.append( input
);
2973 CPPUNIT_ASSERT_MESSAGE
2975 "Appends the sal_Bool(sal_False) to the string buffer(with INT_MAX)",
2976 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2982 CPPUNIT_TEST_SUITE( append_004
);
2983 CPPUNIT_TEST( append_004_001
);
2984 CPPUNIT_TEST( append_004_002
);
2985 CPPUNIT_TEST( append_004_003
);
2986 CPPUNIT_TEST( append_004_004
);
2987 CPPUNIT_TEST( append_004_005
);
2988 CPPUNIT_TEST( append_004_006
);
2989 CPPUNIT_TEST( append_004_007
);
2990 CPPUNIT_TEST( append_004_008
);
2991 CPPUNIT_TEST( append_004_009
);
2992 CPPUNIT_TEST( append_004_010
);
2994 CPPUNIT_TEST( append_004_011
);
2995 CPPUNIT_TEST( append_004_012
);
2997 CPPUNIT_TEST_SUITE_END();
3000 // testing the method append(sal_Char c)
3002 class append_005
: public CppUnit::TestFixture
3007 void setUp() override
3009 arrOUS
[0] = new OString( kTestStr7
);
3010 arrOUS
[1] = new OString( );
3011 arrOUS
[2] = new OString( kTestStr25
);
3012 arrOUS
[3] = new OString( "" );
3013 arrOUS
[4] = new OString( kTestStr28
);
3017 void tearDown() override
3019 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
3020 delete arrOUS
[3]; delete arrOUS
[4];
3025 OString
expVal( kTestStr51
);
3026 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3027 sal_Char input
= 'M';
3029 aStrBuf
.append( input
);
3031 CPPUNIT_ASSERT_MESSAGE
3033 "Appends the sal_Char(M) to the string buffer arrOUS[0]",
3034 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3041 OString
expVal( kTestStr143
);
3042 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3043 sal_Char input
= static_cast<sal_Char
>(SAL_MAX_UINT8
);
3045 aStrBuf
.append( input
);
3047 CPPUNIT_ASSERT_MESSAGE
3049 "Appends the sal_Unicode(kSInt8Max) to the string buffer arrOUS[0]",
3050 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3057 OString
expVal( kTestStr27
);
3058 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3059 sal_Char input
= 's';
3061 aStrBuf
.append( input
);
3063 CPPUNIT_ASSERT_MESSAGE
3065 "Appends the sal_Char(s) to the string buffer arrOUS[1]",
3066 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3073 OString
expVal( kTestStr144
);
3074 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3075 sal_Char input
= static_cast<sal_Char
>(SAL_MAX_UINT8
);
3077 aStrBuf
.append( input
);
3079 CPPUNIT_ASSERT_MESSAGE
3081 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[1]",
3082 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3087 void append_005_005()
3089 OString
expVal( kTestStr27
);
3090 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
3091 sal_Char input
= 's';
3093 aStrBuf
.append( input
);
3095 CPPUNIT_ASSERT_MESSAGE
3097 "Appends the sal_Char(s) to the string buffer arrOUS[2]",
3098 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3105 OString
expVal( kTestStr144
);
3106 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
3107 sal_Char input
= static_cast<sal_Char
>(SAL_MAX_UINT8
);
3109 aStrBuf
.append( input
);
3111 CPPUNIT_ASSERT_MESSAGE
3113 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[2]",
3114 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3121 OString
expVal( kTestStr27
);
3122 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
3123 sal_Char input
= 's';
3125 aStrBuf
.append( input
);
3127 CPPUNIT_ASSERT_MESSAGE
3129 "Appends the sal_Char(s) to the string buffer arrOUS[3]",
3130 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3137 OString
expVal( kTestStr144
);
3138 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
3139 sal_Char input
= static_cast<sal_Char
>(SAL_MAX_UINT8
);
3141 aStrBuf
.append( input
);
3143 CPPUNIT_ASSERT_MESSAGE
3145 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[3]",
3146 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3153 OString
expVal( kTestStr56
);
3154 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
3155 sal_Char input
= 's';
3157 aStrBuf
.append( input
);
3159 CPPUNIT_ASSERT_MESSAGE
3161 "Appends the sal_Char(s) to the string buffer arrOUS[4]",
3162 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3169 OString
expVal( kTestStr145
);
3170 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
3171 sal_Char input
= static_cast<sal_Char
>(SAL_MAX_UINT8
);
3173 aStrBuf
.append( input
);
3175 CPPUNIT_ASSERT_MESSAGE
3177 "Appends the sal_Char(kSInt8Max) to the string buffer arrOUS[4]",
3178 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3186 OString
expVal( kTestStr27
);
3187 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
3188 sal_Char input
= 's';
3190 aStrBuf
.append( input
);
3192 CPPUNIT_ASSERT_MESSAGE
3194 "Appends the sal_Char(s) to the string buffer(with INT_MAX)",
3195 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3202 OString
expVal( kTestStr144
);
3203 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
3204 sal_Char input
= static_cast<sal_Char
>(SAL_MAX_UINT8
);
3206 aStrBuf
.append( input
);
3208 CPPUNIT_ASSERT_MESSAGE
3210 "Appends the sal_Char(kSInt8Max) to the string buffer with INT_MAX)",
3211 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3217 CPPUNIT_TEST_SUITE( append_005
);
3218 CPPUNIT_TEST( append_001
);
3219 CPPUNIT_TEST( append_002
);
3220 CPPUNIT_TEST( append_003
);
3221 CPPUNIT_TEST( append_004
);
3222 CPPUNIT_TEST( append_005_005
);
3223 CPPUNIT_TEST( append_006
);
3224 CPPUNIT_TEST( append_007
);
3225 CPPUNIT_TEST( append_008
);
3226 CPPUNIT_TEST( append_009
);
3227 CPPUNIT_TEST( append_010
);
3229 CPPUNIT_TEST( append_011
);
3230 CPPUNIT_TEST( append_012
);
3232 CPPUNIT_TEST_SUITE_END();
3235 class append_006_Int32
: public CppUnit::TestFixture
3240 void setUp() override
3242 arrOUS
[0] = new OString( kTestStr7
);
3243 arrOUS
[1] = new OString( );
3244 arrOUS
[2] = new OString( kTestStr25
);
3245 arrOUS
[3] = new OString( "" );
3246 arrOUS
[4] = new OString( kTestStr28
);
3250 void tearDown() override
3252 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
3253 delete arrOUS
[3]; delete arrOUS
[4];
3258 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3259 OString
expVal( aStrBuf
.getStr() );
3260 sal_Int32 input
= 0;
3261 sal_Int16 radix
= 2;
3263 expVal
+= OString( "0" );
3264 aStrBuf
.append( input
, radix
);
3266 CPPUNIT_ASSERT_MESSAGE
3268 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3269 aStrBuf
.getStr()== expVal
&&
3270 aStrBuf
.getLength() == expVal
.getLength()
3277 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3278 OString
expVal( aStrBuf
.getStr() );
3279 sal_Int32 input
= 4;
3280 sal_Int16 radix
= 2;
3282 expVal
+= OString( "100" );
3283 aStrBuf
.append( input
, radix
);
3285 CPPUNIT_ASSERT_MESSAGE
3287 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3288 aStrBuf
.getStr()== expVal
&&
3289 aStrBuf
.getLength() == expVal
.getLength()
3296 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3297 OString
expVal( aStrBuf
.getStr() );
3298 sal_Int32 input
= 8;
3299 sal_Int16 radix
= 2;
3301 expVal
+= OString( "1000" );
3302 aStrBuf
.append( input
, radix
);
3304 CPPUNIT_ASSERT_MESSAGE
3306 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3307 aStrBuf
.getStr()== expVal
&&
3308 aStrBuf
.getLength() == expVal
.getLength()
3315 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3316 OString
expVal( aStrBuf
.getStr() );
3317 sal_Int32 input
= 15;
3318 sal_Int16 radix
= 2;
3320 expVal
+= OString( "1111" );
3321 aStrBuf
.append( input
, radix
);
3323 CPPUNIT_ASSERT_MESSAGE
3325 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3326 aStrBuf
.getStr()== expVal
&&
3327 aStrBuf
.getLength() == expVal
.getLength()
3334 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3335 OString
expVal( aStrBuf
.getStr() );
3336 sal_Int32 input
= 0;
3337 sal_Int16 radix
= 8;
3339 expVal
+= OString( "0" );
3340 aStrBuf
.append( input
, radix
);
3342 CPPUNIT_ASSERT_MESSAGE
3344 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3345 aStrBuf
.getStr()== expVal
&&
3346 aStrBuf
.getLength() == expVal
.getLength()
3353 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3354 OString
expVal( aStrBuf
.getStr() );
3355 sal_Int32 input
= 4;
3356 sal_Int16 radix
= 8;
3358 expVal
+= OString( "4" );
3359 aStrBuf
.append( input
, radix
);
3361 CPPUNIT_ASSERT_MESSAGE
3363 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3364 aStrBuf
.getStr()== expVal
&&
3365 aStrBuf
.getLength() == expVal
.getLength()
3372 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3373 OString
expVal( aStrBuf
.getStr() );
3374 sal_Int32 input
= 8;
3375 sal_Int16 radix
= 8;
3377 expVal
+= OString( "10" );
3378 aStrBuf
.append( input
, radix
);
3380 CPPUNIT_ASSERT_MESSAGE
3382 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3383 aStrBuf
.getStr()== expVal
&&
3384 aStrBuf
.getLength() == expVal
.getLength()
3391 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3392 OString
expVal( aStrBuf
.getStr() );
3393 sal_Int32 input
= 15;
3394 sal_Int16 radix
= 8;
3396 expVal
+= OString( "17" );
3397 aStrBuf
.append( input
, radix
);
3399 CPPUNIT_ASSERT_MESSAGE
3401 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3402 aStrBuf
.getStr()== expVal
&&
3403 aStrBuf
.getLength() == expVal
.getLength()
3410 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3411 OString
expVal( aStrBuf
.getStr() );
3412 sal_Int32 input
= 0;
3413 sal_Int16 radix
= 10;
3415 expVal
+= OString( "0" );
3416 aStrBuf
.append( input
, radix
);
3418 CPPUNIT_ASSERT_MESSAGE
3420 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3421 aStrBuf
.getStr()== expVal
&&
3422 aStrBuf
.getLength() == expVal
.getLength()
3429 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3430 OString
expVal( aStrBuf
.getStr() );
3431 sal_Int32 input
= 4;
3432 sal_Int16 radix
= 10;
3434 expVal
+= OString( "4" );
3435 aStrBuf
.append( input
, radix
);
3437 CPPUNIT_ASSERT_MESSAGE
3439 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3440 aStrBuf
.getStr()== expVal
&&
3441 aStrBuf
.getLength() == expVal
.getLength()
3448 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3449 OString
expVal( aStrBuf
.getStr() );
3450 sal_Int32 input
= 8;
3451 sal_Int16 radix
= 10;
3453 expVal
+= OString( "8" );
3454 aStrBuf
.append( input
, radix
);
3456 CPPUNIT_ASSERT_MESSAGE
3458 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3459 aStrBuf
.getStr()== expVal
&&
3460 aStrBuf
.getLength() == expVal
.getLength()
3467 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3468 OString
expVal( aStrBuf
.getStr() );
3469 sal_Int32 input
= 15;
3470 sal_Int16 radix
= 10;
3472 expVal
+= OString( "15" );
3473 aStrBuf
.append( input
, radix
);
3475 CPPUNIT_ASSERT_MESSAGE
3477 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3478 aStrBuf
.getStr()== expVal
&&
3479 aStrBuf
.getLength() == expVal
.getLength()
3486 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3487 OString
expVal( aStrBuf
.getStr() );
3488 sal_Int32 input
= 0;
3489 sal_Int16 radix
= 16;
3491 expVal
+= OString( "0" );
3492 aStrBuf
.append( input
, radix
);
3494 CPPUNIT_ASSERT_MESSAGE
3496 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3497 aStrBuf
.getStr()== expVal
&&
3498 aStrBuf
.getLength() == expVal
.getLength()
3505 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3506 OString
expVal( aStrBuf
.getStr() );
3507 sal_Int32 input
= 4;
3508 sal_Int16 radix
= 16;
3510 expVal
+= OString( "4" );
3511 aStrBuf
.append( input
, radix
);
3513 CPPUNIT_ASSERT_MESSAGE
3515 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3516 aStrBuf
.getStr()== expVal
&&
3517 aStrBuf
.getLength() == expVal
.getLength()
3524 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3525 OString
expVal( aStrBuf
.getStr() );
3526 sal_Int32 input
= 8;
3527 sal_Int16 radix
= 16;
3529 expVal
+= OString( "8" );
3530 aStrBuf
.append( input
, radix
);
3532 CPPUNIT_ASSERT_MESSAGE
3534 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3535 aStrBuf
.getStr()== expVal
&&
3536 aStrBuf
.getLength() == expVal
.getLength()
3543 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3544 OString
expVal( aStrBuf
.getStr() );
3545 sal_Int32 input
= 15;
3546 sal_Int16 radix
= 16;
3548 expVal
+= OString( "f" );
3549 aStrBuf
.append( input
, radix
);
3551 CPPUNIT_ASSERT_MESSAGE
3553 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3554 aStrBuf
.getStr()== expVal
&&
3555 aStrBuf
.getLength() == expVal
.getLength()
3562 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3563 OString
expVal( aStrBuf
.getStr() );
3564 sal_Int32 input
= 0;
3565 sal_Int16 radix
= 36;
3567 expVal
+= OString( "0" );
3568 aStrBuf
.append( input
, radix
);
3570 CPPUNIT_ASSERT_MESSAGE
3572 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3573 aStrBuf
.getStr()== expVal
&&
3574 aStrBuf
.getLength() == expVal
.getLength()
3581 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3582 OString
expVal( aStrBuf
.getStr() );
3583 sal_Int32 input
= 4;
3584 sal_Int16 radix
= 36;
3586 expVal
+= OString( "4" );
3587 aStrBuf
.append( input
, radix
);
3589 CPPUNIT_ASSERT_MESSAGE
3591 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3592 aStrBuf
.getStr()== expVal
&&
3593 aStrBuf
.getLength() == expVal
.getLength()
3600 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3601 OString
expVal( aStrBuf
.getStr() );
3602 sal_Int32 input
= 8;
3603 sal_Int16 radix
= 36;
3605 expVal
+= OString( "8" );
3606 aStrBuf
.append( input
, radix
);
3608 CPPUNIT_ASSERT_MESSAGE
3610 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3611 aStrBuf
.getStr()== expVal
&&
3612 aStrBuf
.getLength() == expVal
.getLength()
3619 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
3620 OString
expVal( aStrBuf
.getStr() );
3621 sal_Int32 input
= 35;
3622 sal_Int16 radix
= 36;
3624 expVal
+= OString( "z" );
3625 aStrBuf
.append( input
, radix
);
3627 CPPUNIT_ASSERT_MESSAGE
3629 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3630 aStrBuf
.getStr()== expVal
&&
3631 aStrBuf
.getLength() == expVal
.getLength()
3638 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3639 OString
expVal( aStrBuf
.getStr() );
3640 sal_Int32 input
= 0;
3641 sal_Int16 radix
= 2;
3643 expVal
+= OString( "0" );
3644 aStrBuf
.append( input
, radix
);
3646 CPPUNIT_ASSERT_MESSAGE
3648 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3649 aStrBuf
.getStr()== expVal
&&
3650 aStrBuf
.getLength() == expVal
.getLength()
3657 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3658 OString
expVal( aStrBuf
.getStr() );
3659 sal_Int32 input
= 4;
3660 sal_Int16 radix
= 2;
3662 expVal
+= OString( "100" );
3663 aStrBuf
.append( input
, radix
);
3665 CPPUNIT_ASSERT_MESSAGE
3667 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3668 aStrBuf
.getStr()== expVal
&&
3669 aStrBuf
.getLength() == expVal
.getLength()
3676 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3677 OString
expVal( aStrBuf
.getStr() );
3678 sal_Int32 input
= 8;
3679 sal_Int16 radix
= 2;
3681 expVal
+= OString( "1000" );
3682 aStrBuf
.append( input
, radix
);
3684 CPPUNIT_ASSERT_MESSAGE
3686 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3687 aStrBuf
.getStr()== expVal
&&
3688 aStrBuf
.getLength() == expVal
.getLength()
3695 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3696 OString
expVal( aStrBuf
.getStr() );
3697 sal_Int32 input
= 15;
3698 sal_Int16 radix
= 2;
3700 expVal
+= OString( "1111" );
3701 aStrBuf
.append( input
, radix
);
3703 CPPUNIT_ASSERT_MESSAGE
3705 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3706 aStrBuf
.getStr()== expVal
&&
3707 aStrBuf
.getLength() == expVal
.getLength()
3714 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3715 OString
expVal( aStrBuf
.getStr() );
3716 sal_Int32 input
= 0;
3717 sal_Int16 radix
= 8;
3719 expVal
+= OString( "0" );
3720 aStrBuf
.append( input
, radix
);
3722 CPPUNIT_ASSERT_MESSAGE
3724 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3725 aStrBuf
.getStr()== expVal
&&
3726 aStrBuf
.getLength() == expVal
.getLength()
3733 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3734 OString
expVal( aStrBuf
.getStr() );
3735 sal_Int32 input
= 4;
3736 sal_Int16 radix
= 8;
3738 expVal
+= OString( "4" );
3739 aStrBuf
.append( input
, radix
);
3741 CPPUNIT_ASSERT_MESSAGE
3743 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3744 aStrBuf
.getStr()== expVal
&&
3745 aStrBuf
.getLength() == expVal
.getLength()
3752 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3753 OString
expVal( aStrBuf
.getStr() );
3754 sal_Int32 input
= 8;
3755 sal_Int16 radix
= 8;
3757 expVal
+= OString( "10" );
3758 aStrBuf
.append( input
, radix
);
3760 CPPUNIT_ASSERT_MESSAGE
3762 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3763 aStrBuf
.getStr()== expVal
&&
3764 aStrBuf
.getLength() == expVal
.getLength()
3771 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3772 OString
expVal( aStrBuf
.getStr() );
3773 sal_Int32 input
= 15;
3774 sal_Int16 radix
= 8;
3776 expVal
+= OString( "17" );
3777 aStrBuf
.append( input
, radix
);
3779 CPPUNIT_ASSERT_MESSAGE
3781 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3782 aStrBuf
.getStr()== expVal
&&
3783 aStrBuf
.getLength() == expVal
.getLength()
3790 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3791 OString
expVal( aStrBuf
.getStr() );
3792 sal_Int32 input
= 0;
3793 sal_Int16 radix
= 10;
3795 expVal
+= OString( "0" );
3796 aStrBuf
.append( input
, radix
);
3798 CPPUNIT_ASSERT_MESSAGE
3800 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3801 aStrBuf
.getStr()== expVal
&&
3802 aStrBuf
.getLength() == expVal
.getLength()
3809 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3810 OString
expVal( aStrBuf
.getStr() );
3811 sal_Int32 input
= 4;
3812 sal_Int16 radix
= 10;
3814 expVal
+= OString( "4" );
3815 aStrBuf
.append( input
, radix
);
3817 CPPUNIT_ASSERT_MESSAGE
3819 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3820 aStrBuf
.getStr()== expVal
&&
3821 aStrBuf
.getLength() == expVal
.getLength()
3828 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3829 OString
expVal( aStrBuf
.getStr() );
3830 sal_Int32 input
= 8;
3831 sal_Int16 radix
= 10;
3833 expVal
+= OString( "8" );
3834 aStrBuf
.append( input
, radix
);
3836 CPPUNIT_ASSERT_MESSAGE
3838 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3839 aStrBuf
.getStr()== expVal
&&
3840 aStrBuf
.getLength() == expVal
.getLength()
3847 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3848 OString
expVal( aStrBuf
.getStr() );
3849 sal_Int32 input
= 15;
3850 sal_Int16 radix
= 10;
3852 expVal
+= OString( "15" );
3853 aStrBuf
.append( input
, radix
);
3855 CPPUNIT_ASSERT_MESSAGE
3857 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3858 aStrBuf
.getStr()== expVal
&&
3859 aStrBuf
.getLength() == expVal
.getLength()
3866 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3867 OString
expVal( aStrBuf
.getStr() );
3868 sal_Int32 input
= 0;
3869 sal_Int16 radix
= 16;
3871 expVal
+= OString( "0" );
3872 aStrBuf
.append( input
, radix
);
3874 CPPUNIT_ASSERT_MESSAGE
3876 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3877 aStrBuf
.getStr()== expVal
&&
3878 aStrBuf
.getLength() == expVal
.getLength()
3885 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3886 OString
expVal( aStrBuf
.getStr() );
3887 sal_Int32 input
= 4;
3888 sal_Int16 radix
= 16;
3890 expVal
+= OString( "4" );
3891 aStrBuf
.append( input
, radix
);
3893 CPPUNIT_ASSERT_MESSAGE
3895 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3896 aStrBuf
.getStr()== expVal
&&
3897 aStrBuf
.getLength() == expVal
.getLength()
3904 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3905 OString
expVal( aStrBuf
.getStr() );
3906 sal_Int32 input
= 8;
3907 sal_Int16 radix
= 16;
3909 expVal
+= OString( "8" );
3910 aStrBuf
.append( input
, radix
);
3912 CPPUNIT_ASSERT_MESSAGE
3914 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3915 aStrBuf
.getStr()== expVal
&&
3916 aStrBuf
.getLength() == expVal
.getLength()
3923 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3924 OString
expVal( aStrBuf
.getStr() );
3925 sal_Int32 input
= 15;
3926 sal_Int16 radix
= 16;
3928 expVal
+= OString( "f" );
3929 aStrBuf
.append( input
, radix
);
3931 CPPUNIT_ASSERT_MESSAGE
3933 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3934 aStrBuf
.getStr()== expVal
&&
3935 aStrBuf
.getLength() == expVal
.getLength()
3942 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3943 OString
expVal( aStrBuf
.getStr() );
3944 sal_Int32 input
= 0;
3945 sal_Int16 radix
= 36;
3947 expVal
+= OString( "0" );
3948 aStrBuf
.append( input
, radix
);
3950 CPPUNIT_ASSERT_MESSAGE
3952 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3953 aStrBuf
.getStr()== expVal
&&
3954 aStrBuf
.getLength() == expVal
.getLength()
3961 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3962 OString
expVal( aStrBuf
.getStr() );
3963 sal_Int32 input
= 4;
3964 sal_Int16 radix
= 36;
3966 expVal
+= OString( "4" );
3967 aStrBuf
.append( input
, radix
);
3969 CPPUNIT_ASSERT_MESSAGE
3971 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3972 aStrBuf
.getStr()== expVal
&&
3973 aStrBuf
.getLength() == expVal
.getLength()
3980 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
3981 OString
expVal( aStrBuf
.getStr() );
3982 sal_Int32 input
= 8;
3983 sal_Int16 radix
= 36;
3985 expVal
+= OString( "8" );
3986 aStrBuf
.append( input
, radix
);
3988 CPPUNIT_ASSERT_MESSAGE
3990 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3991 aStrBuf
.getStr()== expVal
&&
3992 aStrBuf
.getLength() == expVal
.getLength()
3999 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
4000 OString
expVal( aStrBuf
.getStr() );
4001 sal_Int32 input
= 35;
4002 sal_Int16 radix
= 36;
4004 expVal
+= OString( "z" );
4005 aStrBuf
.append( input
, radix
);
4007 CPPUNIT_ASSERT_MESSAGE
4009 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
4010 aStrBuf
.getStr()== expVal
&&
4011 aStrBuf
.getLength() == expVal
.getLength()
4018 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4019 OString
expVal( aStrBuf
.getStr() );
4020 sal_Int32 input
= 0;
4021 sal_Int16 radix
= 2;
4023 expVal
+= OString( "0" );
4024 aStrBuf
.append( input
, radix
);
4026 CPPUNIT_ASSERT_MESSAGE
4028 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4029 aStrBuf
.getStr()== expVal
&&
4030 aStrBuf
.getLength() == expVal
.getLength()
4037 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4038 OString
expVal( aStrBuf
.getStr() );
4039 sal_Int32 input
= 4;
4040 sal_Int16 radix
= 2;
4042 expVal
+= OString( "100" );
4043 aStrBuf
.append( input
, radix
);
4045 CPPUNIT_ASSERT_MESSAGE
4047 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4048 aStrBuf
.getStr()== expVal
&&
4049 aStrBuf
.getLength() == expVal
.getLength()
4056 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4057 OString
expVal( aStrBuf
.getStr() );
4058 sal_Int32 input
= 8;
4059 sal_Int16 radix
= 2;
4061 expVal
+= OString( "1000" );
4062 aStrBuf
.append( input
, radix
);
4064 CPPUNIT_ASSERT_MESSAGE
4066 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4067 aStrBuf
.getStr()== expVal
&&
4068 aStrBuf
.getLength() == expVal
.getLength()
4075 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4076 OString
expVal( aStrBuf
.getStr() );
4077 sal_Int32 input
= 15;
4078 sal_Int16 radix
= 2;
4080 expVal
+= OString( "1111" );
4081 aStrBuf
.append( input
, radix
);
4083 CPPUNIT_ASSERT_MESSAGE
4085 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
4086 aStrBuf
.getStr()== expVal
&&
4087 aStrBuf
.getLength() == expVal
.getLength()
4094 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4095 OString
expVal( aStrBuf
.getStr() );
4096 sal_Int32 input
= 0;
4097 sal_Int16 radix
= 8;
4099 expVal
+= OString( "0" );
4100 aStrBuf
.append( input
, radix
);
4102 CPPUNIT_ASSERT_MESSAGE
4104 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4105 aStrBuf
.getStr()== expVal
&&
4106 aStrBuf
.getLength() == expVal
.getLength()
4113 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4114 OString
expVal( aStrBuf
.getStr() );
4115 sal_Int32 input
= 4;
4116 sal_Int16 radix
= 8;
4118 expVal
+= OString( "4" );
4119 aStrBuf
.append( input
, radix
);
4121 CPPUNIT_ASSERT_MESSAGE
4123 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4124 aStrBuf
.getStr()== expVal
&&
4125 aStrBuf
.getLength() == expVal
.getLength()
4132 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4133 OString
expVal( aStrBuf
.getStr() );
4134 sal_Int32 input
= 8;
4135 sal_Int16 radix
= 8;
4137 expVal
+= OString( "10" );
4138 aStrBuf
.append( input
, radix
);
4140 CPPUNIT_ASSERT_MESSAGE
4142 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4143 aStrBuf
.getStr()== expVal
&&
4144 aStrBuf
.getLength() == expVal
.getLength()
4151 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4152 OString
expVal( aStrBuf
.getStr() );
4153 sal_Int32 input
= 15;
4154 sal_Int16 radix
= 8;
4156 expVal
+= OString( "17" );
4157 aStrBuf
.append( input
, radix
);
4159 CPPUNIT_ASSERT_MESSAGE
4161 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
4162 aStrBuf
.getStr()== expVal
&&
4163 aStrBuf
.getLength() == expVal
.getLength()
4170 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4171 OString
expVal( aStrBuf
.getStr() );
4172 sal_Int32 input
= 0;
4173 sal_Int16 radix
= 10;
4175 expVal
+= OString( "0" );
4176 aStrBuf
.append( input
, radix
);
4178 CPPUNIT_ASSERT_MESSAGE
4180 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4181 aStrBuf
.getStr()== expVal
&&
4182 aStrBuf
.getLength() == expVal
.getLength()
4189 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4190 OString
expVal( aStrBuf
.getStr() );
4191 sal_Int32 input
= 4;
4192 sal_Int16 radix
= 10;
4194 expVal
+= OString( "4" );
4195 aStrBuf
.append( input
, radix
);
4197 CPPUNIT_ASSERT_MESSAGE
4199 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4200 aStrBuf
.getStr()== expVal
&&
4201 aStrBuf
.getLength() == expVal
.getLength()
4208 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4209 OString
expVal( aStrBuf
.getStr() );
4210 sal_Int32 input
= 8;
4211 sal_Int16 radix
= 10;
4213 expVal
+= OString( "8" );
4214 aStrBuf
.append( input
, radix
);
4216 CPPUNIT_ASSERT_MESSAGE
4218 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4219 aStrBuf
.getStr()== expVal
&&
4220 aStrBuf
.getLength() == expVal
.getLength()
4227 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4228 OString
expVal( aStrBuf
.getStr() );
4229 sal_Int32 input
= 15;
4230 sal_Int16 radix
= 10;
4232 expVal
+= OString( "15" );
4233 aStrBuf
.append( input
, radix
);
4235 CPPUNIT_ASSERT_MESSAGE
4237 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4238 aStrBuf
.getStr()== expVal
&&
4239 aStrBuf
.getLength() == expVal
.getLength()
4246 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4247 OString
expVal( aStrBuf
.getStr() );
4248 sal_Int32 input
= 0;
4249 sal_Int16 radix
= 16;
4251 expVal
+= OString( "0" );
4252 aStrBuf
.append( input
, radix
);
4254 CPPUNIT_ASSERT_MESSAGE
4256 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4257 aStrBuf
.getStr()== expVal
&&
4258 aStrBuf
.getLength() == expVal
.getLength()
4265 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4266 OString
expVal( aStrBuf
.getStr() );
4267 sal_Int32 input
= 4;
4268 sal_Int16 radix
= 16;
4270 expVal
+= OString( "4" );
4271 aStrBuf
.append( input
, radix
);
4273 CPPUNIT_ASSERT_MESSAGE
4275 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4276 aStrBuf
.getStr()== expVal
&&
4277 aStrBuf
.getLength() == expVal
.getLength()
4284 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4285 OString
expVal( aStrBuf
.getStr() );
4286 sal_Int32 input
= 8;
4287 sal_Int16 radix
= 16;
4289 expVal
+= OString( "8" );
4290 aStrBuf
.append( input
, radix
);
4292 CPPUNIT_ASSERT_MESSAGE
4294 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4295 aStrBuf
.getStr()== expVal
&&
4296 aStrBuf
.getLength() == expVal
.getLength()
4303 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4304 OString
expVal( aStrBuf
.getStr() );
4305 sal_Int32 input
= 15;
4306 sal_Int16 radix
= 16;
4308 expVal
+= OString( "f" );
4309 aStrBuf
.append( input
, radix
);
4311 CPPUNIT_ASSERT_MESSAGE
4313 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4314 aStrBuf
.getStr()== expVal
&&
4315 aStrBuf
.getLength() == expVal
.getLength()
4322 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4323 OString
expVal( aStrBuf
.getStr() );
4324 sal_Int32 input
= 0;
4325 sal_Int16 radix
= 36;
4327 expVal
+= OString( "0" );
4328 aStrBuf
.append( input
, radix
);
4330 CPPUNIT_ASSERT_MESSAGE
4332 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4333 aStrBuf
.getStr()== expVal
&&
4334 aStrBuf
.getLength() == expVal
.getLength()
4341 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4342 OString
expVal( aStrBuf
.getStr() );
4343 sal_Int32 input
= 4;
4344 sal_Int16 radix
= 36;
4346 expVal
+= OString( "4" );
4347 aStrBuf
.append( input
, radix
);
4349 CPPUNIT_ASSERT_MESSAGE
4351 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4352 aStrBuf
.getStr()== expVal
&&
4353 aStrBuf
.getLength() == expVal
.getLength()
4360 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4361 OString
expVal( aStrBuf
.getStr() );
4362 sal_Int32 input
= 8;
4363 sal_Int16 radix
= 36;
4365 expVal
+= OString( "8" );
4366 aStrBuf
.append( input
, radix
);
4368 CPPUNIT_ASSERT_MESSAGE
4370 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4371 aStrBuf
.getStr()== expVal
&&
4372 aStrBuf
.getLength() == expVal
.getLength()
4379 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
4380 OString
expVal( aStrBuf
.getStr() );
4381 sal_Int32 input
= 35;
4382 sal_Int16 radix
= 36;
4384 expVal
+= OString( "z" );
4385 aStrBuf
.append( input
, radix
);
4387 CPPUNIT_ASSERT_MESSAGE
4389 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4390 aStrBuf
.getStr()== expVal
&&
4391 aStrBuf
.getLength() == expVal
.getLength()
4398 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4399 OString
expVal( aStrBuf
.getStr() );
4400 sal_Int32 input
= 0;
4401 sal_Int16 radix
= 2;
4403 expVal
+= OString( "0" );
4404 aStrBuf
.append( input
, radix
);
4406 CPPUNIT_ASSERT_MESSAGE
4408 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4409 aStrBuf
.getStr()== expVal
&&
4410 aStrBuf
.getLength() == expVal
.getLength()
4417 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4418 OString
expVal( aStrBuf
.getStr() );
4419 sal_Int32 input
= 4;
4420 sal_Int16 radix
= 2;
4422 expVal
+= OString( "100" );
4423 aStrBuf
.append( input
, radix
);
4425 CPPUNIT_ASSERT_MESSAGE
4427 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4428 aStrBuf
.getStr()== expVal
&&
4429 aStrBuf
.getLength() == expVal
.getLength()
4436 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4437 OString
expVal( aStrBuf
.getStr() );
4438 sal_Int32 input
= 8;
4439 sal_Int16 radix
= 2;
4441 expVal
+= OString( "1000" );
4442 aStrBuf
.append( input
, radix
);
4444 CPPUNIT_ASSERT_MESSAGE
4446 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4447 aStrBuf
.getStr()== expVal
&&
4448 aStrBuf
.getLength() == expVal
.getLength()
4455 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4456 OString
expVal( aStrBuf
.getStr() );
4457 sal_Int32 input
= 15;
4458 sal_Int16 radix
= 2;
4460 expVal
+= OString( "1111" );
4461 aStrBuf
.append( input
, radix
);
4463 CPPUNIT_ASSERT_MESSAGE
4465 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4466 aStrBuf
.getStr()== expVal
&&
4467 aStrBuf
.getLength() == expVal
.getLength()
4474 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4475 OString
expVal( aStrBuf
.getStr() );
4476 sal_Int32 input
= 0;
4477 sal_Int16 radix
= 8;
4479 expVal
+= OString( "0" );
4480 aStrBuf
.append( input
, radix
);
4482 CPPUNIT_ASSERT_MESSAGE
4484 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4485 aStrBuf
.getStr()== expVal
&&
4486 aStrBuf
.getLength() == expVal
.getLength()
4493 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4494 OString
expVal( aStrBuf
.getStr() );
4495 sal_Int32 input
= 4;
4496 sal_Int16 radix
= 8;
4498 expVal
+= OString( "4" );
4499 aStrBuf
.append( input
, radix
);
4501 CPPUNIT_ASSERT_MESSAGE
4503 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4504 aStrBuf
.getStr()== expVal
&&
4505 aStrBuf
.getLength() == expVal
.getLength()
4512 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4513 OString
expVal( aStrBuf
.getStr() );
4514 sal_Int32 input
= 8;
4515 sal_Int16 radix
= 8;
4517 expVal
+= OString( "10" );
4518 aStrBuf
.append( input
, radix
);
4520 CPPUNIT_ASSERT_MESSAGE
4522 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4523 aStrBuf
.getStr()== expVal
&&
4524 aStrBuf
.getLength() == expVal
.getLength()
4531 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4532 OString
expVal( aStrBuf
.getStr() );
4533 sal_Int32 input
= 15;
4534 sal_Int16 radix
= 8;
4536 expVal
+= OString( "17" );
4537 aStrBuf
.append( input
, radix
);
4539 CPPUNIT_ASSERT_MESSAGE
4541 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4542 aStrBuf
.getStr()== expVal
&&
4543 aStrBuf
.getLength() == expVal
.getLength()
4550 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4551 OString
expVal( aStrBuf
.getStr() );
4552 sal_Int32 input
= 0;
4553 sal_Int16 radix
= 10;
4555 expVal
+= OString( "0" );
4556 aStrBuf
.append( input
, radix
);
4558 CPPUNIT_ASSERT_MESSAGE
4560 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4561 aStrBuf
.getStr()== expVal
&&
4562 aStrBuf
.getLength() == expVal
.getLength()
4569 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4570 OString
expVal( aStrBuf
.getStr() );
4571 sal_Int32 input
= 4;
4572 sal_Int16 radix
= 10;
4574 expVal
+= OString( "4" );
4575 aStrBuf
.append( input
, radix
);
4577 CPPUNIT_ASSERT_MESSAGE
4579 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4580 aStrBuf
.getStr()== expVal
&&
4581 aStrBuf
.getLength() == expVal
.getLength()
4588 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4589 OString
expVal( aStrBuf
.getStr() );
4590 sal_Int32 input
= 8;
4591 sal_Int16 radix
= 10;
4593 expVal
+= OString( "8" );
4594 aStrBuf
.append( input
, radix
);
4596 CPPUNIT_ASSERT_MESSAGE
4598 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4599 aStrBuf
.getStr()== expVal
&&
4600 aStrBuf
.getLength() == expVal
.getLength()
4607 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4608 OString
expVal( aStrBuf
.getStr() );
4609 sal_Int32 input
= 15;
4610 sal_Int16 radix
= 10;
4612 expVal
+= OString( "15" );
4613 aStrBuf
.append( input
, radix
);
4615 CPPUNIT_ASSERT_MESSAGE
4617 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4618 aStrBuf
.getStr()== expVal
&&
4619 aStrBuf
.getLength() == expVal
.getLength()
4626 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4627 OString
expVal( aStrBuf
.getStr() );
4628 sal_Int32 input
= 0;
4629 sal_Int16 radix
= 16;
4631 expVal
+= OString( "0" );
4632 aStrBuf
.append( input
, radix
);
4634 CPPUNIT_ASSERT_MESSAGE
4636 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4637 aStrBuf
.getStr()== expVal
&&
4638 aStrBuf
.getLength() == expVal
.getLength()
4645 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4646 OString
expVal( aStrBuf
.getStr() );
4647 sal_Int32 input
= 4;
4648 sal_Int16 radix
= 16;
4650 expVal
+= OString( "4" );
4651 aStrBuf
.append( input
, radix
);
4653 CPPUNIT_ASSERT_MESSAGE
4655 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4656 aStrBuf
.getStr()== expVal
&&
4657 aStrBuf
.getLength() == expVal
.getLength()
4664 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4665 OString
expVal( aStrBuf
.getStr() );
4666 sal_Int32 input
= 8;
4667 sal_Int16 radix
= 16;
4669 expVal
+= OString( "8" );
4670 aStrBuf
.append( input
, radix
);
4672 CPPUNIT_ASSERT_MESSAGE
4674 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4675 aStrBuf
.getStr()== expVal
&&
4676 aStrBuf
.getLength() == expVal
.getLength()
4683 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4684 OString
expVal( aStrBuf
.getStr() );
4685 sal_Int32 input
= 15;
4686 sal_Int16 radix
= 16;
4688 expVal
+= OString( "f" );
4689 aStrBuf
.append( input
, radix
);
4691 CPPUNIT_ASSERT_MESSAGE
4693 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4694 aStrBuf
.getStr()== expVal
&&
4695 aStrBuf
.getLength() == expVal
.getLength()
4702 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4703 OString
expVal( aStrBuf
.getStr() );
4704 sal_Int32 input
= 0;
4705 sal_Int16 radix
= 36;
4707 expVal
+= OString( "0" );
4708 aStrBuf
.append( input
, radix
);
4710 CPPUNIT_ASSERT_MESSAGE
4712 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4713 aStrBuf
.getStr()== expVal
&&
4714 aStrBuf
.getLength() == expVal
.getLength()
4721 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4722 OString
expVal( aStrBuf
.getStr() );
4723 sal_Int32 input
= 4;
4724 sal_Int16 radix
= 36;
4726 expVal
+= OString( "4" );
4727 aStrBuf
.append( input
, radix
);
4729 CPPUNIT_ASSERT_MESSAGE
4731 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4732 aStrBuf
.getStr()== expVal
&&
4733 aStrBuf
.getLength() == expVal
.getLength()
4740 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4741 OString
expVal( aStrBuf
.getStr() );
4742 sal_Int32 input
= 8;
4743 sal_Int16 radix
= 36;
4745 expVal
+= OString( "8" );
4746 aStrBuf
.append( input
, radix
);
4748 CPPUNIT_ASSERT_MESSAGE
4750 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4751 aStrBuf
.getStr()== expVal
&&
4752 aStrBuf
.getLength() == expVal
.getLength()
4759 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
4760 OString
expVal( aStrBuf
.getStr() );
4761 sal_Int32 input
= 35;
4762 sal_Int16 radix
= 36;
4764 expVal
+= OString( "z" );
4765 aStrBuf
.append( input
, radix
);
4767 CPPUNIT_ASSERT_MESSAGE
4769 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4770 aStrBuf
.getStr()== expVal
&&
4771 aStrBuf
.getLength() == expVal
.getLength()
4778 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4779 OString
expVal( aStrBuf
.getStr() );
4780 sal_Int32 input
= 0;
4781 sal_Int16 radix
= 2;
4783 expVal
+= OString( "0" );
4784 aStrBuf
.append( input
, radix
);
4786 CPPUNIT_ASSERT_MESSAGE
4788 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4789 aStrBuf
.getStr()== expVal
&&
4790 aStrBuf
.getLength() == expVal
.getLength()
4797 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4798 OString
expVal( aStrBuf
.getStr() );
4799 sal_Int32 input
= 4;
4800 sal_Int16 radix
= 2;
4802 expVal
+= OString( "100" );
4803 aStrBuf
.append( input
, radix
);
4805 CPPUNIT_ASSERT_MESSAGE
4807 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4808 aStrBuf
.getStr()== expVal
&&
4809 aStrBuf
.getLength() == expVal
.getLength()
4816 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4817 OString
expVal( aStrBuf
.getStr() );
4818 sal_Int32 input
= 8;
4819 sal_Int16 radix
= 2;
4821 expVal
+= OString( "1000" );
4822 aStrBuf
.append( input
, radix
);
4824 CPPUNIT_ASSERT_MESSAGE
4826 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4827 aStrBuf
.getStr()== expVal
&&
4828 aStrBuf
.getLength() == expVal
.getLength()
4835 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4836 OString
expVal( aStrBuf
.getStr() );
4837 sal_Int32 input
= 15;
4838 sal_Int16 radix
= 2;
4840 expVal
+= OString( "1111" );
4841 aStrBuf
.append( input
, radix
);
4843 CPPUNIT_ASSERT_MESSAGE
4845 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4846 aStrBuf
.getStr()== expVal
&&
4847 aStrBuf
.getLength() == expVal
.getLength()
4854 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4855 OString
expVal( aStrBuf
.getStr() );
4856 sal_Int32 input
= 0;
4857 sal_Int16 radix
= 8;
4859 expVal
+= OString( "0" );
4860 aStrBuf
.append( input
, radix
);
4862 CPPUNIT_ASSERT_MESSAGE
4864 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4865 aStrBuf
.getStr()== expVal
&&
4866 aStrBuf
.getLength() == expVal
.getLength()
4873 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4874 OString
expVal( aStrBuf
.getStr() );
4875 sal_Int32 input
= 4;
4876 sal_Int16 radix
= 8;
4878 expVal
+= OString( "4" );
4879 aStrBuf
.append( input
, radix
);
4881 CPPUNIT_ASSERT_MESSAGE
4883 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4884 aStrBuf
.getStr()== expVal
&&
4885 aStrBuf
.getLength() == expVal
.getLength()
4892 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4893 OString
expVal( aStrBuf
.getStr() );
4894 sal_Int32 input
= 8;
4895 sal_Int16 radix
= 8;
4897 expVal
+= OString( "10" );
4898 aStrBuf
.append( input
, radix
);
4900 CPPUNIT_ASSERT_MESSAGE
4902 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4903 aStrBuf
.getStr()== expVal
&&
4904 aStrBuf
.getLength() == expVal
.getLength()
4911 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4912 OString
expVal( aStrBuf
.getStr() );
4913 sal_Int32 input
= 15;
4914 sal_Int16 radix
= 8;
4916 expVal
+= OString( "17" );
4917 aStrBuf
.append( input
, radix
);
4919 CPPUNIT_ASSERT_MESSAGE
4921 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4922 aStrBuf
.getStr()== expVal
&&
4923 aStrBuf
.getLength() == expVal
.getLength()
4930 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4931 OString
expVal( aStrBuf
.getStr() );
4932 sal_Int32 input
= 0;
4933 sal_Int16 radix
= 10;
4935 expVal
+= OString( "0" );
4936 aStrBuf
.append( input
, radix
);
4938 CPPUNIT_ASSERT_MESSAGE
4940 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4941 aStrBuf
.getStr()== expVal
&&
4942 aStrBuf
.getLength() == expVal
.getLength()
4949 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4950 OString
expVal( aStrBuf
.getStr() );
4951 sal_Int32 input
= 4;
4952 sal_Int16 radix
= 10;
4954 expVal
+= OString( "4" );
4955 aStrBuf
.append( input
, radix
);
4957 CPPUNIT_ASSERT_MESSAGE
4959 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4960 aStrBuf
.getStr()== expVal
&&
4961 aStrBuf
.getLength() == expVal
.getLength()
4968 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4969 OString
expVal( aStrBuf
.getStr() );
4970 sal_Int32 input
= 8;
4971 sal_Int16 radix
= 10;
4973 expVal
+= OString( "8" );
4974 aStrBuf
.append( input
, radix
);
4976 CPPUNIT_ASSERT_MESSAGE
4978 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4979 aStrBuf
.getStr()== expVal
&&
4980 aStrBuf
.getLength() == expVal
.getLength()
4987 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
4988 OString
expVal( aStrBuf
.getStr() );
4989 sal_Int32 input
= 15;
4990 sal_Int16 radix
= 10;
4992 expVal
+= OString( "15" );
4993 aStrBuf
.append( input
, radix
);
4995 CPPUNIT_ASSERT_MESSAGE
4997 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4998 aStrBuf
.getStr()== expVal
&&
4999 aStrBuf
.getLength() == expVal
.getLength()
5006 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5007 OString
expVal( aStrBuf
.getStr() );
5008 sal_Int32 input
= 0;
5009 sal_Int16 radix
= 16;
5011 expVal
+= OString( "0" );
5012 aStrBuf
.append( input
, radix
);
5014 CPPUNIT_ASSERT_MESSAGE
5016 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5017 aStrBuf
.getStr()== expVal
&&
5018 aStrBuf
.getLength() == expVal
.getLength()
5025 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5026 OString
expVal( aStrBuf
.getStr() );
5027 sal_Int32 input
= 4;
5028 sal_Int16 radix
= 16;
5030 expVal
+= OString( "4" );
5031 aStrBuf
.append( input
, radix
);
5033 CPPUNIT_ASSERT_MESSAGE
5035 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5036 aStrBuf
.getStr()== expVal
&&
5037 aStrBuf
.getLength() == expVal
.getLength()
5044 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5045 OString
expVal( aStrBuf
.getStr() );
5046 sal_Int32 input
= 8;
5047 sal_Int16 radix
= 16;
5049 expVal
+= OString( "8" );
5050 aStrBuf
.append( input
, radix
);
5052 CPPUNIT_ASSERT_MESSAGE
5054 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5055 aStrBuf
.getStr()== expVal
&&
5056 aStrBuf
.getLength() == expVal
.getLength()
5063 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5064 OString
expVal( aStrBuf
.getStr() );
5065 sal_Int32 input
= 15;
5066 sal_Int16 radix
= 16;
5068 expVal
+= OString( "f" );
5069 aStrBuf
.append( input
, radix
);
5071 CPPUNIT_ASSERT_MESSAGE
5073 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
5074 aStrBuf
.getStr()== expVal
&&
5075 aStrBuf
.getLength() == expVal
.getLength()
5082 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5083 OString
expVal( aStrBuf
.getStr() );
5084 sal_Int32 input
= 0;
5085 sal_Int16 radix
= 36;
5087 expVal
+= OString( "0" );
5088 aStrBuf
.append( input
, radix
);
5090 CPPUNIT_ASSERT_MESSAGE
5092 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5093 aStrBuf
.getStr()== expVal
&&
5094 aStrBuf
.getLength() == expVal
.getLength()
5101 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5102 OString
expVal( aStrBuf
.getStr() );
5103 sal_Int32 input
= 4;
5104 sal_Int16 radix
= 36;
5106 expVal
+= OString( "4" );
5107 aStrBuf
.append( input
, radix
);
5109 CPPUNIT_ASSERT_MESSAGE
5111 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5112 aStrBuf
.getStr()== expVal
&&
5113 aStrBuf
.getLength() == expVal
.getLength()
5120 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5121 OString
expVal( aStrBuf
.getStr() );
5122 sal_Int32 input
= 8;
5123 sal_Int16 radix
= 36;
5125 expVal
+= OString( "8" );
5126 aStrBuf
.append( input
, radix
);
5128 CPPUNIT_ASSERT_MESSAGE
5130 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5131 aStrBuf
.getStr()== expVal
&&
5132 aStrBuf
.getLength() == expVal
.getLength()
5139 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
5140 OString
expVal( aStrBuf
.getStr() );
5141 sal_Int32 input
= 35;
5142 sal_Int16 radix
= 36;
5144 expVal
+= OString( "z" );
5145 aStrBuf
.append( input
, radix
);
5147 CPPUNIT_ASSERT_MESSAGE
5149 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
5150 aStrBuf
.getStr()== expVal
&&
5151 aStrBuf
.getLength() == expVal
.getLength()
5156 CPPUNIT_TEST_SUITE( append_006_Int32
);
5157 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
5158 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
5159 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
5160 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
5161 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
5162 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
5163 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
5164 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
5165 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
5166 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
5167 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
5168 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
5169 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
5170 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
5171 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
5172 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
5173 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
5174 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
5175 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
5176 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
5177 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
5178 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
5179 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
5180 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
5181 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
5182 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
5183 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
5184 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
5185 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
5186 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
5187 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
5188 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
5189 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
5190 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
5191 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
5192 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
5193 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
5194 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
5195 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
5196 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
5197 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
5198 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
5199 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
5200 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
5201 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
5202 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
5203 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
5204 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
5205 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
5206 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
5207 CPPUNIT_TEST_SUITE_END();
5210 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
5211 // where i = large constants
5212 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
5213 // where i = large constants
5214 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
5215 // where i = large constants
5216 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
5217 // where i = large constants
5218 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
5219 // where i = large constants
5221 class append_006_Int32_Bounderies
: public CppUnit::TestFixture
5226 void setUp() override
5228 arrOUS
[0] = new OString( kTestStr7
);
5229 arrOUS
[1] = new OString( );
5230 arrOUS
[2] = new OString( kTestStr25
);
5231 arrOUS
[3] = new OString( "" );
5232 arrOUS
[4] = new OString( kTestStr28
);
5236 void tearDown() override
5238 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
5239 delete arrOUS
[3]; delete arrOUS
[4];
5244 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5245 OString
expVal( aStrBuf
.getStr() );
5246 sal_Int32 input
= kSInt8Max
;
5247 sal_Int16 radix
= 2;
5249 expVal
+= OString( "1111111" );
5250 aStrBuf
.append( input
, radix
);
5252 CPPUNIT_ASSERT_MESSAGE
5254 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5255 aStrBuf
.getStr()== expVal
&&
5256 aStrBuf
.getLength() == expVal
.getLength()
5263 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5264 OString
expVal( aStrBuf
.getStr() );
5265 sal_Int32 input
= kSInt32Max
;
5266 sal_Int16 radix
= 2;
5268 expVal
+= OString( "1111111111111111111111111111111" );
5269 aStrBuf
.append( input
, radix
);
5271 CPPUNIT_ASSERT_MESSAGE
5273 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5274 aStrBuf
.getStr()== expVal
&&
5275 aStrBuf
.getLength() == expVal
.getLength()
5282 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5283 OString
expVal( aStrBuf
.getStr() );
5284 sal_Int32 input
= kSInt8Max
;
5285 sal_Int16 radix
= 8;
5287 expVal
+= OString( "177" );
5288 aStrBuf
.append( input
, radix
);
5290 CPPUNIT_ASSERT_MESSAGE
5292 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5293 aStrBuf
.getStr()== expVal
&&
5294 aStrBuf
.getLength() == expVal
.getLength()
5301 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5302 OString
expVal( aStrBuf
.getStr() );
5303 sal_Int32 input
= kSInt32Max
;
5304 sal_Int16 radix
= 8;
5306 expVal
+= OString( "17777777777" );
5307 aStrBuf
.append( input
, radix
);
5309 CPPUNIT_ASSERT_MESSAGE
5311 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5312 aStrBuf
.getStr()== expVal
&&
5313 aStrBuf
.getLength() == expVal
.getLength()
5320 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5321 OString
expVal( aStrBuf
.getStr() );
5322 sal_Int32 input
= kSInt8Max
;
5323 sal_Int16 radix
= 10;
5325 expVal
+= OString( "127" );
5326 aStrBuf
.append( input
, radix
);
5328 CPPUNIT_ASSERT_MESSAGE
5330 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5331 aStrBuf
.getStr()== expVal
&&
5332 aStrBuf
.getLength() == expVal
.getLength()
5339 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5340 OString
expVal( aStrBuf
.getStr() );
5341 sal_Int32 input
= kSInt32Max
;
5342 sal_Int16 radix
= 10;
5344 expVal
+= OString( "2147483647" );
5345 aStrBuf
.append( input
, radix
);
5347 CPPUNIT_ASSERT_MESSAGE
5349 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5350 aStrBuf
.getStr()== expVal
&&
5351 aStrBuf
.getLength() == expVal
.getLength()
5358 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5359 OString
expVal( aStrBuf
.getStr() );
5360 sal_Int32 input
= kSInt8Max
;
5361 sal_Int16 radix
= 16;
5363 expVal
+= OString( "7f" );
5364 aStrBuf
.append( input
, radix
);
5366 CPPUNIT_ASSERT_MESSAGE
5368 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5369 aStrBuf
.getStr()== expVal
&&
5370 aStrBuf
.getLength() == expVal
.getLength()
5377 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5378 OString
expVal( aStrBuf
.getStr() );
5379 sal_Int32 input
= kSInt32Max
;
5380 sal_Int16 radix
= 16;
5382 expVal
+= OString( "7fffffff" );
5383 aStrBuf
.append( input
, radix
);
5385 CPPUNIT_ASSERT_MESSAGE
5387 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5388 aStrBuf
.getStr()== expVal
&&
5389 aStrBuf
.getLength() == expVal
.getLength()
5396 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5397 OString
expVal( aStrBuf
.getStr() );
5398 sal_Int32 input
= kSInt8Max
;
5399 sal_Int16 radix
= 36;
5401 expVal
+= OString( "3j" );
5402 aStrBuf
.append( input
, radix
);
5404 CPPUNIT_ASSERT_MESSAGE
5406 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5407 aStrBuf
.getStr()== expVal
&&
5408 aStrBuf
.getLength() == expVal
.getLength()
5415 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
5416 OString
expVal( aStrBuf
.getStr() );
5417 sal_Int32 input
= kSInt32Max
;
5418 sal_Int16 radix
= 36;
5420 expVal
+= OString( "zik0zj" );
5421 aStrBuf
.append( input
, radix
);
5423 CPPUNIT_ASSERT_MESSAGE
5425 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5426 aStrBuf
.getStr()== expVal
&&
5427 aStrBuf
.getLength() == expVal
.getLength()
5434 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5435 OString
expVal( aStrBuf
.getStr() );
5436 sal_Int32 input
= kSInt8Max
;
5437 sal_Int16 radix
= 2;
5439 expVal
+= OString( "1111111" );
5440 aStrBuf
.append( input
, radix
);
5442 CPPUNIT_ASSERT_MESSAGE
5444 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
5445 aStrBuf
.getStr()== expVal
&&
5446 aStrBuf
.getLength() == expVal
.getLength()
5453 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5454 OString
expVal( aStrBuf
.getStr() );
5455 sal_Int32 input
= kSInt32Max
;
5456 sal_Int16 radix
= 2;
5458 expVal
+= OString( "1111111111111111111111111111111" );
5459 aStrBuf
.append( input
, radix
);
5461 CPPUNIT_ASSERT_MESSAGE
5463 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
5464 aStrBuf
.getStr()== expVal
&&
5465 aStrBuf
.getLength() == expVal
.getLength()
5472 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5473 OString
expVal( aStrBuf
.getStr() );
5474 sal_Int32 input
= kSInt8Max
;
5475 sal_Int16 radix
= 8;
5477 expVal
+= OString( "177" );
5478 aStrBuf
.append( input
, radix
);
5480 CPPUNIT_ASSERT_MESSAGE
5482 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
5483 aStrBuf
.getStr()== expVal
&&
5484 aStrBuf
.getLength() == expVal
.getLength()
5491 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5492 OString
expVal( aStrBuf
.getStr() );
5493 sal_Int32 input
= kSInt32Max
;
5494 sal_Int16 radix
= 8;
5496 expVal
+= OString( "17777777777" );
5497 aStrBuf
.append( input
, radix
);
5499 CPPUNIT_ASSERT_MESSAGE
5501 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
5502 aStrBuf
.getStr()== expVal
&&
5503 aStrBuf
.getLength() == expVal
.getLength()
5510 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5511 OString
expVal( aStrBuf
.getStr() );
5512 sal_Int32 input
= kSInt8Max
;
5513 sal_Int16 radix
= 10;
5515 expVal
+= OString( "127" );
5516 aStrBuf
.append( input
, radix
);
5518 CPPUNIT_ASSERT_MESSAGE
5520 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
5521 aStrBuf
.getStr()== expVal
&&
5522 aStrBuf
.getLength() == expVal
.getLength()
5529 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5530 OString
expVal( aStrBuf
.getStr() );
5531 sal_Int32 input
= kSInt32Max
;
5532 sal_Int16 radix
= 10;
5534 expVal
+= OString( "2147483647" );
5535 aStrBuf
.append( input
, radix
);
5537 CPPUNIT_ASSERT_MESSAGE
5539 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
5540 aStrBuf
.getStr()== expVal
&&
5541 aStrBuf
.getLength() == expVal
.getLength()
5548 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5549 OString
expVal( aStrBuf
.getStr() );
5550 sal_Int32 input
= kSInt8Max
;
5551 sal_Int16 radix
= 16;
5553 expVal
+= OString( "7f" );
5554 aStrBuf
.append( input
, radix
);
5556 CPPUNIT_ASSERT_MESSAGE
5558 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
5559 aStrBuf
.getStr()== expVal
&&
5560 aStrBuf
.getLength() == expVal
.getLength()
5567 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5568 OString
expVal( aStrBuf
.getStr() );
5569 sal_Int32 input
= kSInt32Max
;
5570 sal_Int16 radix
= 16;
5572 expVal
+= OString( "7fffffff" );
5573 aStrBuf
.append( input
, radix
);
5575 CPPUNIT_ASSERT_MESSAGE
5577 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
5578 aStrBuf
.getStr()== expVal
&&
5579 aStrBuf
.getLength() == expVal
.getLength()
5586 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5587 OString
expVal( aStrBuf
.getStr() );
5588 sal_Int32 input
= kSInt8Max
;
5589 sal_Int16 radix
= 36;
5591 expVal
+= OString( "3j" );
5592 aStrBuf
.append( input
, radix
);
5594 CPPUNIT_ASSERT_MESSAGE
5596 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
5597 aStrBuf
.getStr()== expVal
&&
5598 aStrBuf
.getLength() == expVal
.getLength()
5605 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
5606 OString
expVal( aStrBuf
.getStr() );
5607 sal_Int32 input
= kSInt32Max
;
5608 sal_Int16 radix
= 36;
5610 expVal
+= OString( "zik0zj" );
5611 aStrBuf
.append( input
, radix
);
5613 CPPUNIT_ASSERT_MESSAGE
5615 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
5616 aStrBuf
.getStr()== expVal
&&
5617 aStrBuf
.getLength() == expVal
.getLength()
5624 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5625 OString
expVal( aStrBuf
.getStr() );
5626 sal_Int32 input
= kSInt8Max
;
5627 sal_Int16 radix
= 2;
5629 expVal
+= OString( "1111111" );
5630 aStrBuf
.append( input
, radix
);
5632 CPPUNIT_ASSERT_MESSAGE
5634 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
5635 aStrBuf
.getStr()== expVal
&&
5636 aStrBuf
.getLength() == expVal
.getLength()
5643 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5644 OString
expVal( aStrBuf
.getStr() );
5645 sal_Int32 input
= kSInt32Max
;
5646 sal_Int16 radix
= 2;
5648 expVal
+= OString( "1111111111111111111111111111111" );
5649 aStrBuf
.append( input
, radix
);
5651 CPPUNIT_ASSERT_MESSAGE
5653 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
5654 aStrBuf
.getStr()== expVal
&&
5655 aStrBuf
.getLength() == expVal
.getLength()
5662 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5663 OString
expVal( aStrBuf
.getStr() );
5664 sal_Int32 input
= kSInt8Max
;
5665 sal_Int16 radix
= 8;
5667 expVal
+= OString( "177" );
5668 aStrBuf
.append( input
, radix
);
5670 CPPUNIT_ASSERT_MESSAGE
5672 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
5673 aStrBuf
.getStr()== expVal
&&
5674 aStrBuf
.getLength() == expVal
.getLength()
5681 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5682 OString
expVal( aStrBuf
.getStr() );
5683 sal_Int32 input
= kSInt32Max
;
5684 sal_Int16 radix
= 8;
5686 expVal
+= OString( "17777777777" );
5687 aStrBuf
.append( input
, radix
);
5689 CPPUNIT_ASSERT_MESSAGE
5691 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
5692 aStrBuf
.getStr()== expVal
&&
5693 aStrBuf
.getLength() == expVal
.getLength()
5700 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5701 OString
expVal( aStrBuf
.getStr() );
5702 sal_Int32 input
= kSInt8Max
;
5703 sal_Int16 radix
= 10;
5705 expVal
+= OString( "127" );
5706 aStrBuf
.append( input
, radix
);
5708 CPPUNIT_ASSERT_MESSAGE
5710 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
5711 aStrBuf
.getStr()== expVal
&&
5712 aStrBuf
.getLength() == expVal
.getLength()
5719 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5720 OString
expVal( aStrBuf
.getStr() );
5721 sal_Int32 input
= kSInt32Max
;
5722 sal_Int16 radix
= 10;
5724 expVal
+= OString( "2147483647" );
5725 aStrBuf
.append( input
, radix
);
5727 CPPUNIT_ASSERT_MESSAGE
5729 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
5730 aStrBuf
.getStr()== expVal
&&
5731 aStrBuf
.getLength() == expVal
.getLength()
5738 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5739 OString
expVal( aStrBuf
.getStr() );
5740 sal_Int32 input
= kSInt8Max
;
5741 sal_Int16 radix
= 16;
5743 expVal
+= OString( "7f" );
5744 aStrBuf
.append( input
, radix
);
5746 CPPUNIT_ASSERT_MESSAGE
5748 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
5749 aStrBuf
.getStr()== expVal
&&
5750 aStrBuf
.getLength() == expVal
.getLength()
5757 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5758 OString
expVal( aStrBuf
.getStr() );
5759 sal_Int32 input
= kSInt32Max
;
5760 sal_Int16 radix
= 16;
5762 expVal
+= OString( "7fffffff" );
5763 aStrBuf
.append( input
, radix
);
5765 CPPUNIT_ASSERT_MESSAGE
5767 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
5768 aStrBuf
.getStr()== expVal
&&
5769 aStrBuf
.getLength() == expVal
.getLength()
5776 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5777 OString
expVal( aStrBuf
.getStr() );
5778 sal_Int32 input
= kSInt8Max
;
5779 sal_Int16 radix
= 36;
5781 expVal
+= OString( "3j" );
5782 aStrBuf
.append( input
, radix
);
5784 CPPUNIT_ASSERT_MESSAGE
5786 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
5787 aStrBuf
.getStr()== expVal
&&
5788 aStrBuf
.getLength() == expVal
.getLength()
5795 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
5796 OString
expVal( aStrBuf
.getStr() );
5797 sal_Int32 input
= kSInt32Max
;
5798 sal_Int16 radix
= 36;
5800 expVal
+= OString( "zik0zj" );
5801 aStrBuf
.append( input
, radix
);
5803 CPPUNIT_ASSERT_MESSAGE
5805 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
5806 aStrBuf
.getStr()== expVal
&&
5807 aStrBuf
.getLength() == expVal
.getLength()
5814 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5815 OString
expVal( aStrBuf
.getStr() );
5816 sal_Int32 input
= kSInt8Max
;
5817 sal_Int16 radix
= 2;
5819 expVal
+= OString( "1111111" );
5820 aStrBuf
.append( input
, radix
);
5822 CPPUNIT_ASSERT_MESSAGE
5824 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
5825 aStrBuf
.getStr()== expVal
&&
5826 aStrBuf
.getLength() == expVal
.getLength()
5833 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5834 OString
expVal( aStrBuf
.getStr() );
5835 sal_Int32 input
= kSInt32Max
;
5836 sal_Int16 radix
= 2;
5838 expVal
+= OString( "1111111111111111111111111111111" );
5839 aStrBuf
.append( input
, radix
);
5841 CPPUNIT_ASSERT_MESSAGE
5843 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
5844 aStrBuf
.getStr()== expVal
&&
5845 aStrBuf
.getLength() == expVal
.getLength()
5852 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5853 OString
expVal( aStrBuf
.getStr() );
5854 sal_Int32 input
= kSInt8Max
;
5855 sal_Int16 radix
= 8;
5857 expVal
+= OString( "177" );
5858 aStrBuf
.append( input
, radix
);
5860 CPPUNIT_ASSERT_MESSAGE
5862 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
5863 aStrBuf
.getStr()== expVal
&&
5864 aStrBuf
.getLength() == expVal
.getLength()
5871 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5872 OString
expVal( aStrBuf
.getStr() );
5873 sal_Int32 input
= kSInt32Max
;
5874 sal_Int16 radix
= 8;
5876 expVal
+= OString( "17777777777" );
5877 aStrBuf
.append( input
, radix
);
5879 CPPUNIT_ASSERT_MESSAGE
5881 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
5882 aStrBuf
.getStr()== expVal
&&
5883 aStrBuf
.getLength() == expVal
.getLength()
5890 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5891 OString
expVal( aStrBuf
.getStr() );
5892 sal_Int32 input
= kSInt8Max
;
5893 sal_Int16 radix
= 10;
5895 expVal
+= OString( "127" );
5896 aStrBuf
.append( input
, radix
);
5898 CPPUNIT_ASSERT_MESSAGE
5900 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
5901 aStrBuf
.getStr()== expVal
&&
5902 aStrBuf
.getLength() == expVal
.getLength()
5909 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5910 OString
expVal( aStrBuf
.getStr() );
5911 sal_Int32 input
= kSInt32Max
;
5912 sal_Int16 radix
= 10;
5914 expVal
+= OString( "2147483647" );
5915 aStrBuf
.append( input
, radix
);
5917 CPPUNIT_ASSERT_MESSAGE
5919 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
5920 aStrBuf
.getStr()== expVal
&&
5921 aStrBuf
.getLength() == expVal
.getLength()
5928 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5929 OString
expVal( aStrBuf
.getStr() );
5930 sal_Int32 input
= kSInt8Max
;
5931 sal_Int16 radix
= 16;
5933 expVal
+= OString( "7f" );
5934 aStrBuf
.append( input
, radix
);
5936 CPPUNIT_ASSERT_MESSAGE
5938 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
5939 aStrBuf
.getStr()== expVal
&&
5940 aStrBuf
.getLength() == expVal
.getLength()
5947 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5948 OString
expVal( aStrBuf
.getStr() );
5949 sal_Int32 input
= kSInt32Max
;
5950 sal_Int16 radix
= 16;
5952 expVal
+= OString( "7fffffff" );
5953 aStrBuf
.append( input
, radix
);
5955 CPPUNIT_ASSERT_MESSAGE
5957 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
5958 aStrBuf
.getStr()== expVal
&&
5959 aStrBuf
.getLength() == expVal
.getLength()
5966 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5967 OString
expVal( aStrBuf
.getStr() );
5968 sal_Int32 input
= kSInt8Max
;
5969 sal_Int16 radix
= 36;
5971 expVal
+= OString( "3j" );
5972 aStrBuf
.append( input
, radix
);
5974 CPPUNIT_ASSERT_MESSAGE
5976 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
5977 aStrBuf
.getStr()== expVal
&&
5978 aStrBuf
.getLength() == expVal
.getLength()
5985 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
5986 OString
expVal( aStrBuf
.getStr() );
5987 sal_Int32 input
= kSInt32Max
;
5988 sal_Int16 radix
= 36;
5990 expVal
+= OString( "zik0zj" );
5991 aStrBuf
.append( input
, radix
);
5993 CPPUNIT_ASSERT_MESSAGE
5995 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
5996 aStrBuf
.getStr()== expVal
&&
5997 aStrBuf
.getLength() == expVal
.getLength()
6004 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6005 OString
expVal( aStrBuf
.getStr() );
6006 sal_Int32 input
= kSInt8Max
;
6007 sal_Int16 radix
= 2;
6009 expVal
+= OString( "1111111" );
6010 aStrBuf
.append( input
, radix
);
6012 CPPUNIT_ASSERT_MESSAGE
6014 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
6015 aStrBuf
.getStr()== expVal
&&
6016 aStrBuf
.getLength() == expVal
.getLength()
6023 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6024 OString
expVal( aStrBuf
.getStr() );
6025 sal_Int32 input
= kSInt32Max
;
6026 sal_Int16 radix
= 2;
6028 expVal
+= OString( "1111111111111111111111111111111" );
6029 aStrBuf
.append( input
, radix
);
6031 CPPUNIT_ASSERT_MESSAGE
6033 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
6034 aStrBuf
.getStr()== expVal
&&
6035 aStrBuf
.getLength() == expVal
.getLength()
6042 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6043 OString
expVal( aStrBuf
.getStr() );
6044 sal_Int32 input
= kSInt8Max
;
6045 sal_Int16 radix
= 8;
6047 expVal
+= OString( "177" );
6048 aStrBuf
.append( input
, radix
);
6050 CPPUNIT_ASSERT_MESSAGE
6052 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
6053 aStrBuf
.getStr()== expVal
&&
6054 aStrBuf
.getLength() == expVal
.getLength()
6061 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6062 OString
expVal( aStrBuf
.getStr() );
6063 sal_Int32 input
= kSInt32Max
;
6064 sal_Int16 radix
= 8;
6066 expVal
+= OString( "17777777777" );
6067 aStrBuf
.append( input
, radix
);
6069 CPPUNIT_ASSERT_MESSAGE
6071 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
6072 aStrBuf
.getStr()== expVal
&&
6073 aStrBuf
.getLength() == expVal
.getLength()
6080 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6081 OString
expVal( aStrBuf
.getStr() );
6082 sal_Int32 input
= kSInt8Max
;
6083 sal_Int16 radix
= 10;
6085 expVal
+= OString( "127" );
6086 aStrBuf
.append( input
, radix
);
6088 CPPUNIT_ASSERT_MESSAGE
6090 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
6091 aStrBuf
.getStr()== expVal
&&
6092 aStrBuf
.getLength() == expVal
.getLength()
6099 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6100 OString
expVal( aStrBuf
.getStr() );
6101 sal_Int32 input
= kSInt32Max
;
6102 sal_Int16 radix
= 10;
6104 expVal
+= OString( "2147483647" );
6105 aStrBuf
.append( input
, radix
);
6107 CPPUNIT_ASSERT_MESSAGE
6109 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
6110 aStrBuf
.getStr()== expVal
&&
6111 aStrBuf
.getLength() == expVal
.getLength()
6118 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6119 OString
expVal( aStrBuf
.getStr() );
6120 sal_Int32 input
= kSInt8Max
;
6121 sal_Int16 radix
= 16;
6123 expVal
+= OString( "7f" );
6124 aStrBuf
.append( input
, radix
);
6126 CPPUNIT_ASSERT_MESSAGE
6128 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
6129 aStrBuf
.getStr()== expVal
&&
6130 aStrBuf
.getLength() == expVal
.getLength()
6137 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6138 OString
expVal( aStrBuf
.getStr() );
6139 sal_Int32 input
= kSInt32Max
;
6140 sal_Int16 radix
= 16;
6142 expVal
+= OString( "7fffffff" );
6143 aStrBuf
.append( input
, radix
);
6145 CPPUNIT_ASSERT_MESSAGE
6147 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
6148 aStrBuf
.getStr()== expVal
&&
6149 aStrBuf
.getLength() == expVal
.getLength()
6156 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6157 OString
expVal( aStrBuf
.getStr() );
6158 sal_Int32 input
= kSInt8Max
;
6159 sal_Int16 radix
= 36;
6161 expVal
+= OString( "3j" );
6162 aStrBuf
.append( input
, radix
);
6164 CPPUNIT_ASSERT_MESSAGE
6166 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
6167 aStrBuf
.getStr()== expVal
&&
6168 aStrBuf
.getLength() == expVal
.getLength()
6175 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
6176 OString
expVal( aStrBuf
.getStr() );
6177 sal_Int32 input
= kSInt32Max
;
6178 sal_Int16 radix
= 36;
6180 expVal
+= OString( "zik0zj" );
6181 aStrBuf
.append( input
, radix
);
6183 CPPUNIT_ASSERT_MESSAGE
6185 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
6186 aStrBuf
.getStr()== expVal
&&
6187 aStrBuf
.getLength() == expVal
.getLength()
6192 CPPUNIT_TEST_SUITE( append_006_Int32_Bounderies
);
6193 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
6194 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
6195 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
6196 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
6197 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
6198 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
6199 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
6200 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
6201 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
6202 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
6203 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
6204 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
6205 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
6206 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
6207 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
6208 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
6209 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
6210 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
6211 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
6212 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
6213 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
6214 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
6215 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
6216 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
6217 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
6218 CPPUNIT_TEST_SUITE_END();
6221 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
6222 // for negative value
6223 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
6224 // for negative value
6225 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
6226 // for negative value
6227 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
6228 // for negative value
6229 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
6230 // for negative value
6232 class append_006_Int32_Negative
: public CppUnit::TestFixture
6237 void setUp() override
6239 arrOUS
[0] = new OString( kTestStr7
);
6240 arrOUS
[1] = new OString( );
6241 arrOUS
[2] = new OString( kTestStr25
);
6242 arrOUS
[3] = new OString( "" );
6243 arrOUS
[4] = new OString( kTestStr28
);
6247 void tearDown() override
6249 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
6250 delete arrOUS
[3]; delete arrOUS
[4];
6255 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6256 OString
expVal( aStrBuf
.getStr() );
6257 sal_Int32 input
= -0;
6258 sal_Int16 radix
= 2;
6260 expVal
+= OString( "0" );
6261 aStrBuf
.append( input
, radix
);
6263 CPPUNIT_ASSERT_MESSAGE
6265 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6266 aStrBuf
.getStr()== expVal
&&
6267 aStrBuf
.getLength() == expVal
.getLength()
6274 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6275 OString
expVal( aStrBuf
.getStr() );
6276 sal_Int32 input
= -4;
6277 sal_Int16 radix
= 2;
6279 expVal
+= OString( "-" );
6280 expVal
+= OString( "100" );
6281 aStrBuf
.append( input
, radix
);
6283 CPPUNIT_ASSERT_MESSAGE
6285 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6286 aStrBuf
.getStr()== expVal
&&
6287 aStrBuf
.getLength() == expVal
.getLength()
6294 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6295 OString
expVal( aStrBuf
.getStr() );
6296 sal_Int32 input
= -8;
6297 sal_Int16 radix
= 2;
6299 expVal
+= OString( "-" );
6300 expVal
+= OString( "1000" );
6301 aStrBuf
.append( input
, radix
);
6303 CPPUNIT_ASSERT_MESSAGE
6305 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6306 aStrBuf
.getStr()== expVal
&&
6307 aStrBuf
.getLength() == expVal
.getLength()
6314 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6315 OString
expVal( aStrBuf
.getStr() );
6316 sal_Int32 input
= -15;
6317 sal_Int16 radix
= 2;
6319 expVal
+= OString( "-" );
6320 expVal
+= OString( "1111" );
6321 aStrBuf
.append( input
, radix
);
6323 CPPUNIT_ASSERT_MESSAGE
6325 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6326 aStrBuf
.getStr()== expVal
&&
6327 aStrBuf
.getLength() == expVal
.getLength()
6334 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6335 OString
expVal( aStrBuf
.getStr() );
6336 sal_Int32 input
= -0;
6337 sal_Int16 radix
= 8;
6339 expVal
+= OString( "0" );
6340 aStrBuf
.append( input
, radix
);
6342 CPPUNIT_ASSERT_MESSAGE
6344 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6345 aStrBuf
.getStr()== expVal
&&
6346 aStrBuf
.getLength() == expVal
.getLength()
6353 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6354 OString
expVal( aStrBuf
.getStr() );
6355 sal_Int32 input
= -4;
6356 sal_Int16 radix
= 8;
6358 expVal
+= OString( "-" );
6359 expVal
+= OString( "4" );
6360 aStrBuf
.append( input
, radix
);
6362 CPPUNIT_ASSERT_MESSAGE
6364 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6365 aStrBuf
.getStr()== expVal
&&
6366 aStrBuf
.getLength() == expVal
.getLength()
6373 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6374 OString
expVal( aStrBuf
.getStr() );
6375 sal_Int32 input
= -8;
6376 sal_Int16 radix
= 8;
6378 expVal
+= OString( "-" );
6379 expVal
+= OString( "10" );
6380 aStrBuf
.append( input
, radix
);
6382 CPPUNIT_ASSERT_MESSAGE
6384 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6385 aStrBuf
.getStr()== expVal
&&
6386 aStrBuf
.getLength() == expVal
.getLength()
6393 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6394 OString
expVal( aStrBuf
.getStr() );
6395 sal_Int32 input
= -15;
6396 sal_Int16 radix
= 8;
6398 expVal
+= OString( "-" );
6399 expVal
+= OString( "17" );
6400 aStrBuf
.append( input
, radix
);
6402 CPPUNIT_ASSERT_MESSAGE
6404 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6405 aStrBuf
.getStr()== expVal
&&
6406 aStrBuf
.getLength() == expVal
.getLength()
6413 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6414 OString
expVal( aStrBuf
.getStr() );
6415 sal_Int32 input
= -0;
6416 sal_Int16 radix
= 10;
6418 expVal
+= OString( "0" );
6419 aStrBuf
.append( input
, radix
);
6421 CPPUNIT_ASSERT_MESSAGE
6423 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6424 aStrBuf
.getStr()== expVal
&&
6425 aStrBuf
.getLength() == expVal
.getLength()
6432 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6433 OString
expVal( aStrBuf
.getStr() );
6434 sal_Int32 input
= -4;
6435 sal_Int16 radix
= 10;
6437 expVal
+= OString( "-" );
6438 expVal
+= OString( "4" );
6439 aStrBuf
.append( input
, radix
);
6441 CPPUNIT_ASSERT_MESSAGE
6443 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6444 aStrBuf
.getStr()== expVal
&&
6445 aStrBuf
.getLength() == expVal
.getLength()
6452 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6453 OString
expVal( aStrBuf
.getStr() );
6454 sal_Int32 input
= -8;
6455 sal_Int16 radix
= 10;
6457 expVal
+= OString( "-" );
6458 expVal
+= OString( "8" );
6459 aStrBuf
.append( input
, radix
);
6461 CPPUNIT_ASSERT_MESSAGE
6463 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6464 aStrBuf
.getStr()== expVal
&&
6465 aStrBuf
.getLength() == expVal
.getLength()
6472 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6473 OString
expVal( aStrBuf
.getStr() );
6474 sal_Int32 input
= -15;
6475 sal_Int16 radix
= 10;
6477 expVal
+= OString( "-" );
6478 expVal
+= OString( "15" );
6479 aStrBuf
.append( input
, radix
);
6481 CPPUNIT_ASSERT_MESSAGE
6483 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6484 aStrBuf
.getStr()== expVal
&&
6485 aStrBuf
.getLength() == expVal
.getLength()
6492 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6493 OString
expVal( aStrBuf
.getStr() );
6494 sal_Int32 input
= -0;
6495 sal_Int16 radix
= 16;
6497 expVal
+= OString( "0" );
6498 aStrBuf
.append( input
, radix
);
6500 CPPUNIT_ASSERT_MESSAGE
6502 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6503 aStrBuf
.getStr()== expVal
&&
6504 aStrBuf
.getLength() == expVal
.getLength()
6511 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6512 OString
expVal( aStrBuf
.getStr() );
6513 sal_Int32 input
= -4;
6514 sal_Int16 radix
= 16;
6516 expVal
+= OString( "-" );
6517 expVal
+= OString( "4" );
6518 aStrBuf
.append( input
, radix
);
6520 CPPUNIT_ASSERT_MESSAGE
6522 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6523 aStrBuf
.getStr()== expVal
&&
6524 aStrBuf
.getLength() == expVal
.getLength()
6531 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6532 OString
expVal( aStrBuf
.getStr() );
6533 sal_Int32 input
= -8;
6534 sal_Int16 radix
= 16;
6536 expVal
+= OString( "-" );
6537 expVal
+= OString( "8" );
6538 aStrBuf
.append( input
, radix
);
6540 CPPUNIT_ASSERT_MESSAGE
6542 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6543 aStrBuf
.getStr()== expVal
&&
6544 aStrBuf
.getLength() == expVal
.getLength()
6551 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6552 OString
expVal( aStrBuf
.getStr() );
6553 sal_Int32 input
= -15;
6554 sal_Int16 radix
= 16;
6556 expVal
+= OString( "-" );
6557 expVal
+= OString( "f" );
6558 aStrBuf
.append( input
, radix
);
6560 CPPUNIT_ASSERT_MESSAGE
6562 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6563 aStrBuf
.getStr()== expVal
&&
6564 aStrBuf
.getLength() == expVal
.getLength()
6571 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6572 OString
expVal( aStrBuf
.getStr() );
6573 sal_Int32 input
= -0;
6574 sal_Int16 radix
= 36;
6576 expVal
+= OString( "0" );
6577 aStrBuf
.append( input
, radix
);
6579 CPPUNIT_ASSERT_MESSAGE
6581 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6582 aStrBuf
.getStr()== expVal
&&
6583 aStrBuf
.getLength() == expVal
.getLength()
6590 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6591 OString
expVal( aStrBuf
.getStr() );
6592 sal_Int32 input
= -4;
6593 sal_Int16 radix
= 36;
6595 expVal
+= OString( "-" );
6596 expVal
+= OString( "4" );
6597 aStrBuf
.append( input
, radix
);
6599 CPPUNIT_ASSERT_MESSAGE
6601 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6602 aStrBuf
.getStr()== expVal
&&
6603 aStrBuf
.getLength() == expVal
.getLength()
6610 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6611 OString
expVal( aStrBuf
.getStr() );
6612 sal_Int32 input
= -8;
6613 sal_Int16 radix
= 36;
6615 expVal
+= OString( "-" );
6616 expVal
+= OString( "8" );
6617 aStrBuf
.append( input
, radix
);
6619 CPPUNIT_ASSERT_MESSAGE
6621 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6622 aStrBuf
.getStr()== expVal
&&
6623 aStrBuf
.getLength() == expVal
.getLength()
6630 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
6631 OString
expVal( aStrBuf
.getStr() );
6632 sal_Int32 input
= -35;
6633 sal_Int16 radix
= 36;
6635 expVal
+= OString( "-" );
6636 expVal
+= OString( "z" );
6637 aStrBuf
.append( input
, radix
);
6639 CPPUNIT_ASSERT_MESSAGE
6641 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6642 aStrBuf
.getStr()== expVal
&&
6643 aStrBuf
.getLength() == expVal
.getLength()
6650 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6651 OString
expVal( aStrBuf
.getStr() );
6652 sal_Int32 input
= -0;
6653 sal_Int16 radix
= 2;
6655 expVal
+= OString( "0" );
6656 aStrBuf
.append( input
, radix
);
6658 CPPUNIT_ASSERT_MESSAGE
6660 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6661 aStrBuf
.getStr()== expVal
&&
6662 aStrBuf
.getLength() == expVal
.getLength()
6669 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6670 OString
expVal( aStrBuf
.getStr() );
6671 sal_Int32 input
= -4;
6672 sal_Int16 radix
= 2;
6674 expVal
+= OString( "-" );
6675 expVal
+= OString( "100" );
6676 aStrBuf
.append( input
, radix
);
6678 CPPUNIT_ASSERT_MESSAGE
6680 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6681 aStrBuf
.getStr()== expVal
&&
6682 aStrBuf
.getLength() == expVal
.getLength()
6689 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6690 OString
expVal( aStrBuf
.getStr() );
6691 sal_Int32 input
= -8;
6692 sal_Int16 radix
= 2;
6694 expVal
+= OString( "-" );
6695 expVal
+= OString( "1000" );
6696 aStrBuf
.append( input
, radix
);
6698 CPPUNIT_ASSERT_MESSAGE
6700 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6701 aStrBuf
.getStr()== expVal
&&
6702 aStrBuf
.getLength() == expVal
.getLength()
6709 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6710 OString
expVal( aStrBuf
.getStr() );
6711 sal_Int32 input
= -15;
6712 sal_Int16 radix
= 2;
6714 expVal
+= OString( "-" );
6715 expVal
+= OString( "1111" );
6716 aStrBuf
.append( input
, radix
);
6718 CPPUNIT_ASSERT_MESSAGE
6720 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6721 aStrBuf
.getStr()== expVal
&&
6722 aStrBuf
.getLength() == expVal
.getLength()
6729 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6730 OString
expVal( aStrBuf
.getStr() );
6731 sal_Int32 input
= -0;
6732 sal_Int16 radix
= 8;
6734 expVal
+= OString( "0" );
6735 aStrBuf
.append( input
, radix
);
6737 CPPUNIT_ASSERT_MESSAGE
6739 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6740 aStrBuf
.getStr()== expVal
&&
6741 aStrBuf
.getLength() == expVal
.getLength()
6748 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6749 OString
expVal( aStrBuf
.getStr() );
6750 sal_Int32 input
= -4;
6751 sal_Int16 radix
= 8;
6753 expVal
+= OString( "-" );
6754 expVal
+= OString( "4" );
6755 aStrBuf
.append( input
, radix
);
6757 CPPUNIT_ASSERT_MESSAGE
6759 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6760 aStrBuf
.getStr()== expVal
&&
6761 aStrBuf
.getLength() == expVal
.getLength()
6768 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6769 OString
expVal( aStrBuf
.getStr() );
6770 sal_Int32 input
= -8;
6771 sal_Int16 radix
= 8;
6773 expVal
+= OString( "-" );
6774 expVal
+= OString( "10" );
6775 aStrBuf
.append( input
, radix
);
6777 CPPUNIT_ASSERT_MESSAGE
6779 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6780 aStrBuf
.getStr()== expVal
&&
6781 aStrBuf
.getLength() == expVal
.getLength()
6788 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6789 OString
expVal( aStrBuf
.getStr() );
6790 sal_Int32 input
= -15;
6791 sal_Int16 radix
= 8;
6793 expVal
+= OString( "-" );
6794 expVal
+= OString( "17" );
6795 aStrBuf
.append( input
, radix
);
6797 CPPUNIT_ASSERT_MESSAGE
6799 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6800 aStrBuf
.getStr()== expVal
&&
6801 aStrBuf
.getLength() == expVal
.getLength()
6808 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6809 OString
expVal( aStrBuf
.getStr() );
6810 sal_Int32 input
= -0;
6811 sal_Int16 radix
= 10;
6813 expVal
+= OString( "0" );
6814 aStrBuf
.append( input
, radix
);
6816 CPPUNIT_ASSERT_MESSAGE
6818 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6819 aStrBuf
.getStr()== expVal
&&
6820 aStrBuf
.getLength() == expVal
.getLength()
6827 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6828 OString
expVal( aStrBuf
.getStr() );
6829 sal_Int32 input
= -4;
6830 sal_Int16 radix
= 10;
6832 expVal
+= OString( "-" );
6833 expVal
+= OString( "4" );
6834 aStrBuf
.append( input
, radix
);
6836 CPPUNIT_ASSERT_MESSAGE
6838 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6839 aStrBuf
.getStr()== expVal
&&
6840 aStrBuf
.getLength() == expVal
.getLength()
6847 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6848 OString
expVal( aStrBuf
.getStr() );
6849 sal_Int32 input
= -8;
6850 sal_Int16 radix
= 10;
6852 expVal
+= OString( "-" );
6853 expVal
+= OString( "8" );
6854 aStrBuf
.append( input
, radix
);
6856 CPPUNIT_ASSERT_MESSAGE
6858 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6859 aStrBuf
.getStr()== expVal
&&
6860 aStrBuf
.getLength() == expVal
.getLength()
6867 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6868 OString
expVal( aStrBuf
.getStr() );
6869 sal_Int32 input
= -15;
6870 sal_Int16 radix
= 10;
6872 expVal
+= OString( "-" );
6873 expVal
+= OString( "15" );
6874 aStrBuf
.append( input
, radix
);
6876 CPPUNIT_ASSERT_MESSAGE
6878 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6879 aStrBuf
.getStr()== expVal
&&
6880 aStrBuf
.getLength() == expVal
.getLength()
6887 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6888 OString
expVal( aStrBuf
.getStr() );
6889 sal_Int32 input
= -0;
6890 sal_Int16 radix
= 16;
6892 expVal
+= OString( "0" );
6893 aStrBuf
.append( input
, radix
);
6895 CPPUNIT_ASSERT_MESSAGE
6897 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6898 aStrBuf
.getStr()== expVal
&&
6899 aStrBuf
.getLength() == expVal
.getLength()
6906 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6907 OString
expVal( aStrBuf
.getStr() );
6908 sal_Int32 input
= -4;
6909 sal_Int16 radix
= 16;
6911 expVal
+= OString( "-" );
6912 expVal
+= OString( "4" );
6913 aStrBuf
.append( input
, radix
);
6915 CPPUNIT_ASSERT_MESSAGE
6917 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6918 aStrBuf
.getStr()== expVal
&&
6919 aStrBuf
.getLength() == expVal
.getLength()
6926 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6927 OString
expVal( aStrBuf
.getStr() );
6928 sal_Int32 input
= -8;
6929 sal_Int16 radix
= 16;
6931 expVal
+= OString( "-" );
6932 expVal
+= OString( "8" );
6933 aStrBuf
.append( input
, radix
);
6935 CPPUNIT_ASSERT_MESSAGE
6937 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6938 aStrBuf
.getStr()== expVal
&&
6939 aStrBuf
.getLength() == expVal
.getLength()
6946 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6947 OString
expVal( aStrBuf
.getStr() );
6948 sal_Int32 input
= -15;
6949 sal_Int16 radix
= 16;
6951 expVal
+= OString( "-" );
6952 expVal
+= OString( "f" );
6953 aStrBuf
.append( input
, radix
);
6955 CPPUNIT_ASSERT_MESSAGE
6957 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6958 aStrBuf
.getStr()== expVal
&&
6959 aStrBuf
.getLength() == expVal
.getLength()
6966 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6967 OString
expVal( aStrBuf
.getStr() );
6968 sal_Int32 input
= -0;
6969 sal_Int16 radix
= 36;
6971 expVal
+= OString( "0" );
6972 aStrBuf
.append( input
, radix
);
6974 CPPUNIT_ASSERT_MESSAGE
6976 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6977 aStrBuf
.getStr()== expVal
&&
6978 aStrBuf
.getLength() == expVal
.getLength()
6985 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
6986 OString
expVal( aStrBuf
.getStr() );
6987 sal_Int32 input
= -4;
6988 sal_Int16 radix
= 36;
6990 expVal
+= OString( "-" );
6991 expVal
+= OString( "4" );
6992 aStrBuf
.append( input
, radix
);
6994 CPPUNIT_ASSERT_MESSAGE
6996 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6997 aStrBuf
.getStr()== expVal
&&
6998 aStrBuf
.getLength() == expVal
.getLength()
7005 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
7006 OString
expVal( aStrBuf
.getStr() );
7007 sal_Int32 input
= -8;
7008 sal_Int16 radix
= 36;
7010 expVal
+= OString( "-" );
7011 expVal
+= OString( "8" );
7012 aStrBuf
.append( input
, radix
);
7014 CPPUNIT_ASSERT_MESSAGE
7016 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7017 aStrBuf
.getStr()== expVal
&&
7018 aStrBuf
.getLength() == expVal
.getLength()
7025 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
7026 OString
expVal( aStrBuf
.getStr() );
7027 sal_Int32 input
= -35;
7028 sal_Int16 radix
= 36;
7030 expVal
+= OString( "-" );
7031 expVal
+= OString( "z" );
7032 aStrBuf
.append( input
, radix
);
7034 CPPUNIT_ASSERT_MESSAGE
7036 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
7037 aStrBuf
.getStr()== expVal
&&
7038 aStrBuf
.getLength() == expVal
.getLength()
7045 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7046 OString
expVal( aStrBuf
.getStr() );
7047 sal_Int32 input
= -0;
7048 sal_Int16 radix
= 2;
7050 expVal
+= OString( "0" );
7051 aStrBuf
.append( input
, radix
);
7053 CPPUNIT_ASSERT_MESSAGE
7055 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7056 aStrBuf
.getStr()== expVal
&&
7057 aStrBuf
.getLength() == expVal
.getLength()
7064 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7065 OString
expVal( aStrBuf
.getStr() );
7066 sal_Int32 input
= -4;
7067 sal_Int16 radix
= 2;
7069 expVal
+= OString( "-" );
7070 expVal
+= OString( "100" );
7071 aStrBuf
.append( input
, radix
);
7073 CPPUNIT_ASSERT_MESSAGE
7075 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7076 aStrBuf
.getStr()== expVal
&&
7077 aStrBuf
.getLength() == expVal
.getLength()
7084 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7085 OString
expVal( aStrBuf
.getStr() );
7086 sal_Int32 input
= -8;
7087 sal_Int16 radix
= 2;
7089 expVal
+= OString( "-" );
7090 expVal
+= OString( "1000" );
7091 aStrBuf
.append( input
, radix
);
7093 CPPUNIT_ASSERT_MESSAGE
7095 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7096 aStrBuf
.getStr()== expVal
&&
7097 aStrBuf
.getLength() == expVal
.getLength()
7104 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7105 OString
expVal( aStrBuf
.getStr() );
7106 sal_Int32 input
= -15;
7107 sal_Int16 radix
= 2;
7109 expVal
+= OString( "-" );
7110 expVal
+= OString( "1111" );
7111 aStrBuf
.append( input
, radix
);
7113 CPPUNIT_ASSERT_MESSAGE
7115 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
7116 aStrBuf
.getStr()== expVal
&&
7117 aStrBuf
.getLength() == expVal
.getLength()
7124 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7125 OString
expVal( aStrBuf
.getStr() );
7126 sal_Int32 input
= -0;
7127 sal_Int16 radix
= 8;
7129 expVal
+= OString( "0" );
7130 aStrBuf
.append( input
, radix
);
7132 CPPUNIT_ASSERT_MESSAGE
7134 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7135 aStrBuf
.getStr()== expVal
&&
7136 aStrBuf
.getLength() == expVal
.getLength()
7143 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7144 OString
expVal( aStrBuf
.getStr() );
7145 sal_Int32 input
= -4;
7146 sal_Int16 radix
= 8;
7148 expVal
+= OString( "-" );
7149 expVal
+= OString( "4" );
7150 aStrBuf
.append( input
, radix
);
7152 CPPUNIT_ASSERT_MESSAGE
7154 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7155 aStrBuf
.getStr()== expVal
&&
7156 aStrBuf
.getLength() == expVal
.getLength()
7163 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7164 OString
expVal( aStrBuf
.getStr() );
7165 sal_Int32 input
= -8;
7166 sal_Int16 radix
= 8;
7168 expVal
+= OString( "-" );
7169 expVal
+= OString( "10" );
7170 aStrBuf
.append( input
, radix
);
7172 CPPUNIT_ASSERT_MESSAGE
7174 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7175 aStrBuf
.getStr()== expVal
&&
7176 aStrBuf
.getLength() == expVal
.getLength()
7183 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7184 OString
expVal( aStrBuf
.getStr() );
7185 sal_Int32 input
= -15;
7186 sal_Int16 radix
= 8;
7188 expVal
+= OString( "-" );
7189 expVal
+= OString( "17" );
7190 aStrBuf
.append( input
, radix
);
7192 CPPUNIT_ASSERT_MESSAGE
7194 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
7195 aStrBuf
.getStr()== expVal
&&
7196 aStrBuf
.getLength() == expVal
.getLength()
7203 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7204 OString
expVal( aStrBuf
.getStr() );
7205 sal_Int32 input
= -0;
7206 sal_Int16 radix
= 10;
7208 expVal
+= OString( "0" );
7209 aStrBuf
.append( input
, radix
);
7211 CPPUNIT_ASSERT_MESSAGE
7213 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7214 aStrBuf
.getStr()== expVal
&&
7215 aStrBuf
.getLength() == expVal
.getLength()
7222 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7223 OString
expVal( aStrBuf
.getStr() );
7224 sal_Int32 input
= -4;
7225 sal_Int16 radix
= 10;
7227 expVal
+= OString( "-" );
7228 expVal
+= OString( "4" );
7229 aStrBuf
.append( input
, radix
);
7231 CPPUNIT_ASSERT_MESSAGE
7233 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7234 aStrBuf
.getStr()== expVal
&&
7235 aStrBuf
.getLength() == expVal
.getLength()
7242 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7243 OString
expVal( aStrBuf
.getStr() );
7244 sal_Int32 input
= -8;
7245 sal_Int16 radix
= 10;
7247 expVal
+= OString( "-" );
7248 expVal
+= OString( "8" );
7249 aStrBuf
.append( input
, radix
);
7251 CPPUNIT_ASSERT_MESSAGE
7253 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7254 aStrBuf
.getStr()== expVal
&&
7255 aStrBuf
.getLength() == expVal
.getLength()
7262 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7263 OString
expVal( aStrBuf
.getStr() );
7264 sal_Int32 input
= -15;
7265 sal_Int16 radix
= 10;
7267 expVal
+= OString( "-" );
7268 expVal
+= OString( "15" );
7269 aStrBuf
.append( input
, radix
);
7271 CPPUNIT_ASSERT_MESSAGE
7273 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7274 aStrBuf
.getStr()== expVal
&&
7275 aStrBuf
.getLength() == expVal
.getLength()
7282 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7283 OString
expVal( aStrBuf
.getStr() );
7284 sal_Int32 input
= -0;
7285 sal_Int16 radix
= 16;
7287 expVal
+= OString( "0" );
7288 aStrBuf
.append( input
, radix
);
7290 CPPUNIT_ASSERT_MESSAGE
7292 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7293 aStrBuf
.getStr()== expVal
&&
7294 aStrBuf
.getLength() == expVal
.getLength()
7301 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7302 OString
expVal( aStrBuf
.getStr() );
7303 sal_Int32 input
= -4;
7304 sal_Int16 radix
= 16;
7306 expVal
+= OString( "-" );
7307 expVal
+= OString( "4" );
7308 aStrBuf
.append( input
, radix
);
7310 CPPUNIT_ASSERT_MESSAGE
7312 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7313 aStrBuf
.getStr()== expVal
&&
7314 aStrBuf
.getLength() == expVal
.getLength()
7321 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7322 OString
expVal( aStrBuf
.getStr() );
7323 sal_Int32 input
= -8;
7324 sal_Int16 radix
= 16;
7326 expVal
+= OString( "-" );
7327 expVal
+= OString( "8" );
7328 aStrBuf
.append( input
, radix
);
7330 CPPUNIT_ASSERT_MESSAGE
7332 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7333 aStrBuf
.getStr()== expVal
&&
7334 aStrBuf
.getLength() == expVal
.getLength()
7341 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7342 OString
expVal( aStrBuf
.getStr() );
7343 sal_Int32 input
= -15;
7344 sal_Int16 radix
= 16;
7346 expVal
+= OString( "-" );
7347 expVal
+= OString( "f" );
7348 aStrBuf
.append( input
, radix
);
7350 CPPUNIT_ASSERT_MESSAGE
7352 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7353 aStrBuf
.getStr()== expVal
&&
7354 aStrBuf
.getLength() == expVal
.getLength()
7361 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7362 OString
expVal( aStrBuf
.getStr() );
7363 sal_Int32 input
= -0;
7364 sal_Int16 radix
= 36;
7366 expVal
+= OString( "0" );
7367 aStrBuf
.append( input
, radix
);
7369 CPPUNIT_ASSERT_MESSAGE
7371 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7372 aStrBuf
.getStr()== expVal
&&
7373 aStrBuf
.getLength() == expVal
.getLength()
7380 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7381 OString
expVal( aStrBuf
.getStr() );
7382 sal_Int32 input
= -4;
7383 sal_Int16 radix
= 36;
7385 expVal
+= OString( "-" );
7386 expVal
+= OString( "4" );
7387 aStrBuf
.append( input
, radix
);
7389 CPPUNIT_ASSERT_MESSAGE
7391 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7392 aStrBuf
.getStr()== expVal
&&
7393 aStrBuf
.getLength() == expVal
.getLength()
7400 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7401 OString
expVal( aStrBuf
.getStr() );
7402 sal_Int32 input
= -8;
7403 sal_Int16 radix
= 36;
7405 expVal
+= OString( "-" );
7406 expVal
+= OString( "8" );
7407 aStrBuf
.append( input
, radix
);
7409 CPPUNIT_ASSERT_MESSAGE
7411 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7412 aStrBuf
.getStr()== expVal
&&
7413 aStrBuf
.getLength() == expVal
.getLength()
7420 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
7421 OString
expVal( aStrBuf
.getStr() );
7422 sal_Int32 input
= -35;
7423 sal_Int16 radix
= 36;
7425 expVal
+= OString( "-" );
7426 expVal
+= OString( "z" );
7427 aStrBuf
.append( input
, radix
);
7429 CPPUNIT_ASSERT_MESSAGE
7431 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7432 aStrBuf
.getStr()== expVal
&&
7433 aStrBuf
.getLength() == expVal
.getLength()
7440 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7441 OString
expVal( aStrBuf
.getStr() );
7442 sal_Int32 input
= -0;
7443 sal_Int16 radix
= 2;
7445 expVal
+= OString( "0" );
7446 aStrBuf
.append( input
, radix
);
7448 CPPUNIT_ASSERT_MESSAGE
7450 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7451 aStrBuf
.getStr()== expVal
&&
7452 aStrBuf
.getLength() == expVal
.getLength()
7459 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7460 OString
expVal( aStrBuf
.getStr() );
7461 sal_Int32 input
= -4;
7462 sal_Int16 radix
= 2;
7464 expVal
+= OString( "-" );
7465 expVal
+= OString( "100" );
7466 aStrBuf
.append( input
, radix
);
7468 CPPUNIT_ASSERT_MESSAGE
7470 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7471 aStrBuf
.getStr()== expVal
&&
7472 aStrBuf
.getLength() == expVal
.getLength()
7479 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7480 OString
expVal( aStrBuf
.getStr() );
7481 sal_Int32 input
= -8;
7482 sal_Int16 radix
= 2;
7484 expVal
+= OString( "-" );
7485 expVal
+= OString( "1000" );
7486 aStrBuf
.append( input
, radix
);
7488 CPPUNIT_ASSERT_MESSAGE
7490 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7491 aStrBuf
.getStr()== expVal
&&
7492 aStrBuf
.getLength() == expVal
.getLength()
7499 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7500 OString
expVal( aStrBuf
.getStr() );
7501 sal_Int32 input
= -15;
7502 sal_Int16 radix
= 2;
7504 expVal
+= OString( "-" );
7505 expVal
+= OString( "1111" );
7506 aStrBuf
.append( input
, radix
);
7508 CPPUNIT_ASSERT_MESSAGE
7510 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7511 aStrBuf
.getStr()== expVal
&&
7512 aStrBuf
.getLength() == expVal
.getLength()
7519 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7520 OString
expVal( aStrBuf
.getStr() );
7521 sal_Int32 input
= -0;
7522 sal_Int16 radix
= 8;
7524 expVal
+= OString( "0" );
7525 aStrBuf
.append( input
, radix
);
7527 CPPUNIT_ASSERT_MESSAGE
7529 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7530 aStrBuf
.getStr()== expVal
&&
7531 aStrBuf
.getLength() == expVal
.getLength()
7538 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7539 OString
expVal( aStrBuf
.getStr() );
7540 sal_Int32 input
= -4;
7541 sal_Int16 radix
= 8;
7543 expVal
+= OString( "-" );
7544 expVal
+= OString( "4" );
7545 aStrBuf
.append( input
, radix
);
7547 CPPUNIT_ASSERT_MESSAGE
7549 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7550 aStrBuf
.getStr()== expVal
&&
7551 aStrBuf
.getLength() == expVal
.getLength()
7558 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7559 OString
expVal( aStrBuf
.getStr() );
7560 sal_Int32 input
= -8;
7561 sal_Int16 radix
= 8;
7563 expVal
+= OString( "-" );
7564 expVal
+= OString( "10" );
7565 aStrBuf
.append( input
, radix
);
7567 CPPUNIT_ASSERT_MESSAGE
7569 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7570 aStrBuf
.getStr()== expVal
&&
7571 aStrBuf
.getLength() == expVal
.getLength()
7578 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7579 OString
expVal( aStrBuf
.getStr() );
7580 sal_Int32 input
= -15;
7581 sal_Int16 radix
= 8;
7583 expVal
+= OString( "-" );
7584 expVal
+= OString( "17" );
7585 aStrBuf
.append( input
, radix
);
7587 CPPUNIT_ASSERT_MESSAGE
7589 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7590 aStrBuf
.getStr()== expVal
&&
7591 aStrBuf
.getLength() == expVal
.getLength()
7598 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7599 OString
expVal( aStrBuf
.getStr() );
7600 sal_Int32 input
= -0;
7601 sal_Int16 radix
= 10;
7603 expVal
+= OString( "0" );
7604 aStrBuf
.append( input
, radix
);
7606 CPPUNIT_ASSERT_MESSAGE
7608 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7609 aStrBuf
.getStr()== expVal
&&
7610 aStrBuf
.getLength() == expVal
.getLength()
7617 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7618 OString
expVal( aStrBuf
.getStr() );
7619 sal_Int32 input
= -4;
7620 sal_Int16 radix
= 10;
7622 expVal
+= OString( "-" );
7623 expVal
+= OString( "4" );
7624 aStrBuf
.append( input
, radix
);
7626 CPPUNIT_ASSERT_MESSAGE
7628 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7629 aStrBuf
.getStr()== expVal
&&
7630 aStrBuf
.getLength() == expVal
.getLength()
7637 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7638 OString
expVal( aStrBuf
.getStr() );
7639 sal_Int32 input
= -8;
7640 sal_Int16 radix
= 10;
7642 expVal
+= OString( "-" );
7643 expVal
+= OString( "8" );
7644 aStrBuf
.append( input
, radix
);
7646 CPPUNIT_ASSERT_MESSAGE
7648 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7649 aStrBuf
.getStr()== expVal
&&
7650 aStrBuf
.getLength() == expVal
.getLength()
7657 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7658 OString
expVal( aStrBuf
.getStr() );
7659 sal_Int32 input
= -15;
7660 sal_Int16 radix
= 10;
7662 expVal
+= OString( "-" );
7663 expVal
+= OString( "15" );
7664 aStrBuf
.append( input
, radix
);
7666 CPPUNIT_ASSERT_MESSAGE
7668 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7669 aStrBuf
.getStr()== expVal
&&
7670 aStrBuf
.getLength() == expVal
.getLength()
7677 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7678 OString
expVal( aStrBuf
.getStr() );
7679 sal_Int32 input
= -0;
7680 sal_Int16 radix
= 16;
7682 expVal
+= OString( "0" );
7683 aStrBuf
.append( input
, radix
);
7685 CPPUNIT_ASSERT_MESSAGE
7687 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7688 aStrBuf
.getStr()== expVal
&&
7689 aStrBuf
.getLength() == expVal
.getLength()
7696 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7697 OString
expVal( aStrBuf
.getStr() );
7698 sal_Int32 input
= -4;
7699 sal_Int16 radix
= 16;
7701 expVal
+= OString( "-" );
7702 expVal
+= OString( "4" );
7703 aStrBuf
.append( input
, radix
);
7705 CPPUNIT_ASSERT_MESSAGE
7707 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7708 aStrBuf
.getStr()== expVal
&&
7709 aStrBuf
.getLength() == expVal
.getLength()
7716 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7717 OString
expVal( aStrBuf
.getStr() );
7718 sal_Int32 input
= -8;
7719 sal_Int16 radix
= 16;
7721 expVal
+= OString( "-" );
7722 expVal
+= OString( "8" );
7723 aStrBuf
.append( input
, radix
);
7725 CPPUNIT_ASSERT_MESSAGE
7727 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7728 aStrBuf
.getStr()== expVal
&&
7729 aStrBuf
.getLength() == expVal
.getLength()
7736 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7737 OString
expVal( aStrBuf
.getStr() );
7738 sal_Int32 input
= -15;
7739 sal_Int16 radix
= 16;
7741 expVal
+= OString( "-" );
7742 expVal
+= OString( "f" );
7743 aStrBuf
.append( input
, radix
);
7745 CPPUNIT_ASSERT_MESSAGE
7747 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7748 aStrBuf
.getStr()== expVal
&&
7749 aStrBuf
.getLength() == expVal
.getLength()
7756 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7757 OString
expVal( aStrBuf
.getStr() );
7758 sal_Int32 input
= -0;
7759 sal_Int16 radix
= 36;
7761 expVal
+= OString( "0" );
7762 aStrBuf
.append( input
, radix
);
7764 CPPUNIT_ASSERT_MESSAGE
7766 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7767 aStrBuf
.getStr()== expVal
&&
7768 aStrBuf
.getLength() == expVal
.getLength()
7775 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7776 OString
expVal( aStrBuf
.getStr() );
7777 sal_Int32 input
= -4;
7778 sal_Int16 radix
= 36;
7780 expVal
+= OString( "-" );
7781 expVal
+= OString( "4" );
7782 aStrBuf
.append( input
, radix
);
7784 CPPUNIT_ASSERT_MESSAGE
7786 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7787 aStrBuf
.getStr()== expVal
&&
7788 aStrBuf
.getLength() == expVal
.getLength()
7795 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7796 OString
expVal( aStrBuf
.getStr() );
7797 sal_Int32 input
= -8;
7798 sal_Int16 radix
= 36;
7800 expVal
+= OString( "-" );
7801 expVal
+= OString( "8" );
7802 aStrBuf
.append( input
, radix
);
7804 CPPUNIT_ASSERT_MESSAGE
7806 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7807 aStrBuf
.getStr()== expVal
&&
7808 aStrBuf
.getLength() == expVal
.getLength()
7815 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
7816 OString
expVal( aStrBuf
.getStr() );
7817 sal_Int32 input
= -35;
7818 sal_Int16 radix
= 36;
7820 expVal
+= OString( "-" );
7821 expVal
+= OString( "z" );
7822 aStrBuf
.append( input
, radix
);
7824 CPPUNIT_ASSERT_MESSAGE
7826 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7827 aStrBuf
.getStr()== expVal
&&
7828 aStrBuf
.getLength() == expVal
.getLength()
7835 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7836 OString
expVal( aStrBuf
.getStr() );
7837 sal_Int32 input
= -0;
7838 sal_Int16 radix
= 2;
7840 expVal
+= OString( "0" );
7841 aStrBuf
.append( input
, radix
);
7843 CPPUNIT_ASSERT_MESSAGE
7845 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7846 aStrBuf
.getStr()== expVal
&&
7847 aStrBuf
.getLength() == expVal
.getLength()
7854 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7855 OString
expVal( aStrBuf
.getStr() );
7856 sal_Int32 input
= -4;
7857 sal_Int16 radix
= 2;
7859 expVal
+= OString( "-" );
7860 expVal
+= OString( "100" );
7861 aStrBuf
.append( input
, radix
);
7863 CPPUNIT_ASSERT_MESSAGE
7865 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7866 aStrBuf
.getStr()== expVal
&&
7867 aStrBuf
.getLength() == expVal
.getLength()
7874 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7875 OString
expVal( aStrBuf
.getStr() );
7876 sal_Int32 input
= -8;
7877 sal_Int16 radix
= 2;
7879 expVal
+= OString( "-" );
7880 expVal
+= OString( "1000" );
7881 aStrBuf
.append( input
, radix
);
7883 CPPUNIT_ASSERT_MESSAGE
7885 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7886 aStrBuf
.getStr()== expVal
&&
7887 aStrBuf
.getLength() == expVal
.getLength()
7894 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7895 OString
expVal( aStrBuf
.getStr() );
7896 sal_Int32 input
= -15;
7897 sal_Int16 radix
= 2;
7899 expVal
+= OString( "-" );
7900 expVal
+= OString( "1111" );
7901 aStrBuf
.append( input
, radix
);
7903 CPPUNIT_ASSERT_MESSAGE
7905 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7906 aStrBuf
.getStr()== expVal
&&
7907 aStrBuf
.getLength() == expVal
.getLength()
7914 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7915 OString
expVal( aStrBuf
.getStr() );
7916 sal_Int32 input
= -0;
7917 sal_Int16 radix
= 8;
7919 expVal
+= OString( "0" );
7920 aStrBuf
.append( input
, radix
);
7922 CPPUNIT_ASSERT_MESSAGE
7924 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7925 aStrBuf
.getStr()== expVal
&&
7926 aStrBuf
.getLength() == expVal
.getLength()
7933 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7934 OString
expVal( aStrBuf
.getStr() );
7935 sal_Int32 input
= -4;
7936 sal_Int16 radix
= 8;
7938 expVal
+= OString( "-" );
7939 expVal
+= OString( "4" );
7940 aStrBuf
.append( input
, radix
);
7942 CPPUNIT_ASSERT_MESSAGE
7944 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7945 aStrBuf
.getStr()== expVal
&&
7946 aStrBuf
.getLength() == expVal
.getLength()
7953 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7954 OString
expVal( aStrBuf
.getStr() );
7955 sal_Int32 input
= -8;
7956 sal_Int16 radix
= 8;
7958 expVal
+= OString( "-" );
7959 expVal
+= OString( "10" );
7960 aStrBuf
.append( input
, radix
);
7962 CPPUNIT_ASSERT_MESSAGE
7964 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7965 aStrBuf
.getStr()== expVal
&&
7966 aStrBuf
.getLength() == expVal
.getLength()
7973 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7974 OString
expVal( aStrBuf
.getStr() );
7975 sal_Int32 input
= -15;
7976 sal_Int16 radix
= 8;
7978 expVal
+= OString( "-" );
7979 expVal
+= OString( "17" );
7980 aStrBuf
.append( input
, radix
);
7982 CPPUNIT_ASSERT_MESSAGE
7984 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7985 aStrBuf
.getStr()== expVal
&&
7986 aStrBuf
.getLength() == expVal
.getLength()
7993 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
7994 OString
expVal( aStrBuf
.getStr() );
7995 sal_Int32 input
= -0;
7996 sal_Int16 radix
= 10;
7998 expVal
+= OString( "0" );
7999 aStrBuf
.append( input
, radix
);
8001 CPPUNIT_ASSERT_MESSAGE
8003 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8004 aStrBuf
.getStr()== expVal
&&
8005 aStrBuf
.getLength() == expVal
.getLength()
8012 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8013 OString
expVal( aStrBuf
.getStr() );
8014 sal_Int32 input
= -4;
8015 sal_Int16 radix
= 10;
8017 expVal
+= OString( "-" );
8018 expVal
+= OString( "4" );
8019 aStrBuf
.append( input
, radix
);
8021 CPPUNIT_ASSERT_MESSAGE
8023 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8024 aStrBuf
.getStr()== expVal
&&
8025 aStrBuf
.getLength() == expVal
.getLength()
8032 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8033 OString
expVal( aStrBuf
.getStr() );
8034 sal_Int32 input
= -8;
8035 sal_Int16 radix
= 10;
8037 expVal
+= OString( "-" );
8038 expVal
+= OString( "8" );
8039 aStrBuf
.append( input
, radix
);
8041 CPPUNIT_ASSERT_MESSAGE
8043 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8044 aStrBuf
.getStr()== expVal
&&
8045 aStrBuf
.getLength() == expVal
.getLength()
8052 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8053 OString
expVal( aStrBuf
.getStr() );
8054 sal_Int32 input
= -15;
8055 sal_Int16 radix
= 10;
8057 expVal
+= OString( "-" );
8058 expVal
+= OString( "15" );
8059 aStrBuf
.append( input
, radix
);
8061 CPPUNIT_ASSERT_MESSAGE
8063 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
8064 aStrBuf
.getStr()== expVal
&&
8065 aStrBuf
.getLength() == expVal
.getLength()
8072 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8073 OString
expVal( aStrBuf
.getStr() );
8074 sal_Int32 input
= -0;
8075 sal_Int16 radix
= 16;
8077 expVal
+= OString( "0" );
8078 aStrBuf
.append( input
, radix
);
8080 CPPUNIT_ASSERT_MESSAGE
8082 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8083 aStrBuf
.getStr()== expVal
&&
8084 aStrBuf
.getLength() == expVal
.getLength()
8091 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8092 OString
expVal( aStrBuf
.getStr() );
8093 sal_Int32 input
= -4;
8094 sal_Int16 radix
= 16;
8096 expVal
+= OString( "-" );
8097 expVal
+= OString( "4" );
8098 aStrBuf
.append( input
, radix
);
8100 CPPUNIT_ASSERT_MESSAGE
8102 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8103 aStrBuf
.getStr()== expVal
&&
8104 aStrBuf
.getLength() == expVal
.getLength()
8111 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8112 OString
expVal( aStrBuf
.getStr() );
8113 sal_Int32 input
= -8;
8114 sal_Int16 radix
= 16;
8116 expVal
+= OString( "-" );
8117 expVal
+= OString( "8" );
8118 aStrBuf
.append( input
, radix
);
8120 CPPUNIT_ASSERT_MESSAGE
8122 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8123 aStrBuf
.getStr()== expVal
&&
8124 aStrBuf
.getLength() == expVal
.getLength()
8131 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8132 OString
expVal( aStrBuf
.getStr() );
8133 sal_Int32 input
= -15;
8134 sal_Int16 radix
= 16;
8136 expVal
+= OString( "-" );
8137 expVal
+= OString( "f" );
8138 aStrBuf
.append( input
, radix
);
8140 CPPUNIT_ASSERT_MESSAGE
8142 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
8143 aStrBuf
.getStr()== expVal
&&
8144 aStrBuf
.getLength() == expVal
.getLength()
8151 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8152 OString
expVal( aStrBuf
.getStr() );
8153 sal_Int32 input
= -0;
8154 sal_Int16 radix
= 36;
8156 expVal
+= OString( "0" );
8157 aStrBuf
.append( input
, radix
);
8159 CPPUNIT_ASSERT_MESSAGE
8161 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8162 aStrBuf
.getStr()== expVal
&&
8163 aStrBuf
.getLength() == expVal
.getLength()
8170 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8171 OString
expVal( aStrBuf
.getStr() );
8172 sal_Int32 input
= -4;
8173 sal_Int16 radix
= 36;
8175 expVal
+= OString( "-" );
8176 expVal
+= OString( "4" );
8177 aStrBuf
.append( input
, radix
);
8179 CPPUNIT_ASSERT_MESSAGE
8181 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8182 aStrBuf
.getStr()== expVal
&&
8183 aStrBuf
.getLength() == expVal
.getLength()
8189 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8190 OString
expVal( aStrBuf
.getStr() );
8191 sal_Int32 input
= -8;
8192 sal_Int16 radix
= 36;
8194 expVal
+= OString( "-" );
8195 expVal
+= OString( "8" );
8196 aStrBuf
.append( input
, radix
);
8198 CPPUNIT_ASSERT_MESSAGE
8200 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8201 aStrBuf
.getStr()== expVal
&&
8202 aStrBuf
.getLength() == expVal
.getLength()
8208 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8209 OString
expVal( aStrBuf
.getStr() );
8210 sal_Int32 input
= -35;
8211 sal_Int16 radix
= 36;
8213 expVal
+= OString( "-" );
8214 expVal
+= OString( "z" );
8215 aStrBuf
.append( input
, radix
);
8217 CPPUNIT_ASSERT_MESSAGE
8219 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8220 aStrBuf
.getStr()== expVal
&&
8221 aStrBuf
.getLength() == expVal
.getLength()
8225 CPPUNIT_TEST_SUITE( append_006_Int32_Negative
);
8226 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
8227 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
8228 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
8229 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
8230 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
8231 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
8232 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
8233 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
8234 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
8235 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
8236 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
8237 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
8238 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
8239 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
8240 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
8241 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
8242 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
8243 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
8244 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
8245 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
8246 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
8247 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
8248 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
8249 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
8250 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
8251 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
8252 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
8253 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
8254 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
8255 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
8256 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
8257 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
8258 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
8259 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
8260 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
8261 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
8262 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
8263 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
8264 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
8265 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
8266 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
8267 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
8268 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
8269 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
8270 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
8271 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
8272 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
8273 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
8274 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
8275 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
8276 CPPUNIT_TEST_SUITE_END();
8279 // testing the method append( sal_Int32 i, sal_Int16 radix ) where radix = -5
8281 class append_006_Int32_WrongRadix
: public CppUnit::TestFixture
8284 static const sal_Int32 intVal
= 11;
8287 void setUp() override
8289 arrOUS
[0] = new OString( kTestStr7
);
8290 arrOUS
[1] = new OString( );
8291 arrOUS
[2] = new OString( kTestStr25
);
8292 arrOUS
[3] = new OString( "" );
8293 arrOUS
[4] = new OString( kTestStr28
);
8296 void tearDown() override
8298 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
8299 delete arrOUS
[3]; delete arrOUS
[4];
8304 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
8305 OString
expVal( kTestStr59
);
8307 aStrBuf
.append( intVal
, -5 );
8309 CPPUNIT_ASSERT_MESSAGE
8311 "Appends the WrongRadix to the string buffer arrOUS[0]",
8312 aStrBuf
.getStr()== expVal
&&
8313 aStrBuf
.getLength() == expVal
.getLength()
8319 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
8320 OString
expVal( kTestStr60
);
8322 aStrBuf
.append( intVal
, -5 );
8324 CPPUNIT_ASSERT_MESSAGE
8326 "Appends the WrongRadix to the string buffer arrOUS[1]",
8327 aStrBuf
.getStr()== expVal
&&
8328 aStrBuf
.getLength() == expVal
.getLength()
8334 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
8335 OString
expVal( kTestStr60
);
8337 aStrBuf
.append( intVal
, -5 );
8339 CPPUNIT_ASSERT_MESSAGE
8341 "Appends the WrongRadix to the string buffer arrOUS[2]",
8342 aStrBuf
.getStr()== expVal
&&
8343 aStrBuf
.getLength() == expVal
.getLength()
8350 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
8351 OString
expVal( kTestStr60
);
8353 aStrBuf
.append( intVal
, -5 );
8355 CPPUNIT_ASSERT_MESSAGE
8357 "Appends the WrongRadix to the string buffer arrOUS[3]",
8358 aStrBuf
.getStr()== expVal
&&
8359 aStrBuf
.getLength() == expVal
.getLength()
8366 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8367 OString
expVal( kTestStr61
);
8369 aStrBuf
.append( intVal
, -5 );
8371 CPPUNIT_ASSERT_MESSAGE
8373 "Appends the WrongRadix to the string buffer arrOUS[4]",
8374 (aStrBuf
.toString() == expVal
&&
8375 aStrBuf
.getLength() == expVal
.getLength())
8381 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
8382 OString
expVal( kTestStr60
);
8384 aStrBuf
.append( intVal
, -5 );
8386 CPPUNIT_ASSERT_MESSAGE
8388 "Appends the WrongRadix to the string buffer(with INT_MAX)",
8389 aStrBuf
.getStr()== expVal
&&
8390 aStrBuf
.getLength() == expVal
.getLength()
8396 CPPUNIT_TEST_SUITE( append_006_Int32_WrongRadix
);
8397 CPPUNIT_TEST( append_001
);
8398 CPPUNIT_TEST( append_002
);
8399 CPPUNIT_TEST( append_003
);
8400 CPPUNIT_TEST( append_004
);
8401 CPPUNIT_TEST( append_005
);
8403 CPPUNIT_TEST( append_006
);
8405 CPPUNIT_TEST_SUITE_END();
8408 class append_006_Int32_defaultParam
: public CppUnit::TestFixture
8413 void setUp() override
8415 arrOUS
[0] = new OString( kTestStr7
);
8416 arrOUS
[1] = new OString( );
8417 arrOUS
[2] = new OString( kTestStr25
);
8418 arrOUS
[3] = new OString( "" );
8419 arrOUS
[4] = new OString( kTestStr28
);
8423 void tearDown() override
8425 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
8426 delete arrOUS
[3]; delete arrOUS
[4];
8431 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
8432 OString
expVal( kTestStr59
);
8433 sal_Int32 input
= 11;
8435 aStrBuf
.append( input
);
8437 CPPUNIT_ASSERT_MESSAGE
8439 "input Int32 11 and return OStringBuffer[0]+11",
8440 (aStrBuf
.toString() == expVal
&&
8441 aStrBuf
.getLength() == expVal
.getLength())
8448 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
8449 OString
expVal( kTestStr62
);
8450 sal_Int32 input
= 0;
8452 aStrBuf
.append( input
);
8454 CPPUNIT_ASSERT_MESSAGE
8456 "input Int32 0 and return OStringBuffer[0]+0",
8457 (aStrBuf
.toString() == expVal
&&
8458 aStrBuf
.getLength() == expVal
.getLength())
8465 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
8466 OString
expVal( kTestStr63
);
8467 sal_Int32 input
= -11;
8469 aStrBuf
.append( input
);
8471 CPPUNIT_ASSERT_MESSAGE
8473 "input Int32 -11 and return OStringBuffer[0]+(-11)",
8474 (aStrBuf
.toString() == expVal
&&
8475 aStrBuf
.getLength() == expVal
.getLength())
8482 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
8483 OString
expVal( kTestStr64
);
8484 sal_Int32 input
= 2147483647;
8486 aStrBuf
.append( input
);
8488 CPPUNIT_ASSERT_MESSAGE
8490 "input Int32 2147483647 and return OStringBuffer[0]+2147483647",
8491 (aStrBuf
.toString() == expVal
&&
8492 aStrBuf
.getLength() == expVal
.getLength())
8499 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
8500 OString
expVal( kTestStr65
);
8501 sal_Int32 input
= kNonSInt32Max
;
8503 aStrBuf
.append( input
);
8505 CPPUNIT_ASSERT_MESSAGE
8507 "input Int32 -2147483648 and return OStringBuffer[0]+(-2147483648)",
8508 (aStrBuf
.toString() == expVal
&&
8509 aStrBuf
.getLength() == expVal
.getLength())
8516 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
8517 OString
expVal( kTestStr60
);
8518 sal_Int32 input
= 11;
8520 aStrBuf
.append( input
);
8522 CPPUNIT_ASSERT_MESSAGE
8524 "input Int32 11 and return OStringBuffer[1]+11",
8525 (aStrBuf
.toString() == expVal
&&
8526 aStrBuf
.getLength() == expVal
.getLength())
8533 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
8534 OString
expVal( kTestStr66
);
8535 sal_Int32 input
= 0;
8537 aStrBuf
.append( input
);
8539 CPPUNIT_ASSERT_MESSAGE
8541 "input Int32 0 and return OStringBuffer[1]+0",
8542 (aStrBuf
.toString() == expVal
&&
8543 aStrBuf
.getLength() == expVal
.getLength())
8550 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
8551 OString
expVal( kTestStr67
);
8552 sal_Int32 input
= -11;
8554 aStrBuf
.append( input
);
8556 CPPUNIT_ASSERT_MESSAGE
8558 "input Int32 -11 and return OStringBuffer[1]+(-11)",
8559 (aStrBuf
.toString() == expVal
&&
8560 aStrBuf
.getLength() == expVal
.getLength())
8567 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
8568 OString
expVal( kTestStr68
);
8569 sal_Int32 input
= 2147483647;
8571 aStrBuf
.append( input
);
8573 CPPUNIT_ASSERT_MESSAGE
8575 "input Int32 2147483647 and return OStringBuffer[1]+2147483647",
8576 (aStrBuf
.toString() == expVal
&&
8577 aStrBuf
.getLength() == expVal
.getLength())
8584 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
8585 OString
expVal( kTestStr69
);
8586 sal_Int32 input
= SAL_MIN_INT32
/*-2147483648*/;
8588 aStrBuf
.append( input
);
8590 CPPUNIT_ASSERT_MESSAGE
8592 "input Int32 -2147483648 and return OStringBuffer[1]+(-2147483648)",
8593 (aStrBuf
.toString() == expVal
&&
8594 aStrBuf
.getLength() == expVal
.getLength())
8601 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
8602 OString
expVal( kTestStr60
);
8603 sal_Int32 input
= 11;
8605 aStrBuf
.append( input
);
8607 CPPUNIT_ASSERT_MESSAGE
8609 "input Int32 11 and return OStringBuffer[2]+11",
8610 (aStrBuf
.toString() == expVal
&&
8611 aStrBuf
.getLength() == expVal
.getLength())
8618 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
8619 OString
expVal( kTestStr66
);
8620 sal_Int32 input
= 0;
8622 aStrBuf
.append( input
);
8624 CPPUNIT_ASSERT_MESSAGE
8626 "input Int32 0 and return OUStringBuffer[2]+0",
8627 (aStrBuf
.toString() == expVal
&&
8628 aStrBuf
.getLength() == expVal
.getLength())
8635 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
8636 OString
expVal( kTestStr67
);
8637 sal_Int32 input
= -11;
8639 aStrBuf
.append( input
);
8641 CPPUNIT_ASSERT_MESSAGE
8643 "input Int32 -11 and return OUStringBuffer[2]+(-11)",
8644 (aStrBuf
.toString() == expVal
&&
8645 aStrBuf
.getLength() == expVal
.getLength())
8652 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
8653 OString
expVal( kTestStr68
);
8654 sal_Int32 input
= 2147483647;
8656 aStrBuf
.append( input
);
8658 CPPUNIT_ASSERT_MESSAGE
8660 "input Int32 2147483647 and return OStringBuffer[2]+2147483647",
8661 (aStrBuf
.toString() == expVal
&&
8662 aStrBuf
.getLength() == expVal
.getLength())
8669 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
8670 OString
expVal( kTestStr69
);
8671 sal_Int32 input
= SAL_MIN_INT32
;
8673 aStrBuf
.append( input
);
8675 CPPUNIT_ASSERT_MESSAGE
8677 "input Int32 -2147483648 and return OStringBuffer[2]+(-2147483648)",
8678 (aStrBuf
.toString() == expVal
&&
8679 aStrBuf
.getLength() == expVal
.getLength())
8686 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
8687 OString
expVal( kTestStr60
);
8688 sal_Int32 input
= 11;
8690 aStrBuf
.append( input
);
8692 CPPUNIT_ASSERT_MESSAGE
8694 "input Int32 11 and return OStringBuffer[3]+11",
8695 (aStrBuf
.toString() == expVal
&&
8696 aStrBuf
.getLength() == expVal
.getLength())
8703 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
8704 OString
expVal( kTestStr66
);
8705 sal_Int32 input
= 0;
8707 aStrBuf
.append( input
);
8709 CPPUNIT_ASSERT_MESSAGE
8711 "input Int32 0 and return OStringBuffer[3]+0",
8712 (aStrBuf
.toString() == expVal
&&
8713 aStrBuf
.getLength() == expVal
.getLength())
8720 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
8721 OString
expVal( kTestStr67
);
8722 sal_Int32 input
= -11;
8724 aStrBuf
.append( input
);
8726 CPPUNIT_ASSERT_MESSAGE
8728 "input Int32 -11 and return OStringBuffer[3]+(-11)",
8729 (aStrBuf
.toString() == expVal
&&
8730 aStrBuf
.getLength() == expVal
.getLength())
8737 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
8738 OString
expVal( kTestStr68
);
8739 sal_Int32 input
= 2147483647;
8741 aStrBuf
.append( input
);
8743 CPPUNIT_ASSERT_MESSAGE
8745 "input Int32 2147483647 and return OStringBuffer[3]+2147483647",
8746 (aStrBuf
.toString() == expVal
&&
8747 aStrBuf
.getLength() == expVal
.getLength())
8754 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
8755 OString
expVal( kTestStr69
);
8756 sal_Int32 input
= SAL_MIN_INT32
;
8758 aStrBuf
.append( input
);
8760 CPPUNIT_ASSERT_MESSAGE
8762 "input Int32 -2147483648 and return OStringBuffer[3]+(-2147483648)",
8763 (aStrBuf
.toString() == expVal
&&
8764 aStrBuf
.getLength() == expVal
.getLength())
8771 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8772 OString
expVal( kTestStr61
);
8773 sal_Int32 input
= 11;
8775 aStrBuf
.append( input
);
8777 CPPUNIT_ASSERT_MESSAGE
8779 "input Int32 11 and return OStringBuffer[4]+11",
8780 (aStrBuf
.toString() == expVal
&&
8781 aStrBuf
.getLength() == expVal
.getLength())
8788 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8789 OString
expVal( kTestStr70
);
8790 sal_Int32 input
= 0;
8792 aStrBuf
.append( input
);
8794 CPPUNIT_ASSERT_MESSAGE
8796 "input Int32 0 and return OStringBuffer[4]+0",
8797 (aStrBuf
.toString() == expVal
&&
8798 aStrBuf
.getLength() == expVal
.getLength())
8805 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8806 OString
expVal( kTestStr71
);
8807 sal_Int32 input
= -11;
8809 aStrBuf
.append( input
);
8811 CPPUNIT_ASSERT_MESSAGE
8813 "input Int32 -11 and return OStringBuffer[4]+(-11)",
8814 (aStrBuf
.toString() == expVal
&&
8815 aStrBuf
.getLength() == expVal
.getLength())
8822 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8823 OString
expVal( kTestStr72
);
8824 sal_Int32 input
= 2147483647;
8826 aStrBuf
.append( input
);
8828 CPPUNIT_ASSERT_MESSAGE
8830 "input Int32 2147483647 and return OStringBuffer[4]+2147483647",
8831 (aStrBuf
.toString() == expVal
&&
8832 aStrBuf
.getLength() == expVal
.getLength())
8839 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
8840 OString
expVal( kTestStr73
);
8841 sal_Int32 input
= SAL_MIN_INT32
;
8843 aStrBuf
.append( input
);
8845 CPPUNIT_ASSERT_MESSAGE
8847 "input Int32 -2147483648 and return OStringBuffer[4]+(-2147483648)",
8848 (aStrBuf
.toString() == expVal
&&
8849 aStrBuf
.getLength() == expVal
.getLength())
8856 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
8857 OString
expVal( kTestStr60
);
8858 sal_Int32 input
= 11;
8860 aStrBuf
.append( input
);
8862 CPPUNIT_ASSERT_MESSAGE
8864 "input Int32 11 and return OStringBuffer(kSInt32Max)+11",
8865 (aStrBuf
.toString() == expVal
&&
8866 aStrBuf
.getLength() == expVal
.getLength())
8873 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
8874 OString
expVal( kTestStr66
);
8875 sal_Int32 input
= 0;
8877 aStrBuf
.append( input
);
8879 CPPUNIT_ASSERT_MESSAGE
8881 "input Int32 0 and return OStringBuffer(kSInt32Max)+0",
8882 (aStrBuf
.toString() == expVal
&&
8883 aStrBuf
.getLength() == expVal
.getLength())
8890 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
8891 OString
expVal( kTestStr67
);
8892 sal_Int32 input
= -11;
8894 aStrBuf
.append( input
);
8896 CPPUNIT_ASSERT_MESSAGE
8898 "input Int32 -11 and return OStringBuffer(kSInt32Max)+(-11)",
8899 (aStrBuf
.toString() == expVal
&&
8900 aStrBuf
.getLength() == expVal
.getLength())
8907 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
8908 OString
expVal( kTestStr68
);
8909 sal_Int32 input
= 2147483647;
8911 aStrBuf
.append( input
);
8913 CPPUNIT_ASSERT_MESSAGE
8915 "input Int32 2147483647 and return OStringBuffer(kSInt32Max)+2147483647",
8916 (aStrBuf
.toString() == expVal
&&
8917 aStrBuf
.getLength() == expVal
.getLength())
8924 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
8925 OString
expVal( kTestStr69
);
8926 sal_Int32 input
= SAL_MIN_INT32
;
8928 aStrBuf
.append( input
);
8930 CPPUNIT_ASSERT_MESSAGE
8932 "input Int32 -2147483648 and return OStringBuffer(kSInt32Max)+(-2147483648)",
8933 (aStrBuf
.toString() == expVal
&&
8934 aStrBuf
.getLength() == expVal
.getLength())
8940 CPPUNIT_TEST_SUITE( append_006_Int32_defaultParam
);
8941 CPPUNIT_TEST( append_001
);
8942 CPPUNIT_TEST( append_002
);
8943 CPPUNIT_TEST( append_003
);
8944 CPPUNIT_TEST( append_004
);
8945 CPPUNIT_TEST( append_005
);
8946 CPPUNIT_TEST( append_006
);
8947 CPPUNIT_TEST( append_007
);
8948 CPPUNIT_TEST( append_008
);
8949 CPPUNIT_TEST( append_009
);
8950 CPPUNIT_TEST( append_010
);
8951 CPPUNIT_TEST( append_011
);
8952 CPPUNIT_TEST( append_012
);
8953 CPPUNIT_TEST( append_013
);
8954 CPPUNIT_TEST( append_014
);
8955 CPPUNIT_TEST( append_015
);
8956 CPPUNIT_TEST( append_016
);
8957 CPPUNIT_TEST( append_017
);
8958 CPPUNIT_TEST( append_018
);
8959 CPPUNIT_TEST( append_019
);
8960 CPPUNIT_TEST( append_020
);
8961 CPPUNIT_TEST( append_021
);
8962 CPPUNIT_TEST( append_022
);
8963 CPPUNIT_TEST( append_023
);
8964 CPPUNIT_TEST( append_024
);
8965 CPPUNIT_TEST( append_025
);
8967 CPPUNIT_TEST( append_026
);
8968 CPPUNIT_TEST( append_027
);
8969 CPPUNIT_TEST( append_028
);
8970 CPPUNIT_TEST( append_029
);
8971 CPPUNIT_TEST( append_030
);
8973 CPPUNIT_TEST_SUITE_END();
8976 // testing the method append( sal_Int64 l, sal_Int16 radix=2 )
8977 // testing the method append( sal_Int64 l, sal_Int16 radix=8 )
8978 // testing the method append( sal_Int64 l, sal_Int16 radix=10 )
8979 // testing the method append( sal_Int64 l, sal_Int16 radix=16 )
8980 // testing the method append( sal_Int64 l, sal_Int16 radix=36 )
8982 class append_007_Int64
: public CppUnit::TestFixture
8987 void setUp() override
8989 arrOUS
[0] = new OString( kTestStr7
);
8990 arrOUS
[1] = new OString( );
8991 arrOUS
[2] = new OString( kTestStr25
);
8992 arrOUS
[3] = new OString( "" );
8993 arrOUS
[4] = new OString( kTestStr28
);
8997 void tearDown() override
8999 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
9000 delete arrOUS
[3]; delete arrOUS
[4];
9005 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9006 OString
expVal( aStrBuf
.getStr() );
9007 sal_Int64 input
= 0;
9008 sal_Int16 radix
= 2;
9010 expVal
+= OString( "0" );
9011 aStrBuf
.append( input
, radix
);
9013 CPPUNIT_ASSERT_MESSAGE
9015 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9016 aStrBuf
.getStr()== expVal
&&
9017 aStrBuf
.getLength() == expVal
.getLength()
9024 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9025 OString
expVal( aStrBuf
.getStr() );
9026 sal_Int64 input
= 4;
9027 sal_Int16 radix
= 2;
9029 expVal
+= OString( "100" );
9030 aStrBuf
.append( input
, radix
);
9032 CPPUNIT_ASSERT_MESSAGE
9034 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9035 aStrBuf
.getStr()== expVal
&&
9036 aStrBuf
.getLength() == expVal
.getLength()
9043 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9044 OString
expVal( aStrBuf
.getStr() );
9045 sal_Int64 input
= 8;
9046 sal_Int16 radix
= 2;
9048 expVal
+= OString( "1000" );
9049 aStrBuf
.append( input
, radix
);
9051 CPPUNIT_ASSERT_MESSAGE
9053 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9054 aStrBuf
.getStr()== expVal
&&
9055 aStrBuf
.getLength() == expVal
.getLength()
9062 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9063 OString
expVal( aStrBuf
.getStr() );
9064 sal_Int64 input
= 15;
9065 sal_Int16 radix
= 2;
9067 expVal
+= OString( "1111" );
9068 aStrBuf
.append( input
, radix
);
9070 CPPUNIT_ASSERT_MESSAGE
9072 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
9073 aStrBuf
.getStr()== expVal
&&
9074 aStrBuf
.getLength() == expVal
.getLength()
9081 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9082 OString
expVal( aStrBuf
.getStr() );
9083 sal_Int64 input
= 0;
9084 sal_Int16 radix
= 8;
9086 expVal
+= OString( "0" );
9087 aStrBuf
.append( input
, radix
);
9089 CPPUNIT_ASSERT_MESSAGE
9091 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9092 aStrBuf
.getStr()== expVal
&&
9093 aStrBuf
.getLength() == expVal
.getLength()
9100 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9101 OString
expVal( aStrBuf
.getStr() );
9102 sal_Int64 input
= 4;
9103 sal_Int16 radix
= 8;
9105 expVal
+= OString( "4" );
9106 aStrBuf
.append( input
, radix
);
9108 CPPUNIT_ASSERT_MESSAGE
9110 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9111 aStrBuf
.getStr()== expVal
&&
9112 aStrBuf
.getLength() == expVal
.getLength()
9119 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9120 OString
expVal( aStrBuf
.getStr() );
9121 sal_Int64 input
= 8;
9122 sal_Int16 radix
= 8;
9124 expVal
+= OString( "10" );
9125 aStrBuf
.append( input
, radix
);
9127 CPPUNIT_ASSERT_MESSAGE
9129 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9130 aStrBuf
.getStr()== expVal
&&
9131 aStrBuf
.getLength() == expVal
.getLength()
9138 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9139 OString
expVal( aStrBuf
.getStr() );
9140 sal_Int64 input
= 15;
9141 sal_Int16 radix
= 8;
9143 expVal
+= OString( "17" );
9144 aStrBuf
.append( input
, radix
);
9146 CPPUNIT_ASSERT_MESSAGE
9148 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
9149 aStrBuf
.getStr()== expVal
&&
9150 aStrBuf
.getLength() == expVal
.getLength()
9157 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9158 OString
expVal( aStrBuf
.getStr() );
9159 sal_Int64 input
= 0;
9160 sal_Int16 radix
= 10;
9162 expVal
+= OString( "0" );
9163 aStrBuf
.append( input
, radix
);
9165 CPPUNIT_ASSERT_MESSAGE
9167 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9168 aStrBuf
.getStr()== expVal
&&
9169 aStrBuf
.getLength() == expVal
.getLength()
9176 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9177 OString
expVal( aStrBuf
.getStr() );
9178 sal_Int64 input
= 4;
9179 sal_Int16 radix
= 10;
9181 expVal
+= OString( "4" );
9182 aStrBuf
.append( input
, radix
);
9184 CPPUNIT_ASSERT_MESSAGE
9186 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9187 aStrBuf
.getStr()== expVal
&&
9188 aStrBuf
.getLength() == expVal
.getLength()
9195 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9196 OString
expVal( aStrBuf
.getStr() );
9197 sal_Int64 input
= 8;
9198 sal_Int16 radix
= 10;
9200 expVal
+= OString( "8" );
9201 aStrBuf
.append( input
, radix
);
9203 CPPUNIT_ASSERT_MESSAGE
9205 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9206 aStrBuf
.getStr()== expVal
&&
9207 aStrBuf
.getLength() == expVal
.getLength()
9214 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9215 OString
expVal( aStrBuf
.getStr() );
9216 sal_Int64 input
= 15;
9217 sal_Int16 radix
= 10;
9219 expVal
+= OString( "15" );
9220 aStrBuf
.append( input
, radix
);
9222 CPPUNIT_ASSERT_MESSAGE
9224 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
9225 aStrBuf
.getStr()== expVal
&&
9226 aStrBuf
.getLength() == expVal
.getLength()
9233 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9234 OString
expVal( aStrBuf
.getStr() );
9235 sal_Int64 input
= 0;
9236 sal_Int16 radix
= 16;
9238 expVal
+= OString( "0" );
9239 aStrBuf
.append( input
, radix
);
9241 CPPUNIT_ASSERT_MESSAGE
9243 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9244 aStrBuf
.getStr()== expVal
&&
9245 aStrBuf
.getLength() == expVal
.getLength()
9252 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9253 OString
expVal( aStrBuf
.getStr() );
9254 sal_Int64 input
= 4;
9255 sal_Int16 radix
= 16;
9257 expVal
+= OString( "4" );
9258 aStrBuf
.append( input
, radix
);
9260 CPPUNIT_ASSERT_MESSAGE
9262 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9263 aStrBuf
.getStr()== expVal
&&
9264 aStrBuf
.getLength() == expVal
.getLength()
9271 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9272 OString
expVal( aStrBuf
.getStr() );
9273 sal_Int64 input
= 8;
9274 sal_Int16 radix
= 16;
9276 expVal
+= OString( "8" );
9277 aStrBuf
.append( input
, radix
);
9279 CPPUNIT_ASSERT_MESSAGE
9281 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9282 aStrBuf
.getStr()== expVal
&&
9283 aStrBuf
.getLength() == expVal
.getLength()
9290 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9291 OString
expVal( aStrBuf
.getStr() );
9292 sal_Int64 input
= 15;
9293 sal_Int16 radix
= 16;
9295 expVal
+= OString( "f" );
9296 aStrBuf
.append( input
, radix
);
9298 CPPUNIT_ASSERT_MESSAGE
9300 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
9301 aStrBuf
.getStr()== expVal
&&
9302 aStrBuf
.getLength() == expVal
.getLength()
9309 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9310 OString
expVal( aStrBuf
.getStr() );
9311 sal_Int64 input
= 0;
9312 sal_Int16 radix
= 36;
9314 expVal
+= OString( "0" );
9315 aStrBuf
.append( input
, radix
);
9317 CPPUNIT_ASSERT_MESSAGE
9319 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9320 aStrBuf
.getStr()== expVal
&&
9321 aStrBuf
.getLength() == expVal
.getLength()
9328 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9329 OString
expVal( aStrBuf
.getStr() );
9330 sal_Int64 input
= 4;
9331 sal_Int16 radix
= 36;
9333 expVal
+= OString( "4" );
9334 aStrBuf
.append( input
, radix
);
9336 CPPUNIT_ASSERT_MESSAGE
9338 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9339 aStrBuf
.getStr()== expVal
&&
9340 aStrBuf
.getLength() == expVal
.getLength()
9347 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9348 OString
expVal( aStrBuf
.getStr() );
9349 sal_Int64 input
= 8;
9350 sal_Int16 radix
= 36;
9352 expVal
+= OString( "8" );
9353 aStrBuf
.append( input
, radix
);
9355 CPPUNIT_ASSERT_MESSAGE
9357 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9358 aStrBuf
.getStr()== expVal
&&
9359 aStrBuf
.getLength() == expVal
.getLength()
9366 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
9367 OString
expVal( aStrBuf
.getStr() );
9368 sal_Int64 input
= 35;
9369 sal_Int16 radix
= 36;
9371 expVal
+= OString( "z" );
9372 aStrBuf
.append( input
, radix
);
9374 CPPUNIT_ASSERT_MESSAGE
9376 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9377 aStrBuf
.getStr()== expVal
&&
9378 aStrBuf
.getLength() == expVal
.getLength()
9385 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9386 OString
expVal( aStrBuf
.getStr() );
9387 sal_Int64 input
= 0;
9388 sal_Int16 radix
= 2;
9390 expVal
+= OString( "0" );
9391 aStrBuf
.append( input
, radix
);
9393 CPPUNIT_ASSERT_MESSAGE
9395 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9396 aStrBuf
.getStr()== expVal
&&
9397 aStrBuf
.getLength() == expVal
.getLength()
9404 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9405 OString
expVal( aStrBuf
.getStr() );
9406 sal_Int64 input
= 4;
9407 sal_Int16 radix
= 2;
9409 expVal
+= OString( "100" );
9410 aStrBuf
.append( input
, radix
);
9412 CPPUNIT_ASSERT_MESSAGE
9414 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9415 aStrBuf
.getStr()== expVal
&&
9416 aStrBuf
.getLength() == expVal
.getLength()
9423 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9424 OString
expVal( aStrBuf
.getStr() );
9425 sal_Int64 input
= 8;
9426 sal_Int16 radix
= 2;
9428 expVal
+= OString( "1000" );
9429 aStrBuf
.append( input
, radix
);
9431 CPPUNIT_ASSERT_MESSAGE
9433 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9434 aStrBuf
.getStr()== expVal
&&
9435 aStrBuf
.getLength() == expVal
.getLength()
9442 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9443 OString
expVal( aStrBuf
.getStr() );
9444 sal_Int64 input
= 15;
9445 sal_Int16 radix
= 2;
9447 expVal
+= OString( "1111" );
9448 aStrBuf
.append( input
, radix
);
9450 CPPUNIT_ASSERT_MESSAGE
9452 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9453 aStrBuf
.getStr()== expVal
&&
9454 aStrBuf
.getLength() == expVal
.getLength()
9461 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9462 OString
expVal( aStrBuf
.getStr() );
9463 sal_Int64 input
= 0;
9464 sal_Int16 radix
= 8;
9466 expVal
+= OString( "0" );
9467 aStrBuf
.append( input
, radix
);
9469 CPPUNIT_ASSERT_MESSAGE
9471 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9472 aStrBuf
.getStr()== expVal
&&
9473 aStrBuf
.getLength() == expVal
.getLength()
9480 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9481 OString
expVal( aStrBuf
.getStr() );
9482 sal_Int64 input
= 4;
9483 sal_Int16 radix
= 8;
9485 expVal
+= OString( "4" );
9486 aStrBuf
.append( input
, radix
);
9488 CPPUNIT_ASSERT_MESSAGE
9490 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9491 aStrBuf
.getStr()== expVal
&&
9492 aStrBuf
.getLength() == expVal
.getLength()
9499 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9500 OString
expVal( aStrBuf
.getStr() );
9501 sal_Int64 input
= 8;
9502 sal_Int16 radix
= 8;
9504 expVal
+= OString( "10" );
9505 aStrBuf
.append( input
, radix
);
9507 CPPUNIT_ASSERT_MESSAGE
9509 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9510 aStrBuf
.getStr()== expVal
&&
9511 aStrBuf
.getLength() == expVal
.getLength()
9518 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9519 OString
expVal( aStrBuf
.getStr() );
9520 sal_Int64 input
= 15;
9521 sal_Int16 radix
= 8;
9523 expVal
+= OString( "17" );
9524 aStrBuf
.append( input
, radix
);
9526 CPPUNIT_ASSERT_MESSAGE
9528 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9529 aStrBuf
.getStr()== expVal
&&
9530 aStrBuf
.getLength() == expVal
.getLength()
9537 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9538 OString
expVal( aStrBuf
.getStr() );
9539 sal_Int64 input
= 0;
9540 sal_Int16 radix
= 10;
9542 expVal
+= OString( "0" );
9543 aStrBuf
.append( input
, radix
);
9545 CPPUNIT_ASSERT_MESSAGE
9547 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9548 aStrBuf
.getStr()== expVal
&&
9549 aStrBuf
.getLength() == expVal
.getLength()
9556 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9557 OString
expVal( aStrBuf
.getStr() );
9558 sal_Int64 input
= 4;
9559 sal_Int16 radix
= 10;
9561 expVal
+= OString( "4" );
9562 aStrBuf
.append( input
, radix
);
9564 CPPUNIT_ASSERT_MESSAGE
9566 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9567 aStrBuf
.getStr()== expVal
&&
9568 aStrBuf
.getLength() == expVal
.getLength()
9575 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9576 OString
expVal( aStrBuf
.getStr() );
9577 sal_Int64 input
= 8;
9578 sal_Int16 radix
= 10;
9580 expVal
+= OString( "8" );
9581 aStrBuf
.append( input
, radix
);
9583 CPPUNIT_ASSERT_MESSAGE
9585 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9586 aStrBuf
.getStr()== expVal
&&
9587 aStrBuf
.getLength() == expVal
.getLength()
9594 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9595 OString
expVal( aStrBuf
.getStr() );
9596 sal_Int64 input
= 15;
9597 sal_Int16 radix
= 10;
9599 expVal
+= OString( "15" );
9600 aStrBuf
.append( input
, radix
);
9602 CPPUNIT_ASSERT_MESSAGE
9604 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9605 aStrBuf
.getStr()== expVal
&&
9606 aStrBuf
.getLength() == expVal
.getLength()
9613 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9614 OString
expVal( aStrBuf
.getStr() );
9615 sal_Int64 input
= 0;
9616 sal_Int16 radix
= 16;
9618 expVal
+= OString( "0" );
9619 aStrBuf
.append( input
, radix
);
9621 CPPUNIT_ASSERT_MESSAGE
9623 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9624 aStrBuf
.getStr()== expVal
&&
9625 aStrBuf
.getLength() == expVal
.getLength()
9632 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9633 OString
expVal( aStrBuf
.getStr() );
9634 sal_Int64 input
= 4;
9635 sal_Int16 radix
= 16;
9637 expVal
+= OString( "4" );
9638 aStrBuf
.append( input
, radix
);
9640 CPPUNIT_ASSERT_MESSAGE
9642 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9643 aStrBuf
.getStr()== expVal
&&
9644 aStrBuf
.getLength() == expVal
.getLength()
9651 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9652 OString
expVal( aStrBuf
.getStr() );
9653 sal_Int64 input
= 8;
9654 sal_Int16 radix
= 16;
9656 expVal
+= OString( "8" );
9657 aStrBuf
.append( input
, radix
);
9659 CPPUNIT_ASSERT_MESSAGE
9661 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9662 aStrBuf
.getStr()== expVal
&&
9663 aStrBuf
.getLength() == expVal
.getLength()
9670 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9671 OString
expVal( aStrBuf
.getStr() );
9672 sal_Int64 input
= 15;
9673 sal_Int16 radix
= 16;
9675 expVal
+= OString( "f" );
9676 aStrBuf
.append( input
, radix
);
9678 CPPUNIT_ASSERT_MESSAGE
9680 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9681 aStrBuf
.getStr()== expVal
&&
9682 aStrBuf
.getLength() == expVal
.getLength()
9689 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9690 OString
expVal( aStrBuf
.getStr() );
9691 sal_Int64 input
= 0;
9692 sal_Int16 radix
= 36;
9694 expVal
+= OString( "0" );
9695 aStrBuf
.append( input
, radix
);
9697 CPPUNIT_ASSERT_MESSAGE
9699 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9700 aStrBuf
.getStr()== expVal
&&
9701 aStrBuf
.getLength() == expVal
.getLength()
9708 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9709 OString
expVal( aStrBuf
.getStr() );
9710 sal_Int64 input
= 4;
9711 sal_Int16 radix
= 36;
9713 expVal
+= OString( "4" );
9714 aStrBuf
.append( input
, radix
);
9716 CPPUNIT_ASSERT_MESSAGE
9718 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9719 aStrBuf
.getStr()== expVal
&&
9720 aStrBuf
.getLength() == expVal
.getLength()
9727 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9728 OString
expVal( aStrBuf
.getStr() );
9729 sal_Int64 input
= 8;
9730 sal_Int16 radix
= 36;
9732 expVal
+= OString( "8" );
9733 aStrBuf
.append( input
, radix
);
9735 CPPUNIT_ASSERT_MESSAGE
9737 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9738 aStrBuf
.getStr()== expVal
&&
9739 aStrBuf
.getLength() == expVal
.getLength()
9746 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
9747 OString
expVal( aStrBuf
.getStr() );
9748 sal_Int64 input
= 35;
9749 sal_Int16 radix
= 36;
9751 expVal
+= OString( "z" );
9752 aStrBuf
.append( input
, radix
);
9754 CPPUNIT_ASSERT_MESSAGE
9756 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9757 aStrBuf
.getStr()== expVal
&&
9758 aStrBuf
.getLength() == expVal
.getLength()
9765 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9766 OString
expVal( aStrBuf
.getStr() );
9767 sal_Int64 input
= 0;
9768 sal_Int16 radix
= 2;
9770 expVal
+= OString( "0" );
9771 aStrBuf
.append( input
, radix
);
9773 CPPUNIT_ASSERT_MESSAGE
9775 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9776 aStrBuf
.getStr()== expVal
&&
9777 aStrBuf
.getLength() == expVal
.getLength()
9784 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9785 OString
expVal( aStrBuf
.getStr() );
9786 sal_Int64 input
= 4;
9787 sal_Int16 radix
= 2;
9789 expVal
+= OString( "100" );
9790 aStrBuf
.append( input
, radix
);
9792 CPPUNIT_ASSERT_MESSAGE
9794 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9795 aStrBuf
.getStr()== expVal
&&
9796 aStrBuf
.getLength() == expVal
.getLength()
9803 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9804 OString
expVal( aStrBuf
.getStr() );
9805 sal_Int64 input
= 8;
9806 sal_Int16 radix
= 2;
9808 expVal
+= OString( "1000" );
9809 aStrBuf
.append( input
, radix
);
9811 CPPUNIT_ASSERT_MESSAGE
9813 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9814 aStrBuf
.getStr()== expVal
&&
9815 aStrBuf
.getLength() == expVal
.getLength()
9822 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9823 OString
expVal( aStrBuf
.getStr() );
9824 sal_Int64 input
= 15;
9825 sal_Int16 radix
= 2;
9827 expVal
+= OString( "1111" );
9828 aStrBuf
.append( input
, radix
);
9830 CPPUNIT_ASSERT_MESSAGE
9832 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9833 aStrBuf
.getStr()== expVal
&&
9834 aStrBuf
.getLength() == expVal
.getLength()
9841 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9842 OString
expVal( aStrBuf
.getStr() );
9843 sal_Int64 input
= 0;
9844 sal_Int16 radix
= 8;
9846 expVal
+= OString( "0" );
9847 aStrBuf
.append( input
, radix
);
9849 CPPUNIT_ASSERT_MESSAGE
9851 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9852 aStrBuf
.getStr()== expVal
&&
9853 aStrBuf
.getLength() == expVal
.getLength()
9860 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9861 OString
expVal( aStrBuf
.getStr() );
9862 sal_Int64 input
= 4;
9863 sal_Int16 radix
= 8;
9865 expVal
+= OString( "4" );
9866 aStrBuf
.append( input
, radix
);
9868 CPPUNIT_ASSERT_MESSAGE
9870 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9871 aStrBuf
.getStr()== expVal
&&
9872 aStrBuf
.getLength() == expVal
.getLength()
9879 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9880 OString
expVal( aStrBuf
.getStr() );
9881 sal_Int64 input
= 8;
9882 sal_Int16 radix
= 8;
9884 expVal
+= OString( "10" );
9885 aStrBuf
.append( input
, radix
);
9887 CPPUNIT_ASSERT_MESSAGE
9889 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9890 aStrBuf
.getStr()== expVal
&&
9891 aStrBuf
.getLength() == expVal
.getLength()
9898 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9899 OString
expVal( aStrBuf
.getStr() );
9900 sal_Int64 input
= 15;
9901 sal_Int16 radix
= 8;
9903 expVal
+= OString( "17" );
9904 aStrBuf
.append( input
, radix
);
9906 CPPUNIT_ASSERT_MESSAGE
9908 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9909 aStrBuf
.getStr()== expVal
&&
9910 aStrBuf
.getLength() == expVal
.getLength()
9917 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9918 OString
expVal( aStrBuf
.getStr() );
9919 sal_Int64 input
= 0;
9920 sal_Int16 radix
= 10;
9922 expVal
+= OString( "0" );
9923 aStrBuf
.append( input
, radix
);
9925 CPPUNIT_ASSERT_MESSAGE
9927 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9928 aStrBuf
.getStr()== expVal
&&
9929 aStrBuf
.getLength() == expVal
.getLength()
9936 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9937 OString
expVal( aStrBuf
.getStr() );
9938 sal_Int64 input
= 4;
9939 sal_Int16 radix
= 10;
9941 expVal
+= OString( "4" );
9942 aStrBuf
.append( input
, radix
);
9944 CPPUNIT_ASSERT_MESSAGE
9946 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9947 aStrBuf
.getStr()== expVal
&&
9948 aStrBuf
.getLength() == expVal
.getLength()
9955 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9956 OString
expVal( aStrBuf
.getStr() );
9957 sal_Int64 input
= 8;
9958 sal_Int16 radix
= 10;
9960 expVal
+= OString( "8" );
9961 aStrBuf
.append( input
, radix
);
9963 CPPUNIT_ASSERT_MESSAGE
9965 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9966 aStrBuf
.getStr()== expVal
&&
9967 aStrBuf
.getLength() == expVal
.getLength()
9974 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9975 OString
expVal( aStrBuf
.getStr() );
9976 sal_Int64 input
= 15;
9977 sal_Int16 radix
= 10;
9979 expVal
+= OString( "15" );
9980 aStrBuf
.append( input
, radix
);
9982 CPPUNIT_ASSERT_MESSAGE
9984 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9985 aStrBuf
.getStr()== expVal
&&
9986 aStrBuf
.getLength() == expVal
.getLength()
9993 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
9994 OString
expVal( aStrBuf
.getStr() );
9995 sal_Int64 input
= 0;
9996 sal_Int16 radix
= 16;
9998 expVal
+= OString( "0" );
9999 aStrBuf
.append( input
, radix
);
10001 CPPUNIT_ASSERT_MESSAGE
10003 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10004 aStrBuf
.getStr()== expVal
&&
10005 aStrBuf
.getLength() == expVal
.getLength()
10012 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10013 OString
expVal( aStrBuf
.getStr() );
10014 sal_Int64 input
= 4;
10015 sal_Int16 radix
= 16;
10017 expVal
+= OString( "4" );
10018 aStrBuf
.append( input
, radix
);
10020 CPPUNIT_ASSERT_MESSAGE
10022 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10023 aStrBuf
.getStr()== expVal
&&
10024 aStrBuf
.getLength() == expVal
.getLength()
10031 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10032 OString
expVal( aStrBuf
.getStr() );
10033 sal_Int64 input
= 8;
10034 sal_Int16 radix
= 16;
10036 expVal
+= OString( "8" );
10037 aStrBuf
.append( input
, radix
);
10039 CPPUNIT_ASSERT_MESSAGE
10041 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10042 aStrBuf
.getStr()== expVal
&&
10043 aStrBuf
.getLength() == expVal
.getLength()
10050 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10051 OString
expVal( aStrBuf
.getStr() );
10052 sal_Int64 input
= 15;
10053 sal_Int16 radix
= 16;
10055 expVal
+= OString( "f" );
10056 aStrBuf
.append( input
, radix
);
10058 CPPUNIT_ASSERT_MESSAGE
10060 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
10061 aStrBuf
.getStr()== expVal
&&
10062 aStrBuf
.getLength() == expVal
.getLength()
10069 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10070 OString
expVal( aStrBuf
.getStr() );
10071 sal_Int64 input
= 0;
10072 sal_Int16 radix
= 36;
10074 expVal
+= OString( "0" );
10075 aStrBuf
.append( input
, radix
);
10077 CPPUNIT_ASSERT_MESSAGE
10079 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10080 aStrBuf
.getStr()== expVal
&&
10081 aStrBuf
.getLength() == expVal
.getLength()
10088 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10089 OString
expVal( aStrBuf
.getStr() );
10090 sal_Int64 input
= 4;
10091 sal_Int16 radix
= 36;
10093 expVal
+= OString( "4" );
10094 aStrBuf
.append( input
, radix
);
10096 CPPUNIT_ASSERT_MESSAGE
10098 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10099 aStrBuf
.getStr()== expVal
&&
10100 aStrBuf
.getLength() == expVal
.getLength()
10107 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10108 OString
expVal( aStrBuf
.getStr() );
10109 sal_Int64 input
= 8;
10110 sal_Int16 radix
= 36;
10112 expVal
+= OString( "8" );
10113 aStrBuf
.append( input
, radix
);
10115 CPPUNIT_ASSERT_MESSAGE
10117 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10118 aStrBuf
.getStr()== expVal
&&
10119 aStrBuf
.getLength() == expVal
.getLength()
10126 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
10127 OString
expVal( aStrBuf
.getStr() );
10128 sal_Int64 input
= 35;
10129 sal_Int16 radix
= 36;
10131 expVal
+= OString( "z" );
10132 aStrBuf
.append( input
, radix
);
10134 CPPUNIT_ASSERT_MESSAGE
10136 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
10137 aStrBuf
.getStr()== expVal
&&
10138 aStrBuf
.getLength() == expVal
.getLength()
10145 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10146 OString
expVal( aStrBuf
.getStr() );
10147 sal_Int64 input
= 0;
10148 sal_Int16 radix
= 2;
10150 expVal
+= OString( "0" );
10151 aStrBuf
.append( input
, radix
);
10153 CPPUNIT_ASSERT_MESSAGE
10155 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10156 aStrBuf
.getStr()== expVal
&&
10157 aStrBuf
.getLength() == expVal
.getLength()
10164 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10165 OString
expVal( aStrBuf
.getStr() );
10166 sal_Int64 input
= 4;
10167 sal_Int16 radix
= 2;
10169 expVal
+= OString( "100" );
10170 aStrBuf
.append( input
, radix
);
10172 CPPUNIT_ASSERT_MESSAGE
10174 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10175 aStrBuf
.getStr()== expVal
&&
10176 aStrBuf
.getLength() == expVal
.getLength()
10183 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10184 OString
expVal( aStrBuf
.getStr() );
10185 sal_Int64 input
= 8;
10186 sal_Int16 radix
= 2;
10188 expVal
+= OString( "1000" );
10189 aStrBuf
.append( input
, radix
);
10191 CPPUNIT_ASSERT_MESSAGE
10193 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10194 aStrBuf
.getStr()== expVal
&&
10195 aStrBuf
.getLength() == expVal
.getLength()
10202 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10203 OString
expVal( aStrBuf
.getStr() );
10204 sal_Int64 input
= 15;
10205 sal_Int16 radix
= 2;
10207 expVal
+= OString( "1111" );
10208 aStrBuf
.append( input
, radix
);
10210 CPPUNIT_ASSERT_MESSAGE
10212 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
10213 aStrBuf
.getStr()== expVal
&&
10214 aStrBuf
.getLength() == expVal
.getLength()
10221 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10222 OString
expVal( aStrBuf
.getStr() );
10223 sal_Int64 input
= 0;
10224 sal_Int16 radix
= 8;
10226 expVal
+= OString( "0" );
10227 aStrBuf
.append( input
, radix
);
10229 CPPUNIT_ASSERT_MESSAGE
10231 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10232 aStrBuf
.getStr()== expVal
&&
10233 aStrBuf
.getLength() == expVal
.getLength()
10240 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10241 OString
expVal( aStrBuf
.getStr() );
10242 sal_Int64 input
= 4;
10243 sal_Int16 radix
= 8;
10245 expVal
+= OString( "4" );
10246 aStrBuf
.append( input
, radix
);
10248 CPPUNIT_ASSERT_MESSAGE
10250 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10251 aStrBuf
.getStr()== expVal
&&
10252 aStrBuf
.getLength() == expVal
.getLength()
10259 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10260 OString
expVal( aStrBuf
.getStr() );
10261 sal_Int64 input
= 8;
10262 sal_Int16 radix
= 8;
10264 expVal
+= OString( "10" );
10265 aStrBuf
.append( input
, radix
);
10267 CPPUNIT_ASSERT_MESSAGE
10269 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10270 aStrBuf
.getStr()== expVal
&&
10271 aStrBuf
.getLength() == expVal
.getLength()
10278 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10279 OString
expVal( aStrBuf
.getStr() );
10280 sal_Int64 input
= 15;
10281 sal_Int16 radix
= 8;
10283 expVal
+= OString( "17" );
10284 aStrBuf
.append( input
, radix
);
10286 CPPUNIT_ASSERT_MESSAGE
10288 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
10289 aStrBuf
.getStr()== expVal
&&
10290 aStrBuf
.getLength() == expVal
.getLength()
10297 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10298 OString
expVal( aStrBuf
.getStr() );
10299 sal_Int64 input
= 0;
10300 sal_Int16 radix
= 10;
10302 expVal
+= OString( "0" );
10303 aStrBuf
.append( input
, radix
);
10305 CPPUNIT_ASSERT_MESSAGE
10307 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10308 aStrBuf
.getStr()== expVal
&&
10309 aStrBuf
.getLength() == expVal
.getLength()
10316 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10317 OString
expVal( aStrBuf
.getStr() );
10318 sal_Int64 input
= 4;
10319 sal_Int16 radix
= 10;
10321 expVal
+= OString( "4" );
10322 aStrBuf
.append( input
, radix
);
10324 CPPUNIT_ASSERT_MESSAGE
10326 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10327 aStrBuf
.getStr()== expVal
&&
10328 aStrBuf
.getLength() == expVal
.getLength()
10335 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10336 OString
expVal( aStrBuf
.getStr() );
10337 sal_Int64 input
= 8;
10338 sal_Int16 radix
= 10;
10340 expVal
+= OString( "8" );
10341 aStrBuf
.append( input
, radix
);
10343 CPPUNIT_ASSERT_MESSAGE
10345 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10346 aStrBuf
.getStr()== expVal
&&
10347 aStrBuf
.getLength() == expVal
.getLength()
10354 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10355 OString
expVal( aStrBuf
.getStr() );
10356 sal_Int64 input
= 15;
10357 sal_Int16 radix
= 10;
10359 expVal
+= OString( "15" );
10360 aStrBuf
.append( input
, radix
);
10362 CPPUNIT_ASSERT_MESSAGE
10364 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10365 aStrBuf
.getStr()== expVal
&&
10366 aStrBuf
.getLength() == expVal
.getLength()
10373 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10374 OString
expVal( aStrBuf
.getStr() );
10375 sal_Int64 input
= 0;
10376 sal_Int16 radix
= 16;
10378 expVal
+= OString( "0" );
10379 aStrBuf
.append( input
, radix
);
10381 CPPUNIT_ASSERT_MESSAGE
10383 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10384 aStrBuf
.getStr()== expVal
&&
10385 aStrBuf
.getLength() == expVal
.getLength()
10392 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10393 OString
expVal( aStrBuf
.getStr() );
10394 sal_Int64 input
= 4;
10395 sal_Int16 radix
= 16;
10397 expVal
+= OString( "4" );
10398 aStrBuf
.append( input
, radix
);
10400 CPPUNIT_ASSERT_MESSAGE
10402 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10403 aStrBuf
.getStr()== expVal
&&
10404 aStrBuf
.getLength() == expVal
.getLength()
10411 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10412 OString
expVal( aStrBuf
.getStr() );
10413 sal_Int64 input
= 8;
10414 sal_Int16 radix
= 16;
10416 expVal
+= OString( "8" );
10417 aStrBuf
.append( input
, radix
);
10419 CPPUNIT_ASSERT_MESSAGE
10421 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10422 aStrBuf
.getStr()== expVal
&&
10423 aStrBuf
.getLength() == expVal
.getLength()
10430 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10431 OString
expVal( aStrBuf
.getStr() );
10432 sal_Int64 input
= 15;
10433 sal_Int16 radix
= 16;
10435 expVal
+= OString( "f" );
10436 aStrBuf
.append( input
, radix
);
10438 CPPUNIT_ASSERT_MESSAGE
10440 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10441 aStrBuf
.getStr()== expVal
&&
10442 aStrBuf
.getLength() == expVal
.getLength()
10449 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10450 OString
expVal( aStrBuf
.getStr() );
10451 sal_Int64 input
= 0;
10452 sal_Int16 radix
= 36;
10454 expVal
+= OString( "0" );
10455 aStrBuf
.append( input
, radix
);
10457 CPPUNIT_ASSERT_MESSAGE
10459 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10460 aStrBuf
.getStr()== expVal
&&
10461 aStrBuf
.getLength() == expVal
.getLength()
10468 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10469 OString
expVal( aStrBuf
.getStr() );
10470 sal_Int64 input
= 4;
10471 sal_Int16 radix
= 36;
10473 expVal
+= OString( "4" );
10474 aStrBuf
.append( input
, radix
);
10476 CPPUNIT_ASSERT_MESSAGE
10478 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10479 aStrBuf
.getStr()== expVal
&&
10480 aStrBuf
.getLength() == expVal
.getLength()
10487 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10488 OString
expVal( aStrBuf
.getStr() );
10489 sal_Int64 input
= 8;
10490 sal_Int16 radix
= 36;
10492 expVal
+= OString( "8" );
10493 aStrBuf
.append( input
, radix
);
10495 CPPUNIT_ASSERT_MESSAGE
10497 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10498 aStrBuf
.getStr()== expVal
&&
10499 aStrBuf
.getLength() == expVal
.getLength()
10506 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
10507 OString
expVal( aStrBuf
.getStr() );
10508 sal_Int64 input
= 35;
10509 sal_Int16 radix
= 36;
10511 expVal
+= OString( "z" );
10512 aStrBuf
.append( input
, radix
);
10514 CPPUNIT_ASSERT_MESSAGE
10516 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10517 aStrBuf
.getStr()== expVal
&&
10518 aStrBuf
.getLength() == expVal
.getLength()
10525 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10526 OString
expVal( aStrBuf
.getStr() );
10527 sal_Int64 input
= 0;
10528 sal_Int16 radix
= 2;
10530 expVal
+= OString( "0" );
10531 aStrBuf
.append( input
, radix
);
10533 CPPUNIT_ASSERT_MESSAGE
10535 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10536 aStrBuf
.getStr()== expVal
&&
10537 aStrBuf
.getLength() == expVal
.getLength()
10544 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10545 OString
expVal( aStrBuf
.getStr() );
10546 sal_Int64 input
= 4;
10547 sal_Int16 radix
= 2;
10549 expVal
+= OString( "100" );
10550 aStrBuf
.append( input
, radix
);
10552 CPPUNIT_ASSERT_MESSAGE
10554 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10555 aStrBuf
.getStr()== expVal
&&
10556 aStrBuf
.getLength() == expVal
.getLength()
10563 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10564 OString
expVal( aStrBuf
.getStr() );
10565 sal_Int64 input
= 8;
10566 sal_Int16 radix
= 2;
10568 expVal
+= OString( "1000" );
10569 aStrBuf
.append( input
, radix
);
10571 CPPUNIT_ASSERT_MESSAGE
10573 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10574 aStrBuf
.getStr()== expVal
&&
10575 aStrBuf
.getLength() == expVal
.getLength()
10582 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10583 OString
expVal( aStrBuf
.getStr() );
10584 sal_Int64 input
= 15;
10585 sal_Int16 radix
= 2;
10587 expVal
+= OString( "1111" );
10588 aStrBuf
.append( input
, radix
);
10590 CPPUNIT_ASSERT_MESSAGE
10592 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10593 aStrBuf
.getStr()== expVal
&&
10594 aStrBuf
.getLength() == expVal
.getLength()
10601 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10602 OString
expVal( aStrBuf
.getStr() );
10603 sal_Int64 input
= 0;
10604 sal_Int16 radix
= 8;
10606 expVal
+= OString( "0" );
10607 aStrBuf
.append( input
, radix
);
10609 CPPUNIT_ASSERT_MESSAGE
10611 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10612 aStrBuf
.getStr()== expVal
&&
10613 aStrBuf
.getLength() == expVal
.getLength()
10620 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10621 OString
expVal( aStrBuf
.getStr() );
10622 sal_Int64 input
= 4;
10623 sal_Int16 radix
= 8;
10625 expVal
+= OString( "4" );
10626 aStrBuf
.append( input
, radix
);
10628 CPPUNIT_ASSERT_MESSAGE
10630 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10631 aStrBuf
.getStr()== expVal
&&
10632 aStrBuf
.getLength() == expVal
.getLength()
10639 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10640 OString
expVal( aStrBuf
.getStr() );
10641 sal_Int64 input
= 8;
10642 sal_Int16 radix
= 8;
10644 expVal
+= OString( "10" );
10645 aStrBuf
.append( input
, radix
);
10647 CPPUNIT_ASSERT_MESSAGE
10649 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10650 aStrBuf
.getStr()== expVal
&&
10651 aStrBuf
.getLength() == expVal
.getLength()
10658 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10659 OString
expVal( aStrBuf
.getStr() );
10660 sal_Int64 input
= 15;
10661 sal_Int16 radix
= 8;
10663 expVal
+= OString( "17" );
10664 aStrBuf
.append( input
, radix
);
10666 CPPUNIT_ASSERT_MESSAGE
10668 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10669 aStrBuf
.getStr()== expVal
&&
10670 aStrBuf
.getLength() == expVal
.getLength()
10677 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10678 OString
expVal( aStrBuf
.getStr() );
10679 sal_Int64 input
= 0;
10680 sal_Int16 radix
= 10;
10682 expVal
+= OString( "0" );
10683 aStrBuf
.append( input
, radix
);
10685 CPPUNIT_ASSERT_MESSAGE
10687 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10688 aStrBuf
.getStr()== expVal
&&
10689 aStrBuf
.getLength() == expVal
.getLength()
10696 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10697 OString
expVal( aStrBuf
.getStr() );
10698 sal_Int64 input
= 4;
10699 sal_Int16 radix
= 10;
10701 expVal
+= OString( "4" );
10702 aStrBuf
.append( input
, radix
);
10704 CPPUNIT_ASSERT_MESSAGE
10706 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10707 aStrBuf
.getStr()== expVal
&&
10708 aStrBuf
.getLength() == expVal
.getLength()
10715 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10716 OString
expVal( aStrBuf
.getStr() );
10717 sal_Int64 input
= 8;
10718 sal_Int16 radix
= 10;
10720 expVal
+= OString( "8" );
10721 aStrBuf
.append( input
, radix
);
10723 CPPUNIT_ASSERT_MESSAGE
10725 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10726 aStrBuf
.getStr()== expVal
&&
10727 aStrBuf
.getLength() == expVal
.getLength()
10734 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10735 OString
expVal( aStrBuf
.getStr() );
10736 sal_Int64 input
= 15;
10737 sal_Int16 radix
= 10;
10739 expVal
+= OString( "15" );
10740 aStrBuf
.append( input
, radix
);
10742 CPPUNIT_ASSERT_MESSAGE
10744 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10745 aStrBuf
.getStr()== expVal
&&
10746 aStrBuf
.getLength() == expVal
.getLength()
10753 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10754 OString
expVal( aStrBuf
.getStr() );
10755 sal_Int64 input
= 0;
10756 sal_Int16 radix
= 16;
10758 expVal
+= OString( "0" );
10759 aStrBuf
.append( input
, radix
);
10761 CPPUNIT_ASSERT_MESSAGE
10763 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10764 aStrBuf
.getStr()== expVal
&&
10765 aStrBuf
.getLength() == expVal
.getLength()
10772 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10773 OString
expVal( aStrBuf
.getStr() );
10774 sal_Int64 input
= 4;
10775 sal_Int16 radix
= 16;
10777 expVal
+= OString( "4" );
10778 aStrBuf
.append( input
, radix
);
10780 CPPUNIT_ASSERT_MESSAGE
10782 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10783 aStrBuf
.getStr()== expVal
&&
10784 aStrBuf
.getLength() == expVal
.getLength()
10791 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10792 OString
expVal( aStrBuf
.getStr() );
10793 sal_Int64 input
= 8;
10794 sal_Int16 radix
= 16;
10796 expVal
+= OString( "8" );
10797 aStrBuf
.append( input
, radix
);
10799 CPPUNIT_ASSERT_MESSAGE
10801 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10802 aStrBuf
.getStr()== expVal
&&
10803 aStrBuf
.getLength() == expVal
.getLength()
10810 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10811 OString
expVal( aStrBuf
.getStr() );
10812 sal_Int64 input
= 15;
10813 sal_Int16 radix
= 16;
10815 expVal
+= OString( "f" );
10816 aStrBuf
.append( input
, radix
);
10818 CPPUNIT_ASSERT_MESSAGE
10820 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10821 aStrBuf
.getStr()== expVal
&&
10822 aStrBuf
.getLength() == expVal
.getLength()
10829 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10830 OString
expVal( aStrBuf
.getStr() );
10831 sal_Int64 input
= 0;
10832 sal_Int16 radix
= 36;
10834 expVal
+= OString( "0" );
10835 aStrBuf
.append( input
, radix
);
10837 CPPUNIT_ASSERT_MESSAGE
10839 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10840 aStrBuf
.getStr()== expVal
&&
10841 aStrBuf
.getLength() == expVal
.getLength()
10848 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10849 OString
expVal( aStrBuf
.getStr() );
10850 sal_Int64 input
= 4;
10851 sal_Int16 radix
= 36;
10853 expVal
+= OString( "4" );
10854 aStrBuf
.append( input
, radix
);
10856 CPPUNIT_ASSERT_MESSAGE
10858 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10859 aStrBuf
.getStr()== expVal
&&
10860 aStrBuf
.getLength() == expVal
.getLength()
10867 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10868 OString
expVal( aStrBuf
.getStr() );
10869 sal_Int64 input
= 8;
10870 sal_Int16 radix
= 36;
10872 expVal
+= OString( "8" );
10873 aStrBuf
.append( input
, radix
);
10875 CPPUNIT_ASSERT_MESSAGE
10877 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10878 aStrBuf
.getStr()== expVal
&&
10879 aStrBuf
.getLength() == expVal
.getLength()
10886 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
10887 OString
expVal( aStrBuf
.getStr() );
10888 sal_Int64 input
= 35;
10889 sal_Int16 radix
= 36;
10891 expVal
+= OString( "z" );
10892 aStrBuf
.append( input
, radix
);
10894 CPPUNIT_ASSERT_MESSAGE
10896 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10897 aStrBuf
.getStr()== expVal
&&
10898 aStrBuf
.getLength() == expVal
.getLength()
10903 CPPUNIT_TEST_SUITE( append_007_Int64
);
10904 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
10905 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
10906 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
10907 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
10908 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
10909 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
10910 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
10911 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
10912 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
10913 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
10914 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
10915 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
10916 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
10917 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
10918 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
10919 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
10920 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
10921 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
10922 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
10923 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
10924 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
10925 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
10926 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
10927 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
10928 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
10929 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
10930 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
10931 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
10932 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
10933 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
10934 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
10935 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
10936 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
10937 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
10938 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
10939 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
10940 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
10941 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
10942 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
10943 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
10944 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
10945 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
10946 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
10947 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
10948 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
10949 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
10950 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
10951 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
10952 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
10953 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
10954 CPPUNIT_TEST_SUITE_END();
10957 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
10958 // where i = large constants
10959 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
10960 // where i = large constants
10961 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
10962 // where i = large constants
10963 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
10964 // where i = large constants
10965 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
10966 // where i = large constants
10968 class append_007_Int64_Bounderies
: public CppUnit::TestFixture
10970 OString
* arrOUS
[5];
10973 void setUp() override
10975 arrOUS
[0] = new OString( kTestStr7
);
10976 arrOUS
[1] = new OString( );
10977 arrOUS
[2] = new OString( kTestStr25
);
10978 arrOUS
[3] = new OString( "" );
10979 arrOUS
[4] = new OString( kTestStr28
);
10983 void tearDown() override
10985 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
10986 delete arrOUS
[3]; delete arrOUS
[4];
10991 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
10992 OString
expVal( aStrBuf
.getStr() );
10993 sal_Int64 input
= kSInt8Max
;
10994 sal_Int16 radix
= 2;
10996 expVal
+= OString( "1111111" );
10997 aStrBuf
.append( input
, radix
);
10999 CPPUNIT_ASSERT_MESSAGE
11001 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
11002 aStrBuf
.getStr()== expVal
&&
11003 aStrBuf
.getLength() == expVal
.getLength()
11010 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11011 OString
expVal( aStrBuf
.getStr() );
11012 sal_Int64 input
= kSInt64Max
;
11013 sal_Int16 radix
= 2;
11015 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11016 aStrBuf
.append( input
, radix
);
11018 CPPUNIT_ASSERT_MESSAGE
11020 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
11021 aStrBuf
.getStr()== expVal
&&
11022 aStrBuf
.getLength() == expVal
.getLength()
11029 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11030 OString
expVal( aStrBuf
.getStr() );
11031 sal_Int64 input
= kSInt8Max
;
11032 sal_Int16 radix
= 8;
11034 expVal
+= OString( "177" );
11035 aStrBuf
.append( input
, radix
);
11037 CPPUNIT_ASSERT_MESSAGE
11039 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
11040 aStrBuf
.getStr()== expVal
&&
11041 aStrBuf
.getLength() == expVal
.getLength()
11048 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11049 OString
expVal( aStrBuf
.getStr() );
11050 sal_Int64 input
= kSInt64Max
;
11051 sal_Int16 radix
= 8;
11053 expVal
+= OString( "777777777777777777777" );
11054 aStrBuf
.append( input
, radix
);
11056 CPPUNIT_ASSERT_MESSAGE
11058 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
11059 aStrBuf
.getStr()== expVal
&&
11060 aStrBuf
.getLength() == expVal
.getLength()
11067 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11068 OString
expVal( aStrBuf
.getStr() );
11069 sal_Int64 input
= kSInt8Max
;
11070 sal_Int16 radix
= 10;
11072 expVal
+= OString( "127" );
11073 aStrBuf
.append( input
, radix
);
11075 CPPUNIT_ASSERT_MESSAGE
11077 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
11078 aStrBuf
.getStr()== expVal
&&
11079 aStrBuf
.getLength() == expVal
.getLength()
11086 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11087 OString
expVal( aStrBuf
.getStr() );
11088 sal_Int64 input
= kSInt64Max
;
11089 sal_Int16 radix
= 10;
11091 expVal
+= OString( "9223372036854775807" );
11092 aStrBuf
.append( input
, radix
);
11094 CPPUNIT_ASSERT_MESSAGE
11096 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
11097 aStrBuf
.getStr()== expVal
&&
11098 aStrBuf
.getLength() == expVal
.getLength()
11105 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11106 OString
expVal( aStrBuf
.getStr() );
11107 sal_Int64 input
= kSInt8Max
;
11108 sal_Int16 radix
= 16;
11110 expVal
+= OString( "7f" );
11111 aStrBuf
.append( input
, radix
);
11113 CPPUNIT_ASSERT_MESSAGE
11115 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
11116 aStrBuf
.getStr()== expVal
&&
11117 aStrBuf
.getLength() == expVal
.getLength()
11124 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11125 OString
expVal( aStrBuf
.getStr() );
11126 sal_Int64 input
= kSInt64Max
;
11127 sal_Int16 radix
= 16;
11129 expVal
+= OString( "7fffffffffffffff" );
11130 aStrBuf
.append( input
, radix
);
11132 CPPUNIT_ASSERT_MESSAGE
11134 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
11135 aStrBuf
.getStr()== expVal
&&
11136 aStrBuf
.getLength() == expVal
.getLength()
11143 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11144 OString
expVal( aStrBuf
.getStr() );
11145 sal_Int64 input
= kSInt8Max
;
11146 sal_Int16 radix
= 36;
11148 expVal
+= OString( "3j" );
11149 aStrBuf
.append( input
, radix
);
11151 CPPUNIT_ASSERT_MESSAGE
11153 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
11154 aStrBuf
.getStr()== expVal
&&
11155 aStrBuf
.getLength() == expVal
.getLength()
11162 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
11163 OString
expVal( aStrBuf
.getStr() );
11164 sal_Int64 input
= kSInt64Max
;
11165 sal_Int16 radix
= 36;
11167 expVal
+= OString( "1y2p0ij32e8e7" );
11168 aStrBuf
.append( input
, radix
);
11170 CPPUNIT_ASSERT_MESSAGE
11172 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
11173 aStrBuf
.getStr()== expVal
&&
11174 aStrBuf
.getLength() == expVal
.getLength()
11181 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11182 OString
expVal( aStrBuf
.getStr() );
11183 sal_Int64 input
= kSInt8Max
;
11184 sal_Int16 radix
= 2;
11186 expVal
+= OString( "1111111" );
11187 aStrBuf
.append( input
, radix
);
11189 CPPUNIT_ASSERT_MESSAGE
11191 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
11192 aStrBuf
.getStr()== expVal
&&
11193 aStrBuf
.getLength() == expVal
.getLength()
11200 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11201 OString
expVal( aStrBuf
.getStr() );
11202 sal_Int64 input
= kSInt64Max
;
11203 sal_Int16 radix
= 2;
11205 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11206 aStrBuf
.append( input
, radix
);
11208 CPPUNIT_ASSERT_MESSAGE
11210 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
11211 aStrBuf
.getStr()== expVal
&&
11212 aStrBuf
.getLength() == expVal
.getLength()
11219 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11220 OString
expVal( aStrBuf
.getStr() );
11221 sal_Int64 input
= kSInt8Max
;
11222 sal_Int16 radix
= 8;
11224 expVal
+= OString( "177" );
11225 aStrBuf
.append( input
, radix
);
11227 CPPUNIT_ASSERT_MESSAGE
11229 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
11230 aStrBuf
.getStr()== expVal
&&
11231 aStrBuf
.getLength() == expVal
.getLength()
11238 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11239 OString
expVal( aStrBuf
.getStr() );
11240 sal_Int64 input
= kSInt64Max
;
11241 sal_Int16 radix
= 8;
11243 expVal
+= OString( "777777777777777777777" );
11244 aStrBuf
.append( input
, radix
);
11246 CPPUNIT_ASSERT_MESSAGE
11248 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
11249 aStrBuf
.getStr()== expVal
&&
11250 aStrBuf
.getLength() == expVal
.getLength()
11257 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11258 OString
expVal( aStrBuf
.getStr() );
11259 sal_Int64 input
= kSInt8Max
;
11260 sal_Int16 radix
= 10;
11262 expVal
+= OString( "127" );
11263 aStrBuf
.append( input
, radix
);
11265 CPPUNIT_ASSERT_MESSAGE
11267 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
11268 aStrBuf
.getStr()== expVal
&&
11269 aStrBuf
.getLength() == expVal
.getLength()
11276 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11277 OString
expVal( aStrBuf
.getStr() );
11278 sal_Int64 input
= kSInt64Max
;
11279 sal_Int16 radix
= 10;
11281 expVal
+= OString( "9223372036854775807" );
11282 aStrBuf
.append( input
, radix
);
11284 CPPUNIT_ASSERT_MESSAGE
11286 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
11287 aStrBuf
.getStr()== expVal
&&
11288 aStrBuf
.getLength() == expVal
.getLength()
11295 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11296 OString
expVal( aStrBuf
.getStr() );
11297 sal_Int64 input
= kSInt8Max
;
11298 sal_Int16 radix
= 16;
11300 expVal
+= OString( "7f" );
11301 aStrBuf
.append( input
, radix
);
11303 CPPUNIT_ASSERT_MESSAGE
11305 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
11306 aStrBuf
.getStr()== expVal
&&
11307 aStrBuf
.getLength() == expVal
.getLength()
11314 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11315 OString
expVal( aStrBuf
.getStr() );
11316 sal_Int64 input
= kSInt64Max
;
11317 sal_Int16 radix
= 16;
11319 expVal
+= OString( "7fffffffffffffff" );
11320 aStrBuf
.append( input
, radix
);
11322 CPPUNIT_ASSERT_MESSAGE
11324 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
11325 aStrBuf
.getStr()== expVal
&&
11326 aStrBuf
.getLength() == expVal
.getLength()
11333 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11334 OString
expVal( aStrBuf
.getStr() );
11335 sal_Int64 input
= kSInt8Max
;
11336 sal_Int16 radix
= 36;
11338 expVal
+= OString( "3j" );
11339 aStrBuf
.append( input
, radix
);
11341 CPPUNIT_ASSERT_MESSAGE
11343 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
11344 aStrBuf
.getStr()== expVal
&&
11345 aStrBuf
.getLength() == expVal
.getLength()
11352 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
11353 OString
expVal( aStrBuf
.getStr() );
11354 sal_Int64 input
= kSInt64Max
;
11355 sal_Int16 radix
= 36;
11357 expVal
+= OString( "1y2p0ij32e8e7" );
11358 aStrBuf
.append( input
, radix
);
11360 CPPUNIT_ASSERT_MESSAGE
11362 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
11363 aStrBuf
.getStr()== expVal
&&
11364 aStrBuf
.getLength() == expVal
.getLength()
11371 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11372 OString
expVal( aStrBuf
.getStr() );
11373 sal_Int64 input
= kSInt8Max
;
11374 sal_Int16 radix
= 2;
11376 expVal
+= OString( "1111111" );
11377 aStrBuf
.append( input
, radix
);
11379 CPPUNIT_ASSERT_MESSAGE
11381 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11382 aStrBuf
.getStr()== expVal
&&
11383 aStrBuf
.getLength() == expVal
.getLength()
11390 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11391 OString
expVal( aStrBuf
.getStr() );
11392 sal_Int64 input
= kSInt64Max
;
11393 sal_Int16 radix
= 2;
11395 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11396 aStrBuf
.append( input
, radix
);
11398 CPPUNIT_ASSERT_MESSAGE
11400 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11401 aStrBuf
.getStr()== expVal
&&
11402 aStrBuf
.getLength() == expVal
.getLength()
11409 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11410 OString
expVal( aStrBuf
.getStr() );
11411 sal_Int64 input
= kSInt8Max
;
11412 sal_Int16 radix
= 8;
11414 expVal
+= OString( "177" );
11415 aStrBuf
.append( input
, radix
);
11417 CPPUNIT_ASSERT_MESSAGE
11419 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11420 aStrBuf
.getStr()== expVal
&&
11421 aStrBuf
.getLength() == expVal
.getLength()
11428 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11429 OString
expVal( aStrBuf
.getStr() );
11430 sal_Int64 input
= kSInt64Max
;
11431 sal_Int16 radix
= 8;
11433 expVal
+= OString( "777777777777777777777" );
11434 aStrBuf
.append( input
, radix
);
11436 CPPUNIT_ASSERT_MESSAGE
11438 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11439 aStrBuf
.getStr()== expVal
&&
11440 aStrBuf
.getLength() == expVal
.getLength()
11447 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11448 OString
expVal( aStrBuf
.getStr() );
11449 sal_Int64 input
= kSInt8Max
;
11450 sal_Int16 radix
= 10;
11452 expVal
+= OString( "127" );
11453 aStrBuf
.append( input
, radix
);
11455 CPPUNIT_ASSERT_MESSAGE
11457 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
11458 aStrBuf
.getStr()== expVal
&&
11459 aStrBuf
.getLength() == expVal
.getLength()
11466 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11467 OString
expVal( aStrBuf
.getStr() );
11468 sal_Int64 input
= kSInt64Max
;
11469 sal_Int16 radix
= 10;
11471 expVal
+= OString( "9223372036854775807" );
11472 aStrBuf
.append( input
, radix
);
11474 CPPUNIT_ASSERT_MESSAGE
11476 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
11477 aStrBuf
.getStr()== expVal
&&
11478 aStrBuf
.getLength() == expVal
.getLength()
11485 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11486 OString
expVal( aStrBuf
.getStr() );
11487 sal_Int64 input
= kSInt8Max
;
11488 sal_Int16 radix
= 16;
11490 expVal
+= OString( "7f" );
11491 aStrBuf
.append( input
, radix
);
11493 CPPUNIT_ASSERT_MESSAGE
11495 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
11496 aStrBuf
.getStr()== expVal
&&
11497 aStrBuf
.getLength() == expVal
.getLength()
11504 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11505 OString
expVal( aStrBuf
.getStr() );
11506 sal_Int64 input
= kSInt64Max
;
11507 sal_Int16 radix
= 16;
11509 expVal
+= OString( "7fffffffffffffff" );
11510 aStrBuf
.append( input
, radix
);
11512 CPPUNIT_ASSERT_MESSAGE
11514 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
11515 aStrBuf
.getStr()== expVal
&&
11516 aStrBuf
.getLength() == expVal
.getLength()
11523 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11524 OString
expVal( aStrBuf
.getStr() );
11525 sal_Int64 input
= kSInt8Max
;
11526 sal_Int16 radix
= 36;
11528 expVal
+= OString( "3j" );
11529 aStrBuf
.append( input
, radix
);
11531 CPPUNIT_ASSERT_MESSAGE
11533 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
11534 aStrBuf
.getStr()== expVal
&&
11535 aStrBuf
.getLength() == expVal
.getLength()
11542 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
11543 OString
expVal( aStrBuf
.getStr() );
11544 sal_Int64 input
= kSInt64Max
;
11545 sal_Int16 radix
= 36;
11547 expVal
+= OString( "1y2p0ij32e8e7" );
11548 aStrBuf
.append( input
, radix
);
11550 CPPUNIT_ASSERT_MESSAGE
11552 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
11553 aStrBuf
.getStr()== expVal
&&
11554 aStrBuf
.getLength() == expVal
.getLength()
11561 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11562 OString
expVal( aStrBuf
.getStr() );
11563 sal_Int64 input
= kSInt8Max
;
11564 sal_Int16 radix
= 2;
11566 expVal
+= OString( "1111111" );
11567 aStrBuf
.append( input
, radix
);
11569 CPPUNIT_ASSERT_MESSAGE
11571 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
11572 aStrBuf
.getStr()== expVal
&&
11573 aStrBuf
.getLength() == expVal
.getLength()
11580 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11581 OString
expVal( aStrBuf
.getStr() );
11582 sal_Int64 input
= kSInt64Max
;
11583 sal_Int16 radix
= 2;
11585 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11586 aStrBuf
.append( input
, radix
);
11588 CPPUNIT_ASSERT_MESSAGE
11590 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
11591 aStrBuf
.getStr()== expVal
&&
11592 aStrBuf
.getLength() == expVal
.getLength()
11599 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11600 OString
expVal( aStrBuf
.getStr() );
11601 sal_Int64 input
= kSInt8Max
;
11602 sal_Int16 radix
= 8;
11604 expVal
+= OString( "177" );
11605 aStrBuf
.append( input
, radix
);
11607 CPPUNIT_ASSERT_MESSAGE
11609 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
11610 aStrBuf
.getStr()== expVal
&&
11611 aStrBuf
.getLength() == expVal
.getLength()
11618 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11619 OString
expVal( aStrBuf
.getStr() );
11620 sal_Int64 input
= kSInt64Max
;
11621 sal_Int16 radix
= 8;
11623 expVal
+= OString( "777777777777777777777" );
11624 aStrBuf
.append( input
, radix
);
11626 CPPUNIT_ASSERT_MESSAGE
11628 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
11629 aStrBuf
.getStr()== expVal
&&
11630 aStrBuf
.getLength() == expVal
.getLength()
11637 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11638 OString
expVal( aStrBuf
.getStr() );
11639 sal_Int64 input
= kSInt8Max
;
11640 sal_Int16 radix
= 10;
11642 expVal
+= OString( "127" );
11643 aStrBuf
.append( input
, radix
);
11645 CPPUNIT_ASSERT_MESSAGE
11647 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
11648 aStrBuf
.getStr()== expVal
&&
11649 aStrBuf
.getLength() == expVal
.getLength()
11656 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11657 OString
expVal( aStrBuf
.getStr() );
11658 sal_Int64 input
= kSInt64Max
;
11659 sal_Int16 radix
= 10;
11661 expVal
+= OString( "9223372036854775807" );
11662 aStrBuf
.append( input
, radix
);
11664 CPPUNIT_ASSERT_MESSAGE
11666 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
11667 aStrBuf
.getStr()== expVal
&&
11668 aStrBuf
.getLength() == expVal
.getLength()
11675 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11676 OString
expVal( aStrBuf
.getStr() );
11677 sal_Int64 input
= kSInt8Max
;
11678 sal_Int16 radix
= 16;
11680 expVal
+= OString( "7f" );
11681 aStrBuf
.append( input
, radix
);
11683 CPPUNIT_ASSERT_MESSAGE
11685 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
11686 aStrBuf
.getStr()== expVal
&&
11687 aStrBuf
.getLength() == expVal
.getLength()
11694 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11695 OString
expVal( aStrBuf
.getStr() );
11696 sal_Int64 input
= kSInt64Max
;
11697 sal_Int16 radix
= 16;
11699 expVal
+= OString( "7fffffffffffffff" );
11700 aStrBuf
.append( input
, radix
);
11702 CPPUNIT_ASSERT_MESSAGE
11704 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
11705 aStrBuf
.getStr()== expVal
&&
11706 aStrBuf
.getLength() == expVal
.getLength()
11713 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11714 OString
expVal( aStrBuf
.getStr() );
11715 sal_Int64 input
= kSInt8Max
;
11716 sal_Int16 radix
= 36;
11718 expVal
+= OString( "3j" );
11719 aStrBuf
.append( input
, radix
);
11721 CPPUNIT_ASSERT_MESSAGE
11723 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
11724 aStrBuf
.getStr()== expVal
&&
11725 aStrBuf
.getLength() == expVal
.getLength()
11732 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
11733 OString
expVal( aStrBuf
.getStr() );
11734 sal_Int64 input
= kSInt64Max
;
11735 sal_Int16 radix
= 36;
11737 expVal
+= OString( "1y2p0ij32e8e7" );
11738 aStrBuf
.append( input
, radix
);
11740 CPPUNIT_ASSERT_MESSAGE
11742 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
11743 aStrBuf
.getStr()== expVal
&&
11744 aStrBuf
.getLength() == expVal
.getLength()
11751 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11752 OString
expVal( aStrBuf
.getStr() );
11753 sal_Int64 input
= kSInt8Max
;
11754 sal_Int16 radix
= 2;
11756 expVal
+= OString( "1111111" );
11757 aStrBuf
.append( input
, radix
);
11759 CPPUNIT_ASSERT_MESSAGE
11761 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
11762 aStrBuf
.getStr()== expVal
&&
11763 aStrBuf
.getLength() == expVal
.getLength()
11770 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11771 OString
expVal( aStrBuf
.getStr() );
11772 sal_Int64 input
= kSInt64Max
;
11773 sal_Int16 radix
= 2;
11775 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11776 aStrBuf
.append( input
, radix
);
11778 CPPUNIT_ASSERT_MESSAGE
11780 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
11781 aStrBuf
.getStr()== expVal
&&
11782 aStrBuf
.getLength() == expVal
.getLength()
11789 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11790 OString
expVal( aStrBuf
.getStr() );
11791 sal_Int64 input
= kSInt8Max
;
11792 sal_Int16 radix
= 8;
11794 expVal
+= OString( "177" );
11795 aStrBuf
.append( input
, radix
);
11797 CPPUNIT_ASSERT_MESSAGE
11799 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
11800 aStrBuf
.getStr()== expVal
&&
11801 aStrBuf
.getLength() == expVal
.getLength()
11808 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11809 OString
expVal( aStrBuf
.getStr() );
11810 sal_Int64 input
= kSInt64Max
;
11811 sal_Int16 radix
= 8;
11813 expVal
+= OString( "777777777777777777777" );
11814 aStrBuf
.append( input
, radix
);
11816 CPPUNIT_ASSERT_MESSAGE
11818 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
11819 aStrBuf
.getStr()== expVal
&&
11820 aStrBuf
.getLength() == expVal
.getLength()
11827 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11828 OString
expVal( aStrBuf
.getStr() );
11829 sal_Int64 input
= kSInt8Max
;
11830 sal_Int16 radix
= 10;
11832 expVal
+= OString( "127" );
11833 aStrBuf
.append( input
, radix
);
11835 CPPUNIT_ASSERT_MESSAGE
11837 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
11838 aStrBuf
.getStr()== expVal
&&
11839 aStrBuf
.getLength() == expVal
.getLength()
11846 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11847 OString
expVal( aStrBuf
.getStr() );
11848 sal_Int64 input
= kSInt64Max
;
11849 sal_Int16 radix
= 10;
11851 expVal
+= OString( "9223372036854775807" );
11852 aStrBuf
.append( input
, radix
);
11854 CPPUNIT_ASSERT_MESSAGE
11856 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
11857 aStrBuf
.getStr()== expVal
&&
11858 aStrBuf
.getLength() == expVal
.getLength()
11865 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11866 OString
expVal( aStrBuf
.getStr() );
11867 sal_Int64 input
= kSInt8Max
;
11868 sal_Int16 radix
= 16;
11870 expVal
+= OString( "7f" );
11871 aStrBuf
.append( input
, radix
);
11873 CPPUNIT_ASSERT_MESSAGE
11875 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
11876 aStrBuf
.getStr()== expVal
&&
11877 aStrBuf
.getLength() == expVal
.getLength()
11884 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11885 OString
expVal( aStrBuf
.getStr() );
11886 sal_Int64 input
= kSInt64Max
;
11887 sal_Int16 radix
= 16;
11889 expVal
+= OString( "7fffffffffffffff" );
11890 aStrBuf
.append( input
, radix
);
11892 CPPUNIT_ASSERT_MESSAGE
11894 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
11895 aStrBuf
.getStr()== expVal
&&
11896 aStrBuf
.getLength() == expVal
.getLength()
11903 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11904 OString
expVal( aStrBuf
.getStr() );
11905 sal_Int64 input
= kSInt8Max
;
11906 sal_Int16 radix
= 36;
11908 expVal
+= OString( "3j" );
11909 aStrBuf
.append( input
, radix
);
11911 CPPUNIT_ASSERT_MESSAGE
11913 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
11914 aStrBuf
.getStr()== expVal
&&
11915 aStrBuf
.getLength() == expVal
.getLength()
11922 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
11923 OString
expVal( aStrBuf
.getStr() );
11924 sal_Int64 input
= kSInt64Max
;
11925 sal_Int16 radix
= 36;
11927 expVal
+= OString( "1y2p0ij32e8e7" );
11928 aStrBuf
.append( input
, radix
);
11930 CPPUNIT_ASSERT_MESSAGE
11932 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
11933 aStrBuf
.getStr()== expVal
&&
11934 aStrBuf
.getLength() == expVal
.getLength()
11939 CPPUNIT_TEST_SUITE( append_007_Int64_Bounderies
);
11940 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
11941 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
11942 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
11943 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
11944 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
11945 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
11946 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
11947 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
11948 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
11949 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
11950 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
11951 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
11952 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
11953 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
11954 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
11955 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
11956 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
11957 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
11958 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
11959 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
11960 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
11961 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
11962 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
11963 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
11964 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
11965 CPPUNIT_TEST_SUITE_END();
11968 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
11969 // for negative value
11970 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
11971 // for negative value
11972 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
11973 // for negative value
11974 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
11975 // for negative value
11976 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
11977 // for negative value
11979 class append_007_Int64_Negative
: public CppUnit::TestFixture
11981 OString
* arrOUS
[5];
11984 void setUp() override
11986 arrOUS
[0] = new OString( kTestStr7
);
11987 arrOUS
[1] = new OString( );
11988 arrOUS
[2] = new OString( kTestStr25
);
11989 arrOUS
[3] = new OString( "" );
11990 arrOUS
[4] = new OString( kTestStr28
);
11994 void tearDown() override
11996 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
11997 delete arrOUS
[3]; delete arrOUS
[4];
12002 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12003 OString
expVal( aStrBuf
.getStr() );
12004 sal_Int64 input
= -0;
12005 sal_Int16 radix
= 2;
12007 expVal
+= OString( "0" );
12008 aStrBuf
.append( input
, radix
);
12010 CPPUNIT_ASSERT_MESSAGE
12012 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12013 aStrBuf
.getStr()== expVal
&&
12014 aStrBuf
.getLength() == expVal
.getLength()
12021 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12022 OString
expVal( aStrBuf
.getStr() );
12023 sal_Int64 input
= -4;
12024 sal_Int16 radix
= 2;
12026 expVal
+= OString( "-" );
12027 expVal
+= OString( "100" );
12028 aStrBuf
.append( input
, radix
);
12030 CPPUNIT_ASSERT_MESSAGE
12032 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12033 aStrBuf
.getStr()== expVal
&&
12034 aStrBuf
.getLength() == expVal
.getLength()
12041 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12042 OString
expVal( aStrBuf
.getStr() );
12043 sal_Int64 input
= -8;
12044 sal_Int16 radix
= 2;
12046 expVal
+= OString( "-" );
12047 expVal
+= OString( "1000" );
12048 aStrBuf
.append( input
, radix
);
12050 CPPUNIT_ASSERT_MESSAGE
12052 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12053 aStrBuf
.getStr()== expVal
&&
12054 aStrBuf
.getLength() == expVal
.getLength()
12061 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12062 OString
expVal( aStrBuf
.getStr() );
12063 sal_Int64 input
= -15;
12064 sal_Int16 radix
= 2;
12066 expVal
+= OString( "-" );
12067 expVal
+= OString( "1111" );
12068 aStrBuf
.append( input
, radix
);
12070 CPPUNIT_ASSERT_MESSAGE
12072 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
12073 aStrBuf
.getStr()== expVal
&&
12074 aStrBuf
.getLength() == expVal
.getLength()
12081 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12082 OString
expVal( aStrBuf
.getStr() );
12083 sal_Int64 input
= -0;
12084 sal_Int16 radix
= 8;
12086 expVal
+= OString( "0" );
12087 aStrBuf
.append( input
, radix
);
12089 CPPUNIT_ASSERT_MESSAGE
12091 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12092 aStrBuf
.getStr()== expVal
&&
12093 aStrBuf
.getLength() == expVal
.getLength()
12100 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12101 OString
expVal( aStrBuf
.getStr() );
12102 sal_Int64 input
= -4;
12103 sal_Int16 radix
= 8;
12105 expVal
+= OString( "-" );
12106 expVal
+= OString( "4" );
12107 aStrBuf
.append( input
, radix
);
12109 CPPUNIT_ASSERT_MESSAGE
12111 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12112 aStrBuf
.getStr()== expVal
&&
12113 aStrBuf
.getLength() == expVal
.getLength()
12120 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12121 OString
expVal( aStrBuf
.getStr() );
12122 sal_Int64 input
= -8;
12123 sal_Int16 radix
= 8;
12125 expVal
+= OString( "-" );
12126 expVal
+= OString( "10" );
12127 aStrBuf
.append( input
, radix
);
12129 CPPUNIT_ASSERT_MESSAGE
12131 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12132 aStrBuf
.getStr()== expVal
&&
12133 aStrBuf
.getLength() == expVal
.getLength()
12140 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12141 OString
expVal( aStrBuf
.getStr() );
12142 sal_Int64 input
= -15;
12143 sal_Int16 radix
= 8;
12145 expVal
+= OString( "-" );
12146 expVal
+= OString( "17" );
12147 aStrBuf
.append( input
, radix
);
12149 CPPUNIT_ASSERT_MESSAGE
12151 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
12152 aStrBuf
.getStr()== expVal
&&
12153 aStrBuf
.getLength() == expVal
.getLength()
12160 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12161 OString
expVal( aStrBuf
.getStr() );
12162 sal_Int64 input
= -0;
12163 sal_Int16 radix
= 10;
12165 expVal
+= OString( "0" );
12166 aStrBuf
.append( input
, radix
);
12168 CPPUNIT_ASSERT_MESSAGE
12170 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12171 aStrBuf
.getStr()== expVal
&&
12172 aStrBuf
.getLength() == expVal
.getLength()
12179 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12180 OString
expVal( aStrBuf
.getStr() );
12181 sal_Int64 input
= -4;
12182 sal_Int16 radix
= 10;
12184 expVal
+= OString( "-" );
12185 expVal
+= OString( "4" );
12186 aStrBuf
.append( input
, radix
);
12188 CPPUNIT_ASSERT_MESSAGE
12190 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12191 aStrBuf
.getStr()== expVal
&&
12192 aStrBuf
.getLength() == expVal
.getLength()
12199 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12200 OString
expVal( aStrBuf
.getStr() );
12201 sal_Int64 input
= -8;
12202 sal_Int16 radix
= 10;
12204 expVal
+= OString( "-" );
12205 expVal
+= OString( "8" );
12206 aStrBuf
.append( input
, radix
);
12208 CPPUNIT_ASSERT_MESSAGE
12210 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12211 aStrBuf
.getStr()== expVal
&&
12212 aStrBuf
.getLength() == expVal
.getLength()
12219 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12220 OString
expVal( aStrBuf
.getStr() );
12221 sal_Int64 input
= -15;
12222 sal_Int16 radix
= 10;
12224 expVal
+= OString( "-" );
12225 expVal
+= OString( "15" );
12226 aStrBuf
.append( input
, radix
);
12228 CPPUNIT_ASSERT_MESSAGE
12230 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
12231 aStrBuf
.getStr()== expVal
&&
12232 aStrBuf
.getLength() == expVal
.getLength()
12239 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12240 OString
expVal( aStrBuf
.getStr() );
12241 sal_Int64 input
= -0;
12242 sal_Int16 radix
= 16;
12244 expVal
+= OString( "0" );
12245 aStrBuf
.append( input
, radix
);
12247 CPPUNIT_ASSERT_MESSAGE
12249 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12250 aStrBuf
.getStr()== expVal
&&
12251 aStrBuf
.getLength() == expVal
.getLength()
12258 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12259 OString
expVal( aStrBuf
.getStr() );
12260 sal_Int64 input
= -4;
12261 sal_Int16 radix
= 16;
12263 expVal
+= OString( "-" );
12264 expVal
+= OString( "4" );
12265 aStrBuf
.append( input
, radix
);
12267 CPPUNIT_ASSERT_MESSAGE
12269 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12270 aStrBuf
.getStr()== expVal
&&
12271 aStrBuf
.getLength() == expVal
.getLength()
12278 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12279 OString
expVal( aStrBuf
.getStr() );
12280 sal_Int64 input
= -8;
12281 sal_Int16 radix
= 16;
12283 expVal
+= OString( "-" );
12284 expVal
+= OString( "8" );
12285 aStrBuf
.append( input
, radix
);
12287 CPPUNIT_ASSERT_MESSAGE
12289 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12290 aStrBuf
.getStr()== expVal
&&
12291 aStrBuf
.getLength() == expVal
.getLength()
12298 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12299 OString
expVal( aStrBuf
.getStr() );
12300 sal_Int64 input
= -15;
12301 sal_Int16 radix
= 16;
12303 expVal
+= OString( "-" );
12304 expVal
+= OString( "f" );
12305 aStrBuf
.append( input
, radix
);
12307 CPPUNIT_ASSERT_MESSAGE
12309 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
12310 aStrBuf
.getStr()== expVal
&&
12311 aStrBuf
.getLength() == expVal
.getLength()
12318 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12319 OString
expVal( aStrBuf
.getStr() );
12320 sal_Int64 input
= -0;
12321 sal_Int16 radix
= 36;
12323 expVal
+= OString( "0" );
12324 aStrBuf
.append( input
, radix
);
12326 CPPUNIT_ASSERT_MESSAGE
12328 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12329 aStrBuf
.getStr()== expVal
&&
12330 aStrBuf
.getLength() == expVal
.getLength()
12337 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12338 OString
expVal( aStrBuf
.getStr() );
12339 sal_Int64 input
= -4;
12340 sal_Int16 radix
= 36;
12342 expVal
+= OString( "-" );
12343 expVal
+= OString( "4" );
12344 aStrBuf
.append( input
, radix
);
12346 CPPUNIT_ASSERT_MESSAGE
12348 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12349 aStrBuf
.getStr()== expVal
&&
12350 aStrBuf
.getLength() == expVal
.getLength()
12357 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12358 OString
expVal( aStrBuf
.getStr() );
12359 sal_Int64 input
= -8;
12360 sal_Int16 radix
= 36;
12362 expVal
+= OString( "-" );
12363 expVal
+= OString( "8" );
12364 aStrBuf
.append( input
, radix
);
12366 CPPUNIT_ASSERT_MESSAGE
12368 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12369 aStrBuf
.getStr()== expVal
&&
12370 aStrBuf
.getLength() == expVal
.getLength()
12377 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
12378 OString
expVal( aStrBuf
.getStr() );
12379 sal_Int64 input
= -35;
12380 sal_Int16 radix
= 36;
12382 expVal
+= OString( "-" );
12383 expVal
+= OString( "z" );
12384 aStrBuf
.append( input
, radix
);
12386 CPPUNIT_ASSERT_MESSAGE
12388 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12389 aStrBuf
.getStr()== expVal
&&
12390 aStrBuf
.getLength() == expVal
.getLength()
12397 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12398 OString
expVal( aStrBuf
.getStr() );
12399 sal_Int64 input
= -0;
12400 sal_Int16 radix
= 2;
12402 expVal
+= OString( "0" );
12403 aStrBuf
.append( input
, radix
);
12405 CPPUNIT_ASSERT_MESSAGE
12407 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12408 aStrBuf
.getStr()== expVal
&&
12409 aStrBuf
.getLength() == expVal
.getLength()
12416 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12417 OString
expVal( aStrBuf
.getStr() );
12418 sal_Int64 input
= -4;
12419 sal_Int16 radix
= 2;
12421 expVal
+= OString( "-" );
12422 expVal
+= OString( "100" );
12423 aStrBuf
.append( input
, radix
);
12425 CPPUNIT_ASSERT_MESSAGE
12427 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12428 aStrBuf
.getStr()== expVal
&&
12429 aStrBuf
.getLength() == expVal
.getLength()
12436 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12437 OString
expVal( aStrBuf
.getStr() );
12438 sal_Int64 input
= -8;
12439 sal_Int16 radix
= 2;
12441 expVal
+= OString( "-" );
12442 expVal
+= OString( "1000" );
12443 aStrBuf
.append( input
, radix
);
12445 CPPUNIT_ASSERT_MESSAGE
12447 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12448 aStrBuf
.getStr()== expVal
&&
12449 aStrBuf
.getLength() == expVal
.getLength()
12456 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12457 OString
expVal( aStrBuf
.getStr() );
12458 sal_Int64 input
= -15;
12459 sal_Int16 radix
= 2;
12461 expVal
+= OString( "-" );
12462 expVal
+= OString( "1111" );
12463 aStrBuf
.append( input
, radix
);
12465 CPPUNIT_ASSERT_MESSAGE
12467 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12468 aStrBuf
.getStr()== expVal
&&
12469 aStrBuf
.getLength() == expVal
.getLength()
12476 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12477 OString
expVal( aStrBuf
.getStr() );
12478 sal_Int64 input
= -0;
12479 sal_Int16 radix
= 8;
12481 expVal
+= OString( "0" );
12482 aStrBuf
.append( input
, radix
);
12484 CPPUNIT_ASSERT_MESSAGE
12486 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12487 aStrBuf
.getStr()== expVal
&&
12488 aStrBuf
.getLength() == expVal
.getLength()
12495 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12496 OString
expVal( aStrBuf
.getStr() );
12497 sal_Int64 input
= -4;
12498 sal_Int16 radix
= 8;
12500 expVal
+= OString( "-" );
12501 expVal
+= OString( "4" );
12502 aStrBuf
.append( input
, radix
);
12504 CPPUNIT_ASSERT_MESSAGE
12506 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12507 aStrBuf
.getStr()== expVal
&&
12508 aStrBuf
.getLength() == expVal
.getLength()
12515 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12516 OString
expVal( aStrBuf
.getStr() );
12517 sal_Int64 input
= -8;
12518 sal_Int16 radix
= 8;
12520 expVal
+= OString( "-" );
12521 expVal
+= OString( "10" );
12522 aStrBuf
.append( input
, radix
);
12524 CPPUNIT_ASSERT_MESSAGE
12526 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12527 aStrBuf
.getStr()== expVal
&&
12528 aStrBuf
.getLength() == expVal
.getLength()
12535 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12536 OString
expVal( aStrBuf
.getStr() );
12537 sal_Int64 input
= -15;
12538 sal_Int16 radix
= 8;
12540 expVal
+= OString( "-" );
12541 expVal
+= OString( "17" );
12542 aStrBuf
.append( input
, radix
);
12544 CPPUNIT_ASSERT_MESSAGE
12546 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12547 aStrBuf
.getStr()== expVal
&&
12548 aStrBuf
.getLength() == expVal
.getLength()
12555 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12556 OString
expVal( aStrBuf
.getStr() );
12557 sal_Int64 input
= -0;
12558 sal_Int16 radix
= 10;
12560 expVal
+= OString( "0" );
12561 aStrBuf
.append( input
, radix
);
12563 CPPUNIT_ASSERT_MESSAGE
12565 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12566 aStrBuf
.getStr()== expVal
&&
12567 aStrBuf
.getLength() == expVal
.getLength()
12574 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12575 OString
expVal( aStrBuf
.getStr() );
12576 sal_Int64 input
= -4;
12577 sal_Int16 radix
= 10;
12579 expVal
+= OString( "-" );
12580 expVal
+= OString( "4" );
12581 aStrBuf
.append( input
, radix
);
12583 CPPUNIT_ASSERT_MESSAGE
12585 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12586 aStrBuf
.getStr()== expVal
&&
12587 aStrBuf
.getLength() == expVal
.getLength()
12594 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12595 OString
expVal( aStrBuf
.getStr() );
12596 sal_Int64 input
= -8;
12597 sal_Int16 radix
= 10;
12599 expVal
+= OString( "-" );
12600 expVal
+= OString( "8" );
12601 aStrBuf
.append( input
, radix
);
12603 CPPUNIT_ASSERT_MESSAGE
12605 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12606 aStrBuf
.getStr()== expVal
&&
12607 aStrBuf
.getLength() == expVal
.getLength()
12614 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12615 OString
expVal( aStrBuf
.getStr() );
12616 sal_Int64 input
= -15;
12617 sal_Int16 radix
= 10;
12619 expVal
+= OString( "-" );
12620 expVal
+= OString( "15" );
12621 aStrBuf
.append( input
, radix
);
12623 CPPUNIT_ASSERT_MESSAGE
12625 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12626 aStrBuf
.getStr()== expVal
&&
12627 aStrBuf
.getLength() == expVal
.getLength()
12634 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12635 OString
expVal( aStrBuf
.getStr() );
12636 sal_Int64 input
= -0;
12637 sal_Int16 radix
= 16;
12639 expVal
+= OString( "0" );
12640 aStrBuf
.append( input
, radix
);
12642 CPPUNIT_ASSERT_MESSAGE
12644 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12645 aStrBuf
.getStr()== expVal
&&
12646 aStrBuf
.getLength() == expVal
.getLength()
12653 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12654 OString
expVal( aStrBuf
.getStr() );
12655 sal_Int64 input
= -4;
12656 sal_Int16 radix
= 16;
12658 expVal
+= OString( "-" );
12659 expVal
+= OString( "4" );
12660 aStrBuf
.append( input
, radix
);
12662 CPPUNIT_ASSERT_MESSAGE
12664 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12665 aStrBuf
.getStr()== expVal
&&
12666 aStrBuf
.getLength() == expVal
.getLength()
12673 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12674 OString
expVal( aStrBuf
.getStr() );
12675 sal_Int64 input
= -8;
12676 sal_Int16 radix
= 16;
12678 expVal
+= OString( "-" );
12679 expVal
+= OString( "8" );
12680 aStrBuf
.append( input
, radix
);
12682 CPPUNIT_ASSERT_MESSAGE
12684 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12685 aStrBuf
.getStr()== expVal
&&
12686 aStrBuf
.getLength() == expVal
.getLength()
12693 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12694 OString
expVal( aStrBuf
.getStr() );
12695 sal_Int64 input
= -15;
12696 sal_Int16 radix
= 16;
12698 expVal
+= OString( "-" );
12699 expVal
+= OString( "f" );
12700 aStrBuf
.append( input
, radix
);
12702 CPPUNIT_ASSERT_MESSAGE
12704 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12705 aStrBuf
.getStr()== expVal
&&
12706 aStrBuf
.getLength() == expVal
.getLength()
12713 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12714 OString
expVal( aStrBuf
.getStr() );
12715 sal_Int64 input
= -0;
12716 sal_Int16 radix
= 36;
12718 expVal
+= OString( "0" );
12719 aStrBuf
.append( input
, radix
);
12721 CPPUNIT_ASSERT_MESSAGE
12723 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12724 aStrBuf
.getStr()== expVal
&&
12725 aStrBuf
.getLength() == expVal
.getLength()
12732 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12733 OString
expVal( aStrBuf
.getStr() );
12734 sal_Int64 input
= -4;
12735 sal_Int16 radix
= 36;
12737 expVal
+= OString( "-" );
12738 expVal
+= OString( "4" );
12739 aStrBuf
.append( input
, radix
);
12741 CPPUNIT_ASSERT_MESSAGE
12743 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12744 aStrBuf
.getStr()== expVal
&&
12745 aStrBuf
.getLength() == expVal
.getLength()
12752 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12753 OString
expVal( aStrBuf
.getStr() );
12754 sal_Int64 input
= -8;
12755 sal_Int16 radix
= 36;
12757 expVal
+= OString( "-" );
12758 expVal
+= OString( "8" );
12759 aStrBuf
.append( input
, radix
);
12761 CPPUNIT_ASSERT_MESSAGE
12763 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12764 aStrBuf
.getStr()== expVal
&&
12765 aStrBuf
.getLength() == expVal
.getLength()
12772 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
12773 OString
expVal( aStrBuf
.getStr() );
12774 sal_Int64 input
= -35;
12775 sal_Int16 radix
= 36;
12777 expVal
+= OString( "-" );
12778 expVal
+= OString( "z" );
12779 aStrBuf
.append( input
, radix
);
12781 CPPUNIT_ASSERT_MESSAGE
12783 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12784 aStrBuf
.getStr()== expVal
&&
12785 aStrBuf
.getLength() == expVal
.getLength()
12792 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12793 OString
expVal( aStrBuf
.getStr() );
12794 sal_Int64 input
= -0;
12795 sal_Int16 radix
= 2;
12797 expVal
+= OString( "0" );
12798 aStrBuf
.append( input
, radix
);
12800 CPPUNIT_ASSERT_MESSAGE
12802 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12803 aStrBuf
.getStr()== expVal
&&
12804 aStrBuf
.getLength() == expVal
.getLength()
12811 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12812 OString
expVal( aStrBuf
.getStr() );
12813 sal_Int64 input
= -4;
12814 sal_Int16 radix
= 2;
12816 expVal
+= OString( "-" );
12817 expVal
+= OString( "100" );
12818 aStrBuf
.append( input
, radix
);
12820 CPPUNIT_ASSERT_MESSAGE
12822 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12823 aStrBuf
.getStr()== expVal
&&
12824 aStrBuf
.getLength() == expVal
.getLength()
12831 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12832 OString
expVal( aStrBuf
.getStr() );
12833 sal_Int64 input
= -8;
12834 sal_Int16 radix
= 2;
12836 expVal
+= OString( "-" );
12837 expVal
+= OString( "1000" );
12838 aStrBuf
.append( input
, radix
);
12840 CPPUNIT_ASSERT_MESSAGE
12842 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12843 aStrBuf
.getStr()== expVal
&&
12844 aStrBuf
.getLength() == expVal
.getLength()
12851 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12852 OString
expVal( aStrBuf
.getStr() );
12853 sal_Int64 input
= -15;
12854 sal_Int16 radix
= 2;
12856 expVal
+= OString( "-" );
12857 expVal
+= OString( "1111" );
12858 aStrBuf
.append( input
, radix
);
12860 CPPUNIT_ASSERT_MESSAGE
12862 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12863 aStrBuf
.getStr()== expVal
&&
12864 aStrBuf
.getLength() == expVal
.getLength()
12871 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12872 OString
expVal( aStrBuf
.getStr() );
12873 sal_Int64 input
= -0;
12874 sal_Int16 radix
= 8;
12876 expVal
+= OString( "0" );
12877 aStrBuf
.append( input
, radix
);
12879 CPPUNIT_ASSERT_MESSAGE
12881 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12882 aStrBuf
.getStr()== expVal
&&
12883 aStrBuf
.getLength() == expVal
.getLength()
12890 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12891 OString
expVal( aStrBuf
.getStr() );
12892 sal_Int64 input
= -4;
12893 sal_Int16 radix
= 8;
12895 expVal
+= OString( "-" );
12896 expVal
+= OString( "4" );
12897 aStrBuf
.append( input
, radix
);
12899 CPPUNIT_ASSERT_MESSAGE
12901 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12902 aStrBuf
.getStr()== expVal
&&
12903 aStrBuf
.getLength() == expVal
.getLength()
12910 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12911 OString
expVal( aStrBuf
.getStr() );
12912 sal_Int64 input
= -8;
12913 sal_Int16 radix
= 8;
12915 expVal
+= OString( "-" );
12916 expVal
+= OString( "10" );
12917 aStrBuf
.append( input
, radix
);
12919 CPPUNIT_ASSERT_MESSAGE
12921 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12922 aStrBuf
.getStr()== expVal
&&
12923 aStrBuf
.getLength() == expVal
.getLength()
12930 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12931 OString
expVal( aStrBuf
.getStr() );
12932 sal_Int64 input
= -15;
12933 sal_Int16 radix
= 8;
12935 expVal
+= OString( "-" );
12936 expVal
+= OString( "17" );
12937 aStrBuf
.append( input
, radix
);
12939 CPPUNIT_ASSERT_MESSAGE
12941 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12942 aStrBuf
.getStr()== expVal
&&
12943 aStrBuf
.getLength() == expVal
.getLength()
12950 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12951 OString
expVal( aStrBuf
.getStr() );
12952 sal_Int64 input
= -0;
12953 sal_Int16 radix
= 10;
12955 expVal
+= OString( "0" );
12956 aStrBuf
.append( input
, radix
);
12958 CPPUNIT_ASSERT_MESSAGE
12960 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12961 aStrBuf
.getStr()== expVal
&&
12962 aStrBuf
.getLength() == expVal
.getLength()
12969 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12970 OString
expVal( aStrBuf
.getStr() );
12971 sal_Int64 input
= -4;
12972 sal_Int16 radix
= 10;
12974 expVal
+= OString( "-" );
12975 expVal
+= OString( "4" );
12976 aStrBuf
.append( input
, radix
);
12978 CPPUNIT_ASSERT_MESSAGE
12980 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12981 aStrBuf
.getStr()== expVal
&&
12982 aStrBuf
.getLength() == expVal
.getLength()
12989 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
12990 OString
expVal( aStrBuf
.getStr() );
12991 sal_Int64 input
= -8;
12992 sal_Int16 radix
= 10;
12994 expVal
+= OString( "-" );
12995 expVal
+= OString( "8" );
12996 aStrBuf
.append( input
, radix
);
12998 CPPUNIT_ASSERT_MESSAGE
13000 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13001 aStrBuf
.getStr()== expVal
&&
13002 aStrBuf
.getLength() == expVal
.getLength()
13009 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13010 OString
expVal( aStrBuf
.getStr() );
13011 sal_Int64 input
= -15;
13012 sal_Int16 radix
= 10;
13014 expVal
+= OString( "-" );
13015 expVal
+= OString( "15" );
13016 aStrBuf
.append( input
, radix
);
13018 CPPUNIT_ASSERT_MESSAGE
13020 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
13021 aStrBuf
.getStr()== expVal
&&
13022 aStrBuf
.getLength() == expVal
.getLength()
13029 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13030 OString
expVal( aStrBuf
.getStr() );
13031 sal_Int64 input
= -0;
13032 sal_Int16 radix
= 16;
13034 expVal
+= OString( "0" );
13035 aStrBuf
.append( input
, radix
);
13037 CPPUNIT_ASSERT_MESSAGE
13039 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13040 aStrBuf
.getStr()== expVal
&&
13041 aStrBuf
.getLength() == expVal
.getLength()
13048 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13049 OString
expVal( aStrBuf
.getStr() );
13050 sal_Int64 input
= -4;
13051 sal_Int16 radix
= 16;
13053 expVal
+= OString( "-" );
13054 expVal
+= OString( "4" );
13055 aStrBuf
.append( input
, radix
);
13057 CPPUNIT_ASSERT_MESSAGE
13059 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13060 aStrBuf
.getStr()== expVal
&&
13061 aStrBuf
.getLength() == expVal
.getLength()
13068 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13069 OString
expVal( aStrBuf
.getStr() );
13070 sal_Int64 input
= -8;
13071 sal_Int16 radix
= 16;
13073 expVal
+= OString( "-" );
13074 expVal
+= OString( "8" );
13075 aStrBuf
.append( input
, radix
);
13077 CPPUNIT_ASSERT_MESSAGE
13079 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13080 aStrBuf
.getStr()== expVal
&&
13081 aStrBuf
.getLength() == expVal
.getLength()
13088 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13089 OString
expVal( aStrBuf
.getStr() );
13090 sal_Int64 input
= -15;
13091 sal_Int16 radix
= 16;
13093 expVal
+= OString( "-" );
13094 expVal
+= OString( "f" );
13095 aStrBuf
.append( input
, radix
);
13097 CPPUNIT_ASSERT_MESSAGE
13099 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
13100 aStrBuf
.getStr()== expVal
&&
13101 aStrBuf
.getLength() == expVal
.getLength()
13108 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13109 OString
expVal( aStrBuf
.getStr() );
13110 sal_Int64 input
= -0;
13111 sal_Int16 radix
= 36;
13113 expVal
+= OString( "0" );
13114 aStrBuf
.append( input
, radix
);
13116 CPPUNIT_ASSERT_MESSAGE
13118 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13119 aStrBuf
.getStr()== expVal
&&
13120 aStrBuf
.getLength() == expVal
.getLength()
13127 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13128 OString
expVal( aStrBuf
.getStr() );
13129 sal_Int64 input
= -4;
13130 sal_Int16 radix
= 36;
13132 expVal
+= OString( "-" );
13133 expVal
+= OString( "4" );
13134 aStrBuf
.append( input
, radix
);
13136 CPPUNIT_ASSERT_MESSAGE
13138 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13139 aStrBuf
.getStr()== expVal
&&
13140 aStrBuf
.getLength() == expVal
.getLength()
13147 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13148 OString
expVal( aStrBuf
.getStr() );
13149 sal_Int64 input
= -8;
13150 sal_Int16 radix
= 36;
13152 expVal
+= OString( "-" );
13153 expVal
+= OString( "8" );
13154 aStrBuf
.append( input
, radix
);
13156 CPPUNIT_ASSERT_MESSAGE
13158 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13159 aStrBuf
.getStr()== expVal
&&
13160 aStrBuf
.getLength() == expVal
.getLength()
13167 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
13168 OString
expVal( aStrBuf
.getStr() );
13169 sal_Int64 input
= -35;
13170 sal_Int16 radix
= 36;
13172 expVal
+= OString( "-" );
13173 expVal
+= OString( "z" );
13174 aStrBuf
.append( input
, radix
);
13176 CPPUNIT_ASSERT_MESSAGE
13178 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
13179 aStrBuf
.getStr()== expVal
&&
13180 aStrBuf
.getLength() == expVal
.getLength()
13187 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13188 OString
expVal( aStrBuf
.getStr() );
13189 sal_Int64 input
= -0;
13190 sal_Int16 radix
= 2;
13192 expVal
+= OString( "0" );
13193 aStrBuf
.append( input
, radix
);
13195 CPPUNIT_ASSERT_MESSAGE
13197 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13198 aStrBuf
.getStr()== expVal
&&
13199 aStrBuf
.getLength() == expVal
.getLength()
13206 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13207 OString
expVal( aStrBuf
.getStr() );
13208 sal_Int64 input
= -4;
13209 sal_Int16 radix
= 2;
13211 expVal
+= OString( "-" );
13212 expVal
+= OString( "100" );
13213 aStrBuf
.append( input
, radix
);
13215 CPPUNIT_ASSERT_MESSAGE
13217 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13218 aStrBuf
.getStr()== expVal
&&
13219 aStrBuf
.getLength() == expVal
.getLength()
13226 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13227 OString
expVal( aStrBuf
.getStr() );
13228 sal_Int64 input
= -8;
13229 sal_Int16 radix
= 2;
13231 expVal
+= OString( "-" );
13232 expVal
+= OString( "1000" );
13233 aStrBuf
.append( input
, radix
);
13235 CPPUNIT_ASSERT_MESSAGE
13237 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13238 aStrBuf
.getStr()== expVal
&&
13239 aStrBuf
.getLength() == expVal
.getLength()
13246 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13247 OString
expVal( aStrBuf
.getStr() );
13248 sal_Int64 input
= -15;
13249 sal_Int16 radix
= 2;
13251 expVal
+= OString( "-" );
13252 expVal
+= OString( "1111" );
13253 aStrBuf
.append( input
, radix
);
13255 CPPUNIT_ASSERT_MESSAGE
13257 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
13258 aStrBuf
.getStr()== expVal
&&
13259 aStrBuf
.getLength() == expVal
.getLength()
13266 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13267 OString
expVal( aStrBuf
.getStr() );
13268 sal_Int64 input
= -0;
13269 sal_Int16 radix
= 8;
13271 expVal
+= OString( "0" );
13272 aStrBuf
.append( input
, radix
);
13274 CPPUNIT_ASSERT_MESSAGE
13276 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13277 aStrBuf
.getStr()== expVal
&&
13278 aStrBuf
.getLength() == expVal
.getLength()
13285 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13286 OString
expVal( aStrBuf
.getStr() );
13287 sal_Int64 input
= -4;
13288 sal_Int16 radix
= 8;
13290 expVal
+= OString( "-" );
13291 expVal
+= OString( "4" );
13292 aStrBuf
.append( input
, radix
);
13294 CPPUNIT_ASSERT_MESSAGE
13296 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13297 aStrBuf
.getStr()== expVal
&&
13298 aStrBuf
.getLength() == expVal
.getLength()
13305 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13306 OString
expVal( aStrBuf
.getStr() );
13307 sal_Int64 input
= -8;
13308 sal_Int16 radix
= 8;
13310 expVal
+= OString( "-" );
13311 expVal
+= OString( "10" );
13312 aStrBuf
.append( input
, radix
);
13314 CPPUNIT_ASSERT_MESSAGE
13316 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13317 aStrBuf
.getStr()== expVal
&&
13318 aStrBuf
.getLength() == expVal
.getLength()
13325 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13326 OString
expVal( aStrBuf
.getStr() );
13327 sal_Int64 input
= -15;
13328 sal_Int16 radix
= 8;
13330 expVal
+= OString( "-" );
13331 expVal
+= OString( "17" );
13332 aStrBuf
.append( input
, radix
);
13334 CPPUNIT_ASSERT_MESSAGE
13336 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
13337 aStrBuf
.getStr()== expVal
&&
13338 aStrBuf
.getLength() == expVal
.getLength()
13345 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13346 OString
expVal( aStrBuf
.getStr() );
13347 sal_Int64 input
= -0;
13348 sal_Int16 radix
= 10;
13350 expVal
+= OString( "0" );
13351 aStrBuf
.append( input
, radix
);
13353 CPPUNIT_ASSERT_MESSAGE
13355 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13356 aStrBuf
.getStr()== expVal
&&
13357 aStrBuf
.getLength() == expVal
.getLength()
13364 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13365 OString
expVal( aStrBuf
.getStr() );
13366 sal_Int64 input
= -4;
13367 sal_Int16 radix
= 10;
13369 expVal
+= OString( "-" );
13370 expVal
+= OString( "4" );
13371 aStrBuf
.append( input
, radix
);
13373 CPPUNIT_ASSERT_MESSAGE
13375 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13376 aStrBuf
.getStr()== expVal
&&
13377 aStrBuf
.getLength() == expVal
.getLength()
13384 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13385 OString
expVal( aStrBuf
.getStr() );
13386 sal_Int64 input
= -8;
13387 sal_Int16 radix
= 10;
13389 expVal
+= OString( "-" );
13390 expVal
+= OString( "8" );
13391 aStrBuf
.append( input
, radix
);
13393 CPPUNIT_ASSERT_MESSAGE
13395 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13396 aStrBuf
.getStr()== expVal
&&
13397 aStrBuf
.getLength() == expVal
.getLength()
13404 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13405 OString
expVal( aStrBuf
.getStr() );
13406 sal_Int64 input
= -15;
13407 sal_Int16 radix
= 10;
13409 expVal
+= OString( "-" );
13410 expVal
+= OString( "15" );
13411 aStrBuf
.append( input
, radix
);
13413 CPPUNIT_ASSERT_MESSAGE
13415 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13416 aStrBuf
.getStr()== expVal
&&
13417 aStrBuf
.getLength() == expVal
.getLength()
13424 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13425 OString
expVal( aStrBuf
.getStr() );
13426 sal_Int64 input
= -0;
13427 sal_Int16 radix
= 16;
13429 expVal
+= OString( "0" );
13430 aStrBuf
.append( input
, radix
);
13432 CPPUNIT_ASSERT_MESSAGE
13434 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13435 aStrBuf
.getStr()== expVal
&&
13436 aStrBuf
.getLength() == expVal
.getLength()
13443 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13444 OString
expVal( aStrBuf
.getStr() );
13445 sal_Int64 input
= -4;
13446 sal_Int16 radix
= 16;
13448 expVal
+= OString( "-" );
13449 expVal
+= OString( "4" );
13450 aStrBuf
.append( input
, radix
);
13452 CPPUNIT_ASSERT_MESSAGE
13454 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13455 aStrBuf
.getStr()== expVal
&&
13456 aStrBuf
.getLength() == expVal
.getLength()
13463 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13464 OString
expVal( aStrBuf
.getStr() );
13465 sal_Int64 input
= -8;
13466 sal_Int16 radix
= 16;
13468 expVal
+= OString( "-" );
13469 expVal
+= OString( "8" );
13470 aStrBuf
.append( input
, radix
);
13472 CPPUNIT_ASSERT_MESSAGE
13474 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13475 aStrBuf
.getStr()== expVal
&&
13476 aStrBuf
.getLength() == expVal
.getLength()
13483 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13484 OString
expVal( aStrBuf
.getStr() );
13485 sal_Int64 input
= -15;
13486 sal_Int16 radix
= 16;
13488 expVal
+= OString( "-" );
13489 expVal
+= OString( "f" );
13490 aStrBuf
.append( input
, radix
);
13492 CPPUNIT_ASSERT_MESSAGE
13494 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13495 aStrBuf
.getStr()== expVal
&&
13496 aStrBuf
.getLength() == expVal
.getLength()
13503 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13504 OString
expVal( aStrBuf
.getStr() );
13505 sal_Int64 input
= -0;
13506 sal_Int16 radix
= 36;
13508 expVal
+= OString( "0" );
13509 aStrBuf
.append( input
, radix
);
13511 CPPUNIT_ASSERT_MESSAGE
13513 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13514 aStrBuf
.getStr()== expVal
&&
13515 aStrBuf
.getLength() == expVal
.getLength()
13522 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13523 OString
expVal( aStrBuf
.getStr() );
13524 sal_Int64 input
= -4;
13525 sal_Int16 radix
= 36;
13527 expVal
+= OString( "-" );
13528 expVal
+= OString( "4" );
13529 aStrBuf
.append( input
, radix
);
13531 CPPUNIT_ASSERT_MESSAGE
13533 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13534 aStrBuf
.getStr()== expVal
&&
13535 aStrBuf
.getLength() == expVal
.getLength()
13542 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13543 OString
expVal( aStrBuf
.getStr() );
13544 sal_Int64 input
= -8;
13545 sal_Int16 radix
= 36;
13547 expVal
+= OString( "-" );
13548 expVal
+= OString( "8" );
13549 aStrBuf
.append( input
, radix
);
13551 CPPUNIT_ASSERT_MESSAGE
13553 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13554 aStrBuf
.getStr()== expVal
&&
13555 aStrBuf
.getLength() == expVal
.getLength()
13562 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
13563 OString
expVal( aStrBuf
.getStr() );
13564 sal_Int64 input
= -35;
13565 sal_Int16 radix
= 36;
13567 expVal
+= OString( "-" );
13568 expVal
+= OString( "z" );
13569 aStrBuf
.append( input
, radix
);
13571 CPPUNIT_ASSERT_MESSAGE
13573 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13574 aStrBuf
.getStr()== expVal
&&
13575 aStrBuf
.getLength() == expVal
.getLength()
13582 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13583 OString
expVal( aStrBuf
.getStr() );
13584 sal_Int64 input
= -0;
13585 sal_Int16 radix
= 2;
13587 expVal
+= OString( "0" );
13588 aStrBuf
.append( input
, radix
);
13590 CPPUNIT_ASSERT_MESSAGE
13592 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13593 aStrBuf
.getStr()== expVal
&&
13594 aStrBuf
.getLength() == expVal
.getLength()
13601 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13602 OString
expVal( aStrBuf
.getStr() );
13603 sal_Int64 input
= -4;
13604 sal_Int16 radix
= 2;
13606 expVal
+= OString( "-" );
13607 expVal
+= OString( "100" );
13608 aStrBuf
.append( input
, radix
);
13610 CPPUNIT_ASSERT_MESSAGE
13612 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13613 aStrBuf
.getStr()== expVal
&&
13614 aStrBuf
.getLength() == expVal
.getLength()
13621 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13622 OString
expVal( aStrBuf
.getStr() );
13623 sal_Int64 input
= -8;
13624 sal_Int16 radix
= 2;
13626 expVal
+= OString( "-" );
13627 expVal
+= OString( "1000" );
13628 aStrBuf
.append( input
, radix
);
13630 CPPUNIT_ASSERT_MESSAGE
13632 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13633 aStrBuf
.getStr()== expVal
&&
13634 aStrBuf
.getLength() == expVal
.getLength()
13641 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13642 OString
expVal( aStrBuf
.getStr() );
13643 sal_Int64 input
= -15;
13644 sal_Int16 radix
= 2;
13646 expVal
+= OString( "-" );
13647 expVal
+= OString( "1111" );
13648 aStrBuf
.append( input
, radix
);
13650 CPPUNIT_ASSERT_MESSAGE
13652 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13653 aStrBuf
.getStr()== expVal
&&
13654 aStrBuf
.getLength() == expVal
.getLength()
13661 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13662 OString
expVal( aStrBuf
.getStr() );
13663 sal_Int64 input
= -0;
13664 sal_Int16 radix
= 8;
13666 expVal
+= OString( "0" );
13667 aStrBuf
.append( input
, radix
);
13669 CPPUNIT_ASSERT_MESSAGE
13671 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13672 aStrBuf
.getStr()== expVal
&&
13673 aStrBuf
.getLength() == expVal
.getLength()
13680 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13681 OString
expVal( aStrBuf
.getStr() );
13682 sal_Int64 input
= -4;
13683 sal_Int16 radix
= 8;
13685 expVal
+= OString( "-" );
13686 expVal
+= OString( "4" );
13687 aStrBuf
.append( input
, radix
);
13689 CPPUNIT_ASSERT_MESSAGE
13691 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13692 aStrBuf
.getStr()== expVal
&&
13693 aStrBuf
.getLength() == expVal
.getLength()
13700 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13701 OString
expVal( aStrBuf
.getStr() );
13702 sal_Int64 input
= -8;
13703 sal_Int16 radix
= 8;
13705 expVal
+= OString( "-" );
13706 expVal
+= OString( "10" );
13707 aStrBuf
.append( input
, radix
);
13709 CPPUNIT_ASSERT_MESSAGE
13711 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13712 aStrBuf
.getStr()== expVal
&&
13713 aStrBuf
.getLength() == expVal
.getLength()
13720 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13721 OString
expVal( aStrBuf
.getStr() );
13722 sal_Int64 input
= -15;
13723 sal_Int16 radix
= 8;
13725 expVal
+= OString( "-" );
13726 expVal
+= OString( "17" );
13727 aStrBuf
.append( input
, radix
);
13729 CPPUNIT_ASSERT_MESSAGE
13731 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13732 aStrBuf
.getStr()== expVal
&&
13733 aStrBuf
.getLength() == expVal
.getLength()
13740 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13741 OString
expVal( aStrBuf
.getStr() );
13742 sal_Int64 input
= -0;
13743 sal_Int16 radix
= 10;
13745 expVal
+= OString( "0" );
13746 aStrBuf
.append( input
, radix
);
13748 CPPUNIT_ASSERT_MESSAGE
13750 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13751 aStrBuf
.getStr()== expVal
&&
13752 aStrBuf
.getLength() == expVal
.getLength()
13759 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13760 OString
expVal( aStrBuf
.getStr() );
13761 sal_Int64 input
= -4;
13762 sal_Int16 radix
= 10;
13764 expVal
+= OString( "-" );
13765 expVal
+= OString( "4" );
13766 aStrBuf
.append( input
, radix
);
13768 CPPUNIT_ASSERT_MESSAGE
13770 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13771 aStrBuf
.getStr()== expVal
&&
13772 aStrBuf
.getLength() == expVal
.getLength()
13779 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13780 OString
expVal( aStrBuf
.getStr() );
13781 sal_Int64 input
= -8;
13782 sal_Int16 radix
= 10;
13784 expVal
+= OString( "-" );
13785 expVal
+= OString( "8" );
13786 aStrBuf
.append( input
, radix
);
13788 CPPUNIT_ASSERT_MESSAGE
13790 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13791 aStrBuf
.getStr()== expVal
&&
13792 aStrBuf
.getLength() == expVal
.getLength()
13799 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13800 OString
expVal( aStrBuf
.getStr() );
13801 sal_Int64 input
= -15;
13802 sal_Int16 radix
= 10;
13804 expVal
+= OString( "-" );
13805 expVal
+= OString( "15" );
13806 aStrBuf
.append( input
, radix
);
13808 CPPUNIT_ASSERT_MESSAGE
13810 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13811 aStrBuf
.getStr()== expVal
&&
13812 aStrBuf
.getLength() == expVal
.getLength()
13819 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13820 OString
expVal( aStrBuf
.getStr() );
13821 sal_Int64 input
= -0;
13822 sal_Int16 radix
= 16;
13824 expVal
+= OString( "0" );
13825 aStrBuf
.append( input
, radix
);
13827 CPPUNIT_ASSERT_MESSAGE
13829 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13830 aStrBuf
.getStr()== expVal
&&
13831 aStrBuf
.getLength() == expVal
.getLength()
13838 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13839 OString
expVal( aStrBuf
.getStr() );
13840 sal_Int64 input
= -4;
13841 sal_Int16 radix
= 16;
13843 expVal
+= OString( "-" );
13844 expVal
+= OString( "4" );
13845 aStrBuf
.append( input
, radix
);
13847 CPPUNIT_ASSERT_MESSAGE
13849 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13850 aStrBuf
.getStr()== expVal
&&
13851 aStrBuf
.getLength() == expVal
.getLength()
13858 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13859 OString
expVal( aStrBuf
.getStr() );
13860 sal_Int64 input
= -8;
13861 sal_Int16 radix
= 16;
13863 expVal
+= OString( "-" );
13864 expVal
+= OString( "8" );
13865 aStrBuf
.append( input
, radix
);
13867 CPPUNIT_ASSERT_MESSAGE
13869 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13870 aStrBuf
.getStr()== expVal
&&
13871 aStrBuf
.getLength() == expVal
.getLength()
13878 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13879 OString
expVal( aStrBuf
.getStr() );
13880 sal_Int64 input
= -15;
13881 sal_Int16 radix
= 16;
13883 expVal
+= OString( "-" );
13884 expVal
+= OString( "f" );
13885 aStrBuf
.append( input
, radix
);
13887 CPPUNIT_ASSERT_MESSAGE
13889 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13890 aStrBuf
.getStr()== expVal
&&
13891 aStrBuf
.getLength() == expVal
.getLength()
13898 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13899 OString
expVal( aStrBuf
.getStr() );
13900 sal_Int64 input
= -0;
13901 sal_Int16 radix
= 36;
13903 expVal
+= OString( "0" );
13904 aStrBuf
.append( input
, radix
);
13906 CPPUNIT_ASSERT_MESSAGE
13908 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13909 aStrBuf
.getStr()== expVal
&&
13910 aStrBuf
.getLength() == expVal
.getLength()
13917 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13918 OString
expVal( aStrBuf
.getStr() );
13919 sal_Int64 input
= -4;
13920 sal_Int16 radix
= 36;
13922 expVal
+= OString( "-" );
13923 expVal
+= OString( "4" );
13924 aStrBuf
.append( input
, radix
);
13926 CPPUNIT_ASSERT_MESSAGE
13928 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13929 aStrBuf
.getStr()== expVal
&&
13930 aStrBuf
.getLength() == expVal
.getLength()
13937 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13938 OString
expVal( aStrBuf
.getStr() );
13939 sal_Int64 input
= -8;
13940 sal_Int16 radix
= 36;
13942 expVal
+= OString( "-" );
13943 expVal
+= OString( "8" );
13944 aStrBuf
.append( input
, radix
);
13946 CPPUNIT_ASSERT_MESSAGE
13948 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13949 aStrBuf
.getStr()== expVal
&&
13950 aStrBuf
.getLength() == expVal
.getLength()
13957 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
13958 OString
expVal( aStrBuf
.getStr() );
13959 sal_Int64 input
= -35;
13960 sal_Int16 radix
= 36;
13962 expVal
+= OString( "-" );
13963 expVal
+= OString( "z" );
13964 aStrBuf
.append( input
, radix
);
13966 CPPUNIT_ASSERT_MESSAGE
13968 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13969 aStrBuf
.getStr()== expVal
&&
13970 aStrBuf
.getLength() == expVal
.getLength()
13975 CPPUNIT_TEST_SUITE( append_007_Int64_Negative
);
13976 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
13977 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
13978 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
13979 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
13980 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
13981 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
13982 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
13983 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
13984 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
13985 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
13986 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
13987 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
13988 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
13989 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
13990 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
13991 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
13992 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
13993 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
13994 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
13995 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
13996 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
13997 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
13998 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
13999 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
14000 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
14001 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
14002 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
14003 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
14004 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
14005 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
14006 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
14007 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
14008 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
14009 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
14010 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
14011 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
14012 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
14013 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
14014 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
14015 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
14016 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
14017 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
14018 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
14019 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
14020 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
14021 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
14022 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
14023 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
14024 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
14025 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
14026 CPPUNIT_TEST_SUITE_END();
14029 // testing the method append( sal_Int64 i, sal_Int16 radix ) where radix = -5
14031 class append_007_Int64_WrongRadix
: public CppUnit::TestFixture
14033 OString
* arrOUS
[5];
14034 static const sal_Int64 intVal
= 11;
14037 void setUp() override
14039 arrOUS
[0] = new OString( kTestStr7
);
14040 arrOUS
[1] = new OString( );
14041 arrOUS
[2] = new OString( kTestStr25
);
14042 arrOUS
[3] = new OString( "" );
14043 arrOUS
[4] = new OString( kTestStr28
);
14046 void tearDown() override
14048 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
14049 delete arrOUS
[3]; delete arrOUS
[4];
14054 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14055 OString
expVal( kTestStr59
);
14057 aStrBuf
.append( intVal
, -5 );
14059 CPPUNIT_ASSERT_MESSAGE
14061 "Appends the WrongRadix to the string buffer arrOUS[0]",
14062 (aStrBuf
.toString() == expVal
&&
14063 aStrBuf
.getLength() == expVal
.getLength())
14069 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14070 OString
expVal( kTestStr60
);
14072 aStrBuf
.append( intVal
, -5 );
14074 CPPUNIT_ASSERT_MESSAGE
14076 "Appends the WrongRadix to the string buffer arrOUS[1]",
14077 (aStrBuf
.toString() == expVal
&&
14078 aStrBuf
.getLength() == expVal
.getLength())
14084 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14085 OString
expVal( kTestStr60
);
14087 aStrBuf
.append( intVal
, -5 );
14089 CPPUNIT_ASSERT_MESSAGE
14091 "Appends the WrongRadix to the string buffer arrOUS[2]",
14092 (aStrBuf
.toString() == expVal
&&
14093 aStrBuf
.getLength() == expVal
.getLength())
14099 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
14100 OString
expVal( kTestStr60
);
14102 aStrBuf
.append( intVal
, -5 );
14104 CPPUNIT_ASSERT_MESSAGE
14106 "Appends the WrongRadix to the string buffer arrOUS[3]",
14107 (aStrBuf
.toString() == expVal
&&
14108 aStrBuf
.getLength() == expVal
.getLength())
14114 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
14115 OString
expVal( kTestStr61
);
14117 aStrBuf
.append( intVal
, -5 );
14119 CPPUNIT_ASSERT_MESSAGE
14121 "Appends the WrongRadix to the string buffer arrOUS[4]",
14122 (aStrBuf
.toString() == expVal
&&
14123 aStrBuf
.getLength() == expVal
.getLength())
14129 ::rtl::OStringBuffer
aStrBuf( kSInt64Max
);
14130 OString
expVal( kTestStr60
);
14132 aStrBuf
.append( intVal
, -5 );
14134 CPPUNIT_ASSERT_MESSAGE
14136 "Appends the WrongRadix to the string buffer(with INT_MAX)",
14137 (aStrBuf
.toString() == expVal
&&
14138 aStrBuf
.getLength() == expVal
.getLength())
14143 CPPUNIT_TEST_SUITE( append_007_Int64_WrongRadix
);
14144 CPPUNIT_TEST( append_001
);
14145 CPPUNIT_TEST( append_002
);
14146 CPPUNIT_TEST( append_003
);
14147 CPPUNIT_TEST( append_004
);
14148 CPPUNIT_TEST( append_005
);
14150 CPPUNIT_TEST( append_006
);
14152 CPPUNIT_TEST_SUITE_END();
14155 class append_007_Int64_defaultParam
: public CppUnit::TestFixture
14157 OString
* arrOUS
[5];
14160 void setUp() override
14162 arrOUS
[0] = new OString( kTestStr7
);
14163 arrOUS
[1] = new OString( );
14164 arrOUS
[2] = new OString( kTestStr25
);
14165 arrOUS
[3] = new OString( "" );
14166 arrOUS
[4] = new OString( kTestStr28
);
14170 void tearDown() override
14172 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
14173 delete arrOUS
[3]; delete arrOUS
[4];
14178 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14179 OString
expVal( kTestStr59
);
14180 sal_Int64 input
= 11;
14182 aStrBuf
.append( input
);
14184 CPPUNIT_ASSERT_MESSAGE
14186 "input Int64 11 and return OStringBuffer[0]+11",
14187 (aStrBuf
.toString() == expVal
&&
14188 aStrBuf
.getLength() == expVal
.getLength())
14195 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14196 OString
expVal( kTestStr62
);
14197 sal_Int64 input
= 0;
14199 aStrBuf
.append( input
);
14201 CPPUNIT_ASSERT_MESSAGE
14203 "input Int64 0 and return OStringBuffer[0]+0",
14204 (aStrBuf
.toString() == expVal
&&
14205 aStrBuf
.getLength() == expVal
.getLength())
14212 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14213 OString
expVal( kTestStr63
);
14214 sal_Int64 input
= -11;
14216 aStrBuf
.append( input
);
14218 CPPUNIT_ASSERT_MESSAGE
14220 "input Int64 -11 and return OStringBuffer[0]+(-11)",
14221 (aStrBuf
.toString() == expVal
&&
14222 aStrBuf
.getLength() == expVal
.getLength())
14229 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14230 OString
expVal( kTestStr116
);
14231 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
14232 aStrBuf
.append( input
);
14234 CPPUNIT_ASSERT_MESSAGE
14236 "input Int64 9223372036854775807 and return OStringBuffer[0]+9223372036854775807",
14237 (aStrBuf
.toString() == expVal
&&
14238 aStrBuf
.getLength() == expVal
.getLength())
14245 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14246 OString
expVal( kTestStr117
);
14247 sal_Int64 input
= SAL_MIN_INT64
/*-9223372036854775808*/; // LLA: this is not the same :-( kNonSInt64Max;
14249 aStrBuf
.append( input
);
14251 bool bRes
= expVal
== aStrBuf
.getStr();
14252 CPPUNIT_ASSERT_MESSAGE
14254 "input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)",
14255 bRes
&& aStrBuf
.getLength() == expVal
.getLength()
14262 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14263 OString
expVal( kTestStr60
);
14264 sal_Int64 input
= 11;
14266 aStrBuf
.append( input
);
14268 CPPUNIT_ASSERT_MESSAGE
14270 "input Int64 11 and return OStringBuffer[1]+11",
14271 (aStrBuf
.toString() == expVal
&&
14272 aStrBuf
.getLength() == expVal
.getLength())
14279 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14280 OString
expVal( kTestStr66
);
14281 sal_Int64 input
= 0;
14283 aStrBuf
.append( input
);
14285 CPPUNIT_ASSERT_MESSAGE
14287 "input Int64 0 and return OStringBuffer[1]+0",
14288 (aStrBuf
.toString() == expVal
&&
14289 aStrBuf
.getLength() == expVal
.getLength())
14296 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14297 OString
expVal( kTestStr67
);
14298 sal_Int64 input
= -11;
14300 aStrBuf
.append( input
);
14302 CPPUNIT_ASSERT_MESSAGE
14304 "input Int64 -11 and return OStringBuffer[1]+(-11)",
14305 (aStrBuf
.toString() == expVal
&&
14306 aStrBuf
.getLength() == expVal
.getLength())
14313 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14314 OString
expVal( kTestStr118
);
14315 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
14316 aStrBuf
.append( input
);
14318 CPPUNIT_ASSERT_MESSAGE
14320 "input Int64 9223372036854775807 and return OStringBuffer[1]+9223372036854775807",
14321 (aStrBuf
.toString() == expVal
&&
14322 aStrBuf
.getLength() == expVal
.getLength())
14329 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14330 OString
expVal( kTestStr119
);
14331 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14333 aStrBuf
.append( input
);
14335 CPPUNIT_ASSERT_MESSAGE
14337 "input Int64 -9223372036854775808 and return OStringBuffer[1]+(-9223372036854775808)",
14338 (aStrBuf
.toString() == expVal
&&
14339 aStrBuf
.getLength() == expVal
.getLength())
14346 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14347 OString
expVal( kTestStr60
);
14348 sal_Int64 input
= 11;
14350 aStrBuf
.append( input
);
14352 CPPUNIT_ASSERT_MESSAGE
14354 "input Int64 11 and return OStringBuffer[2]+11",
14355 (aStrBuf
.toString() == expVal
&&
14356 aStrBuf
.getLength() == expVal
.getLength())
14363 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14364 OString
expVal( kTestStr66
);
14365 sal_Int64 input
= 0;
14367 aStrBuf
.append( input
);
14369 CPPUNIT_ASSERT_MESSAGE
14371 "input Int64 0 and return OUStringBuffer[2]+0",
14372 (aStrBuf
.toString() == expVal
&&
14373 aStrBuf
.getLength() == expVal
.getLength())
14380 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14381 OString
expVal( kTestStr67
);
14382 sal_Int64 input
= -11;
14384 aStrBuf
.append( input
);
14386 CPPUNIT_ASSERT_MESSAGE
14388 "input Int64 -11 and return OUStringBuffer[2]+(-11)",
14389 (aStrBuf
.toString() == expVal
&&
14390 aStrBuf
.getLength() == expVal
.getLength())
14397 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14398 OString
expVal( kTestStr118
);
14399 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
14400 aStrBuf
.append( input
);
14402 CPPUNIT_ASSERT_MESSAGE
14404 "input Int64 9223372036854775807 and return OStringBuffer[2]+9223372036854775807",
14405 (aStrBuf
.toString() == expVal
&&
14406 aStrBuf
.getLength() == expVal
.getLength())
14413 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14414 OString
expVal( kTestStr119
);
14415 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14417 aStrBuf
.append( input
);
14419 CPPUNIT_ASSERT_MESSAGE
14421 "input Int64 -9223372036854775808 and return OStringBuffer[2]+(-9223372036854775808)",
14422 (aStrBuf
.toString() == expVal
&&
14423 aStrBuf
.getLength() == expVal
.getLength())
14430 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
14431 OString
expVal( kTestStr60
);
14432 sal_Int64 input
= 11;
14434 aStrBuf
.append( input
);
14436 CPPUNIT_ASSERT_MESSAGE
14438 "input Int64 11 and return OStringBuffer[3]+11",
14439 (aStrBuf
.toString() == expVal
&&
14440 aStrBuf
.getLength() == expVal
.getLength())
14447 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
14448 OString
expVal( kTestStr66
);
14449 sal_Int64 input
= 0;
14451 aStrBuf
.append( input
);
14453 CPPUNIT_ASSERT_MESSAGE
14455 "input Int64 0 and return OStringBuffer[3]+0",
14456 (aStrBuf
.toString() == expVal
&&
14457 aStrBuf
.getLength() == expVal
.getLength())
14464 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
14465 OString
expVal( kTestStr67
);
14466 sal_Int64 input
= -11;
14468 aStrBuf
.append( input
);
14470 CPPUNIT_ASSERT_MESSAGE
14472 "input Int64 -11 and return OStringBuffer[3]+(-11)",
14473 (aStrBuf
.toString() == expVal
&&
14474 aStrBuf
.getLength() == expVal
.getLength())
14481 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
14482 OString
expVal( kTestStr118
);
14483 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
14484 aStrBuf
.append( input
);
14486 CPPUNIT_ASSERT_MESSAGE
14488 "input Int64 9223372036854775807 and return OStringBuffer[3]+9223372036854775807",
14489 (aStrBuf
.toString() == expVal
&&
14490 aStrBuf
.getLength() == expVal
.getLength())
14497 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
14498 OString
expVal( kTestStr119
);
14499 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14501 aStrBuf
.append( input
);
14503 CPPUNIT_ASSERT_MESSAGE
14505 "input Int64 -9223372036854775808 and return OStringBuffer[3]+(-9223372036854775808)",
14506 (aStrBuf
.toString() == expVal
&&
14507 aStrBuf
.getLength() == expVal
.getLength())
14514 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
14515 OString
expVal( kTestStr61
);
14516 sal_Int64 input
= 11;
14518 aStrBuf
.append( input
);
14520 CPPUNIT_ASSERT_MESSAGE
14522 "input Int64 11 and return OStringBuffer[4]+11",
14523 (aStrBuf
.toString() == expVal
&&
14524 aStrBuf
.getLength() == expVal
.getLength())
14531 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
14532 OString
expVal( kTestStr70
);
14533 sal_Int64 input
= 0;
14535 aStrBuf
.append( input
);
14537 CPPUNIT_ASSERT_MESSAGE
14539 "input Int64 0 and return OStringBuffer[4]+0",
14540 (aStrBuf
.toString() == expVal
&&
14541 aStrBuf
.getLength() == expVal
.getLength())
14548 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
14549 OString
expVal( kTestStr71
);
14550 sal_Int64 input
= -11;
14552 aStrBuf
.append( input
);
14554 CPPUNIT_ASSERT_MESSAGE
14556 "input Int64 -11 and return OStringBuffer[4]+(-11)",
14557 (aStrBuf
.toString() == expVal
&&
14558 aStrBuf
.getLength() == expVal
.getLength())
14565 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
14566 OString
expVal( kTestStr120
);
14567 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
14568 aStrBuf
.append( input
);
14570 CPPUNIT_ASSERT_MESSAGE
14572 "input Int64 9223372036854775807 and return OStringBuffer[4]+9223372036854775807",
14573 (aStrBuf
.toString() == expVal
&&
14574 aStrBuf
.getLength() == expVal
.getLength())
14581 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
14582 OString
expVal( kTestStr121
);
14583 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14585 aStrBuf
.append( input
);
14587 CPPUNIT_ASSERT_MESSAGE
14589 "input Int64 -9223372036854775808 and return OStringBuffer[4]+(-9223372036854775808)",
14590 (aStrBuf
.toString() == expVal
&&
14591 aStrBuf
.getLength() == expVal
.getLength())
14598 ::rtl::OStringBuffer
aStrBuf( kSInt64Max
);
14599 OString
expVal( kTestStr60
);
14600 sal_Int64 input
= 11;
14602 aStrBuf
.append( input
);
14604 CPPUNIT_ASSERT_MESSAGE
14606 "input Int64 11 and return OStringBuffer(kSInt64Max)+11",
14607 (aStrBuf
.toString() == expVal
&&
14608 aStrBuf
.getLength() == expVal
.getLength())
14615 ::rtl::OStringBuffer
aStrBuf( kSInt64Max
);
14616 OString
expVal( kTestStr66
);
14617 sal_Int64 input
= 0;
14619 aStrBuf
.append( input
);
14621 CPPUNIT_ASSERT_MESSAGE
14623 "input Int64 0 and return OStringBuffer(kSInt64Max)+0",
14624 (aStrBuf
.toString() == expVal
&&
14625 aStrBuf
.getLength() == expVal
.getLength())
14632 ::rtl::OStringBuffer
aStrBuf( kSInt64Max
);
14633 OString
expVal( kTestStr67
);
14634 sal_Int64 input
= -11;
14636 aStrBuf
.append( input
);
14638 CPPUNIT_ASSERT_MESSAGE
14640 "input Int64 -11 and return OStringBuffer(kSInt64Max)+(-11)",
14641 (aStrBuf
.toString() == expVal
&&
14642 aStrBuf
.getLength() == expVal
.getLength())
14649 ::rtl::OStringBuffer
aStrBuf( kSInt64Max
);
14650 OString
expVal( kTestStr118
);
14651 sal_Int64 input
= 9223372036854775807;
14653 aStrBuf
.append( input
);
14655 CPPUNIT_ASSERT_MESSAGE
14657 "input Int64 9223372036854775807 and return OStringBuffer(kSInt64Max)+9223372036854775807",
14658 (aStrBuf
.toString() == expVal
&&
14659 aStrBuf
.getLength() == expVal
.getLength())
14666 ::rtl::OStringBuffer
aStrBuf( kSInt64Max
);
14667 OString
expVal( kTestStr119
);
14668 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14670 aStrBuf
.append( input
);
14672 CPPUNIT_ASSERT_MESSAGE
14674 "input Int64 -9223372036854775808 and return OStringBuffer(kSInt64Max)+(-9223372036854775808)",
14675 (aStrBuf
.toString() == expVal
&&
14676 aStrBuf
.getLength() == expVal
.getLength())
14682 CPPUNIT_TEST_SUITE( append_007_Int64_defaultParam
);
14683 CPPUNIT_TEST( append_001
);
14684 CPPUNIT_TEST( append_002
);
14685 CPPUNIT_TEST( append_003
);
14686 CPPUNIT_TEST( append_004
);
14687 CPPUNIT_TEST( append_005
);
14688 CPPUNIT_TEST( append_006
);
14689 CPPUNIT_TEST( append_007
);
14690 CPPUNIT_TEST( append_008
);
14691 CPPUNIT_TEST( append_009
);
14692 CPPUNIT_TEST( append_010
);
14693 CPPUNIT_TEST( append_011
);
14694 CPPUNIT_TEST( append_012
);
14695 CPPUNIT_TEST( append_013
);
14696 CPPUNIT_TEST( append_014
);
14697 CPPUNIT_TEST( append_015
);
14698 CPPUNIT_TEST( append_016
);
14699 CPPUNIT_TEST( append_017
);
14700 CPPUNIT_TEST( append_018
);
14701 CPPUNIT_TEST( append_019
);
14702 CPPUNIT_TEST( append_020
);
14703 CPPUNIT_TEST( append_021
);
14704 CPPUNIT_TEST( append_022
);
14705 CPPUNIT_TEST( append_023
);
14706 CPPUNIT_TEST( append_024
);
14707 CPPUNIT_TEST( append_025
);
14709 CPPUNIT_TEST( append_026
);
14710 CPPUNIT_TEST( append_027
);
14711 CPPUNIT_TEST( append_028
);
14712 CPPUNIT_TEST( append_029
);
14713 CPPUNIT_TEST( append_030
);
14715 CPPUNIT_TEST_SUITE_END();
14718 // testing the method append( float f )
14720 class checkfloat
: public CppUnit::TestFixture
14723 bool checkIfStrBufContainAtPosTheFloat(rtl::OStringBuffer
const& _sStrBuf
, sal_Int32 _nLen
, float _nFloat
)
14725 OString sFloatValue
;
14726 sFloatValue
= OString::number(_nFloat
);
14728 OString
sBufferString(_sStrBuf
.getStr());
14729 sal_Int32 nPos
= sBufferString
.indexOf(sFloatValue
);
14730 return nPos
>= 0 && nPos
== _nLen
;
14734 class append_008_float
: public checkfloat
14736 OString
* arrOUS
[5];
14739 void setUp() override
14741 arrOUS
[0] = new OString( kTestStr7
);
14742 arrOUS
[1] = new OString( );
14743 arrOUS
[2] = new OString( kTestStr25
);
14744 arrOUS
[3] = new OString( "" );
14745 arrOUS
[4] = new OString( kTestStr28
);
14749 void tearDown() override
14751 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
14752 delete arrOUS
[3]; delete arrOUS
[4];
14757 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14758 float input
= static_cast<float>(atof("3.0"));
14761 // the complex problem is here, that a float value is not really what we write.
14762 // So a 3.0 could also be 3 or 3.0 or 3.0000001 or 2.9999999
14763 // this has to be checked.
14764 sal_Int32 nLen
= aStrBuf
.getLength();
14765 aStrBuf
.append( input
);
14767 CPPUNIT_ASSERT_MESSAGE
14769 "arrOUS[0] append 3.0",
14770 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14777 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14778 float input
= static_cast<float>(atof("3.5"));
14780 sal_Int32 nLen
= aStrBuf
.getLength();
14781 aStrBuf
.append( input
);
14783 CPPUNIT_ASSERT_MESSAGE
14785 "arrOUS[0] append 3.5",
14786 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14793 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14794 float input
= static_cast<float>(atof("3.0625"));
14796 sal_Int32 nLen
= aStrBuf
.getLength();
14797 aStrBuf
.append( input
);
14799 CPPUNIT_ASSERT_MESSAGE
14801 "arrOUS[0] append 3.0625",
14802 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14809 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14810 float input
= static_cast<float>(atof("3.502525"));
14812 sal_Int32 nLen
= aStrBuf
.getLength();
14813 aStrBuf
.append( input
);
14815 CPPUNIT_ASSERT_MESSAGE
14817 "arrOUS[0] append 3.502525",
14818 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14825 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14826 float input
= static_cast<float>(atof("3.141592"));
14828 sal_Int32 nLen
= aStrBuf
.getLength();
14829 aStrBuf
.append( input
);
14831 CPPUNIT_ASSERT_MESSAGE
14833 "arrOUS[0] append 3.141592",
14834 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14841 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14842 float input
= static_cast<float>(atof("3.5025255"));
14844 sal_Int32 nLen
= aStrBuf
.getLength();
14845 aStrBuf
.append( input
);
14847 CPPUNIT_ASSERT_MESSAGE
14849 "arrOUS[0] append 3.5025255",
14850 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14857 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
14858 float input
= static_cast<float>(atof("3.00390625"));
14860 sal_Int32 nLen
= aStrBuf
.getLength();
14861 aStrBuf
.append( input
);
14863 CPPUNIT_ASSERT_MESSAGE
14865 "arrOUS[0] append 3.0039062",
14866 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14873 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14874 float input
= static_cast<float>(atof("3.0"));
14876 sal_Int32 nLen
= aStrBuf
.getLength();
14877 aStrBuf
.append( input
);
14879 CPPUNIT_ASSERT_MESSAGE
14881 "arrOUS[1] append 3.0",
14882 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14889 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14890 float input
= static_cast<float>(atof("3.5"));
14892 sal_Int32 nLen
= aStrBuf
.getLength();
14893 aStrBuf
.append( input
);
14895 CPPUNIT_ASSERT_MESSAGE
14897 "arrOUS[1] append 3.5",
14898 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14905 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14906 float input
= static_cast<float>(atof("3.0625"));
14908 sal_Int32 nLen
= aStrBuf
.getLength();
14909 aStrBuf
.append( input
);
14911 CPPUNIT_ASSERT_MESSAGE
14913 "arrOUS[1] append 3.0625",
14914 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14921 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14922 float input
= static_cast<float>(atof("3.502525"));
14924 sal_Int32 nLen
= aStrBuf
.getLength();
14925 aStrBuf
.append( input
);
14927 CPPUNIT_ASSERT_MESSAGE
14929 "arrOUS[1] append 3.502525",
14930 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14937 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14938 float input
= static_cast<float>(atof("3.141592"));
14940 sal_Int32 nLen
= aStrBuf
.getLength();
14941 aStrBuf
.append( input
);
14943 CPPUNIT_ASSERT_MESSAGE
14945 "arrOUS[1] append 3.141592",
14946 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14953 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14954 float input
= static_cast<float>(atof("3.5025255"));
14956 sal_Int32 nLen
= aStrBuf
.getLength();
14957 aStrBuf
.append( input
);
14959 CPPUNIT_ASSERT_MESSAGE
14961 "arrOUS[1] append 3.5025255",
14962 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14969 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
14970 float input
= static_cast<float>(atof("3.00390625"));
14972 sal_Int32 nLen
= aStrBuf
.getLength();
14973 aStrBuf
.append( input
);
14975 CPPUNIT_ASSERT_MESSAGE
14977 "arrOUS[1] append 3.0039062",
14978 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14985 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
14986 float input
= static_cast<float>(atof("3.0"));
14988 sal_Int32 nLen
= aStrBuf
.getLength();
14989 aStrBuf
.append( input
);
14991 CPPUNIT_ASSERT_MESSAGE
14993 "arrOUS[2] append 3.0",
14994 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15001 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15002 float input
= static_cast<float>(atof("3.5"));
15004 sal_Int32 nLen
= aStrBuf
.getLength();
15005 aStrBuf
.append( input
);
15007 CPPUNIT_ASSERT_MESSAGE
15009 "arrOUS[2] append 3.5",
15010 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15017 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15018 float input
= static_cast<float>(atof("3.0625"));
15020 sal_Int32 nLen
= aStrBuf
.getLength();
15021 aStrBuf
.append( input
);
15023 CPPUNIT_ASSERT_MESSAGE
15025 "arrOUS[2] append 3.0625",
15026 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15033 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15034 float input
= static_cast<float>(atof("3.502525"));
15036 sal_Int32 nLen
= aStrBuf
.getLength();
15037 aStrBuf
.append( input
);
15039 CPPUNIT_ASSERT_MESSAGE
15041 "arrOUS[2] append 3.502525",
15042 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15049 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15050 float input
= static_cast<float>(atof("3.141592"));
15052 sal_Int32 nLen
= aStrBuf
.getLength();
15053 aStrBuf
.append( input
);
15055 CPPUNIT_ASSERT_MESSAGE
15057 "arrOUS[2] append 3.141592",
15058 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15065 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15066 float input
= static_cast<float>(atof("3.5025255"));
15068 sal_Int32 nLen
= aStrBuf
.getLength();
15069 aStrBuf
.append( input
);
15071 CPPUNIT_ASSERT_MESSAGE
15073 "arrOUS[2] append 3.5025255",
15074 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15081 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15082 float input
= static_cast<float>(atof("3.00390625"));
15084 sal_Int32 nLen
= aStrBuf
.getLength();
15085 aStrBuf
.append( input
);
15087 CPPUNIT_ASSERT_MESSAGE
15089 "arrOUS[2] append 3.0039062",
15090 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15097 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15098 float input
= static_cast<float>(atof("3.0"));
15100 sal_Int32 nLen
= aStrBuf
.getLength();
15101 aStrBuf
.append( input
);
15103 CPPUNIT_ASSERT_MESSAGE
15105 "arrOUS[3] append 3.0",
15106 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15113 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15114 float input
= static_cast<float>(atof("3.5"));
15116 sal_Int32 nLen
= aStrBuf
.getLength();
15117 aStrBuf
.append( input
);
15119 CPPUNIT_ASSERT_MESSAGE
15121 "arrOUS[3] append 3.5",
15122 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15129 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15130 float input
= static_cast<float>(atof("3.0625"));
15132 sal_Int32 nLen
= aStrBuf
.getLength();
15133 aStrBuf
.append( input
);
15135 CPPUNIT_ASSERT_MESSAGE
15137 "arrOUS[3] append 3.0625",
15138 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15145 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15146 float input
= static_cast<float>(atof("3.502525"));
15148 sal_Int32 nLen
= aStrBuf
.getLength();
15149 aStrBuf
.append( input
);
15151 CPPUNIT_ASSERT_MESSAGE
15153 "arrOUS[3] append 3.502525",
15154 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15162 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15163 float input
= (float)atof("3.0");
15165 sal_Int32 nLen
= aStrBuf
.getLength();
15166 aStrBuf
.append( input
);
15168 CPPUNIT_ASSERT_MESSAGE
15170 "OStringBuffer( kSInt32Max ) append 3.0",
15171 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15178 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15179 float input
= (float)atof("3.5");
15181 sal_Int32 nLen
= aStrBuf
.getLength();
15182 aStrBuf
.append( input
);
15184 CPPUNIT_ASSERT_MESSAGE
15186 "OStringBuffer( kSInt32Max ) append 3.5",
15187 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15194 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15195 float input
= (float)atof("3.0625");
15197 sal_Int32 nLen
= aStrBuf
.getLength();
15198 aStrBuf
.append( input
);
15200 CPPUNIT_ASSERT_MESSAGE
15202 "OStringBuffer( kSInt32Max ) append 3.0625",
15203 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15210 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15211 float input
= (float)atof("3.502525");
15213 sal_Int32 nLen
= aStrBuf
.getLength();
15214 aStrBuf
.append( input
);
15216 CPPUNIT_ASSERT_MESSAGE
15218 "OStringBuffer( kSInt32Max ) append 3.502525",
15219 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15226 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15227 float input
= (float)atof("3.141592");
15229 sal_Int32 nLen
= aStrBuf
.getLength();
15230 aStrBuf
.append( input
);
15232 CPPUNIT_ASSERT_MESSAGE
15234 "OStringBuffer( kSInt32Max ) append 3.141592",
15235 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15242 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15243 float input
= (float)atof("3.5025255");
15245 sal_Int32 nLen
= aStrBuf
.getLength();
15246 aStrBuf
.append( input
);
15248 CPPUNIT_ASSERT_MESSAGE
15250 "OStringBuffer( kSInt32Max ) append 3.5025255",
15251 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15258 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15259 float input
= (float)atof("3.00390625");
15261 sal_Int32 nLen
= aStrBuf
.getLength();
15262 aStrBuf
.append( input
);
15264 CPPUNIT_ASSERT_MESSAGE
15266 "OStringBuffer( kSInt32Max ) append 3.0039062",
15267 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15273 CPPUNIT_TEST_SUITE( append_008_float
);
15274 CPPUNIT_TEST( append_001
);
15275 CPPUNIT_TEST( append_002
);
15276 CPPUNIT_TEST( append_003
);
15277 CPPUNIT_TEST( append_004
);
15278 CPPUNIT_TEST( append_005
);
15279 CPPUNIT_TEST( append_006
);
15280 CPPUNIT_TEST( append_007
);
15281 CPPUNIT_TEST( append_008
);
15282 CPPUNIT_TEST( append_009
);
15283 CPPUNIT_TEST( append_010
);
15284 CPPUNIT_TEST( append_011
);
15285 CPPUNIT_TEST( append_012
);
15286 CPPUNIT_TEST( append_013
);
15287 CPPUNIT_TEST( append_014
);
15288 CPPUNIT_TEST( append_015
);
15289 CPPUNIT_TEST( append_016
);
15290 CPPUNIT_TEST( append_017
);
15291 CPPUNIT_TEST( append_018
);
15292 CPPUNIT_TEST( append_019
);
15293 CPPUNIT_TEST( append_020
);
15294 CPPUNIT_TEST( append_021
);
15295 CPPUNIT_TEST( append_022
);
15296 CPPUNIT_TEST( append_023
);
15297 CPPUNIT_TEST( append_024
);
15298 CPPUNIT_TEST( append_025
);
15300 CPPUNIT_TEST( append_026
);
15301 CPPUNIT_TEST( append_027
);
15302 CPPUNIT_TEST( append_028
);
15303 CPPUNIT_TEST( append_029
);
15304 CPPUNIT_TEST( append_030
);
15306 CPPUNIT_TEST_SUITE_END();
15309 // testing the method append( float f ) for negative value
15311 class append_008_Float_Negative
: public checkfloat
15313 OString
* arrOUS
[5];
15316 void setUp() override
15318 arrOUS
[0] = new OString( kTestStr7
);
15319 arrOUS
[1] = new OString( );
15320 arrOUS
[2] = new OString( kTestStr25
);
15321 arrOUS
[3] = new OString( "" );
15322 arrOUS
[4] = new OString( kTestStr28
);
15326 void tearDown() override
15328 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
15329 delete arrOUS
[3]; delete arrOUS
[4];
15334 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15335 float input
= static_cast<float>(atof("-3.0"));
15337 sal_Int32 nLen
= aStrBuf
.getLength();
15338 aStrBuf
.append( input
);
15340 CPPUNIT_ASSERT_MESSAGE
15342 "arrOUS[0] append -3.0",
15343 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15350 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15351 float input
= static_cast<float>(atof("-3.5"));
15353 sal_Int32 nLen
= aStrBuf
.getLength();
15354 aStrBuf
.append( input
);
15356 CPPUNIT_ASSERT_MESSAGE
15358 "arrOUS[0] append -3.5",
15359 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15366 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15367 float input
= static_cast<float>(atof("-3.0625"));
15369 sal_Int32 nLen
= aStrBuf
.getLength();
15370 aStrBuf
.append( input
);
15372 CPPUNIT_ASSERT_MESSAGE
15374 "arrOUS[0] append -3.0625",
15375 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15382 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15383 float input
= static_cast<float>(atof("-3.502525"));
15385 sal_Int32 nLen
= aStrBuf
.getLength();
15386 aStrBuf
.append( input
);
15388 CPPUNIT_ASSERT_MESSAGE
15390 "arrOUS[0] append -3.502525",
15391 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15398 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15399 float input
= static_cast<float>(atof("-3.141592"));
15401 sal_Int32 nLen
= aStrBuf
.getLength();
15402 aStrBuf
.append( input
);
15404 CPPUNIT_ASSERT_MESSAGE
15406 "arrOUS[0] append -3.141592",
15407 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15414 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15415 float input
= static_cast<float>(atof("-3.5025255"));
15417 sal_Int32 nLen
= aStrBuf
.getLength();
15418 aStrBuf
.append( input
);
15420 CPPUNIT_ASSERT_MESSAGE
15422 "arrOUS[0] append -3.5025255",
15423 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15430 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15431 float input
= static_cast<float>(atof("-3.00390625"));
15433 sal_Int32 nLen
= aStrBuf
.getLength();
15434 aStrBuf
.append( input
);
15436 CPPUNIT_ASSERT_MESSAGE
15438 "arrOUS[0] append -3.0039062",
15439 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15446 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15447 float input
= static_cast<float>(atof("-3.0"));
15449 sal_Int32 nLen
= aStrBuf
.getLength();
15450 aStrBuf
.append( input
);
15452 CPPUNIT_ASSERT_MESSAGE
15454 "arrOUS[1] append -3.0",
15455 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15462 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15463 float input
= static_cast<float>(atof("-3.5"));
15465 sal_Int32 nLen
= aStrBuf
.getLength();
15466 aStrBuf
.append( input
);
15468 CPPUNIT_ASSERT_MESSAGE
15470 "arrOUS[1] append -3.5",
15471 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15478 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15479 float input
= static_cast<float>(atof("-3.0625"));
15481 sal_Int32 nLen
= aStrBuf
.getLength();
15482 aStrBuf
.append( input
);
15484 CPPUNIT_ASSERT_MESSAGE
15486 "arrOUS[1] append -3.0625",
15487 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15494 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15495 float input
= static_cast<float>(atof("-3.502525"));
15497 sal_Int32 nLen
= aStrBuf
.getLength();
15498 aStrBuf
.append( input
);
15500 CPPUNIT_ASSERT_MESSAGE
15502 "arrOUS[1] append -3.502525",
15503 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15510 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15511 float input
= static_cast<float>(atof("-3.141592"));
15513 sal_Int32 nLen
= aStrBuf
.getLength();
15514 aStrBuf
.append( input
);
15516 CPPUNIT_ASSERT_MESSAGE
15518 "arrOUS[1] append -3.141592",
15519 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15526 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15527 float input
= static_cast<float>(atof("-3.5025255"));
15529 sal_Int32 nLen
= aStrBuf
.getLength();
15530 aStrBuf
.append( input
);
15532 CPPUNIT_ASSERT_MESSAGE
15534 "arrOUS[1] append -3.5025255",
15535 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15542 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[1] );
15543 float input
= static_cast<float>(atof("-3.00390625"));
15545 sal_Int32 nLen
= aStrBuf
.getLength();
15546 aStrBuf
.append( input
);
15548 CPPUNIT_ASSERT_MESSAGE
15550 "arrOUS[1] append -3.0039062",
15551 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15558 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15559 float input
= static_cast<float>(atof("-3.0"));
15561 sal_Int32 nLen
= aStrBuf
.getLength();
15562 aStrBuf
.append( input
);
15564 CPPUNIT_ASSERT_MESSAGE
15566 "arrOUS[2] append -3.0",
15567 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15574 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15575 float input
= static_cast<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
)
15590 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15591 float input
= static_cast<float>(atof("-3.0625"));
15593 sal_Int32 nLen
= aStrBuf
.getLength();
15594 aStrBuf
.append( input
);
15596 CPPUNIT_ASSERT_MESSAGE
15598 "arrOUS[2] append -3.0625",
15599 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15606 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15607 float input
= static_cast<float>(atof("-3.502525"));
15609 sal_Int32 nLen
= aStrBuf
.getLength();
15610 aStrBuf
.append( input
);
15612 CPPUNIT_ASSERT_MESSAGE
15614 "arrOUS[2] append -3.502525",
15615 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15622 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15623 float input
= static_cast<float>(atof("-3.141592"));
15625 sal_Int32 nLen
= aStrBuf
.getLength();
15626 aStrBuf
.append( input
);
15628 CPPUNIT_ASSERT_MESSAGE
15630 "arrOUS[2] append -3.141592",
15631 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15638 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15639 float input
= static_cast<float>(atof("-3.5025255"));
15641 sal_Int32 nLen
= aStrBuf
.getLength();
15642 aStrBuf
.append( input
);
15644 CPPUNIT_ASSERT_MESSAGE
15646 "arrOUS[2] append -3.5025255",
15647 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15654 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[2] );
15655 float input
= static_cast<float>(atof("-3.00390625"));
15657 sal_Int32 nLen
= aStrBuf
.getLength();
15658 aStrBuf
.append( input
);
15660 CPPUNIT_ASSERT_MESSAGE
15662 "arrOUS[2] append -3.0039062",
15663 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15670 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15671 float input
= static_cast<float>(atof("-3.0"));
15673 sal_Int32 nLen
= aStrBuf
.getLength();
15674 aStrBuf
.append( input
);
15676 CPPUNIT_ASSERT_MESSAGE
15678 "arrOUS[3] append -3.0",
15679 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15686 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15687 float input
= static_cast<float>(atof("-3.5"));
15689 sal_Int32 nLen
= aStrBuf
.getLength();
15690 aStrBuf
.append( input
);
15692 CPPUNIT_ASSERT_MESSAGE
15694 "arrOUS[3] append -3.5",
15695 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15702 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15703 float input
= static_cast<float>(atof("-3.0625"));
15705 sal_Int32 nLen
= aStrBuf
.getLength();
15706 aStrBuf
.append( input
);
15708 CPPUNIT_ASSERT_MESSAGE
15710 "arrOUS[3] append -3.0625",
15711 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15718 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[3] );
15719 float input
= static_cast<float>(atof("-3.502525"));
15721 sal_Int32 nLen
= aStrBuf
.getLength();
15722 aStrBuf
.append( input
);
15724 CPPUNIT_ASSERT_MESSAGE
15726 "arrOUS[3] append -3.502525",
15727 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15735 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15736 float input
= (float)atof("-3.0");
15738 sal_Int32 nLen
= aStrBuf
.getLength();
15739 aStrBuf
.append( input
);
15741 CPPUNIT_ASSERT_MESSAGE
15743 "OStringBuffer( kSInt32Max ) append -3.0",
15744 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15751 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15752 float input
= (float)atof("-3.5");
15754 sal_Int32 nLen
= aStrBuf
.getLength();
15755 aStrBuf
.append( input
);
15757 CPPUNIT_ASSERT_MESSAGE
15759 "OStringBuffer( kSInt32Max ) append -3.5",
15760 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15767 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15768 float input
= (float)atof("-3.0625");
15770 sal_Int32 nLen
= aStrBuf
.getLength();
15771 aStrBuf
.append( input
);
15773 CPPUNIT_ASSERT_MESSAGE
15775 "OStringBuffer( kSInt32Max ) append -3.0625",
15776 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15783 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15784 float input
= (float)atof("-3.502525");
15786 sal_Int32 nLen
= aStrBuf
.getLength();
15787 aStrBuf
.append( input
);
15789 CPPUNIT_ASSERT_MESSAGE
15791 "OStringBuffer( kSInt32Max ) append -3.502525",
15792 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15799 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15800 float input
= (float)atof("-3.141592");
15802 sal_Int32 nLen
= aStrBuf
.getLength();
15803 aStrBuf
.append( input
);
15805 CPPUNIT_ASSERT_MESSAGE
15807 "OStringBuffer( kSInt32Max ) append -3.141592",
15808 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15815 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15816 float input
= (float)atof("-3.5025255");
15818 sal_Int32 nLen
= aStrBuf
.getLength();
15819 aStrBuf
.append( input
);
15821 CPPUNIT_ASSERT_MESSAGE
15823 "OStringBuffer( kSInt32Max ) append -3.5025255",
15824 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15831 ::rtl::OStringBuffer
aStrBuf( kSInt32Max
);
15832 float input
= (float)atof("-3.00390625");
15834 sal_Int32 nLen
= aStrBuf
.getLength();
15835 aStrBuf
.append( input
);
15837 CPPUNIT_ASSERT_MESSAGE
15839 "OStringBuffer( kSInt32Max ) append -3.0039062",
15840 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15846 CPPUNIT_TEST_SUITE( append_008_Float_Negative
);
15847 CPPUNIT_TEST( append_001
);
15848 CPPUNIT_TEST( append_002
);
15849 CPPUNIT_TEST( append_003
);
15850 CPPUNIT_TEST( append_004
);
15851 CPPUNIT_TEST( append_005
);
15852 CPPUNIT_TEST( append_006
);
15853 CPPUNIT_TEST( append_007
);
15854 CPPUNIT_TEST( append_008
);
15855 CPPUNIT_TEST( append_009
);
15856 CPPUNIT_TEST( append_010
);
15857 CPPUNIT_TEST( append_011
);
15858 CPPUNIT_TEST( append_012
);
15859 CPPUNIT_TEST( append_013
);
15860 CPPUNIT_TEST( append_014
);
15861 CPPUNIT_TEST( append_015
);
15862 CPPUNIT_TEST( append_016
);
15863 CPPUNIT_TEST( append_017
);
15864 CPPUNIT_TEST( append_018
);
15865 CPPUNIT_TEST( append_019
);
15866 CPPUNIT_TEST( append_020
);
15867 CPPUNIT_TEST( append_021
);
15868 CPPUNIT_TEST( append_022
);
15869 CPPUNIT_TEST( append_023
);
15870 CPPUNIT_TEST( append_024
);
15871 CPPUNIT_TEST( append_025
);
15873 CPPUNIT_TEST( append_026
);
15874 CPPUNIT_TEST( append_027
);
15875 CPPUNIT_TEST( append_028
);
15876 CPPUNIT_TEST( append_029
);
15877 CPPUNIT_TEST( append_030
);
15879 CPPUNIT_TEST_SUITE_END();
15882 // testing the method append( double d )
15884 class checkdouble
: public CppUnit::TestFixture
15887 bool checkIfStrBufContainAtPosTheDouble(rtl::OStringBuffer
const& _sStrBuf
, sal_Int32 _nLen
, double _nDouble
)
15889 OString sDoubleValue
;
15890 sDoubleValue
= OString::number(_nDouble
);
15892 OString
sBufferString(_sStrBuf
.getStr());
15893 sal_Int32 nPos
= sBufferString
.indexOf(sDoubleValue
);
15894 return nPos
>= 0 && nPos
== _nLen
;
15898 class append_009_double
: public checkdouble
15900 OString
* arrOUS
[5];
15903 void setUp() override
15905 arrOUS
[0] = new OString( kTestStr7
);
15906 arrOUS
[1] = new OString( );
15907 arrOUS
[2] = new OString( kTestStr25
);
15908 arrOUS
[3] = new OString( "" );
15909 arrOUS
[4] = new OString( kTestStr28
);
15913 void tearDown() override
15915 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
15916 delete arrOUS
[3]; delete arrOUS
[4];
15921 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15922 double input
= atof("3.0");
15924 sal_Int32 nLen
= aStrBuf
.getLength();
15925 aStrBuf
.append( input
);
15927 CPPUNIT_ASSERT_MESSAGE
15929 "arrOUS[0] append 3.0",
15930 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15937 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
15938 double input
= atof("3.141592653589793238462643");
15940 sal_Int32 nLen
= aStrBuf
.getLength();
15941 aStrBuf
.append( input
);
15943 CPPUNIT_ASSERT_MESSAGE
15945 "arrOUS[4] append 3.141592653589793238462643",
15946 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15951 CPPUNIT_TEST_SUITE( append_009_double
);
15952 CPPUNIT_TEST( append_001
);
15953 CPPUNIT_TEST( append_035
);
15954 CPPUNIT_TEST_SUITE_END();
15957 // testing the method append( double f ) for negative value
15959 class append_009_Double_Negative
: public checkdouble
15961 OString
* arrOUS
[5];
15964 void setUp() override
15966 arrOUS
[0] = new OString( kTestStr7
);
15967 arrOUS
[1] = new OString( );
15968 arrOUS
[2] = new OString( kTestStr25
);
15969 arrOUS
[3] = new OString( "" );
15970 arrOUS
[4] = new OString( kTestStr28
);
15974 void tearDown() override
15976 delete arrOUS
[0]; delete arrOUS
[1]; delete arrOUS
[2];
15977 delete arrOUS
[3]; delete arrOUS
[4];
15982 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[0] );
15983 double input
= atof("-3.0");
15985 sal_Int32 nLen
= aStrBuf
.getLength();
15986 aStrBuf
.append( input
);
15988 CPPUNIT_ASSERT_MESSAGE
15990 "arrOUS[0] append -3.0",
15991 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15998 ::rtl::OStringBuffer
aStrBuf( *arrOUS
[4] );
15999 double input
= atof("-3.141592653589793238462643");
16001 sal_Int32 nLen
= aStrBuf
.getLength();
16002 aStrBuf
.append( input
);
16004 CPPUNIT_ASSERT_MESSAGE
16006 "arrOUS[4] append -3.141592653589793238462643",
16007 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
16012 CPPUNIT_TEST_SUITE( append_009_Double_Negative
);
16013 CPPUNIT_TEST( append_001
);
16014 CPPUNIT_TEST( append_035
);
16015 CPPUNIT_TEST_SUITE_END();
16018 class AppendUninitialized
: public CppUnit::TestFixture
{
16022 void testNonEmpty();
16026 CPPUNIT_TEST_SUITE(AppendUninitialized
);
16027 CPPUNIT_TEST(testEmpty
);
16028 CPPUNIT_TEST(testNonEmpty
);
16029 CPPUNIT_TEST(testZero
);
16030 CPPUNIT_TEST_SUITE_END();
16033 void AppendUninitialized::testEmpty() {
16035 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), s
.getLength());
16036 char * p
= s
.appendUninitialized(5);
16037 CPPUNIT_ASSERT_EQUAL(
16038 static_cast<void const *>(s
.getStr()),
16039 static_cast<void const *>(p
));
16040 CPPUNIT_ASSERT_EQUAL(sal_Int32(5), s
.getLength());
16043 void AppendUninitialized::testNonEmpty() {
16044 OStringBuffer
s("ab");
16045 CPPUNIT_ASSERT_EQUAL(sal_Int32(2), s
.getLength());
16046 char * p
= s
.appendUninitialized(5);
16047 CPPUNIT_ASSERT_EQUAL(
16048 static_cast<void const *>(s
.getStr() + 2),
16049 static_cast<void const *>(p
));
16050 CPPUNIT_ASSERT_EQUAL(sal_Int32(7), s
.getLength());
16053 void AppendUninitialized::testZero() {
16055 char * p
= s
.appendUninitialized(0);
16056 CPPUNIT_ASSERT_EQUAL(
16057 static_cast<void const *>(s
.getStr()),
16058 static_cast<void const *>(p
));
16059 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), s
.getLength());
16061 } // namespace rtl_OStringBuffer
16063 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ctors
);
16064 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::makeStringAndClear
);
16065 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getLength
);
16066 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getCapacity
);
16067 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ensureCapacity
);
16068 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::setLength
);
16069 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::csuc
);
16070 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getStr
);
16071 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_001
);
16072 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_002
);
16073 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_003
);
16074 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_004
);
16075 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_005
);
16076 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32
);
16077 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Bounderies
);
16078 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Negative
);
16079 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_WrongRadix
);
16080 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_defaultParam
);
16081 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64
);
16082 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Bounderies
);
16083 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Negative
);
16084 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_WrongRadix
);
16085 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_defaultParam
);
16086 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_float
);
16087 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative
);
16088 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_double
);
16089 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative
);
16090 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::AppendUninitialized
);
16091 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::remove
);
16093 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */