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 // This file contains cppunit tests for the
32 // OString and OStringBuffer classes
34 // testing constructors
35 namespace rtl_OStringBuffer
37 class ctors
: public CppUnit::TestFixture
43 OStringBuffer aStrBuf
;
44 const char* pStr
= aStrBuf
.getStr();
46 CPPUNIT_ASSERT_MESSAGE
48 "New OStringBuffer containing no characters",
51 CPPUNIT_ASSERT_EQUAL_MESSAGE
53 "New OStringBuffer containing no characters",
56 CPPUNIT_ASSERT_EQUAL_MESSAGE
58 "New OStringBuffer containing no characters",
59 sal_Int32(16), aStrBuf
.getCapacity()
65 OString
aStrtmp( kTestStr1
);
66 OStringBuffer
aStrBuftmp( aStrtmp
);
67 OStringBuffer
aStrBuf( aStrBuftmp
);
68 // sal_Bool res = cmpstr(aStrBuftmp.getStr(),aStrBuf.getStr());
70 sal_Int32 nLenStrBuftmp
= aStrBuftmp
.getLength();
72 OString
sStr(aStrBuftmp
.getStr());
73 bool res
= aStrtmp
== sStr
;
75 CPPUNIT_ASSERT_EQUAL_MESSAGE
77 "New OStringBuffer from another OStringBuffer",
78 nLenStrBuftmp
, aStrBuf
.getLength()
80 CPPUNIT_ASSERT_EQUAL_MESSAGE
82 "New OStringBuffer from another OStringBuffer",
83 aStrBuftmp
.getCapacity(), aStrBuf
.getCapacity()
85 CPPUNIT_ASSERT_MESSAGE
87 "New OStringBuffer from another OStringBuffer",
95 OStringBuffer
aStrBuf1(kTestStr2Len
);
96 OStringBuffer
aStrBuf2(0);
98 const char* pStr1
= aStrBuf1
.getStr();
99 const char* pStr2
= aStrBuf2
.getStr();
101 CPPUNIT_ASSERT_MESSAGE
103 "New OStringBuffer containing no characters and contain assigned capacity",
106 CPPUNIT_ASSERT_EQUAL_MESSAGE
108 "New OStringBuffer containing no characters and contain assigned capacity",
111 CPPUNIT_ASSERT_EQUAL_MESSAGE
113 "New OStringBuffer containing no characters and contain assigned capacity",
114 kTestStr2Len
, aStrBuf1
.getCapacity()
116 CPPUNIT_ASSERT_MESSAGE
118 "New OStringBuffer containing no characters and contain assigned capacity",
121 CPPUNIT_ASSERT_EQUAL_MESSAGE
123 "New OStringBuffer containing no characters and contain assigned capacity",
126 CPPUNIT_ASSERT_EQUAL_MESSAGE
128 "New OStringBuffer containing no characters and contain assigned capacity",
129 sal_Int32(0), aStrBuf2
.getCapacity()
136 OString
aStrtmp( kTestStr1
);
137 OStringBuffer
aStrBuf( aStrtmp
);
138 sal_Int32 leg
= aStrBuf
.getLength();
140 CPPUNIT_ASSERT_EQUAL_MESSAGE
142 "New OStringBuffer from OString",
143 aStrtmp
, OString(aStrBuf
.getStr())
145 CPPUNIT_ASSERT_EQUAL_MESSAGE
147 "New OStringBuffer from OString",
148 aStrtmp
.pData
->length
, leg
150 CPPUNIT_ASSERT_EQUAL_MESSAGE
152 "New OStringBuffer from OString",
153 leg
+16, aStrBuf
.getCapacity()
160 auto dummy
= b1
.makeStringAndClear();
162 OStringBuffer
b2(b1
);
168 //pass in a const char*, get a temp
170 OStringBuffer
aStrBuf(kTestStr1
);
171 sal_Int32 leg
= aStrBuf
.getLength();
173 CPPUNIT_ASSERT_EQUAL_MESSAGE
175 "New OStringBuffer from const char*",
176 rtl_str_getLength(kTestStr1
), leg
178 CPPUNIT_ASSERT_EQUAL_MESSAGE
180 "New OStringBuffer from const char*",
181 leg
+16, aStrBuf
.getCapacity()
185 CPPUNIT_TEST_SUITE(ctors
);
186 CPPUNIT_TEST(ctor_001
);
187 CPPUNIT_TEST(ctor_002
);
188 CPPUNIT_TEST(ctor_003
);
189 CPPUNIT_TEST(ctor_004
);
190 CPPUNIT_TEST(ctor_005
);
191 CPPUNIT_TEST(ctor_006
);
192 CPPUNIT_TEST_SUITE_END();
195 class makeStringAndClear
: public CppUnit::TestFixture
200 void setUp() override
202 arrOUS
[0] = OString( kTestStr1
);
203 arrOUS
[1] = OString( kTestStr14
);
204 arrOUS
[2] = OString( kTestStr25
);
205 arrOUS
[3] = OString( kTestStr27
);
206 arrOUS
[4] = OString( kTestStr29
);
207 arrOUS
[5] = OString( "\0", 1 );
211 void makeStringAndClear_001()
213 OStringBuffer aStrBuf1
;
215 bool lastRes
= aStrBuf1
.makeStringAndClear().isEmpty();
217 CPPUNIT_ASSERT_MESSAGE
219 "two empty strings(def. constructor)",
222 CPPUNIT_ASSERT_EQUAL_MESSAGE
224 "two empty strings(def. constructor)",
225 sal_Int32(0), aStrBuf1
.getCapacity()
227 CPPUNIT_ASSERT_EQUAL_MESSAGE
229 "two empty strings(def. constructor)",
230 '\0', *(aStrBuf1
.getStr())
235 void makeStringAndClear_002()
237 OStringBuffer
aStrBuf2(26);
239 bool lastRes
= aStrBuf2
.makeStringAndClear().isEmpty();
241 CPPUNIT_ASSERT_MESSAGE
243 "two empty strings(with an argu)",
244 lastRes
&& ( aStrBuf2
.getCapacity() == 0 ) &&
245 ( *(aStrBuf2
.getStr()) == '\0' )
250 void makeStringAndClear_003()
252 OStringBuffer
aStrBuf3(arrOUS
[0]);
253 OString
aStr3(arrOUS
[0]);
255 bool lastRes
= (aStrBuf3
.makeStringAndClear() == aStr3
);
257 CPPUNIT_ASSERT_MESSAGE
260 lastRes
&& ( aStrBuf3
.getCapacity() == 0 ) &&
261 ( *(aStrBuf3
.getStr()) == '\0' )
266 void makeStringAndClear_004()
268 OStringBuffer
aStrBuf4(arrOUS
[1]);
269 OString
aStr4(arrOUS
[1]);
271 bool lastRes
= (aStrBuf4
.makeStringAndClear() == aStr4
);
273 CPPUNIT_ASSERT_MESSAGE
275 "string with space ",
276 lastRes
&& ( aStrBuf4
.getCapacity() == 0 ) &&
277 ( *(aStrBuf4
.getStr()) == '\0' )
281 void makeStringAndClear_005()
283 OStringBuffer
aStrBuf5(arrOUS
[2]);
284 OString
aStr5(arrOUS
[2]);
286 bool lastRes
= (aStrBuf5
.makeStringAndClear() == aStr5
);
288 CPPUNIT_ASSERT_MESSAGE
291 lastRes
&& ( aStrBuf5
.getCapacity() == 0 ) &&
292 ( *(aStrBuf5
.getStr()) == '\0' )
296 void makeStringAndClear_006()
298 OStringBuffer
aStrBuf6(arrOUS
[3]);
299 OString
aStr6(arrOUS
[3]);
301 bool lastRes
= (aStrBuf6
.makeStringAndClear() == aStr6
);
303 CPPUNIT_ASSERT_MESSAGE
305 "string with a character",
306 lastRes
&& ( aStrBuf6
.getCapacity() == 0 ) &&
307 ( *(aStrBuf6
.getStr()) == '\0' )
311 void makeStringAndClear_007()
313 OStringBuffer
aStrBuf7(arrOUS
[4]);
314 OString
aStr7(arrOUS
[4]);
316 bool lastRes
= (aStrBuf7
.makeStringAndClear() == aStr7
);
318 CPPUNIT_ASSERT_MESSAGE
320 "string with special characters",
321 lastRes
&& ( aStrBuf7
.getCapacity() == 0 ) &&
322 ( *(aStrBuf7
.getStr()) == '\0' )
326 void makeStringAndClear_008()
328 OStringBuffer
aStrBuf8(arrOUS
[5]);
329 OString
aStr8(arrOUS
[5]);
331 bool lastRes
= (aStrBuf8
.makeStringAndClear() == aStr8
);
333 CPPUNIT_ASSERT_MESSAGE
335 "string only with (\0)",
336 lastRes
&& ( aStrBuf8
.getCapacity() == 0 ) &&
337 ( *(aStrBuf8
.getStr()) == '\0' )
341 CPPUNIT_TEST_SUITE(makeStringAndClear
);
342 CPPUNIT_TEST(makeStringAndClear_001
);
343 CPPUNIT_TEST(makeStringAndClear_002
);
344 CPPUNIT_TEST(makeStringAndClear_003
);
345 CPPUNIT_TEST(makeStringAndClear_004
);
346 CPPUNIT_TEST(makeStringAndClear_005
);
347 CPPUNIT_TEST(makeStringAndClear_006
);
348 CPPUNIT_TEST(makeStringAndClear_007
);
349 CPPUNIT_TEST(makeStringAndClear_008
);
350 CPPUNIT_TEST_SUITE_END();
353 class remove
: public CppUnit::TestFixture
359 RTL_CONSTASCII_STRINGPARAM("Red Hat, Inc."));
362 CPPUNIT_ASSERT(sb
.toString().equalsL(
363 RTL_CONSTASCII_STRINGPARAM("Hat, Inc.")));
366 CPPUNIT_ASSERT(sb
.toString().equalsL(
367 RTL_CONSTASCII_STRINGPARAM("Hat")));
371 CPPUNIT_ASSERT(sb
.toString().isEmpty());
373 sb
.append(RTL_CONSTASCII_STRINGPARAM("Red Hat, Inc."));
377 CPPUNIT_ASSERT(sb
.toString().equalsL(
378 RTL_CONSTASCII_STRINGPARAM("Red")));
380 sb
.remove(0, sb
.getLength());
382 CPPUNIT_ASSERT(sb
.toString().isEmpty());
385 CPPUNIT_TEST_SUITE(remove
);
386 CPPUNIT_TEST(remove_001
);
387 CPPUNIT_TEST_SUITE_END();
390 class getLength
: public CppUnit::TestFixture
395 void setUp() override
397 arrOUS
[0] = OString( kTestStr1
);
398 arrOUS
[1] = OString( "1" );
399 arrOUS
[2] = OString( );
400 arrOUS
[3] = OString( "" );
401 arrOUS
[4] = OString( "\0", 1 );
402 arrOUS
[5] = OString( kTestStr2
);
408 OStringBuffer
aStrBuf( arrOUS
[0] );
409 sal_Int32 expVal
= kTestStr1Len
;
411 CPPUNIT_ASSERT_EQUAL_MESSAGE
413 "length of ascii string",
414 expVal
, aStrBuf
.getLength()
421 OStringBuffer
aStrBuf( arrOUS
[1] );
422 sal_Int32 expVal
= 1;
424 CPPUNIT_ASSERT_EQUAL_MESSAGE
426 "length of ascii string of size 1",
427 expVal
, aStrBuf
.getLength()
433 OStringBuffer
aStrBuf( arrOUS
[2] );
434 sal_Int32 expVal
= 0;
436 CPPUNIT_ASSERT_EQUAL_MESSAGE
438 "length of empty string",
439 expVal
, aStrBuf
.getLength()
445 OStringBuffer
aStrBuf( arrOUS
[3] );
446 sal_Int32 expVal
= 0;
448 CPPUNIT_ASSERT_EQUAL_MESSAGE
450 "length of empty string (empty ascii string arg)",
451 expVal
, aStrBuf
.getLength()
457 OStringBuffer
aStrBuf( arrOUS
[4] );
458 sal_Int32 expVal
= 1;
460 CPPUNIT_ASSERT_EQUAL_MESSAGE
462 "length of string with \\0 embedded",
463 expVal
, aStrBuf
.getLength()
469 OStringBuffer
aStrBuf( arrOUS
[5] );
470 sal_Int32 expVal
= kTestStr2Len
;
472 CPPUNIT_ASSERT_EQUAL_MESSAGE
474 "length(>16) of ascii string",
475 expVal
, aStrBuf
.getLength()
481 OStringBuffer aStrBuf
;
482 sal_Int32 expVal
= 0;
484 CPPUNIT_ASSERT_EQUAL_MESSAGE
486 "length of empty string (default constructor)",
487 expVal
, aStrBuf
.getLength()
493 OStringBuffer
aStrBuf( 26 );
494 sal_Int32 expVal
= 0;
496 CPPUNIT_ASSERT_EQUAL_MESSAGE
498 "length of empty string (with capacity)",
499 expVal
, aStrBuf
.getLength()
503 CPPUNIT_TEST_SUITE( getLength
);
504 CPPUNIT_TEST( getLength_001
);
505 CPPUNIT_TEST( getLength_002
);
506 CPPUNIT_TEST( getLength_003
);
507 CPPUNIT_TEST( getLength_004
);
508 CPPUNIT_TEST( getLength_005
);
509 CPPUNIT_TEST( getLength_006
);
510 CPPUNIT_TEST( getLength_007
);
511 CPPUNIT_TEST( getLength_008
);
512 CPPUNIT_TEST_SUITE_END();
515 class getCapacity
: public CppUnit::TestFixture
520 void setUp() override
522 arrOUS
[0] = OString( kTestStr1
);
523 arrOUS
[1] = OString( "1" );
524 arrOUS
[2] = OString( );
525 arrOUS
[3] = OString( "" );
526 arrOUS
[4] = OString( "\0", 1 );
527 arrOUS
[5] = OString( kTestStr2
);
531 void getCapacity_001()
533 OStringBuffer
aStrBuf( arrOUS
[0] );
534 sal_Int32 expVal
= kTestStr1Len
+16;
536 CPPUNIT_ASSERT_EQUAL_MESSAGE
538 "capacity of ascii string",
539 expVal
, aStrBuf
.getCapacity()
544 void getCapacity_002()
546 OStringBuffer
aStrBuf( arrOUS
[1] );
547 sal_Int32 expVal
= 1+16;
549 CPPUNIT_ASSERT_EQUAL_MESSAGE
551 "capacity of ascii string of size 1",
552 expVal
, aStrBuf
.getCapacity()
556 void getCapacity_003()
558 OStringBuffer
aStrBuf( arrOUS
[2] );
559 sal_Int32 expVal
= 0+16;
561 CPPUNIT_ASSERT_EQUAL_MESSAGE
563 "capacity of empty string",
564 expVal
, aStrBuf
.getCapacity()
568 void getCapacity_004()
570 OStringBuffer
aStrBuf( arrOUS
[3] );
571 sal_Int32 expVal
= 0+16;
573 CPPUNIT_ASSERT_EQUAL_MESSAGE
575 "capacity of empty string (empty ascii string arg)",
576 expVal
, aStrBuf
.getCapacity()
580 void getCapacity_005()
582 OStringBuffer
aStrBuf( arrOUS
[4] );
583 sal_Int32 expVal
= 1+16;
585 CPPUNIT_ASSERT_EQUAL_MESSAGE
587 "capacity of string with \\0 embedded",
588 expVal
, aStrBuf
.getCapacity()
592 void getCapacity_006()
594 OStringBuffer
aStrBuf( arrOUS
[5] );
595 sal_Int32 expVal
= kTestStr2Len
+16;
597 CPPUNIT_ASSERT_EQUAL_MESSAGE
599 "capacity(>16) of ascii string",
600 expVal
, aStrBuf
.getCapacity()
604 void getCapacity_007()
606 OStringBuffer aStrBuf
;
607 sal_Int32 expVal
= 16;
609 CPPUNIT_ASSERT_EQUAL_MESSAGE
611 "capacity of empty string (default constructor)",
612 expVal
, aStrBuf
.getCapacity()
616 void getCapacity_010()
618 OStringBuffer
aStrBuf( 16 );
619 sal_Int32 expVal
= 16;
621 CPPUNIT_ASSERT_EQUAL_MESSAGE
623 "capacity of empty string (with capacity 16)",
624 expVal
, aStrBuf
.getCapacity()
628 void getCapacity_011()
630 OStringBuffer
aStrBuf( 6 );
631 sal_Int32 expVal
= 6;
633 CPPUNIT_ASSERT_EQUAL_MESSAGE
635 "capacity of empty string (with capacity 6)",
636 expVal
, aStrBuf
.getCapacity()
640 void getCapacity_012()
642 OStringBuffer
aStrBuf( 0 );
643 sal_Int32 expVal
= 0;
645 CPPUNIT_ASSERT_EQUAL_MESSAGE
647 "capacity of empty string (with capacity 0)",
648 expVal
, aStrBuf
.getCapacity()
652 CPPUNIT_TEST_SUITE( getCapacity
);
653 CPPUNIT_TEST( getCapacity_001
);
654 CPPUNIT_TEST( getCapacity_002
);
655 CPPUNIT_TEST( getCapacity_003
);
656 CPPUNIT_TEST( getCapacity_004
);
657 CPPUNIT_TEST( getCapacity_005
);
658 CPPUNIT_TEST( getCapacity_006
);
659 CPPUNIT_TEST( getCapacity_007
);
660 CPPUNIT_TEST( getCapacity_010
);
661 CPPUNIT_TEST( getCapacity_011
);
662 CPPUNIT_TEST( getCapacity_012
);
663 CPPUNIT_TEST_SUITE_END();
666 class ensureCapacity
: public CppUnit::TestFixture
668 void ensureCapacity_001()
670 sal_Int32 expVal
= 16;
671 OStringBuffer aStrBuf
;
674 aStrBuf
.ensureCapacity( input
);
676 CPPUNIT_ASSERT_EQUAL_MESSAGE
678 "capacity equal to 16, minimum is 5",
679 expVal
, aStrBuf
.getCapacity()
684 void ensureCapacity_002()
686 sal_Int32 expVal
= 16;
687 OStringBuffer aStrBuf
;
688 sal_Int32 input
= -5;
690 aStrBuf
.ensureCapacity( input
);
692 CPPUNIT_ASSERT_EQUAL_MESSAGE
694 "capacity equal to 16, minimum is -5",
695 expVal
, aStrBuf
.getCapacity()
700 void ensureCapacity_003()
702 sal_Int32 expVal
= 16;
703 OStringBuffer aStrBuf
;
706 aStrBuf
.ensureCapacity( input
);
708 CPPUNIT_ASSERT_EQUAL_MESSAGE
710 "capacity equal to 16, minimum is 0",
711 expVal
, aStrBuf
.getCapacity()
716 void ensureCapacity_004() //the testcase is based on comments
718 sal_Int32 expVal
= 20;
719 OStringBuffer aStrBuf
;
720 sal_Int32 input
= 20;
722 aStrBuf
.ensureCapacity( input
);
724 CPPUNIT_ASSERT_EQUAL_MESSAGE
726 "capacity equal to 16, minimum is 20",
727 expVal
, aStrBuf
.getCapacity()
732 void ensureCapacity_005()
734 sal_Int32 expVal
= 50;
735 OStringBuffer aStrBuf
;
736 sal_Int32 input
= 50;
738 aStrBuf
.ensureCapacity( input
);
740 CPPUNIT_ASSERT_EQUAL_MESSAGE
742 "capacity equal to 16, minimum is 50",
743 expVal
, aStrBuf
.getCapacity()
748 void ensureCapacity_006()
750 sal_Int32 expVal
= 20;
751 OStringBuffer
aStrBuf( 6 );
752 sal_Int32 input
= 20;
754 aStrBuf
.ensureCapacity( input
);
756 CPPUNIT_ASSERT_EQUAL_MESSAGE
758 "capacity equal to 6, minimum is 20",
759 expVal
, aStrBuf
.getCapacity()
764 void ensureCapacity_007()
766 sal_Int32 expVal
= 6;
767 OStringBuffer
aStrBuf( 6 );
770 aStrBuf
.ensureCapacity( input
);
772 CPPUNIT_ASSERT_EQUAL_MESSAGE
774 "capacity equal to 6, minimum is 2",
775 expVal
, aStrBuf
.getCapacity()
780 void ensureCapacity_008()
782 sal_Int32 expVal
= 6;
783 OStringBuffer
aStrBuf( 6 );
784 sal_Int32 input
= -6;
786 aStrBuf
.ensureCapacity( input
);
788 CPPUNIT_ASSERT_EQUAL_MESSAGE
790 "capacity equal to 6, minimum is -6",
791 expVal
, aStrBuf
.getCapacity()
796 void ensureCapacity_009() //the testcase is based on comments
798 sal_Int32 expVal
= 10;
799 OStringBuffer
aStrBuf( 6 );
800 sal_Int32 input
= 10;
802 aStrBuf
.ensureCapacity( input
);
804 CPPUNIT_ASSERT_EQUAL_MESSAGE
806 "capacity equal to 6, minimum is -6",
807 expVal
, aStrBuf
.getCapacity()
812 void ensureCapacity_010()
814 sal_Int32 expVal
= 6;
815 OStringBuffer
aStrBuf( 0 );
818 aStrBuf
.ensureCapacity( input
);
820 CPPUNIT_ASSERT_EQUAL_MESSAGE
822 "capacity equal to 0, minimum is 6",
823 expVal
, aStrBuf
.getCapacity()
828 void ensureCapacity_011() //the testcase is based on comments
830 sal_Int32 expVal
= 2; // capacity is x = (str->length + 1) * 2; minimum < x ? x : minimum
831 OStringBuffer
aStrBuf( 0 );
834 aStrBuf
.ensureCapacity( input
);
836 CPPUNIT_ASSERT_EQUAL_MESSAGE
838 "capacity equal to 0, minimum is 1",
839 expVal
, aStrBuf
.getCapacity()
844 void ensureCapacity_012()
846 sal_Int32 expVal
= 0;
847 OStringBuffer
aStrBuf( 0 );
848 sal_Int32 input
= -1;
850 aStrBuf
.ensureCapacity( input
);
852 CPPUNIT_ASSERT_EQUAL_MESSAGE
854 "capacity equal to 0, minimum is -1",
855 expVal
, aStrBuf
.getCapacity()
860 CPPUNIT_TEST_SUITE( ensureCapacity
);
861 CPPUNIT_TEST( ensureCapacity_001
);
862 CPPUNIT_TEST( ensureCapacity_002
);
863 CPPUNIT_TEST( ensureCapacity_003
);
864 CPPUNIT_TEST( ensureCapacity_004
);
865 CPPUNIT_TEST( ensureCapacity_005
);
866 CPPUNIT_TEST( ensureCapacity_006
);
867 CPPUNIT_TEST( ensureCapacity_007
);
868 CPPUNIT_TEST( ensureCapacity_008
);
869 CPPUNIT_TEST( ensureCapacity_009
);
870 CPPUNIT_TEST( ensureCapacity_010
);
871 CPPUNIT_TEST( ensureCapacity_011
);
872 CPPUNIT_TEST( ensureCapacity_012
);
873 CPPUNIT_TEST_SUITE_END();
876 class setLength
: public CppUnit::TestFixture
881 void setUp() override
883 arrOUS
[0] = OString( kTestStr1
);
884 arrOUS
[1] = OString( "1" );
885 arrOUS
[2] = OString( );
886 arrOUS
[3] = OString( "" );
887 arrOUS
[4] = OString( "\0", 1 );
888 arrOUS
[5] = OString( kTestStr2
);
894 OStringBuffer
aStrBuf( arrOUS
[0] );
895 sal_Int32 expVal1
= 50;
896 OString
expVal2( kTestStr1
);
897 sal_Int32 expVal3
= 50;
898 sal_Int32 input
= 50;
900 aStrBuf
.setLength( input
);
902 CPPUNIT_ASSERT_MESSAGE
904 "newLength more than the capacity of OStringBuffer(kTestStr1)",
905 aStrBuf
.getStr() == expVal2
&&
906 aStrBuf
.getLength() == expVal1
&&
907 aStrBuf
.getCapacity() == expVal3
914 OStringBuffer
aStrBuf( arrOUS
[0] );
915 sal_Int32 expVal1
= kTestStr13Len
;
916 OString
expVal2( kTestStr1
);
917 sal_Int32 expVal3
= 32;
918 sal_Int32 input
= kTestStr13Len
;
920 aStrBuf
.setLength( input
);
922 CPPUNIT_ASSERT_MESSAGE
924 "newLength more than the length of OStringBuffer(kTestStr1)",
925 aStrBuf
.getStr() == expVal2
&&
926 aStrBuf
.getLength() == expVal1
&&
927 aStrBuf
.getCapacity() == expVal3
934 OStringBuffer
aStrBuf( arrOUS
[0] );
935 sal_Int32 expVal1
= kTestStr1Len
;
936 OString
expVal2( kTestStr1
);
937 sal_Int32 expVal3
= 32;
938 sal_Int32 input
= kTestStr1Len
;
940 aStrBuf
.setLength( input
);
942 CPPUNIT_ASSERT_MESSAGE
944 "newLength equal to the length of OStringBuffer(kTestStr1)",
945 aStrBuf
.getStr() == expVal2
&&
946 aStrBuf
.getLength() == expVal1
&&
947 aStrBuf
.getCapacity() == expVal3
954 OStringBuffer
aStrBuf( arrOUS
[0] );
955 sal_Int32 expVal1
= kTestStr7Len
;
956 OString
expVal2( kTestStr7
);
957 sal_Int32 expVal3
= 32;
958 sal_Int32 input
= kTestStr7Len
;
960 aStrBuf
.setLength( input
);
962 CPPUNIT_ASSERT_MESSAGE
964 "newLength less than the length of OStringBuffer(kTestStr1)",
965 aStrBuf
.getStr() == expVal2
&&
966 aStrBuf
.getLength() == expVal1
&&
967 aStrBuf
.getCapacity() == expVal3
974 OStringBuffer
aStrBuf( arrOUS
[0] );
975 sal_Int32 expVal1
= 0;
976 sal_Int32 expVal3
= 32;
979 aStrBuf
.setLength( input
);
981 CPPUNIT_ASSERT_MESSAGE
983 "newLength equal to 0",
984 aStrBuf
.getStr()[0] == '\0' &&
985 aStrBuf
.getLength() == expVal1
&&
986 aStrBuf
.getCapacity() == expVal3
993 OStringBuffer
aStrBuf( arrOUS
[1] );
994 sal_Int32 expVal1
= 25;
995 OString
expVal2( arrOUS
[1] );
996 sal_Int32 expVal3
= 25;
997 sal_Int32 input
= 25;
999 aStrBuf
.setLength( input
);
1001 CPPUNIT_ASSERT_MESSAGE
1003 "newLength more than the capacity of OStringBuffer(1)",
1004 aStrBuf
.getStr() == expVal2
&&
1005 aStrBuf
.getLength() == expVal1
&&
1006 aStrBuf
.getCapacity() == expVal3
1011 void setLength_007()
1013 OStringBuffer
aStrBuf( arrOUS
[1] );
1014 sal_Int32 expVal1
= kTestStr27Len
;
1015 OString
expVal2( arrOUS
[1] );
1016 sal_Int32 expVal3
= 17;
1017 sal_Int32 input
= kTestStr27Len
;
1019 aStrBuf
.setLength( input
);
1021 CPPUNIT_ASSERT_MESSAGE
1023 "newLength equal to the length of OStringBuffer(1)",
1024 aStrBuf
.getStr() == expVal2
&&
1025 aStrBuf
.getLength() == expVal1
&&
1026 aStrBuf
.getCapacity() == expVal3
1031 void setLength_008()
1033 OStringBuffer
aStrBuf( arrOUS
[1] );
1034 sal_Int32 expVal1
= 0;
1035 sal_Int32 expVal3
= 17;
1036 sal_Int32 input
= 0;
1038 aStrBuf
.setLength( input
);
1040 CPPUNIT_ASSERT_MESSAGE
1042 "newLength less than the length of OUStringBuffer(1)",
1043 aStrBuf
.getStr()[0] == '\0' &&
1044 aStrBuf
.getLength() == expVal1
&&
1045 aStrBuf
.getCapacity() == expVal3
1050 void setLength_009()
1052 OStringBuffer
aStrBuf( arrOUS
[2] );
1053 sal_Int32 expVal1
= 20;
1054 sal_Int32 expVal3
= 20;
1055 sal_Int32 input
= 20;
1057 aStrBuf
.setLength( input
);
1059 CPPUNIT_ASSERT_MESSAGE
1061 "newLength more than the capacity of OStringBuffer()",
1062 aStrBuf
.getStr()[0] == '\0' &&
1063 aStrBuf
.getLength() == expVal1
&&
1064 aStrBuf
.getCapacity() == expVal3
1069 void setLength_010()
1071 OStringBuffer
aStrBuf( arrOUS
[2] );
1072 sal_Int32 expVal1
= 3;
1073 sal_Int32 expVal3
= 16;
1074 sal_Int32 input
= 3;
1076 aStrBuf
.setLength( input
);
1078 CPPUNIT_ASSERT_MESSAGE
1080 "newLength more than the length of OStringBuffer()",
1081 aStrBuf
.getStr()[0] == '\0' &&
1082 aStrBuf
.getLength() == expVal1
&&
1083 aStrBuf
.getCapacity() == expVal3
1088 void setLength_011()
1090 OStringBuffer
aStrBuf( arrOUS
[2] );
1091 sal_Int32 expVal1
= 0;
1092 sal_Int32 expVal3
= 16;
1093 sal_Int32 input
= 0;
1095 aStrBuf
.setLength( input
);
1097 CPPUNIT_ASSERT_MESSAGE
1099 "newLength more than the length of OStringBuffer()",
1100 aStrBuf
.getStr()[0] == '\0' &&
1101 aStrBuf
.getLength() == expVal1
&&
1102 aStrBuf
.getCapacity() == expVal3
1107 void setLength_012()
1109 OStringBuffer
aStrBuf( arrOUS
[3] );
1110 sal_Int32 expVal1
= 20;
1111 sal_Int32 expVal3
= 20;
1112 sal_Int32 input
= 20;
1114 aStrBuf
.setLength( input
);
1116 CPPUNIT_ASSERT_MESSAGE
1118 "newLength more than the capacity of OStringBuffer("")",
1119 aStrBuf
.getStr()[0] == '\0' &&
1120 aStrBuf
.getLength() == expVal1
&&
1121 aStrBuf
.getCapacity() == expVal3
1126 void setLength_013()
1128 OStringBuffer
aStrBuf( arrOUS
[3] );
1129 sal_Int32 expVal1
= 5;
1130 sal_Int32 expVal3
= 16;
1131 sal_Int32 input
= 5;
1133 aStrBuf
.setLength( input
);
1135 CPPUNIT_ASSERT_MESSAGE
1137 "newLength more than the length of OStringBuffer("")",
1138 aStrBuf
.getStr()[0] == '\0' &&
1139 aStrBuf
.getLength() == expVal1
&&
1140 aStrBuf
.getCapacity() == expVal3
1145 void setLength_014()
1147 OStringBuffer
aStrBuf( arrOUS
[3] );
1148 sal_Int32 expVal1
= 0;
1149 sal_Int32 expVal3
= 16;
1150 sal_Int32 input
= 0;
1152 aStrBuf
.setLength( input
);
1154 CPPUNIT_ASSERT_MESSAGE
1156 "newLength less than the length of OStringBuffer("")",
1157 aStrBuf
.getStr()[0] == '\0' &&
1158 aStrBuf
.getLength() == expVal1
&&
1159 aStrBuf
.getCapacity() == expVal3
1164 void setLength_015()
1166 OStringBuffer
aStrBuf( arrOUS
[4] );
1167 sal_Int32 expVal1
= 20;
1168 sal_Int32 expVal3
= 20;
1169 sal_Int32 input
= 20;
1171 aStrBuf
.setLength( input
);
1173 CPPUNIT_ASSERT_MESSAGE
1175 "newLength more than the length of OStringBuffer(\0)",
1176 aStrBuf
.getStr()[0] == '\0' &&
1177 aStrBuf
.getLength() == expVal1
&&
1178 aStrBuf
.getCapacity() == expVal3
1183 void setLength_016()
1185 OStringBuffer
aStrBuf( arrOUS
[4] );
1186 sal_Int32 expVal1
= 5;
1187 sal_Int32 expVal3
= 17;
1188 sal_Int32 input
= 5;
1190 aStrBuf
.setLength( input
);
1192 CPPUNIT_ASSERT_MESSAGE
1194 "newLength more than the length of OStringBuffer(\0)",
1195 aStrBuf
.getStr()[0] == '\0' &&
1196 aStrBuf
.getLength() == expVal1
&&
1197 aStrBuf
.getCapacity() == expVal3
1202 void setLength_017()
1204 OStringBuffer
aStrBuf( arrOUS
[4] );
1205 sal_Int32 expVal1
= 0;
1206 sal_Int32 expVal3
= 17;
1207 sal_Int32 input
= 0;
1209 aStrBuf
.setLength( input
);
1211 CPPUNIT_ASSERT_MESSAGE
1213 "newLength less than the length of OStringBuffer(\0)",
1214 aStrBuf
.getStr()[0] == '\0' &&
1215 aStrBuf
.getLength() == expVal1
&&
1216 aStrBuf
.getCapacity() == expVal3
1221 void setLength_018()
1223 OStringBuffer
aStrBuf( arrOUS
[5] );
1224 sal_Int32 expVal1
= 50;
1225 OString
expVal2( kTestStr2
);
1226 sal_Int32 expVal3
= 66;
1227 sal_Int32 input
= 50;
1229 aStrBuf
.setLength( input
);
1231 CPPUNIT_ASSERT_MESSAGE
1233 "newLength more than the capacity of OStringBuffer(kTestStr2)",
1234 aStrBuf
.getStr() == expVal2
&&
1235 aStrBuf
.getLength() == expVal1
&&
1236 aStrBuf
.getCapacity() == expVal3
1241 void setLength_019()
1243 OStringBuffer
aStrBuf( arrOUS
[5] );
1244 sal_Int32 expVal1
= 40;
1245 OString
expVal2(kTestStr2
);
1246 sal_Int32 expVal3
= 48;
1247 sal_Int32 input
= 40;
1249 aStrBuf
.setLength( input
);
1251 CPPUNIT_ASSERT_MESSAGE
1253 "newLength more than the length of OStringBuffer(kTestStr2)",
1254 aStrBuf
.getStr() == expVal2
&&
1255 aStrBuf
.getLength() == expVal1
&&
1256 aStrBuf
.getCapacity() == expVal3
1261 void setLength_020()
1263 OStringBuffer
aStrBuf( arrOUS
[5] );
1264 sal_Int32 expVal1
= kTestStr2Len
;
1265 OString
expVal2(kTestStr2
);
1266 sal_Int32 expVal3
= 48;
1267 sal_Int32 input
= kTestStr2Len
;
1269 aStrBuf
.setLength( input
);
1271 CPPUNIT_ASSERT_MESSAGE
1273 "newLength equal to the length of OUStringBuffer(kTestStr2)",
1274 aStrBuf
.getStr() == expVal2
&&
1275 aStrBuf
.getLength() == expVal1
&&
1276 aStrBuf
.getCapacity() == expVal3
1281 void setLength_021()
1283 OStringBuffer
aStrBuf( arrOUS
[5] );
1284 sal_Int32 expVal1
= kTestStr7Len
;
1285 OString
expVal2(kTestStr7
);
1286 sal_Int32 expVal3
= 48;
1287 sal_Int32 input
= kTestStr7Len
;
1289 aStrBuf
.setLength( input
);
1291 CPPUNIT_ASSERT_MESSAGE
1293 "newLength less than the length of OUStringBuffer(TestStr2)",
1294 aStrBuf
.getStr() == expVal2
&&
1295 aStrBuf
.getLength() == expVal1
&&
1296 aStrBuf
.getCapacity() == expVal3
1301 void setLength_022()
1303 OStringBuffer
aStrBuf( arrOUS
[5] );
1304 sal_Int32 expVal1
= 0;
1305 sal_Int32 expVal3
= 48;
1306 sal_Int32 input
= 0;
1308 aStrBuf
.setLength( input
);
1310 CPPUNIT_ASSERT_MESSAGE
1312 "newLength equal to 0",
1313 aStrBuf
.getStr()[0] == '\0' &&
1314 aStrBuf
.getLength() == expVal1
&&
1315 aStrBuf
.getCapacity() == expVal3
1320 CPPUNIT_TEST_SUITE( setLength
);
1321 CPPUNIT_TEST( setLength_001
);
1322 CPPUNIT_TEST( setLength_002
);
1323 CPPUNIT_TEST( setLength_003
);
1324 CPPUNIT_TEST( setLength_004
);
1325 CPPUNIT_TEST( setLength_005
);
1326 CPPUNIT_TEST( setLength_006
);
1327 CPPUNIT_TEST( setLength_007
);
1328 CPPUNIT_TEST( setLength_008
);
1329 CPPUNIT_TEST( setLength_009
);
1330 CPPUNIT_TEST( setLength_010
);
1331 CPPUNIT_TEST( setLength_011
);
1332 CPPUNIT_TEST( setLength_012
);
1333 CPPUNIT_TEST( setLength_013
);
1334 CPPUNIT_TEST( setLength_014
);
1335 CPPUNIT_TEST( setLength_015
);
1336 CPPUNIT_TEST( setLength_016
);
1337 CPPUNIT_TEST( setLength_017
);
1338 CPPUNIT_TEST( setLength_018
);
1339 CPPUNIT_TEST( setLength_019
);
1340 CPPUNIT_TEST( setLength_020
);
1341 CPPUNIT_TEST( setLength_021
);
1342 CPPUNIT_TEST( setLength_022
);
1343 CPPUNIT_TEST_SUITE_END();
1346 class csuc
: public CppUnit::TestFixture
1350 const char* expVal
= kTestStr1
;
1351 OStringBuffer
aStrBuf( kTestStr1
);
1352 sal_Int32 cmpLen
= kTestStr1Len
;
1354 // LLA: wrong access! const char* pstr = *&aStrBuf;
1355 const char* pstr
= aStrBuf
.getStr();
1356 int nEqual
= strncmp(pstr
, expVal
, cmpLen
);
1358 CPPUNIT_ASSERT_EQUAL_MESSAGE
1360 "test normal string",
1361 /* cmpstr( pstr, expVal, cmpLen ) */
1369 OStringBuffer aStrBuf
;
1371 // LLA: wrong access! const char* pstr = *&aStrBuf;
1372 const char* pstr
= aStrBuf
.getStr();
1373 sal_Int32 nLen
= strlen(pstr
);
1375 CPPUNIT_ASSERT_EQUAL_MESSAGE
1377 "test empty string",
1378 // cmpstr( pstr, &expVal, cmpLen )
1379 static_cast<sal_Int32
>(0), nLen
1384 CPPUNIT_TEST_SUITE( csuc
);
1385 CPPUNIT_TEST( csuc_001
);
1386 CPPUNIT_TEST( csuc_002
);
1387 CPPUNIT_TEST_SUITE_END();
1390 class getStr
: public CppUnit::TestFixture
1394 const char* expVal
= kTestStr1
;
1395 OStringBuffer
aStrBuf( kTestStr1
);
1396 sal_Int32 cmpLen
= kTestStr1Len
;
1398 const char* pstr
= aStrBuf
.getStr();
1399 int nEqual
= strncmp(pstr
, expVal
, cmpLen
);
1401 CPPUNIT_ASSERT_EQUAL_MESSAGE
1403 "test normal string",
1411 OStringBuffer aStrBuf
;
1412 const char* pstr
= aStrBuf
.getStr();
1413 CPPUNIT_ASSERT_MESSAGE
1415 "test empty string",
1422 CPPUNIT_TEST_SUITE( getStr
);
1423 CPPUNIT_TEST( getStr_001
);
1424 CPPUNIT_TEST( getStr_002
);
1425 CPPUNIT_TEST_SUITE_END();
1428 class append_001
: public CppUnit::TestFixture
1432 OString empty
; // silence loplugin
1435 void setUp() override
1437 arrOUS
[0] = OString( kTestStr7
);
1438 arrOUS
[1] = OString( );
1439 arrOUS
[2] = OString( kTestStr25
);
1440 arrOUS
[3] = OString( "" );
1441 arrOUS
[4] = OString( kTestStr28
);
1445 void append_001_001()
1447 OString
expVal( kTestStr1
);
1448 OStringBuffer
aStrBuf( arrOUS
[0] );
1449 OString
input2( kTestStr8
);
1451 aStrBuf
.append( input2
);
1453 CPPUNIT_ASSERT_MESSAGE
1455 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
1456 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1461 void append_001_002()
1463 OString
expVal( kTestStr2
);
1464 OStringBuffer
aStrBuf( arrOUS
[0] );
1465 OString
input2( kTestStr36
);
1467 aStrBuf
.append( input2
);
1469 CPPUNIT_ASSERT_MESSAGE
1471 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
1472 aStrBuf
.getStr()== expVal
&&
1473 aStrBuf
.getLength() == expVal
.getLength()
1478 void append_001_003()
1480 OString
expVal( kTestStr37
);
1481 OStringBuffer
aStrBuf( arrOUS
[0] );
1482 OString
input2( kTestStr23
);
1484 aStrBuf
.append( input2
);
1486 CPPUNIT_ASSERT_MESSAGE
1488 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
1489 aStrBuf
.getStr()== expVal
&&
1490 aStrBuf
.getLength() == expVal
.getLength()
1495 void append_001_004()
1497 OString
expVal( kTestStr7
);
1498 OStringBuffer
aStrBuf( arrOUS
[0] );
1500 aStrBuf
.append( empty
);
1502 CPPUNIT_ASSERT_MESSAGE
1504 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
1505 aStrBuf
.getStr()== expVal
&&
1506 aStrBuf
.getLength() == expVal
.getLength()
1511 void append_001_005()
1513 OString
expVal( kTestStr7
);
1514 OStringBuffer
aStrBuf( arrOUS
[1] );
1515 OString
input2( kTestStr7
);
1517 aStrBuf
.append( input2
);
1519 CPPUNIT_ASSERT_MESSAGE
1521 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
1522 aStrBuf
.getStr()== expVal
&&
1523 aStrBuf
.getLength() == expVal
.getLength()
1528 void append_001_006()
1530 OString
expVal( kTestStr2
);
1531 OStringBuffer
aStrBuf( arrOUS
[1] );
1532 OString
input2( kTestStr2
);
1534 aStrBuf
.append( input2
);
1536 CPPUNIT_ASSERT_MESSAGE
1538 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
1539 aStrBuf
.getStr()== expVal
&&
1540 aStrBuf
.getLength() == expVal
.getLength()
1545 void append_001_007()
1547 OString
expVal( kTestStr1
);
1548 OStringBuffer
aStrBuf( arrOUS
[1] );
1549 OString
input2( kTestStr1
);
1551 aStrBuf
.append( input2
);
1553 CPPUNIT_ASSERT_MESSAGE
1555 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
1556 aStrBuf
.getStr()== expVal
&&
1557 aStrBuf
.getLength() == expVal
.getLength()
1562 void append_001_008()
1565 OStringBuffer
aStrBuf( arrOUS
[1] );
1567 aStrBuf
.append( empty
);
1569 CPPUNIT_ASSERT_MESSAGE
1571 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
1572 aStrBuf
.getStr()== expVal
&&
1573 aStrBuf
.getLength() == expVal
.getLength()
1578 void append_001_009()
1580 OString
expVal( kTestStr7
);
1581 OStringBuffer
aStrBuf( arrOUS
[2] );
1582 OString
input2( kTestStr7
);
1584 aStrBuf
.append( input2
);
1586 CPPUNIT_ASSERT_MESSAGE
1588 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
1589 aStrBuf
.getStr()== expVal
&&
1590 aStrBuf
.getLength() == expVal
.getLength()
1595 void append_001_010()
1597 OString
expVal( kTestStr2
);
1598 OStringBuffer
aStrBuf( arrOUS
[2] );
1599 OString
input2( kTestStr2
);
1601 aStrBuf
.append( input2
);
1603 CPPUNIT_ASSERT_MESSAGE
1605 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
1606 aStrBuf
.getStr()== expVal
&&
1607 aStrBuf
.getLength() == expVal
.getLength()
1612 void append_001_011()
1614 OString
expVal( kTestStr1
);
1615 OStringBuffer
aStrBuf( arrOUS
[2] );
1616 OString
input2( kTestStr1
);
1618 aStrBuf
.append( input2
);
1620 CPPUNIT_ASSERT_MESSAGE
1622 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
1623 aStrBuf
.getStr()== expVal
&&
1624 aStrBuf
.getLength() == expVal
.getLength()
1629 void append_001_012()
1632 OStringBuffer
aStrBuf( arrOUS
[2] );
1634 aStrBuf
.append( empty
);
1636 CPPUNIT_ASSERT_MESSAGE
1638 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
1639 aStrBuf
.getStr()== expVal
&&
1640 aStrBuf
.getLength() == expVal
.getLength()
1645 void append_001_013()
1647 OString
expVal( kTestStr7
);
1648 OStringBuffer
aStrBuf( arrOUS
[3] );
1649 OString
input2( kTestStr7
);
1651 aStrBuf
.append( input2
);
1653 CPPUNIT_ASSERT_MESSAGE
1655 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
1656 aStrBuf
.getStr()== expVal
&&
1657 aStrBuf
.getLength() == expVal
.getLength()
1662 void append_001_014()
1664 OString
expVal( kTestStr2
);
1665 OStringBuffer
aStrBuf( arrOUS
[3] );
1666 OString
input2( kTestStr2
);
1668 aStrBuf
.append( input2
);
1670 CPPUNIT_ASSERT_MESSAGE
1672 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
1673 aStrBuf
.getStr()== expVal
&&
1674 aStrBuf
.getLength() == expVal
.getLength()
1679 void append_001_015()
1681 OString
expVal( kTestStr1
);
1682 OStringBuffer
aStrBuf( arrOUS
[3] );
1683 OString
input2( kTestStr1
);
1685 aStrBuf
.append( input2
);
1687 CPPUNIT_ASSERT_MESSAGE
1689 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
1690 aStrBuf
.getStr()== expVal
&&
1691 aStrBuf
.getLength() == expVal
.getLength()
1696 void append_001_016()
1699 OStringBuffer
aStrBuf( arrOUS
[3] );
1701 aStrBuf
.append( empty
);
1703 CPPUNIT_ASSERT_MESSAGE
1705 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
1706 aStrBuf
.getStr()== expVal
&&
1707 aStrBuf
.getLength() == expVal
.getLength()
1712 void append_001_017()
1714 OString
expVal( kTestStr29
);
1715 OStringBuffer
aStrBuf( arrOUS
[4] );
1716 OString
input2( kTestStr38
);
1718 aStrBuf
.append( input2
);
1720 CPPUNIT_ASSERT_MESSAGE
1722 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
1723 aStrBuf
.getStr()== expVal
&&
1724 aStrBuf
.getLength() == expVal
.getLength()
1729 void append_001_018()
1731 OString
expVal( kTestStr39
);
1732 OStringBuffer
aStrBuf( arrOUS
[4] );
1733 OString
input2( kTestStr17
);
1735 aStrBuf
.append( input2
);
1737 CPPUNIT_ASSERT_MESSAGE
1739 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
1740 aStrBuf
.getStr()== expVal
&&
1741 aStrBuf
.getLength() == expVal
.getLength()
1746 void append_001_019()
1748 OString
expVal( kTestStr40
);
1749 OStringBuffer
aStrBuf( arrOUS
[4] );
1750 OString
input2( kTestStr31
);
1752 aStrBuf
.append( input2
);
1754 CPPUNIT_ASSERT_MESSAGE
1756 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
1757 aStrBuf
.getStr()== expVal
&&
1758 aStrBuf
.getLength() == expVal
.getLength()
1763 void append_001_020()
1765 OString
expVal( kTestStr28
);
1766 OStringBuffer
aStrBuf( arrOUS
[4] );
1768 aStrBuf
.append( empty
);
1770 CPPUNIT_ASSERT_MESSAGE
1772 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
1773 aStrBuf
.getStr()== expVal
&&
1774 aStrBuf
.getLength() == expVal
.getLength()
1781 OStringBuffer
aStrBuf("hello world");
1783 aStrBuf
.append('\0');
1784 aStrBuf
.append('\1');
1785 aStrBuf
.append('\2');
1787 aStrBuf
.append("hello world");
1789 CPPUNIT_ASSERT_MESSAGE
1791 "should be able to append nulls",
1792 aStrBuf
.getLength() ==
1793 2 * RTL_CONSTASCII_LENGTH("hello world") + 3 &&
1794 aStrBuf
[RTL_CONSTASCII_LENGTH("hello world")] == 0 &&
1795 aStrBuf
[RTL_CONSTASCII_LENGTH("hello world")]+1 == 1 &&
1796 aStrBuf
[RTL_CONSTASCII_LENGTH("hello world")]+2 == 2
1801 CPPUNIT_TEST_SUITE( append_001
);
1802 CPPUNIT_TEST( append_001_001
);
1803 CPPUNIT_TEST( append_001_002
);
1804 CPPUNIT_TEST( append_001_003
);
1805 CPPUNIT_TEST( append_001_004
);
1806 CPPUNIT_TEST( append_001_005
);
1807 CPPUNIT_TEST( append_001_006
);
1808 CPPUNIT_TEST( append_001_007
);
1809 CPPUNIT_TEST( append_001_008
);
1810 CPPUNIT_TEST( append_001_009
);
1811 CPPUNIT_TEST( append_001_010
);
1812 CPPUNIT_TEST( append_001_011
);
1813 CPPUNIT_TEST( append_001_012
);
1814 CPPUNIT_TEST( append_001_013
);
1815 CPPUNIT_TEST( append_001_014
);
1816 CPPUNIT_TEST( append_001_015
);
1817 CPPUNIT_TEST( append_001_016
);
1818 CPPUNIT_TEST( append_001_017
);
1819 CPPUNIT_TEST( append_001_018
);
1820 CPPUNIT_TEST( append_001_019
);
1821 CPPUNIT_TEST( append_001_020
);
1822 CPPUNIT_TEST( append_null
);
1823 CPPUNIT_TEST_SUITE_END();
1826 class append_002
: public CppUnit::TestFixture
1831 void setUp() override
1833 arrOUS
[0] = OString( kTestStr7
);
1834 arrOUS
[1] = OString( );
1835 arrOUS
[2] = OString( kTestStr25
);
1836 arrOUS
[3] = OString( "" );
1837 arrOUS
[4] = OString( kTestStr28
);
1841 void append_002_001()
1843 OString
expVal( kTestStr1
);
1844 OStringBuffer
aStrBuf( arrOUS
[0] );
1845 const char* input
= kTestStr8
;
1847 aStrBuf
.append( input
);
1849 CPPUNIT_ASSERT_MESSAGE
1851 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
1852 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1857 void append_002_002()
1859 OString
expVal( kTestStr2
);
1860 OStringBuffer
aStrBuf( arrOUS
[0] );
1861 const char* input
= kTestStr36
;
1863 aStrBuf
.append( input
);
1865 CPPUNIT_ASSERT_MESSAGE
1867 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
1868 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1873 void append_002_003()
1875 OString
expVal( kTestStr37
);
1876 OStringBuffer
aStrBuf( arrOUS
[0] );
1877 const char* input
= kTestStr23
;
1879 aStrBuf
.append( input
);
1881 CPPUNIT_ASSERT_MESSAGE
1883 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
1884 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1889 void append_002_004()
1891 OString
expVal( kTestStr7
);
1892 OStringBuffer
aStrBuf( arrOUS
[0] );
1893 const char* input
= kTestStr25
;
1895 aStrBuf
.append( input
);
1897 CPPUNIT_ASSERT_MESSAGE
1899 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
1900 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1905 void append_002_005()
1907 OString
expVal( kTestStr7
);
1908 OStringBuffer
aStrBuf( arrOUS
[1] );
1909 const char* input
= kTestStr7
;
1911 aStrBuf
.append( input
);
1913 CPPUNIT_ASSERT_MESSAGE
1915 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
1916 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1921 void append_002_006()
1923 OString
expVal( kTestStr2
);
1924 OStringBuffer
aStrBuf( arrOUS
[1] );
1925 const char* input
= kTestStr2
;
1927 aStrBuf
.append( input
);
1929 CPPUNIT_ASSERT_MESSAGE
1931 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
1932 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1937 void append_002_007()
1939 OString
expVal( kTestStr1
);
1940 OStringBuffer
aStrBuf( arrOUS
[1] );
1941 const char* input
= kTestStr1
;
1943 aStrBuf
.append( input
);
1945 CPPUNIT_ASSERT_MESSAGE
1947 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
1948 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1953 void append_002_008()
1956 OStringBuffer
aStrBuf( arrOUS
[1] );
1957 const char* input
= kTestStr25
;
1959 aStrBuf
.append( input
);
1961 CPPUNIT_ASSERT_MESSAGE
1963 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
1964 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1969 void append_002_009()
1971 OString
expVal( kTestStr7
);
1972 OStringBuffer
aStrBuf( arrOUS
[2] );
1973 const char* input
= kTestStr7
;
1975 aStrBuf
.append( input
);
1977 CPPUNIT_ASSERT_MESSAGE
1979 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
1980 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
1985 void append_002_010()
1987 OString
expVal( kTestStr2
);
1988 OStringBuffer
aStrBuf( arrOUS
[2] );
1989 const char* input
= kTestStr2
;
1991 aStrBuf
.append( input
);
1993 CPPUNIT_ASSERT_MESSAGE
1995 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
1996 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2001 void append_002_011()
2003 OString
expVal( kTestStr1
);
2004 OStringBuffer
aStrBuf( arrOUS
[2] );
2005 const char* input
= kTestStr1
;
2007 aStrBuf
.append( input
);
2009 CPPUNIT_ASSERT_MESSAGE
2011 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2012 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2017 void append_002_012()
2020 OStringBuffer
aStrBuf( arrOUS
[2] );
2021 const char* input
= kTestStr25
;
2023 aStrBuf
.append( input
);
2025 CPPUNIT_ASSERT_MESSAGE
2027 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2028 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2033 void append_002_013()
2035 OString
expVal( kTestStr7
);
2036 OStringBuffer
aStrBuf( arrOUS
[3] );
2037 const char* input
= kTestStr7
;
2039 aStrBuf
.append( input
);
2041 CPPUNIT_ASSERT_MESSAGE
2043 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2044 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2049 void append_002_014()
2051 OString
expVal( kTestStr2
);
2052 OStringBuffer
aStrBuf( arrOUS
[3] );
2053 const char* input
= kTestStr2
;
2055 aStrBuf
.append( input
);
2057 CPPUNIT_ASSERT_MESSAGE
2059 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2060 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2065 void append_002_015()
2067 OString
expVal( kTestStr1
);
2068 OStringBuffer
aStrBuf( arrOUS
[3] );
2069 const char* input
= kTestStr1
;
2071 aStrBuf
.append( input
);
2073 CPPUNIT_ASSERT_MESSAGE
2075 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2076 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2081 void append_002_016()
2084 OStringBuffer
aStrBuf( arrOUS
[3] );
2085 const char* input
= kTestStr25
;
2087 aStrBuf
.append( input
);
2089 CPPUNIT_ASSERT_MESSAGE
2091 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2092 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2097 void append_002_017()
2099 OString
expVal( kTestStr29
);
2100 OStringBuffer
aStrBuf( arrOUS
[4] );
2101 const char* input
= kTestStr38
;
2103 aStrBuf
.append( input
);
2105 CPPUNIT_ASSERT_MESSAGE
2107 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2108 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2113 void append_002_018()
2115 OString
expVal( kTestStr39
);
2116 OStringBuffer
aStrBuf( arrOUS
[4] );
2117 const char* input
= kTestStr17
;
2119 aStrBuf
.append( input
);
2121 CPPUNIT_ASSERT_MESSAGE
2123 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2124 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2129 void append_002_019()
2131 OString
expVal( kTestStr40
);
2132 OStringBuffer
aStrBuf( arrOUS
[4] );
2133 const char* input
= kTestStr31
;
2135 aStrBuf
.append( input
);
2137 CPPUNIT_ASSERT_MESSAGE
2139 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2140 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2145 void append_002_020()
2147 OString
expVal( kTestStr28
);
2148 OStringBuffer
aStrBuf( arrOUS
[4] );
2149 const char* input
= kTestStr25
;
2151 aStrBuf
.append( input
);
2153 CPPUNIT_ASSERT_MESSAGE
2155 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2156 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2162 void append_002_021()
2165 OStringBuffer
aStrBuf( kSInt32Max
);
2166 const char* input
= kTestStr25
;
2168 aStrBuf
.append( input
);
2170 CPPUNIT_ASSERT_MESSAGE
2172 "Appends the string(length equal to 0) to the string buffer(with INT_MAX)",
2173 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2179 CPPUNIT_TEST_SUITE( append_002
);
2180 CPPUNIT_TEST( append_002_001
);
2181 CPPUNIT_TEST( append_002_002
);
2182 CPPUNIT_TEST( append_002_003
);
2183 CPPUNIT_TEST( append_002_004
);
2184 CPPUNIT_TEST( append_002_005
);
2185 CPPUNIT_TEST( append_002_006
);
2186 CPPUNIT_TEST( append_002_007
);
2187 CPPUNIT_TEST( append_002_008
);
2188 CPPUNIT_TEST( append_002_009
);
2189 CPPUNIT_TEST( append_002_010
);
2190 CPPUNIT_TEST( append_002_011
);
2191 CPPUNIT_TEST( append_002_012
);
2192 CPPUNIT_TEST( append_002_013
);
2193 CPPUNIT_TEST( append_002_014
);
2194 CPPUNIT_TEST( append_002_015
);
2195 CPPUNIT_TEST( append_002_016
);
2196 CPPUNIT_TEST( append_002_017
);
2197 CPPUNIT_TEST( append_002_018
);
2198 CPPUNIT_TEST( append_002_019
);
2199 CPPUNIT_TEST( append_002_020
);
2201 CPPUNIT_TEST( append_002_021
);
2203 CPPUNIT_TEST_SUITE_END();
2206 class append_003
: public CppUnit::TestFixture
2211 void setUp() override
2213 arrOUS
[0] = OString( kTestStr7
);
2214 arrOUS
[1] = OString( );
2215 arrOUS
[2] = OString( kTestStr25
);
2216 arrOUS
[3] = OString( "" );
2217 arrOUS
[4] = OString( kTestStr28
);
2221 void append_003_001()
2223 OString
expVal( kTestStr1
);
2224 OStringBuffer
aStrBuf( arrOUS
[0] );
2225 const char* input1
= kTestStr36
;
2226 sal_Int32 input2
= 12;
2228 aStrBuf
.append( input1
, input2
);
2230 CPPUNIT_ASSERT_MESSAGE
2232 "Appends the string(length less than 16) to the string buffer arrOUS[0]",
2233 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2238 void append_003_002()
2240 OString
expVal( kTestStr2
);
2241 OStringBuffer
aStrBuf( arrOUS
[0] );
2242 const char* input1
= kTestStr36
;
2243 sal_Int32 input2
= 28;
2245 aStrBuf
.append( input1
, input2
);
2247 CPPUNIT_ASSERT_MESSAGE
2249 "Appends the string(length more than 16) to the string buffer arrOUS[0]",
2250 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2255 void append_003_003()
2257 OString
expVal( kTestStr37
);
2258 OStringBuffer
aStrBuf( arrOUS
[0] );
2259 const char* input1
= kTestStr23
;
2260 sal_Int32 input2
= 16;
2262 aStrBuf
.append( input1
, input2
);
2264 CPPUNIT_ASSERT_MESSAGE
2266 "Appends the string(length equal to 16) to the string buffer arrOUS[0]",
2267 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2272 void append_003_004()
2274 OString
expVal( kTestStr7
);
2275 OStringBuffer
aStrBuf( arrOUS
[0] );
2276 const char* input1
= kTestStr2
;
2277 sal_Int32 input2
= 0;
2279 aStrBuf
.append( input1
, input2
);
2281 CPPUNIT_ASSERT_MESSAGE
2283 "Appends the string(length equal to 0) to the string buffer arrOUS[0]",
2284 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2289 void append_003_006()
2291 OString
expVal( kTestStr7
);
2292 OStringBuffer
aStrBuf( arrOUS
[1] );
2293 const char* input1
= kTestStr2
;
2294 sal_Int32 input2
= 4;
2296 aStrBuf
.append( input1
, input2
);
2298 CPPUNIT_ASSERT_MESSAGE
2300 "Appends the string(length less than 16) to the string buffer arrOUS[1]",
2301 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2306 void append_003_007()
2308 OString
expVal( kTestStr2
);
2309 OStringBuffer
aStrBuf( arrOUS
[1] );
2310 const char* input1
= kTestStr2
;
2311 sal_Int32 input2
= 32;
2313 aStrBuf
.append( input1
, input2
);
2315 CPPUNIT_ASSERT_MESSAGE
2317 "Appends the string(length more than 16) to the string buffer arrOUS[1]",
2318 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2323 void append_003_008()
2325 OString
expVal( kTestStr1
);
2326 OStringBuffer
aStrBuf( arrOUS
[1] );
2327 const char* input1
= kTestStr2
;
2328 sal_Int32 input2
= 16;
2330 aStrBuf
.append( input1
, input2
);
2332 CPPUNIT_ASSERT_MESSAGE
2334 "Appends the string(length equal to 16) to the string buffer arrOUS[1]",
2335 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2340 void append_003_009()
2343 OStringBuffer
aStrBuf( arrOUS
[1] );
2344 const char* input1
= kTestStr2
;
2345 sal_Int32 input2
= 0;
2347 aStrBuf
.append( input1
, input2
);
2349 CPPUNIT_ASSERT_MESSAGE
2351 "Appends the string(length equal to 0) to the string buffer arrOUS[1]",
2352 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2357 void append_003_011()
2359 OString
expVal( kTestStr7
);
2360 OStringBuffer
aStrBuf( arrOUS
[2] );
2361 const char* input1
= kTestStr2
;
2362 sal_Int32 input2
= 4;
2364 aStrBuf
.append( input1
, input2
);
2366 CPPUNIT_ASSERT_MESSAGE
2368 "Appends the string(length less than 16) to the string buffer arrOUS[2]",
2369 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2374 void append_003_012()
2376 OString
expVal( kTestStr2
);
2377 OStringBuffer
aStrBuf( arrOUS
[2] );
2378 const char* input1
= kTestStr2
;
2379 sal_Int32 input2
= 32;
2381 aStrBuf
.append( input1
, input2
);
2383 CPPUNIT_ASSERT_MESSAGE
2385 "Appends the string(length more than 16) to the string buffer arrOUS[2]",
2386 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2391 void append_003_013()
2393 OString
expVal( kTestStr1
);
2394 OStringBuffer
aStrBuf( arrOUS
[2] );
2395 const char* input1
= kTestStr2
;
2396 sal_Int32 input2
= 16;
2398 aStrBuf
.append( input1
, input2
);
2400 CPPUNIT_ASSERT_MESSAGE
2402 "Appends the string(length equal to 16) to the string buffer arrOUS[2]",
2403 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2408 void append_003_014()
2411 OStringBuffer
aStrBuf( arrOUS
[2] );
2412 const char* input1
= kTestStr2
;
2413 sal_Int32 input2
= 0;
2415 aStrBuf
.append( input1
, input2
);
2417 CPPUNIT_ASSERT_MESSAGE
2419 "Appends the string(length equal to 0) to the string buffer arrOUS[2]",
2420 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2425 void append_003_016()
2427 OString
expVal( kTestStr7
);
2428 OStringBuffer
aStrBuf( arrOUS
[3] );
2429 const char* input1
= kTestStr2
;
2430 sal_Int32 input2
= 4;
2432 aStrBuf
.append( input1
, input2
);
2434 CPPUNIT_ASSERT_MESSAGE
2436 "Appends the string(length less than 16) to the string buffer arrOUS[3]",
2437 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2442 void append_003_017()
2444 OString
expVal( kTestStr2
);
2445 OStringBuffer
aStrBuf( arrOUS
[3] );
2446 const char* input1
= kTestStr2
;
2447 sal_Int32 input2
= 32;
2449 aStrBuf
.append( input1
, input2
);
2451 CPPUNIT_ASSERT_MESSAGE
2453 "Appends the string(length more than 16) to the string buffer arrOUS[3]",
2454 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2459 void append_003_018()
2461 OString
expVal( kTestStr1
);
2462 OStringBuffer
aStrBuf( arrOUS
[3] );
2463 const char* input1
= kTestStr2
;
2464 sal_Int32 input2
= 16;
2466 aStrBuf
.append( input1
, input2
);
2468 CPPUNIT_ASSERT_MESSAGE
2470 "Appends the string(length equal to 16) to the string buffer arrOUS[3]",
2471 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2476 void append_003_019()
2479 OStringBuffer
aStrBuf( arrOUS
[3] );
2480 const char* input1
= kTestStr2
;
2481 sal_Int32 input2
= 0;
2483 aStrBuf
.append( input1
, input2
);
2485 CPPUNIT_ASSERT_MESSAGE
2487 "Appends the string(length equal to 0) to the string buffer arrOUS[3]",
2488 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2493 void append_003_021()
2495 OString
expVal( kTestStr29
);
2496 OStringBuffer
aStrBuf( arrOUS
[4] );
2497 const char* input1
= kTestStr38
;
2498 sal_Int32 input2
= 7;
2500 aStrBuf
.append( input1
, input2
);
2502 CPPUNIT_ASSERT_MESSAGE
2504 "Appends the string(length less than 16) to the string buffer arrOUS[4]",
2505 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2510 void append_003_022()
2512 OString
expVal( kTestStr39
);
2513 OStringBuffer
aStrBuf( arrOUS
[4] );
2514 const char* input1
= kTestStr17
;
2515 sal_Int32 input2
= 22;
2517 aStrBuf
.append( input1
, input2
);
2519 CPPUNIT_ASSERT_MESSAGE
2521 "Appends the string(length more than 16) to the string buffer arrOUS[4]",
2522 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2527 void append_003_023()
2529 OString
expVal( kTestStr40
);
2530 OStringBuffer
aStrBuf( arrOUS
[4] );
2531 const char* input1
= kTestStr31
;
2532 sal_Int32 input2
= 16;
2534 aStrBuf
.append( input1
, input2
);
2536 CPPUNIT_ASSERT_MESSAGE
2538 "Appends the string(length equal to 16) to the string buffer arrOUS[4]",
2539 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2544 void append_003_024()
2546 OString
expVal( kTestStr28
);
2547 OStringBuffer
aStrBuf( arrOUS
[4] );
2548 const char* input1
= kTestStr2
;
2549 sal_Int32 input2
= 0;
2551 aStrBuf
.append( input1
, input2
);
2553 CPPUNIT_ASSERT_MESSAGE
2555 "Appends the string(length equal to 0) to the string buffer arrOUS[4]",
2556 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2561 CPPUNIT_TEST_SUITE( append_003
);
2562 CPPUNIT_TEST( append_003_001
);
2563 CPPUNIT_TEST( append_003_002
);
2564 CPPUNIT_TEST( append_003_003
);
2565 CPPUNIT_TEST( append_003_004
);
2566 CPPUNIT_TEST( append_003_006
);
2567 CPPUNIT_TEST( append_003_007
);
2568 CPPUNIT_TEST( append_003_008
);
2569 CPPUNIT_TEST( append_003_009
);
2570 CPPUNIT_TEST( append_003_011
);
2571 CPPUNIT_TEST( append_003_012
);
2572 CPPUNIT_TEST( append_003_013
);
2573 CPPUNIT_TEST( append_003_014
);
2574 CPPUNIT_TEST( append_003_016
);
2575 CPPUNIT_TEST( append_003_017
);
2576 CPPUNIT_TEST( append_003_018
);
2577 CPPUNIT_TEST( append_003_019
);
2578 CPPUNIT_TEST( append_003_021
);
2579 CPPUNIT_TEST( append_003_022
);
2580 CPPUNIT_TEST( append_003_023
);
2581 CPPUNIT_TEST( append_003_024
);
2582 CPPUNIT_TEST_SUITE_END();
2585 class append_004
: public CppUnit::TestFixture
2590 void setUp() override
2592 arrOUS
[0] = OString( kTestStr7
);
2593 arrOUS
[1] = OString( );
2594 arrOUS
[2] = OString( kTestStr25
);
2595 arrOUS
[3] = OString( "" );
2596 arrOUS
[4] = OString( kTestStr28
);
2600 void append_004_001()
2602 OString
expVal( kTestStr45
);
2603 OStringBuffer
aStrBuf( arrOUS
[0] );
2606 aStrBuf
.append( input
);
2608 CPPUNIT_ASSERT_MESSAGE
2610 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[0]",
2611 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2616 void append_004_002()
2618 OString
expVal( kTestStr46
);
2619 OStringBuffer
aStrBuf( arrOUS
[0] );
2622 aStrBuf
.append( input
);
2624 CPPUNIT_ASSERT_MESSAGE
2626 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[0]",
2627 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2632 void append_004_003()
2634 OString
expVal( kTestStr47
);
2635 OStringBuffer
aStrBuf( arrOUS
[1] );
2638 aStrBuf
.append( input
);
2640 CPPUNIT_ASSERT_MESSAGE
2642 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[1]",
2643 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2648 void append_004_004()
2650 OString
expVal( kTestStr48
);
2651 OStringBuffer
aStrBuf( arrOUS
[1] );
2654 aStrBuf
.append( input
);
2656 CPPUNIT_ASSERT_MESSAGE
2658 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[1]",
2659 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2664 void append_004_005()
2666 OString
expVal( kTestStr47
);
2667 OStringBuffer
aStrBuf( arrOUS
[2] );
2670 aStrBuf
.append( input
);
2672 CPPUNIT_ASSERT_MESSAGE
2674 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[2]",
2675 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2680 void append_004_006()
2682 OString
expVal( kTestStr48
);
2683 OStringBuffer
aStrBuf( arrOUS
[2] );
2686 aStrBuf
.append( input
);
2688 CPPUNIT_ASSERT_MESSAGE
2690 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[2]",
2691 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2696 void append_004_007()
2698 OString
expVal( kTestStr47
);
2699 OStringBuffer
aStrBuf( arrOUS
[3] );
2702 aStrBuf
.append( input
);
2704 CPPUNIT_ASSERT_MESSAGE
2706 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[3]",
2707 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2712 void append_004_008()
2714 OString
expVal( kTestStr48
);
2715 OStringBuffer
aStrBuf( arrOUS
[3] );
2718 aStrBuf
.append( input
);
2720 CPPUNIT_ASSERT_MESSAGE
2722 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[3]",
2723 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2728 void append_004_009()
2730 OString
expVal( kTestStr49
);
2731 OStringBuffer
aStrBuf( arrOUS
[4] );
2734 aStrBuf
.append( input
);
2736 CPPUNIT_ASSERT_MESSAGE
2738 "Appends the sal_Bool(sal_True) to the string buffer arrOUS[4]",
2739 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2744 void append_004_010()
2746 OString
expVal( kTestStr50
);
2747 OStringBuffer
aStrBuf( arrOUS
[4] );
2750 aStrBuf
.append( input
);
2752 CPPUNIT_ASSERT_MESSAGE
2754 "Appends the sal_Bool(sal_False) to the string buffer arrOUS[4]",
2755 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2761 void append_004_011()
2763 OString
expVal( kTestStr47
);
2764 OStringBuffer
aStrBuf( kSInt32Max
);
2765 sal_Bool input
= sal_True
;
2767 aStrBuf
.append( input
);
2769 CPPUNIT_ASSERT_MESSAGE
2771 "Appends the sal_Bool(sal_True) to the string buffer(with INT_MAX)",
2772 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2777 void append_004_012()
2779 OString
expVal( kTestStr48
);
2780 OStringBuffer
aStrBuf( kSInt32Max
);
2781 sal_Bool input
= sal_False
;
2783 aStrBuf
.append( input
);
2785 CPPUNIT_ASSERT_MESSAGE
2787 "Appends the sal_Bool(sal_False) to the string buffer(with INT_MAX)",
2788 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2794 CPPUNIT_TEST_SUITE( append_004
);
2795 CPPUNIT_TEST( append_004_001
);
2796 CPPUNIT_TEST( append_004_002
);
2797 CPPUNIT_TEST( append_004_003
);
2798 CPPUNIT_TEST( append_004_004
);
2799 CPPUNIT_TEST( append_004_005
);
2800 CPPUNIT_TEST( append_004_006
);
2801 CPPUNIT_TEST( append_004_007
);
2802 CPPUNIT_TEST( append_004_008
);
2803 CPPUNIT_TEST( append_004_009
);
2804 CPPUNIT_TEST( append_004_010
);
2806 CPPUNIT_TEST( append_004_011
);
2807 CPPUNIT_TEST( append_004_012
);
2809 CPPUNIT_TEST_SUITE_END();
2812 // testing the method append(char c)
2814 class append_005
: public CppUnit::TestFixture
2819 void setUp() override
2821 arrOUS
[0] = OString( kTestStr7
);
2822 arrOUS
[1] = OString( );
2823 arrOUS
[2] = OString( kTestStr25
);
2824 arrOUS
[3] = OString( "" );
2825 arrOUS
[4] = OString( kTestStr28
);
2831 OString
expVal( kTestStr51
);
2832 OStringBuffer
aStrBuf( arrOUS
[0] );
2835 aStrBuf
.append( input
);
2837 CPPUNIT_ASSERT_MESSAGE
2839 "Appends the char(M) to the string buffer arrOUS[0]",
2840 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2847 OString
expVal( kTestStr143
);
2848 OStringBuffer
aStrBuf( arrOUS
[0] );
2849 char input
= static_cast<char>(SAL_MAX_UINT8
);
2851 aStrBuf
.append( input
);
2853 CPPUNIT_ASSERT_MESSAGE
2855 "Appends the sal_Unicode(kSInt8Max) to the string buffer arrOUS[0]",
2856 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2863 OString
expVal( kTestStr27
);
2864 OStringBuffer
aStrBuf( arrOUS
[1] );
2867 aStrBuf
.append( input
);
2869 CPPUNIT_ASSERT_MESSAGE
2871 "Appends the char(s) to the string buffer arrOUS[1]",
2872 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2879 OString
expVal( kTestStr144
);
2880 OStringBuffer
aStrBuf( arrOUS
[1] );
2881 char input
= static_cast<char>(SAL_MAX_UINT8
);
2883 aStrBuf
.append( input
);
2885 CPPUNIT_ASSERT_MESSAGE
2887 "Appends the char(kSInt8Max) to the string buffer arrOUS[1]",
2888 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2893 void append_005_005()
2895 OString
expVal( kTestStr27
);
2896 OStringBuffer
aStrBuf( arrOUS
[2] );
2899 aStrBuf
.append( input
);
2901 CPPUNIT_ASSERT_MESSAGE
2903 "Appends the char(s) to the string buffer arrOUS[2]",
2904 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2911 OString
expVal( kTestStr144
);
2912 OStringBuffer
aStrBuf( arrOUS
[2] );
2913 char input
= static_cast<char>(SAL_MAX_UINT8
);
2915 aStrBuf
.append( input
);
2917 CPPUNIT_ASSERT_MESSAGE
2919 "Appends the char(kSInt8Max) to the string buffer arrOUS[2]",
2920 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2927 OString
expVal( kTestStr27
);
2928 OStringBuffer
aStrBuf( arrOUS
[3] );
2931 aStrBuf
.append( input
);
2933 CPPUNIT_ASSERT_MESSAGE
2935 "Appends the char(s) to the string buffer arrOUS[3]",
2936 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2943 OString
expVal( kTestStr144
);
2944 OStringBuffer
aStrBuf( arrOUS
[3] );
2945 char input
= static_cast<char>(SAL_MAX_UINT8
);
2947 aStrBuf
.append( input
);
2949 CPPUNIT_ASSERT_MESSAGE
2951 "Appends the char(kSInt8Max) to the string buffer arrOUS[3]",
2952 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2959 OString
expVal( kTestStr56
);
2960 OStringBuffer
aStrBuf( arrOUS
[4] );
2963 aStrBuf
.append( input
);
2965 CPPUNIT_ASSERT_MESSAGE
2967 "Appends the char(s) to the string buffer arrOUS[4]",
2968 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2975 OString
expVal( kTestStr145
);
2976 OStringBuffer
aStrBuf( arrOUS
[4] );
2977 char input
= static_cast<char>(SAL_MAX_UINT8
);
2979 aStrBuf
.append( input
);
2981 CPPUNIT_ASSERT_MESSAGE
2983 "Appends the char(kSInt8Max) to the string buffer arrOUS[4]",
2984 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
2992 OString
expVal( kTestStr27
);
2993 OStringBuffer
aStrBuf( kSInt32Max
);
2996 aStrBuf
.append( input
);
2998 CPPUNIT_ASSERT_MESSAGE
3000 "Appends the char(s) to the string buffer(with INT_MAX)",
3001 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3008 OString
expVal( kTestStr144
);
3009 OStringBuffer
aStrBuf( kSInt32Max
);
3010 char input
= static_cast<char>(SAL_MAX_UINT8
);
3012 aStrBuf
.append( input
);
3014 CPPUNIT_ASSERT_MESSAGE
3016 "Appends the char(kSInt8Max) to the string buffer with INT_MAX)",
3017 ( aStrBuf
.getStr()== expVal
) &&( aStrBuf
.getLength() == expVal
.getLength() )
3023 CPPUNIT_TEST_SUITE( append_005
);
3024 CPPUNIT_TEST( append_001
);
3025 CPPUNIT_TEST( append_002
);
3026 CPPUNIT_TEST( append_003
);
3027 CPPUNIT_TEST( append_004
);
3028 CPPUNIT_TEST( append_005_005
);
3029 CPPUNIT_TEST( append_006
);
3030 CPPUNIT_TEST( append_007
);
3031 CPPUNIT_TEST( append_008
);
3032 CPPUNIT_TEST( append_009
);
3033 CPPUNIT_TEST( append_010
);
3035 CPPUNIT_TEST( append_011
);
3036 CPPUNIT_TEST( append_012
);
3038 CPPUNIT_TEST_SUITE_END();
3041 class append_006_Int32
: public CppUnit::TestFixture
3046 void setUp() override
3048 arrOUS
[0] = OString( kTestStr7
);
3049 arrOUS
[1] = OString( );
3050 arrOUS
[2] = OString( kTestStr25
);
3051 arrOUS
[3] = OString( "" );
3052 arrOUS
[4] = OString( kTestStr28
);
3058 OStringBuffer
aStrBuf( arrOUS
[0] );
3059 OString
expVal( aStrBuf
.getStr() );
3060 sal_Int32 input
= 0;
3061 sal_Int16 radix
= 2;
3063 expVal
+= OString( "0" );
3064 aStrBuf
.append( input
, radix
);
3066 CPPUNIT_ASSERT_MESSAGE
3068 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3069 aStrBuf
.getStr()== expVal
&&
3070 aStrBuf
.getLength() == expVal
.getLength()
3077 OStringBuffer
aStrBuf( arrOUS
[0] );
3078 OString
expVal( aStrBuf
.getStr() );
3079 sal_Int32 input
= 4;
3080 sal_Int16 radix
= 2;
3082 expVal
+= OString( "100" );
3083 aStrBuf
.append( input
, radix
);
3085 CPPUNIT_ASSERT_MESSAGE
3087 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3088 aStrBuf
.getStr()== expVal
&&
3089 aStrBuf
.getLength() == expVal
.getLength()
3096 OStringBuffer
aStrBuf( arrOUS
[0] );
3097 OString
expVal( aStrBuf
.getStr() );
3098 sal_Int32 input
= 8;
3099 sal_Int16 radix
= 2;
3101 expVal
+= OString( "1000" );
3102 aStrBuf
.append( input
, radix
);
3104 CPPUNIT_ASSERT_MESSAGE
3106 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3107 aStrBuf
.getStr()== expVal
&&
3108 aStrBuf
.getLength() == expVal
.getLength()
3115 OStringBuffer
aStrBuf( arrOUS
[0] );
3116 OString
expVal( aStrBuf
.getStr() );
3117 sal_Int32 input
= 15;
3118 sal_Int16 radix
= 2;
3120 expVal
+= OString( "1111" );
3121 aStrBuf
.append( input
, radix
);
3123 CPPUNIT_ASSERT_MESSAGE
3125 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[0]",
3126 aStrBuf
.getStr()== expVal
&&
3127 aStrBuf
.getLength() == expVal
.getLength()
3134 OStringBuffer
aStrBuf( arrOUS
[0] );
3135 OString
expVal( aStrBuf
.getStr() );
3136 sal_Int32 input
= 0;
3137 sal_Int16 radix
= 8;
3139 expVal
+= OString( "0" );
3140 aStrBuf
.append( input
, radix
);
3142 CPPUNIT_ASSERT_MESSAGE
3144 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3145 aStrBuf
.getStr()== expVal
&&
3146 aStrBuf
.getLength() == expVal
.getLength()
3153 OStringBuffer
aStrBuf( arrOUS
[0] );
3154 OString
expVal( aStrBuf
.getStr() );
3155 sal_Int32 input
= 4;
3156 sal_Int16 radix
= 8;
3158 expVal
+= OString( "4" );
3159 aStrBuf
.append( input
, radix
);
3161 CPPUNIT_ASSERT_MESSAGE
3163 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3164 aStrBuf
.getStr()== expVal
&&
3165 aStrBuf
.getLength() == expVal
.getLength()
3172 OStringBuffer
aStrBuf( arrOUS
[0] );
3173 OString
expVal( aStrBuf
.getStr() );
3174 sal_Int32 input
= 8;
3175 sal_Int16 radix
= 8;
3177 expVal
+= OString( "10" );
3178 aStrBuf
.append( input
, radix
);
3180 CPPUNIT_ASSERT_MESSAGE
3182 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3183 aStrBuf
.getStr()== expVal
&&
3184 aStrBuf
.getLength() == expVal
.getLength()
3191 OStringBuffer
aStrBuf( arrOUS
[0] );
3192 OString
expVal( aStrBuf
.getStr() );
3193 sal_Int32 input
= 15;
3194 sal_Int16 radix
= 8;
3196 expVal
+= OString( "17" );
3197 aStrBuf
.append( input
, radix
);
3199 CPPUNIT_ASSERT_MESSAGE
3201 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[0]",
3202 aStrBuf
.getStr()== expVal
&&
3203 aStrBuf
.getLength() == expVal
.getLength()
3210 OStringBuffer
aStrBuf( arrOUS
[0] );
3211 OString
expVal( aStrBuf
.getStr() );
3212 sal_Int32 input
= 0;
3213 sal_Int16 radix
= 10;
3215 expVal
+= OString( "0" );
3216 aStrBuf
.append( input
, radix
);
3218 CPPUNIT_ASSERT_MESSAGE
3220 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3221 aStrBuf
.getStr()== expVal
&&
3222 aStrBuf
.getLength() == expVal
.getLength()
3229 OStringBuffer
aStrBuf( arrOUS
[0] );
3230 OString
expVal( aStrBuf
.getStr() );
3231 sal_Int32 input
= 4;
3232 sal_Int16 radix
= 10;
3234 expVal
+= OString( "4" );
3235 aStrBuf
.append( input
, radix
);
3237 CPPUNIT_ASSERT_MESSAGE
3239 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3240 aStrBuf
.getStr()== expVal
&&
3241 aStrBuf
.getLength() == expVal
.getLength()
3248 OStringBuffer
aStrBuf( arrOUS
[0] );
3249 OString
expVal( aStrBuf
.getStr() );
3250 sal_Int32 input
= 8;
3251 sal_Int16 radix
= 10;
3253 expVal
+= OString( "8" );
3254 aStrBuf
.append( input
, radix
);
3256 CPPUNIT_ASSERT_MESSAGE
3258 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3259 aStrBuf
.getStr()== expVal
&&
3260 aStrBuf
.getLength() == expVal
.getLength()
3267 OStringBuffer
aStrBuf( arrOUS
[0] );
3268 OString
expVal( aStrBuf
.getStr() );
3269 sal_Int32 input
= 15;
3270 sal_Int16 radix
= 10;
3272 expVal
+= OString( "15" );
3273 aStrBuf
.append( input
, radix
);
3275 CPPUNIT_ASSERT_MESSAGE
3277 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[0]",
3278 aStrBuf
.getStr()== expVal
&&
3279 aStrBuf
.getLength() == expVal
.getLength()
3286 OStringBuffer
aStrBuf( arrOUS
[0] );
3287 OString
expVal( aStrBuf
.getStr() );
3288 sal_Int32 input
= 0;
3289 sal_Int16 radix
= 16;
3291 expVal
+= OString( "0" );
3292 aStrBuf
.append( input
, radix
);
3294 CPPUNIT_ASSERT_MESSAGE
3296 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3297 aStrBuf
.getStr()== expVal
&&
3298 aStrBuf
.getLength() == expVal
.getLength()
3305 OStringBuffer
aStrBuf( arrOUS
[0] );
3306 OString
expVal( aStrBuf
.getStr() );
3307 sal_Int32 input
= 4;
3308 sal_Int16 radix
= 16;
3310 expVal
+= OString( "4" );
3311 aStrBuf
.append( input
, radix
);
3313 CPPUNIT_ASSERT_MESSAGE
3315 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3316 aStrBuf
.getStr()== expVal
&&
3317 aStrBuf
.getLength() == expVal
.getLength()
3324 OStringBuffer
aStrBuf( arrOUS
[0] );
3325 OString
expVal( aStrBuf
.getStr() );
3326 sal_Int32 input
= 8;
3327 sal_Int16 radix
= 16;
3329 expVal
+= OString( "8" );
3330 aStrBuf
.append( input
, radix
);
3332 CPPUNIT_ASSERT_MESSAGE
3334 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3335 aStrBuf
.getStr()== expVal
&&
3336 aStrBuf
.getLength() == expVal
.getLength()
3343 OStringBuffer
aStrBuf( arrOUS
[0] );
3344 OString
expVal( aStrBuf
.getStr() );
3345 sal_Int32 input
= 15;
3346 sal_Int16 radix
= 16;
3348 expVal
+= OString( "f" );
3349 aStrBuf
.append( input
, radix
);
3351 CPPUNIT_ASSERT_MESSAGE
3353 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
3354 aStrBuf
.getStr()== expVal
&&
3355 aStrBuf
.getLength() == expVal
.getLength()
3362 OStringBuffer
aStrBuf( arrOUS
[0] );
3363 OString
expVal( aStrBuf
.getStr() );
3364 sal_Int32 input
= 0;
3365 sal_Int16 radix
= 36;
3367 expVal
+= OString( "0" );
3368 aStrBuf
.append( input
, radix
);
3370 CPPUNIT_ASSERT_MESSAGE
3372 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3373 aStrBuf
.getStr()== expVal
&&
3374 aStrBuf
.getLength() == expVal
.getLength()
3381 OStringBuffer
aStrBuf( arrOUS
[0] );
3382 OString
expVal( aStrBuf
.getStr() );
3383 sal_Int32 input
= 4;
3384 sal_Int16 radix
= 36;
3386 expVal
+= OString( "4" );
3387 aStrBuf
.append( input
, radix
);
3389 CPPUNIT_ASSERT_MESSAGE
3391 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3392 aStrBuf
.getStr()== expVal
&&
3393 aStrBuf
.getLength() == expVal
.getLength()
3400 OStringBuffer
aStrBuf( arrOUS
[0] );
3401 OString
expVal( aStrBuf
.getStr() );
3402 sal_Int32 input
= 8;
3403 sal_Int16 radix
= 36;
3405 expVal
+= OString( "8" );
3406 aStrBuf
.append( input
, radix
);
3408 CPPUNIT_ASSERT_MESSAGE
3410 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3411 aStrBuf
.getStr()== expVal
&&
3412 aStrBuf
.getLength() == expVal
.getLength()
3419 OStringBuffer
aStrBuf( arrOUS
[0] );
3420 OString
expVal( aStrBuf
.getStr() );
3421 sal_Int32 input
= 35;
3422 sal_Int16 radix
= 36;
3424 expVal
+= OString( "z" );
3425 aStrBuf
.append( input
, radix
);
3427 CPPUNIT_ASSERT_MESSAGE
3429 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[0]",
3430 aStrBuf
.getStr()== expVal
&&
3431 aStrBuf
.getLength() == expVal
.getLength()
3438 OStringBuffer
aStrBuf( arrOUS
[1] );
3439 OString
expVal( aStrBuf
.getStr() );
3440 sal_Int32 input
= 0;
3441 sal_Int16 radix
= 2;
3443 expVal
+= OString( "0" );
3444 aStrBuf
.append( input
, radix
);
3446 CPPUNIT_ASSERT_MESSAGE
3448 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3449 aStrBuf
.getStr()== expVal
&&
3450 aStrBuf
.getLength() == expVal
.getLength()
3457 OStringBuffer
aStrBuf( arrOUS
[1] );
3458 OString
expVal( aStrBuf
.getStr() );
3459 sal_Int32 input
= 4;
3460 sal_Int16 radix
= 2;
3462 expVal
+= OString( "100" );
3463 aStrBuf
.append( input
, radix
);
3465 CPPUNIT_ASSERT_MESSAGE
3467 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3468 aStrBuf
.getStr()== expVal
&&
3469 aStrBuf
.getLength() == expVal
.getLength()
3476 OStringBuffer
aStrBuf( arrOUS
[1] );
3477 OString
expVal( aStrBuf
.getStr() );
3478 sal_Int32 input
= 8;
3479 sal_Int16 radix
= 2;
3481 expVal
+= OString( "1000" );
3482 aStrBuf
.append( input
, radix
);
3484 CPPUNIT_ASSERT_MESSAGE
3486 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3487 aStrBuf
.getStr()== expVal
&&
3488 aStrBuf
.getLength() == expVal
.getLength()
3495 OStringBuffer
aStrBuf( arrOUS
[1] );
3496 OString
expVal( aStrBuf
.getStr() );
3497 sal_Int32 input
= 15;
3498 sal_Int16 radix
= 2;
3500 expVal
+= OString( "1111" );
3501 aStrBuf
.append( input
, radix
);
3503 CPPUNIT_ASSERT_MESSAGE
3505 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[1]",
3506 aStrBuf
.getStr()== expVal
&&
3507 aStrBuf
.getLength() == expVal
.getLength()
3514 OStringBuffer
aStrBuf( arrOUS
[1] );
3515 OString
expVal( aStrBuf
.getStr() );
3516 sal_Int32 input
= 0;
3517 sal_Int16 radix
= 8;
3519 expVal
+= OString( "0" );
3520 aStrBuf
.append( input
, radix
);
3522 CPPUNIT_ASSERT_MESSAGE
3524 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3525 aStrBuf
.getStr()== expVal
&&
3526 aStrBuf
.getLength() == expVal
.getLength()
3533 OStringBuffer
aStrBuf( arrOUS
[1] );
3534 OString
expVal( aStrBuf
.getStr() );
3535 sal_Int32 input
= 4;
3536 sal_Int16 radix
= 8;
3538 expVal
+= OString( "4" );
3539 aStrBuf
.append( input
, radix
);
3541 CPPUNIT_ASSERT_MESSAGE
3543 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3544 aStrBuf
.getStr()== expVal
&&
3545 aStrBuf
.getLength() == expVal
.getLength()
3552 OStringBuffer
aStrBuf( arrOUS
[1] );
3553 OString
expVal( aStrBuf
.getStr() );
3554 sal_Int32 input
= 8;
3555 sal_Int16 radix
= 8;
3557 expVal
+= OString( "10" );
3558 aStrBuf
.append( input
, radix
);
3560 CPPUNIT_ASSERT_MESSAGE
3562 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3563 aStrBuf
.getStr()== expVal
&&
3564 aStrBuf
.getLength() == expVal
.getLength()
3571 OStringBuffer
aStrBuf( arrOUS
[1] );
3572 OString
expVal( aStrBuf
.getStr() );
3573 sal_Int32 input
= 15;
3574 sal_Int16 radix
= 8;
3576 expVal
+= OString( "17" );
3577 aStrBuf
.append( input
, radix
);
3579 CPPUNIT_ASSERT_MESSAGE
3581 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[1]",
3582 aStrBuf
.getStr()== expVal
&&
3583 aStrBuf
.getLength() == expVal
.getLength()
3590 OStringBuffer
aStrBuf( arrOUS
[1] );
3591 OString
expVal( aStrBuf
.getStr() );
3592 sal_Int32 input
= 0;
3593 sal_Int16 radix
= 10;
3595 expVal
+= OString( "0" );
3596 aStrBuf
.append( input
, radix
);
3598 CPPUNIT_ASSERT_MESSAGE
3600 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3601 aStrBuf
.getStr()== expVal
&&
3602 aStrBuf
.getLength() == expVal
.getLength()
3609 OStringBuffer
aStrBuf( arrOUS
[1] );
3610 OString
expVal( aStrBuf
.getStr() );
3611 sal_Int32 input
= 4;
3612 sal_Int16 radix
= 10;
3614 expVal
+= OString( "4" );
3615 aStrBuf
.append( input
, radix
);
3617 CPPUNIT_ASSERT_MESSAGE
3619 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3620 aStrBuf
.getStr()== expVal
&&
3621 aStrBuf
.getLength() == expVal
.getLength()
3628 OStringBuffer
aStrBuf( arrOUS
[1] );
3629 OString
expVal( aStrBuf
.getStr() );
3630 sal_Int32 input
= 8;
3631 sal_Int16 radix
= 10;
3633 expVal
+= OString( "8" );
3634 aStrBuf
.append( input
, radix
);
3636 CPPUNIT_ASSERT_MESSAGE
3638 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3639 aStrBuf
.getStr()== expVal
&&
3640 aStrBuf
.getLength() == expVal
.getLength()
3647 OStringBuffer
aStrBuf( arrOUS
[1] );
3648 OString
expVal( aStrBuf
.getStr() );
3649 sal_Int32 input
= 15;
3650 sal_Int16 radix
= 10;
3652 expVal
+= OString( "15" );
3653 aStrBuf
.append( input
, radix
);
3655 CPPUNIT_ASSERT_MESSAGE
3657 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[1]",
3658 aStrBuf
.getStr()== expVal
&&
3659 aStrBuf
.getLength() == expVal
.getLength()
3666 OStringBuffer
aStrBuf( arrOUS
[1] );
3667 OString
expVal( aStrBuf
.getStr() );
3668 sal_Int32 input
= 0;
3669 sal_Int16 radix
= 16;
3671 expVal
+= OString( "0" );
3672 aStrBuf
.append( input
, radix
);
3674 CPPUNIT_ASSERT_MESSAGE
3676 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3677 aStrBuf
.getStr()== expVal
&&
3678 aStrBuf
.getLength() == expVal
.getLength()
3685 OStringBuffer
aStrBuf( arrOUS
[1] );
3686 OString
expVal( aStrBuf
.getStr() );
3687 sal_Int32 input
= 4;
3688 sal_Int16 radix
= 16;
3690 expVal
+= OString( "4" );
3691 aStrBuf
.append( input
, radix
);
3693 CPPUNIT_ASSERT_MESSAGE
3695 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3696 aStrBuf
.getStr()== expVal
&&
3697 aStrBuf
.getLength() == expVal
.getLength()
3704 OStringBuffer
aStrBuf( arrOUS
[1] );
3705 OString
expVal( aStrBuf
.getStr() );
3706 sal_Int32 input
= 8;
3707 sal_Int16 radix
= 16;
3709 expVal
+= OString( "8" );
3710 aStrBuf
.append( input
, radix
);
3712 CPPUNIT_ASSERT_MESSAGE
3714 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3715 aStrBuf
.getStr()== expVal
&&
3716 aStrBuf
.getLength() == expVal
.getLength()
3723 OStringBuffer
aStrBuf( arrOUS
[1] );
3724 OString
expVal( aStrBuf
.getStr() );
3725 sal_Int32 input
= 15;
3726 sal_Int16 radix
= 16;
3728 expVal
+= OString( "f" );
3729 aStrBuf
.append( input
, radix
);
3731 CPPUNIT_ASSERT_MESSAGE
3733 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
3734 aStrBuf
.getStr()== expVal
&&
3735 aStrBuf
.getLength() == expVal
.getLength()
3742 OStringBuffer
aStrBuf( arrOUS
[1] );
3743 OString
expVal( aStrBuf
.getStr() );
3744 sal_Int32 input
= 0;
3745 sal_Int16 radix
= 36;
3747 expVal
+= OString( "0" );
3748 aStrBuf
.append( input
, radix
);
3750 CPPUNIT_ASSERT_MESSAGE
3752 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3753 aStrBuf
.getStr()== expVal
&&
3754 aStrBuf
.getLength() == expVal
.getLength()
3761 OStringBuffer
aStrBuf( arrOUS
[1] );
3762 OString
expVal( aStrBuf
.getStr() );
3763 sal_Int32 input
= 4;
3764 sal_Int16 radix
= 36;
3766 expVal
+= OString( "4" );
3767 aStrBuf
.append( input
, radix
);
3769 CPPUNIT_ASSERT_MESSAGE
3771 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3772 aStrBuf
.getStr()== expVal
&&
3773 aStrBuf
.getLength() == expVal
.getLength()
3780 OStringBuffer
aStrBuf( arrOUS
[1] );
3781 OString
expVal( aStrBuf
.getStr() );
3782 sal_Int32 input
= 8;
3783 sal_Int16 radix
= 36;
3785 expVal
+= OString( "8" );
3786 aStrBuf
.append( input
, radix
);
3788 CPPUNIT_ASSERT_MESSAGE
3790 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3791 aStrBuf
.getStr()== expVal
&&
3792 aStrBuf
.getLength() == expVal
.getLength()
3799 OStringBuffer
aStrBuf( arrOUS
[1] );
3800 OString
expVal( aStrBuf
.getStr() );
3801 sal_Int32 input
= 35;
3802 sal_Int16 radix
= 36;
3804 expVal
+= OString( "z" );
3805 aStrBuf
.append( input
, radix
);
3807 CPPUNIT_ASSERT_MESSAGE
3809 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[1]",
3810 aStrBuf
.getStr()== expVal
&&
3811 aStrBuf
.getLength() == expVal
.getLength()
3818 OStringBuffer
aStrBuf( arrOUS
[2] );
3819 OString
expVal( aStrBuf
.getStr() );
3820 sal_Int32 input
= 0;
3821 sal_Int16 radix
= 2;
3823 expVal
+= OString( "0" );
3824 aStrBuf
.append( input
, radix
);
3826 CPPUNIT_ASSERT_MESSAGE
3828 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
3829 aStrBuf
.getStr()== expVal
&&
3830 aStrBuf
.getLength() == expVal
.getLength()
3837 OStringBuffer
aStrBuf( arrOUS
[2] );
3838 OString
expVal( aStrBuf
.getStr() );
3839 sal_Int32 input
= 4;
3840 sal_Int16 radix
= 2;
3842 expVal
+= OString( "100" );
3843 aStrBuf
.append( input
, radix
);
3845 CPPUNIT_ASSERT_MESSAGE
3847 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
3848 aStrBuf
.getStr()== expVal
&&
3849 aStrBuf
.getLength() == expVal
.getLength()
3856 OStringBuffer
aStrBuf( arrOUS
[2] );
3857 OString
expVal( aStrBuf
.getStr() );
3858 sal_Int32 input
= 8;
3859 sal_Int16 radix
= 2;
3861 expVal
+= OString( "1000" );
3862 aStrBuf
.append( input
, radix
);
3864 CPPUNIT_ASSERT_MESSAGE
3866 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
3867 aStrBuf
.getStr()== expVal
&&
3868 aStrBuf
.getLength() == expVal
.getLength()
3875 OStringBuffer
aStrBuf( arrOUS
[2] );
3876 OString
expVal( aStrBuf
.getStr() );
3877 sal_Int32 input
= 15;
3878 sal_Int16 radix
= 2;
3880 expVal
+= OString( "1111" );
3881 aStrBuf
.append( input
, radix
);
3883 CPPUNIT_ASSERT_MESSAGE
3885 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[2]",
3886 aStrBuf
.getStr()== expVal
&&
3887 aStrBuf
.getLength() == expVal
.getLength()
3894 OStringBuffer
aStrBuf( arrOUS
[2] );
3895 OString
expVal( aStrBuf
.getStr() );
3896 sal_Int32 input
= 0;
3897 sal_Int16 radix
= 8;
3899 expVal
+= OString( "0" );
3900 aStrBuf
.append( input
, radix
);
3902 CPPUNIT_ASSERT_MESSAGE
3904 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
3905 aStrBuf
.getStr()== expVal
&&
3906 aStrBuf
.getLength() == expVal
.getLength()
3913 OStringBuffer
aStrBuf( arrOUS
[2] );
3914 OString
expVal( aStrBuf
.getStr() );
3915 sal_Int32 input
= 4;
3916 sal_Int16 radix
= 8;
3918 expVal
+= OString( "4" );
3919 aStrBuf
.append( input
, radix
);
3921 CPPUNIT_ASSERT_MESSAGE
3923 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
3924 aStrBuf
.getStr()== expVal
&&
3925 aStrBuf
.getLength() == expVal
.getLength()
3932 OStringBuffer
aStrBuf( arrOUS
[2] );
3933 OString
expVal( aStrBuf
.getStr() );
3934 sal_Int32 input
= 8;
3935 sal_Int16 radix
= 8;
3937 expVal
+= OString( "10" );
3938 aStrBuf
.append( input
, radix
);
3940 CPPUNIT_ASSERT_MESSAGE
3942 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
3943 aStrBuf
.getStr()== expVal
&&
3944 aStrBuf
.getLength() == expVal
.getLength()
3951 OStringBuffer
aStrBuf( arrOUS
[2] );
3952 OString
expVal( aStrBuf
.getStr() );
3953 sal_Int32 input
= 15;
3954 sal_Int16 radix
= 8;
3956 expVal
+= OString( "17" );
3957 aStrBuf
.append( input
, radix
);
3959 CPPUNIT_ASSERT_MESSAGE
3961 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[2]",
3962 aStrBuf
.getStr()== expVal
&&
3963 aStrBuf
.getLength() == expVal
.getLength()
3970 OStringBuffer
aStrBuf( arrOUS
[2] );
3971 OString
expVal( aStrBuf
.getStr() );
3972 sal_Int32 input
= 0;
3973 sal_Int16 radix
= 10;
3975 expVal
+= OString( "0" );
3976 aStrBuf
.append( input
, radix
);
3978 CPPUNIT_ASSERT_MESSAGE
3980 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
3981 aStrBuf
.getStr()== expVal
&&
3982 aStrBuf
.getLength() == expVal
.getLength()
3989 OStringBuffer
aStrBuf( arrOUS
[2] );
3990 OString
expVal( aStrBuf
.getStr() );
3991 sal_Int32 input
= 4;
3992 sal_Int16 radix
= 10;
3994 expVal
+= OString( "4" );
3995 aStrBuf
.append( input
, radix
);
3997 CPPUNIT_ASSERT_MESSAGE
3999 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4000 aStrBuf
.getStr()== expVal
&&
4001 aStrBuf
.getLength() == expVal
.getLength()
4008 OStringBuffer
aStrBuf( arrOUS
[2] );
4009 OString
expVal( aStrBuf
.getStr() );
4010 sal_Int32 input
= 8;
4011 sal_Int16 radix
= 10;
4013 expVal
+= OString( "8" );
4014 aStrBuf
.append( input
, radix
);
4016 CPPUNIT_ASSERT_MESSAGE
4018 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4019 aStrBuf
.getStr()== expVal
&&
4020 aStrBuf
.getLength() == expVal
.getLength()
4027 OStringBuffer
aStrBuf( arrOUS
[2] );
4028 OString
expVal( aStrBuf
.getStr() );
4029 sal_Int32 input
= 15;
4030 sal_Int16 radix
= 10;
4032 expVal
+= OString( "15" );
4033 aStrBuf
.append( input
, radix
);
4035 CPPUNIT_ASSERT_MESSAGE
4037 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[2]",
4038 aStrBuf
.getStr()== expVal
&&
4039 aStrBuf
.getLength() == expVal
.getLength()
4046 OStringBuffer
aStrBuf( arrOUS
[2] );
4047 OString
expVal( aStrBuf
.getStr() );
4048 sal_Int32 input
= 0;
4049 sal_Int16 radix
= 16;
4051 expVal
+= OString( "0" );
4052 aStrBuf
.append( input
, radix
);
4054 CPPUNIT_ASSERT_MESSAGE
4056 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4057 aStrBuf
.getStr()== expVal
&&
4058 aStrBuf
.getLength() == expVal
.getLength()
4065 OStringBuffer
aStrBuf( arrOUS
[2] );
4066 OString
expVal( aStrBuf
.getStr() );
4067 sal_Int32 input
= 4;
4068 sal_Int16 radix
= 16;
4070 expVal
+= OString( "4" );
4071 aStrBuf
.append( input
, radix
);
4073 CPPUNIT_ASSERT_MESSAGE
4075 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4076 aStrBuf
.getStr()== expVal
&&
4077 aStrBuf
.getLength() == expVal
.getLength()
4084 OStringBuffer
aStrBuf( arrOUS
[2] );
4085 OString
expVal( aStrBuf
.getStr() );
4086 sal_Int32 input
= 8;
4087 sal_Int16 radix
= 16;
4089 expVal
+= OString( "8" );
4090 aStrBuf
.append( input
, radix
);
4092 CPPUNIT_ASSERT_MESSAGE
4094 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4095 aStrBuf
.getStr()== expVal
&&
4096 aStrBuf
.getLength() == expVal
.getLength()
4103 OStringBuffer
aStrBuf( arrOUS
[2] );
4104 OString
expVal( aStrBuf
.getStr() );
4105 sal_Int32 input
= 15;
4106 sal_Int16 radix
= 16;
4108 expVal
+= OString( "f" );
4109 aStrBuf
.append( input
, radix
);
4111 CPPUNIT_ASSERT_MESSAGE
4113 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
4114 aStrBuf
.getStr()== expVal
&&
4115 aStrBuf
.getLength() == expVal
.getLength()
4122 OStringBuffer
aStrBuf( arrOUS
[2] );
4123 OString
expVal( aStrBuf
.getStr() );
4124 sal_Int32 input
= 0;
4125 sal_Int16 radix
= 36;
4127 expVal
+= OString( "0" );
4128 aStrBuf
.append( input
, radix
);
4130 CPPUNIT_ASSERT_MESSAGE
4132 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4133 aStrBuf
.getStr()== expVal
&&
4134 aStrBuf
.getLength() == expVal
.getLength()
4141 OStringBuffer
aStrBuf( arrOUS
[2] );
4142 OString
expVal( aStrBuf
.getStr() );
4143 sal_Int32 input
= 4;
4144 sal_Int16 radix
= 36;
4146 expVal
+= OString( "4" );
4147 aStrBuf
.append( input
, radix
);
4149 CPPUNIT_ASSERT_MESSAGE
4151 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4152 aStrBuf
.getStr()== expVal
&&
4153 aStrBuf
.getLength() == expVal
.getLength()
4160 OStringBuffer
aStrBuf( arrOUS
[2] );
4161 OString
expVal( aStrBuf
.getStr() );
4162 sal_Int32 input
= 8;
4163 sal_Int16 radix
= 36;
4165 expVal
+= OString( "8" );
4166 aStrBuf
.append( input
, radix
);
4168 CPPUNIT_ASSERT_MESSAGE
4170 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4171 aStrBuf
.getStr()== expVal
&&
4172 aStrBuf
.getLength() == expVal
.getLength()
4179 OStringBuffer
aStrBuf( arrOUS
[2] );
4180 OString
expVal( aStrBuf
.getStr() );
4181 sal_Int32 input
= 35;
4182 sal_Int16 radix
= 36;
4184 expVal
+= OString( "z" );
4185 aStrBuf
.append( input
, radix
);
4187 CPPUNIT_ASSERT_MESSAGE
4189 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[2]",
4190 aStrBuf
.getStr()== expVal
&&
4191 aStrBuf
.getLength() == expVal
.getLength()
4198 OStringBuffer
aStrBuf( arrOUS
[3] );
4199 OString
expVal( aStrBuf
.getStr() );
4200 sal_Int32 input
= 0;
4201 sal_Int16 radix
= 2;
4203 expVal
+= OString( "0" );
4204 aStrBuf
.append( input
, radix
);
4206 CPPUNIT_ASSERT_MESSAGE
4208 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4209 aStrBuf
.getStr()== expVal
&&
4210 aStrBuf
.getLength() == expVal
.getLength()
4217 OStringBuffer
aStrBuf( arrOUS
[3] );
4218 OString
expVal( aStrBuf
.getStr() );
4219 sal_Int32 input
= 4;
4220 sal_Int16 radix
= 2;
4222 expVal
+= OString( "100" );
4223 aStrBuf
.append( input
, radix
);
4225 CPPUNIT_ASSERT_MESSAGE
4227 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4228 aStrBuf
.getStr()== expVal
&&
4229 aStrBuf
.getLength() == expVal
.getLength()
4236 OStringBuffer
aStrBuf( arrOUS
[3] );
4237 OString
expVal( aStrBuf
.getStr() );
4238 sal_Int32 input
= 8;
4239 sal_Int16 radix
= 2;
4241 expVal
+= OString( "1000" );
4242 aStrBuf
.append( input
, radix
);
4244 CPPUNIT_ASSERT_MESSAGE
4246 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4247 aStrBuf
.getStr()== expVal
&&
4248 aStrBuf
.getLength() == expVal
.getLength()
4255 OStringBuffer
aStrBuf( arrOUS
[3] );
4256 OString
expVal( aStrBuf
.getStr() );
4257 sal_Int32 input
= 15;
4258 sal_Int16 radix
= 2;
4260 expVal
+= OString( "1111" );
4261 aStrBuf
.append( input
, radix
);
4263 CPPUNIT_ASSERT_MESSAGE
4265 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[3]",
4266 aStrBuf
.getStr()== expVal
&&
4267 aStrBuf
.getLength() == expVal
.getLength()
4274 OStringBuffer
aStrBuf( arrOUS
[3] );
4275 OString
expVal( aStrBuf
.getStr() );
4276 sal_Int32 input
= 0;
4277 sal_Int16 radix
= 8;
4279 expVal
+= OString( "0" );
4280 aStrBuf
.append( input
, radix
);
4282 CPPUNIT_ASSERT_MESSAGE
4284 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4285 aStrBuf
.getStr()== expVal
&&
4286 aStrBuf
.getLength() == expVal
.getLength()
4293 OStringBuffer
aStrBuf( arrOUS
[3] );
4294 OString
expVal( aStrBuf
.getStr() );
4295 sal_Int32 input
= 4;
4296 sal_Int16 radix
= 8;
4298 expVal
+= OString( "4" );
4299 aStrBuf
.append( input
, radix
);
4301 CPPUNIT_ASSERT_MESSAGE
4303 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4304 aStrBuf
.getStr()== expVal
&&
4305 aStrBuf
.getLength() == expVal
.getLength()
4312 OStringBuffer
aStrBuf( arrOUS
[3] );
4313 OString
expVal( aStrBuf
.getStr() );
4314 sal_Int32 input
= 8;
4315 sal_Int16 radix
= 8;
4317 expVal
+= OString( "10" );
4318 aStrBuf
.append( input
, radix
);
4320 CPPUNIT_ASSERT_MESSAGE
4322 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4323 aStrBuf
.getStr()== expVal
&&
4324 aStrBuf
.getLength() == expVal
.getLength()
4331 OStringBuffer
aStrBuf( arrOUS
[3] );
4332 OString
expVal( aStrBuf
.getStr() );
4333 sal_Int32 input
= 15;
4334 sal_Int16 radix
= 8;
4336 expVal
+= OString( "17" );
4337 aStrBuf
.append( input
, radix
);
4339 CPPUNIT_ASSERT_MESSAGE
4341 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[3]",
4342 aStrBuf
.getStr()== expVal
&&
4343 aStrBuf
.getLength() == expVal
.getLength()
4350 OStringBuffer
aStrBuf( arrOUS
[3] );
4351 OString
expVal( aStrBuf
.getStr() );
4352 sal_Int32 input
= 0;
4353 sal_Int16 radix
= 10;
4355 expVal
+= OString( "0" );
4356 aStrBuf
.append( input
, radix
);
4358 CPPUNIT_ASSERT_MESSAGE
4360 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4361 aStrBuf
.getStr()== expVal
&&
4362 aStrBuf
.getLength() == expVal
.getLength()
4369 OStringBuffer
aStrBuf( arrOUS
[3] );
4370 OString
expVal( aStrBuf
.getStr() );
4371 sal_Int32 input
= 4;
4372 sal_Int16 radix
= 10;
4374 expVal
+= OString( "4" );
4375 aStrBuf
.append( input
, radix
);
4377 CPPUNIT_ASSERT_MESSAGE
4379 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4380 aStrBuf
.getStr()== expVal
&&
4381 aStrBuf
.getLength() == expVal
.getLength()
4388 OStringBuffer
aStrBuf( arrOUS
[3] );
4389 OString
expVal( aStrBuf
.getStr() );
4390 sal_Int32 input
= 8;
4391 sal_Int16 radix
= 10;
4393 expVal
+= OString( "8" );
4394 aStrBuf
.append( input
, radix
);
4396 CPPUNIT_ASSERT_MESSAGE
4398 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4399 aStrBuf
.getStr()== expVal
&&
4400 aStrBuf
.getLength() == expVal
.getLength()
4407 OStringBuffer
aStrBuf( arrOUS
[3] );
4408 OString
expVal( aStrBuf
.getStr() );
4409 sal_Int32 input
= 15;
4410 sal_Int16 radix
= 10;
4412 expVal
+= OString( "15" );
4413 aStrBuf
.append( input
, radix
);
4415 CPPUNIT_ASSERT_MESSAGE
4417 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[3]",
4418 aStrBuf
.getStr()== expVal
&&
4419 aStrBuf
.getLength() == expVal
.getLength()
4426 OStringBuffer
aStrBuf( arrOUS
[3] );
4427 OString
expVal( aStrBuf
.getStr() );
4428 sal_Int32 input
= 0;
4429 sal_Int16 radix
= 16;
4431 expVal
+= OString( "0" );
4432 aStrBuf
.append( input
, radix
);
4434 CPPUNIT_ASSERT_MESSAGE
4436 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4437 aStrBuf
.getStr()== expVal
&&
4438 aStrBuf
.getLength() == expVal
.getLength()
4445 OStringBuffer
aStrBuf( arrOUS
[3] );
4446 OString
expVal( aStrBuf
.getStr() );
4447 sal_Int32 input
= 4;
4448 sal_Int16 radix
= 16;
4450 expVal
+= OString( "4" );
4451 aStrBuf
.append( input
, radix
);
4453 CPPUNIT_ASSERT_MESSAGE
4455 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4456 aStrBuf
.getStr()== expVal
&&
4457 aStrBuf
.getLength() == expVal
.getLength()
4464 OStringBuffer
aStrBuf( arrOUS
[3] );
4465 OString
expVal( aStrBuf
.getStr() );
4466 sal_Int32 input
= 8;
4467 sal_Int16 radix
= 16;
4469 expVal
+= OString( "8" );
4470 aStrBuf
.append( input
, radix
);
4472 CPPUNIT_ASSERT_MESSAGE
4474 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4475 aStrBuf
.getStr()== expVal
&&
4476 aStrBuf
.getLength() == expVal
.getLength()
4483 OStringBuffer
aStrBuf( arrOUS
[3] );
4484 OString
expVal( aStrBuf
.getStr() );
4485 sal_Int32 input
= 15;
4486 sal_Int16 radix
= 16;
4488 expVal
+= OString( "f" );
4489 aStrBuf
.append( input
, radix
);
4491 CPPUNIT_ASSERT_MESSAGE
4493 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
4494 aStrBuf
.getStr()== expVal
&&
4495 aStrBuf
.getLength() == expVal
.getLength()
4502 OStringBuffer
aStrBuf( arrOUS
[3] );
4503 OString
expVal( aStrBuf
.getStr() );
4504 sal_Int32 input
= 0;
4505 sal_Int16 radix
= 36;
4507 expVal
+= OString( "0" );
4508 aStrBuf
.append( input
, radix
);
4510 CPPUNIT_ASSERT_MESSAGE
4512 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4513 aStrBuf
.getStr()== expVal
&&
4514 aStrBuf
.getLength() == expVal
.getLength()
4521 OStringBuffer
aStrBuf( arrOUS
[3] );
4522 OString
expVal( aStrBuf
.getStr() );
4523 sal_Int32 input
= 4;
4524 sal_Int16 radix
= 36;
4526 expVal
+= OString( "4" );
4527 aStrBuf
.append( input
, radix
);
4529 CPPUNIT_ASSERT_MESSAGE
4531 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4532 aStrBuf
.getStr()== expVal
&&
4533 aStrBuf
.getLength() == expVal
.getLength()
4540 OStringBuffer
aStrBuf( arrOUS
[3] );
4541 OString
expVal( aStrBuf
.getStr() );
4542 sal_Int32 input
= 8;
4543 sal_Int16 radix
= 36;
4545 expVal
+= OString( "8" );
4546 aStrBuf
.append( input
, radix
);
4548 CPPUNIT_ASSERT_MESSAGE
4550 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4551 aStrBuf
.getStr()== expVal
&&
4552 aStrBuf
.getLength() == expVal
.getLength()
4559 OStringBuffer
aStrBuf( arrOUS
[3] );
4560 OString
expVal( aStrBuf
.getStr() );
4561 sal_Int32 input
= 35;
4562 sal_Int16 radix
= 36;
4564 expVal
+= OString( "z" );
4565 aStrBuf
.append( input
, radix
);
4567 CPPUNIT_ASSERT_MESSAGE
4569 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[3]",
4570 aStrBuf
.getStr()== expVal
&&
4571 aStrBuf
.getLength() == expVal
.getLength()
4578 OStringBuffer
aStrBuf( arrOUS
[4] );
4579 OString
expVal( aStrBuf
.getStr() );
4580 sal_Int32 input
= 0;
4581 sal_Int16 radix
= 2;
4583 expVal
+= OString( "0" );
4584 aStrBuf
.append( input
, radix
);
4586 CPPUNIT_ASSERT_MESSAGE
4588 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4589 aStrBuf
.getStr()== expVal
&&
4590 aStrBuf
.getLength() == expVal
.getLength()
4597 OStringBuffer
aStrBuf( arrOUS
[4] );
4598 OString
expVal( aStrBuf
.getStr() );
4599 sal_Int32 input
= 4;
4600 sal_Int16 radix
= 2;
4602 expVal
+= OString( "100" );
4603 aStrBuf
.append( input
, radix
);
4605 CPPUNIT_ASSERT_MESSAGE
4607 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4608 aStrBuf
.getStr()== expVal
&&
4609 aStrBuf
.getLength() == expVal
.getLength()
4616 OStringBuffer
aStrBuf( arrOUS
[4] );
4617 OString
expVal( aStrBuf
.getStr() );
4618 sal_Int32 input
= 8;
4619 sal_Int16 radix
= 2;
4621 expVal
+= OString( "1000" );
4622 aStrBuf
.append( input
, radix
);
4624 CPPUNIT_ASSERT_MESSAGE
4626 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4627 aStrBuf
.getStr()== expVal
&&
4628 aStrBuf
.getLength() == expVal
.getLength()
4635 OStringBuffer
aStrBuf( arrOUS
[4] );
4636 OString
expVal( aStrBuf
.getStr() );
4637 sal_Int32 input
= 15;
4638 sal_Int16 radix
= 2;
4640 expVal
+= OString( "1111" );
4641 aStrBuf
.append( input
, radix
);
4643 CPPUNIT_ASSERT_MESSAGE
4645 "append(sal_Int32, radix 2)_006_kRadixBinary for arrOUS[4]",
4646 aStrBuf
.getStr()== expVal
&&
4647 aStrBuf
.getLength() == expVal
.getLength()
4654 OStringBuffer
aStrBuf( arrOUS
[4] );
4655 OString
expVal( aStrBuf
.getStr() );
4656 sal_Int32 input
= 0;
4657 sal_Int16 radix
= 8;
4659 expVal
+= OString( "0" );
4660 aStrBuf
.append( input
, radix
);
4662 CPPUNIT_ASSERT_MESSAGE
4664 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4665 aStrBuf
.getStr()== expVal
&&
4666 aStrBuf
.getLength() == expVal
.getLength()
4673 OStringBuffer
aStrBuf( arrOUS
[4] );
4674 OString
expVal( aStrBuf
.getStr() );
4675 sal_Int32 input
= 4;
4676 sal_Int16 radix
= 8;
4678 expVal
+= OString( "4" );
4679 aStrBuf
.append( input
, radix
);
4681 CPPUNIT_ASSERT_MESSAGE
4683 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4684 aStrBuf
.getStr()== expVal
&&
4685 aStrBuf
.getLength() == expVal
.getLength()
4692 OStringBuffer
aStrBuf( arrOUS
[4] );
4693 OString
expVal( aStrBuf
.getStr() );
4694 sal_Int32 input
= 8;
4695 sal_Int16 radix
= 8;
4697 expVal
+= OString( "10" );
4698 aStrBuf
.append( input
, radix
);
4700 CPPUNIT_ASSERT_MESSAGE
4702 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4703 aStrBuf
.getStr()== expVal
&&
4704 aStrBuf
.getLength() == expVal
.getLength()
4711 OStringBuffer
aStrBuf( arrOUS
[4] );
4712 OString
expVal( aStrBuf
.getStr() );
4713 sal_Int32 input
= 15;
4714 sal_Int16 radix
= 8;
4716 expVal
+= OString( "17" );
4717 aStrBuf
.append( input
, radix
);
4719 CPPUNIT_ASSERT_MESSAGE
4721 "append(sal_Int32, radix 8)_006_kRadixOctol for arrOUS[4]",
4722 aStrBuf
.getStr()== expVal
&&
4723 aStrBuf
.getLength() == expVal
.getLength()
4730 OStringBuffer
aStrBuf( arrOUS
[4] );
4731 OString
expVal( aStrBuf
.getStr() );
4732 sal_Int32 input
= 0;
4733 sal_Int16 radix
= 10;
4735 expVal
+= OString( "0" );
4736 aStrBuf
.append( input
, radix
);
4738 CPPUNIT_ASSERT_MESSAGE
4740 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4741 aStrBuf
.getStr()== expVal
&&
4742 aStrBuf
.getLength() == expVal
.getLength()
4749 OStringBuffer
aStrBuf( arrOUS
[4] );
4750 OString
expVal( aStrBuf
.getStr() );
4751 sal_Int32 input
= 4;
4752 sal_Int16 radix
= 10;
4754 expVal
+= OString( "4" );
4755 aStrBuf
.append( input
, radix
);
4757 CPPUNIT_ASSERT_MESSAGE
4759 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4760 aStrBuf
.getStr()== expVal
&&
4761 aStrBuf
.getLength() == expVal
.getLength()
4768 OStringBuffer
aStrBuf( arrOUS
[4] );
4769 OString
expVal( aStrBuf
.getStr() );
4770 sal_Int32 input
= 8;
4771 sal_Int16 radix
= 10;
4773 expVal
+= OString( "8" );
4774 aStrBuf
.append( input
, radix
);
4776 CPPUNIT_ASSERT_MESSAGE
4778 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4779 aStrBuf
.getStr()== expVal
&&
4780 aStrBuf
.getLength() == expVal
.getLength()
4787 OStringBuffer
aStrBuf( arrOUS
[4] );
4788 OString
expVal( aStrBuf
.getStr() );
4789 sal_Int32 input
= 15;
4790 sal_Int16 radix
= 10;
4792 expVal
+= OString( "15" );
4793 aStrBuf
.append( input
, radix
);
4795 CPPUNIT_ASSERT_MESSAGE
4797 "append(sal_Int32, radix 10)_006_kRadixDecimal for arrOUS[4]",
4798 aStrBuf
.getStr()== expVal
&&
4799 aStrBuf
.getLength() == expVal
.getLength()
4806 OStringBuffer
aStrBuf( arrOUS
[4] );
4807 OString
expVal( aStrBuf
.getStr() );
4808 sal_Int32 input
= 0;
4809 sal_Int16 radix
= 16;
4811 expVal
+= OString( "0" );
4812 aStrBuf
.append( input
, radix
);
4814 CPPUNIT_ASSERT_MESSAGE
4816 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
4817 aStrBuf
.getStr()== expVal
&&
4818 aStrBuf
.getLength() == expVal
.getLength()
4825 OStringBuffer
aStrBuf( arrOUS
[4] );
4826 OString
expVal( aStrBuf
.getStr() );
4827 sal_Int32 input
= 4;
4828 sal_Int16 radix
= 16;
4830 expVal
+= OString( "4" );
4831 aStrBuf
.append( input
, radix
);
4833 CPPUNIT_ASSERT_MESSAGE
4835 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
4836 aStrBuf
.getStr()== expVal
&&
4837 aStrBuf
.getLength() == expVal
.getLength()
4844 OStringBuffer
aStrBuf( arrOUS
[4] );
4845 OString
expVal( aStrBuf
.getStr() );
4846 sal_Int32 input
= 8;
4847 sal_Int16 radix
= 16;
4849 expVal
+= OString( "8" );
4850 aStrBuf
.append( input
, radix
);
4852 CPPUNIT_ASSERT_MESSAGE
4854 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
4855 aStrBuf
.getStr()== expVal
&&
4856 aStrBuf
.getLength() == expVal
.getLength()
4863 OStringBuffer
aStrBuf( arrOUS
[4] );
4864 OString
expVal( aStrBuf
.getStr() );
4865 sal_Int32 input
= 15;
4866 sal_Int16 radix
= 16;
4868 expVal
+= OString( "f" );
4869 aStrBuf
.append( input
, radix
);
4871 CPPUNIT_ASSERT_MESSAGE
4873 "append(sal_Int32, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
4874 aStrBuf
.getStr()== expVal
&&
4875 aStrBuf
.getLength() == expVal
.getLength()
4882 OStringBuffer
aStrBuf( arrOUS
[4] );
4883 OString
expVal( aStrBuf
.getStr() );
4884 sal_Int32 input
= 0;
4885 sal_Int16 radix
= 36;
4887 expVal
+= OString( "0" );
4888 aStrBuf
.append( input
, radix
);
4890 CPPUNIT_ASSERT_MESSAGE
4892 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
4893 aStrBuf
.getStr()== expVal
&&
4894 aStrBuf
.getLength() == expVal
.getLength()
4901 OStringBuffer
aStrBuf( arrOUS
[4] );
4902 OString
expVal( aStrBuf
.getStr() );
4903 sal_Int32 input
= 4;
4904 sal_Int16 radix
= 36;
4906 expVal
+= OString( "4" );
4907 aStrBuf
.append( input
, radix
);
4909 CPPUNIT_ASSERT_MESSAGE
4911 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
4912 aStrBuf
.getStr()== expVal
&&
4913 aStrBuf
.getLength() == expVal
.getLength()
4920 OStringBuffer
aStrBuf( arrOUS
[4] );
4921 OString
expVal( aStrBuf
.getStr() );
4922 sal_Int32 input
= 8;
4923 sal_Int16 radix
= 36;
4925 expVal
+= OString( "8" );
4926 aStrBuf
.append( input
, radix
);
4928 CPPUNIT_ASSERT_MESSAGE
4930 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
4931 aStrBuf
.getStr()== expVal
&&
4932 aStrBuf
.getLength() == expVal
.getLength()
4939 OStringBuffer
aStrBuf( arrOUS
[4] );
4940 OString
expVal( aStrBuf
.getStr() );
4941 sal_Int32 input
= 35;
4942 sal_Int16 radix
= 36;
4944 expVal
+= OString( "z" );
4945 aStrBuf
.append( input
, radix
);
4947 CPPUNIT_ASSERT_MESSAGE
4949 "append(sal_Int32, radix 36)_006_kRadixBase36 for arrOUS[4]",
4950 aStrBuf
.getStr()== expVal
&&
4951 aStrBuf
.getLength() == expVal
.getLength()
4956 CPPUNIT_TEST_SUITE( append_006_Int32
);
4957 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
4958 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
4959 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
4960 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
4961 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
4962 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
4963 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
4964 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
4965 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
4966 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
4967 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
4968 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
4969 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
4970 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
4971 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
4972 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
4973 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
4974 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
4975 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
4976 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
4977 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
4978 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
4979 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
4980 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
4981 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
4982 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
4983 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
4984 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
4985 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
4986 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
4987 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
4988 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
4989 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
4990 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
4991 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
4992 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
4993 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
4994 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
4995 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
4996 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
4997 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
4998 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
4999 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
5000 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
5001 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
5002 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
5003 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
5004 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
5005 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
5006 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
5007 CPPUNIT_TEST_SUITE_END();
5010 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
5011 // where i = large constants
5012 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
5013 // where i = large constants
5014 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
5015 // where i = large constants
5016 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
5017 // where i = large constants
5018 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
5019 // where i = large constants
5021 class append_006_Int32_Bounderies
: public CppUnit::TestFixture
5026 void setUp() override
5028 arrOUS
[0] = OString( kTestStr7
);
5029 arrOUS
[1] = OString( );
5030 arrOUS
[2] = OString( kTestStr25
);
5031 arrOUS
[3] = OString( "" );
5032 arrOUS
[4] = OString( kTestStr28
);
5037 OStringBuffer
aStrBuf( arrOUS
[0] );
5038 OString
expVal( aStrBuf
.getStr() );
5039 sal_Int32 input
= kSInt8Max
;
5040 sal_Int16 radix
= 2;
5042 expVal
+= OString( "1111111" );
5043 aStrBuf
.append( input
, radix
);
5045 CPPUNIT_ASSERT_MESSAGE
5047 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5048 aStrBuf
.getStr()== expVal
&&
5049 aStrBuf
.getLength() == expVal
.getLength()
5056 OStringBuffer
aStrBuf( arrOUS
[0] );
5057 OString
expVal( aStrBuf
.getStr() );
5058 sal_Int32 input
= kSInt32Max
;
5059 sal_Int16 radix
= 2;
5061 expVal
+= OString( "1111111111111111111111111111111" );
5062 aStrBuf
.append( input
, radix
);
5064 CPPUNIT_ASSERT_MESSAGE
5066 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
5067 aStrBuf
.getStr()== expVal
&&
5068 aStrBuf
.getLength() == expVal
.getLength()
5075 OStringBuffer
aStrBuf( arrOUS
[0] );
5076 OString
expVal( aStrBuf
.getStr() );
5077 sal_Int32 input
= kSInt8Max
;
5078 sal_Int16 radix
= 8;
5080 expVal
+= OString( "177" );
5081 aStrBuf
.append( input
, radix
);
5083 CPPUNIT_ASSERT_MESSAGE
5085 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5086 aStrBuf
.getStr()== expVal
&&
5087 aStrBuf
.getLength() == expVal
.getLength()
5094 OStringBuffer
aStrBuf( arrOUS
[0] );
5095 OString
expVal( aStrBuf
.getStr() );
5096 sal_Int32 input
= kSInt32Max
;
5097 sal_Int16 radix
= 8;
5099 expVal
+= OString( "17777777777" );
5100 aStrBuf
.append( input
, radix
);
5102 CPPUNIT_ASSERT_MESSAGE
5104 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
5105 aStrBuf
.getStr()== expVal
&&
5106 aStrBuf
.getLength() == expVal
.getLength()
5113 OStringBuffer
aStrBuf( arrOUS
[0] );
5114 OString
expVal( aStrBuf
.getStr() );
5115 sal_Int32 input
= kSInt8Max
;
5116 sal_Int16 radix
= 10;
5118 expVal
+= OString( "127" );
5119 aStrBuf
.append( input
, radix
);
5121 CPPUNIT_ASSERT_MESSAGE
5123 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5124 aStrBuf
.getStr()== expVal
&&
5125 aStrBuf
.getLength() == expVal
.getLength()
5132 OStringBuffer
aStrBuf( arrOUS
[0] );
5133 OString
expVal( aStrBuf
.getStr() );
5134 sal_Int32 input
= kSInt32Max
;
5135 sal_Int16 radix
= 10;
5137 expVal
+= OString( "2147483647" );
5138 aStrBuf
.append( input
, radix
);
5140 CPPUNIT_ASSERT_MESSAGE
5142 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
5143 aStrBuf
.getStr()== expVal
&&
5144 aStrBuf
.getLength() == expVal
.getLength()
5151 OStringBuffer
aStrBuf( arrOUS
[0] );
5152 OString
expVal( aStrBuf
.getStr() );
5153 sal_Int32 input
= kSInt8Max
;
5154 sal_Int16 radix
= 16;
5156 expVal
+= OString( "7f" );
5157 aStrBuf
.append( input
, radix
);
5159 CPPUNIT_ASSERT_MESSAGE
5161 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5162 aStrBuf
.getStr()== expVal
&&
5163 aStrBuf
.getLength() == expVal
.getLength()
5170 OStringBuffer
aStrBuf( arrOUS
[0] );
5171 OString
expVal( aStrBuf
.getStr() );
5172 sal_Int32 input
= kSInt32Max
;
5173 sal_Int16 radix
= 16;
5175 expVal
+= OString( "7fffffff" );
5176 aStrBuf
.append( input
, radix
);
5178 CPPUNIT_ASSERT_MESSAGE
5180 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
5181 aStrBuf
.getStr()== expVal
&&
5182 aStrBuf
.getLength() == expVal
.getLength()
5189 OStringBuffer
aStrBuf( arrOUS
[0] );
5190 OString
expVal( aStrBuf
.getStr() );
5191 sal_Int32 input
= kSInt8Max
;
5192 sal_Int16 radix
= 36;
5194 expVal
+= OString( "3j" );
5195 aStrBuf
.append( input
, radix
);
5197 CPPUNIT_ASSERT_MESSAGE
5199 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5200 aStrBuf
.getStr()== expVal
&&
5201 aStrBuf
.getLength() == expVal
.getLength()
5208 OStringBuffer
aStrBuf( arrOUS
[0] );
5209 OString
expVal( aStrBuf
.getStr() );
5210 sal_Int32 input
= kSInt32Max
;
5211 sal_Int16 radix
= 36;
5213 expVal
+= OString( "zik0zj" );
5214 aStrBuf
.append( input
, radix
);
5216 CPPUNIT_ASSERT_MESSAGE
5218 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
5219 aStrBuf
.getStr()== expVal
&&
5220 aStrBuf
.getLength() == expVal
.getLength()
5227 OStringBuffer
aStrBuf( arrOUS
[1] );
5228 OString
expVal( aStrBuf
.getStr() );
5229 sal_Int32 input
= kSInt8Max
;
5230 sal_Int16 radix
= 2;
5232 expVal
+= OString( "1111111" );
5233 aStrBuf
.append( input
, radix
);
5235 CPPUNIT_ASSERT_MESSAGE
5237 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
5238 aStrBuf
.getStr()== expVal
&&
5239 aStrBuf
.getLength() == expVal
.getLength()
5246 OStringBuffer
aStrBuf( arrOUS
[1] );
5247 OString
expVal( aStrBuf
.getStr() );
5248 sal_Int32 input
= kSInt32Max
;
5249 sal_Int16 radix
= 2;
5251 expVal
+= OString( "1111111111111111111111111111111" );
5252 aStrBuf
.append( input
, radix
);
5254 CPPUNIT_ASSERT_MESSAGE
5256 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
5257 aStrBuf
.getStr()== expVal
&&
5258 aStrBuf
.getLength() == expVal
.getLength()
5265 OStringBuffer
aStrBuf( arrOUS
[1] );
5266 OString
expVal( aStrBuf
.getStr() );
5267 sal_Int32 input
= kSInt8Max
;
5268 sal_Int16 radix
= 8;
5270 expVal
+= OString( "177" );
5271 aStrBuf
.append( input
, radix
);
5273 CPPUNIT_ASSERT_MESSAGE
5275 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
5276 aStrBuf
.getStr()== expVal
&&
5277 aStrBuf
.getLength() == expVal
.getLength()
5284 OStringBuffer
aStrBuf( arrOUS
[1] );
5285 OString
expVal( aStrBuf
.getStr() );
5286 sal_Int32 input
= kSInt32Max
;
5287 sal_Int16 radix
= 8;
5289 expVal
+= OString( "17777777777" );
5290 aStrBuf
.append( input
, radix
);
5292 CPPUNIT_ASSERT_MESSAGE
5294 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
5295 aStrBuf
.getStr()== expVal
&&
5296 aStrBuf
.getLength() == expVal
.getLength()
5303 OStringBuffer
aStrBuf( arrOUS
[1] );
5304 OString
expVal( aStrBuf
.getStr() );
5305 sal_Int32 input
= kSInt8Max
;
5306 sal_Int16 radix
= 10;
5308 expVal
+= OString( "127" );
5309 aStrBuf
.append( input
, radix
);
5311 CPPUNIT_ASSERT_MESSAGE
5313 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
5314 aStrBuf
.getStr()== expVal
&&
5315 aStrBuf
.getLength() == expVal
.getLength()
5322 OStringBuffer
aStrBuf( arrOUS
[1] );
5323 OString
expVal( aStrBuf
.getStr() );
5324 sal_Int32 input
= kSInt32Max
;
5325 sal_Int16 radix
= 10;
5327 expVal
+= OString( "2147483647" );
5328 aStrBuf
.append( input
, radix
);
5330 CPPUNIT_ASSERT_MESSAGE
5332 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
5333 aStrBuf
.getStr()== expVal
&&
5334 aStrBuf
.getLength() == expVal
.getLength()
5341 OStringBuffer
aStrBuf( arrOUS
[1] );
5342 OString
expVal( aStrBuf
.getStr() );
5343 sal_Int32 input
= kSInt8Max
;
5344 sal_Int16 radix
= 16;
5346 expVal
+= OString( "7f" );
5347 aStrBuf
.append( input
, radix
);
5349 CPPUNIT_ASSERT_MESSAGE
5351 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
5352 aStrBuf
.getStr()== expVal
&&
5353 aStrBuf
.getLength() == expVal
.getLength()
5360 OStringBuffer
aStrBuf( arrOUS
[1] );
5361 OString
expVal( aStrBuf
.getStr() );
5362 sal_Int32 input
= kSInt32Max
;
5363 sal_Int16 radix
= 16;
5365 expVal
+= OString( "7fffffff" );
5366 aStrBuf
.append( input
, radix
);
5368 CPPUNIT_ASSERT_MESSAGE
5370 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
5371 aStrBuf
.getStr()== expVal
&&
5372 aStrBuf
.getLength() == expVal
.getLength()
5379 OStringBuffer
aStrBuf( arrOUS
[1] );
5380 OString
expVal( aStrBuf
.getStr() );
5381 sal_Int32 input
= kSInt8Max
;
5382 sal_Int16 radix
= 36;
5384 expVal
+= OString( "3j" );
5385 aStrBuf
.append( input
, radix
);
5387 CPPUNIT_ASSERT_MESSAGE
5389 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
5390 aStrBuf
.getStr()== expVal
&&
5391 aStrBuf
.getLength() == expVal
.getLength()
5398 OStringBuffer
aStrBuf( arrOUS
[1] );
5399 OString
expVal( aStrBuf
.getStr() );
5400 sal_Int32 input
= kSInt32Max
;
5401 sal_Int16 radix
= 36;
5403 expVal
+= OString( "zik0zj" );
5404 aStrBuf
.append( input
, radix
);
5406 CPPUNIT_ASSERT_MESSAGE
5408 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
5409 aStrBuf
.getStr()== expVal
&&
5410 aStrBuf
.getLength() == expVal
.getLength()
5417 OStringBuffer
aStrBuf( arrOUS
[2] );
5418 OString
expVal( aStrBuf
.getStr() );
5419 sal_Int32 input
= kSInt8Max
;
5420 sal_Int16 radix
= 2;
5422 expVal
+= OString( "1111111" );
5423 aStrBuf
.append( input
, radix
);
5425 CPPUNIT_ASSERT_MESSAGE
5427 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
5428 aStrBuf
.getStr()== expVal
&&
5429 aStrBuf
.getLength() == expVal
.getLength()
5436 OStringBuffer
aStrBuf( arrOUS
[2] );
5437 OString
expVal( aStrBuf
.getStr() );
5438 sal_Int32 input
= kSInt32Max
;
5439 sal_Int16 radix
= 2;
5441 expVal
+= OString( "1111111111111111111111111111111" );
5442 aStrBuf
.append( input
, radix
);
5444 CPPUNIT_ASSERT_MESSAGE
5446 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
5447 aStrBuf
.getStr()== expVal
&&
5448 aStrBuf
.getLength() == expVal
.getLength()
5455 OStringBuffer
aStrBuf( arrOUS
[2] );
5456 OString
expVal( aStrBuf
.getStr() );
5457 sal_Int32 input
= kSInt8Max
;
5458 sal_Int16 radix
= 8;
5460 expVal
+= OString( "177" );
5461 aStrBuf
.append( input
, radix
);
5463 CPPUNIT_ASSERT_MESSAGE
5465 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
5466 aStrBuf
.getStr()== expVal
&&
5467 aStrBuf
.getLength() == expVal
.getLength()
5474 OStringBuffer
aStrBuf( arrOUS
[2] );
5475 OString
expVal( aStrBuf
.getStr() );
5476 sal_Int32 input
= kSInt32Max
;
5477 sal_Int16 radix
= 8;
5479 expVal
+= OString( "17777777777" );
5480 aStrBuf
.append( input
, radix
);
5482 CPPUNIT_ASSERT_MESSAGE
5484 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
5485 aStrBuf
.getStr()== expVal
&&
5486 aStrBuf
.getLength() == expVal
.getLength()
5493 OStringBuffer
aStrBuf( arrOUS
[2] );
5494 OString
expVal( aStrBuf
.getStr() );
5495 sal_Int32 input
= kSInt8Max
;
5496 sal_Int16 radix
= 10;
5498 expVal
+= OString( "127" );
5499 aStrBuf
.append( input
, radix
);
5501 CPPUNIT_ASSERT_MESSAGE
5503 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
5504 aStrBuf
.getStr()== expVal
&&
5505 aStrBuf
.getLength() == expVal
.getLength()
5512 OStringBuffer
aStrBuf( arrOUS
[2] );
5513 OString
expVal( aStrBuf
.getStr() );
5514 sal_Int32 input
= kSInt32Max
;
5515 sal_Int16 radix
= 10;
5517 expVal
+= OString( "2147483647" );
5518 aStrBuf
.append( input
, radix
);
5520 CPPUNIT_ASSERT_MESSAGE
5522 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
5523 aStrBuf
.getStr()== expVal
&&
5524 aStrBuf
.getLength() == expVal
.getLength()
5531 OStringBuffer
aStrBuf( arrOUS
[2] );
5532 OString
expVal( aStrBuf
.getStr() );
5533 sal_Int32 input
= kSInt8Max
;
5534 sal_Int16 radix
= 16;
5536 expVal
+= OString( "7f" );
5537 aStrBuf
.append( input
, radix
);
5539 CPPUNIT_ASSERT_MESSAGE
5541 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
5542 aStrBuf
.getStr()== expVal
&&
5543 aStrBuf
.getLength() == expVal
.getLength()
5550 OStringBuffer
aStrBuf( arrOUS
[2] );
5551 OString
expVal( aStrBuf
.getStr() );
5552 sal_Int32 input
= kSInt32Max
;
5553 sal_Int16 radix
= 16;
5555 expVal
+= OString( "7fffffff" );
5556 aStrBuf
.append( input
, radix
);
5558 CPPUNIT_ASSERT_MESSAGE
5560 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
5561 aStrBuf
.getStr()== expVal
&&
5562 aStrBuf
.getLength() == expVal
.getLength()
5569 OStringBuffer
aStrBuf( arrOUS
[2] );
5570 OString
expVal( aStrBuf
.getStr() );
5571 sal_Int32 input
= kSInt8Max
;
5572 sal_Int16 radix
= 36;
5574 expVal
+= OString( "3j" );
5575 aStrBuf
.append( input
, radix
);
5577 CPPUNIT_ASSERT_MESSAGE
5579 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
5580 aStrBuf
.getStr()== expVal
&&
5581 aStrBuf
.getLength() == expVal
.getLength()
5588 OStringBuffer
aStrBuf( arrOUS
[2] );
5589 OString
expVal( aStrBuf
.getStr() );
5590 sal_Int32 input
= kSInt32Max
;
5591 sal_Int16 radix
= 36;
5593 expVal
+= OString( "zik0zj" );
5594 aStrBuf
.append( input
, radix
);
5596 CPPUNIT_ASSERT_MESSAGE
5598 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
5599 aStrBuf
.getStr()== expVal
&&
5600 aStrBuf
.getLength() == expVal
.getLength()
5607 OStringBuffer
aStrBuf( arrOUS
[3] );
5608 OString
expVal( aStrBuf
.getStr() );
5609 sal_Int32 input
= kSInt8Max
;
5610 sal_Int16 radix
= 2;
5612 expVal
+= OString( "1111111" );
5613 aStrBuf
.append( input
, radix
);
5615 CPPUNIT_ASSERT_MESSAGE
5617 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
5618 aStrBuf
.getStr()== expVal
&&
5619 aStrBuf
.getLength() == expVal
.getLength()
5626 OStringBuffer
aStrBuf( arrOUS
[3] );
5627 OString
expVal( aStrBuf
.getStr() );
5628 sal_Int32 input
= kSInt32Max
;
5629 sal_Int16 radix
= 2;
5631 expVal
+= OString( "1111111111111111111111111111111" );
5632 aStrBuf
.append( input
, radix
);
5634 CPPUNIT_ASSERT_MESSAGE
5636 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
5637 aStrBuf
.getStr()== expVal
&&
5638 aStrBuf
.getLength() == expVal
.getLength()
5645 OStringBuffer
aStrBuf( arrOUS
[3] );
5646 OString
expVal( aStrBuf
.getStr() );
5647 sal_Int32 input
= kSInt8Max
;
5648 sal_Int16 radix
= 8;
5650 expVal
+= OString( "177" );
5651 aStrBuf
.append( input
, radix
);
5653 CPPUNIT_ASSERT_MESSAGE
5655 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
5656 aStrBuf
.getStr()== expVal
&&
5657 aStrBuf
.getLength() == expVal
.getLength()
5664 OStringBuffer
aStrBuf( arrOUS
[3] );
5665 OString
expVal( aStrBuf
.getStr() );
5666 sal_Int32 input
= kSInt32Max
;
5667 sal_Int16 radix
= 8;
5669 expVal
+= OString( "17777777777" );
5670 aStrBuf
.append( input
, radix
);
5672 CPPUNIT_ASSERT_MESSAGE
5674 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
5675 aStrBuf
.getStr()== expVal
&&
5676 aStrBuf
.getLength() == expVal
.getLength()
5683 OStringBuffer
aStrBuf( arrOUS
[3] );
5684 OString
expVal( aStrBuf
.getStr() );
5685 sal_Int32 input
= kSInt8Max
;
5686 sal_Int16 radix
= 10;
5688 expVal
+= OString( "127" );
5689 aStrBuf
.append( input
, radix
);
5691 CPPUNIT_ASSERT_MESSAGE
5693 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
5694 aStrBuf
.getStr()== expVal
&&
5695 aStrBuf
.getLength() == expVal
.getLength()
5702 OStringBuffer
aStrBuf( arrOUS
[3] );
5703 OString
expVal( aStrBuf
.getStr() );
5704 sal_Int32 input
= kSInt32Max
;
5705 sal_Int16 radix
= 10;
5707 expVal
+= OString( "2147483647" );
5708 aStrBuf
.append( input
, radix
);
5710 CPPUNIT_ASSERT_MESSAGE
5712 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
5713 aStrBuf
.getStr()== expVal
&&
5714 aStrBuf
.getLength() == expVal
.getLength()
5721 OStringBuffer
aStrBuf( arrOUS
[3] );
5722 OString
expVal( aStrBuf
.getStr() );
5723 sal_Int32 input
= kSInt8Max
;
5724 sal_Int16 radix
= 16;
5726 expVal
+= OString( "7f" );
5727 aStrBuf
.append( input
, radix
);
5729 CPPUNIT_ASSERT_MESSAGE
5731 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
5732 aStrBuf
.getStr()== expVal
&&
5733 aStrBuf
.getLength() == expVal
.getLength()
5740 OStringBuffer
aStrBuf( arrOUS
[3] );
5741 OString
expVal( aStrBuf
.getStr() );
5742 sal_Int32 input
= kSInt32Max
;
5743 sal_Int16 radix
= 16;
5745 expVal
+= OString( "7fffffff" );
5746 aStrBuf
.append( input
, radix
);
5748 CPPUNIT_ASSERT_MESSAGE
5750 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
5751 aStrBuf
.getStr()== expVal
&&
5752 aStrBuf
.getLength() == expVal
.getLength()
5759 OStringBuffer
aStrBuf( arrOUS
[3] );
5760 OString
expVal( aStrBuf
.getStr() );
5761 sal_Int32 input
= kSInt8Max
;
5762 sal_Int16 radix
= 36;
5764 expVal
+= OString( "3j" );
5765 aStrBuf
.append( input
, radix
);
5767 CPPUNIT_ASSERT_MESSAGE
5769 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
5770 aStrBuf
.getStr()== expVal
&&
5771 aStrBuf
.getLength() == expVal
.getLength()
5778 OStringBuffer
aStrBuf( arrOUS
[3] );
5779 OString
expVal( aStrBuf
.getStr() );
5780 sal_Int32 input
= kSInt32Max
;
5781 sal_Int16 radix
= 36;
5783 expVal
+= OString( "zik0zj" );
5784 aStrBuf
.append( input
, radix
);
5786 CPPUNIT_ASSERT_MESSAGE
5788 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
5789 aStrBuf
.getStr()== expVal
&&
5790 aStrBuf
.getLength() == expVal
.getLength()
5797 OStringBuffer
aStrBuf( arrOUS
[4] );
5798 OString
expVal( aStrBuf
.getStr() );
5799 sal_Int32 input
= kSInt8Max
;
5800 sal_Int16 radix
= 2;
5802 expVal
+= OString( "1111111" );
5803 aStrBuf
.append( input
, radix
);
5805 CPPUNIT_ASSERT_MESSAGE
5807 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
5808 aStrBuf
.getStr()== expVal
&&
5809 aStrBuf
.getLength() == expVal
.getLength()
5816 OStringBuffer
aStrBuf( arrOUS
[4] );
5817 OString
expVal( aStrBuf
.getStr() );
5818 sal_Int32 input
= kSInt32Max
;
5819 sal_Int16 radix
= 2;
5821 expVal
+= OString( "1111111111111111111111111111111" );
5822 aStrBuf
.append( input
, radix
);
5824 CPPUNIT_ASSERT_MESSAGE
5826 "append(sal_Int32, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
5827 aStrBuf
.getStr()== expVal
&&
5828 aStrBuf
.getLength() == expVal
.getLength()
5835 OStringBuffer
aStrBuf( arrOUS
[4] );
5836 OString
expVal( aStrBuf
.getStr() );
5837 sal_Int32 input
= kSInt8Max
;
5838 sal_Int16 radix
= 8;
5840 expVal
+= OString( "177" );
5841 aStrBuf
.append( input
, radix
);
5843 CPPUNIT_ASSERT_MESSAGE
5845 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
5846 aStrBuf
.getStr()== expVal
&&
5847 aStrBuf
.getLength() == expVal
.getLength()
5854 OStringBuffer
aStrBuf( arrOUS
[4] );
5855 OString
expVal( aStrBuf
.getStr() );
5856 sal_Int32 input
= kSInt32Max
;
5857 sal_Int16 radix
= 8;
5859 expVal
+= OString( "17777777777" );
5860 aStrBuf
.append( input
, radix
);
5862 CPPUNIT_ASSERT_MESSAGE
5864 "append(sal_Int32, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
5865 aStrBuf
.getStr()== expVal
&&
5866 aStrBuf
.getLength() == expVal
.getLength()
5873 OStringBuffer
aStrBuf( arrOUS
[4] );
5874 OString
expVal( aStrBuf
.getStr() );
5875 sal_Int32 input
= kSInt8Max
;
5876 sal_Int16 radix
= 10;
5878 expVal
+= OString( "127" );
5879 aStrBuf
.append( input
, radix
);
5881 CPPUNIT_ASSERT_MESSAGE
5883 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
5884 aStrBuf
.getStr()== expVal
&&
5885 aStrBuf
.getLength() == expVal
.getLength()
5892 OStringBuffer
aStrBuf( arrOUS
[4] );
5893 OString
expVal( aStrBuf
.getStr() );
5894 sal_Int32 input
= kSInt32Max
;
5895 sal_Int16 radix
= 10;
5897 expVal
+= OString( "2147483647" );
5898 aStrBuf
.append( input
, radix
);
5900 CPPUNIT_ASSERT_MESSAGE
5902 "append(sal_Int32, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
5903 aStrBuf
.getStr()== expVal
&&
5904 aStrBuf
.getLength() == expVal
.getLength()
5911 OStringBuffer
aStrBuf( arrOUS
[4] );
5912 OString
expVal( aStrBuf
.getStr() );
5913 sal_Int32 input
= kSInt8Max
;
5914 sal_Int16 radix
= 16;
5916 expVal
+= OString( "7f" );
5917 aStrBuf
.append( input
, radix
);
5919 CPPUNIT_ASSERT_MESSAGE
5921 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
5922 aStrBuf
.getStr()== expVal
&&
5923 aStrBuf
.getLength() == expVal
.getLength()
5930 OStringBuffer
aStrBuf( arrOUS
[4] );
5931 OString
expVal( aStrBuf
.getStr() );
5932 sal_Int32 input
= kSInt32Max
;
5933 sal_Int16 radix
= 16;
5935 expVal
+= OString( "7fffffff" );
5936 aStrBuf
.append( input
, radix
);
5938 CPPUNIT_ASSERT_MESSAGE
5940 "append(sal_Int32, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
5941 aStrBuf
.getStr()== expVal
&&
5942 aStrBuf
.getLength() == expVal
.getLength()
5949 OStringBuffer
aStrBuf( arrOUS
[4] );
5950 OString
expVal( aStrBuf
.getStr() );
5951 sal_Int32 input
= kSInt8Max
;
5952 sal_Int16 radix
= 36;
5954 expVal
+= OString( "3j" );
5955 aStrBuf
.append( input
, radix
);
5957 CPPUNIT_ASSERT_MESSAGE
5959 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
5960 aStrBuf
.getStr()== expVal
&&
5961 aStrBuf
.getLength() == expVal
.getLength()
5968 OStringBuffer
aStrBuf( arrOUS
[4] );
5969 OString
expVal( aStrBuf
.getStr() );
5970 sal_Int32 input
= kSInt32Max
;
5971 sal_Int16 radix
= 36;
5973 expVal
+= OString( "zik0zj" );
5974 aStrBuf
.append( input
, radix
);
5976 CPPUNIT_ASSERT_MESSAGE
5978 "append(sal_Int32, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
5979 aStrBuf
.getStr()== expVal
&&
5980 aStrBuf
.getLength() == expVal
.getLength()
5985 CPPUNIT_TEST_SUITE( append_006_Int32_Bounderies
);
5986 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
5987 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
5988 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
5989 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
5990 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
5991 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
5992 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
5993 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
5994 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
5995 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
5996 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
5997 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
5998 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
5999 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
6000 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
6001 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
6002 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
6003 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
6004 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
6005 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
6006 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
6007 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
6008 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
6009 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
6010 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
6011 CPPUNIT_TEST_SUITE_END();
6014 // testing the method append( sal_Int32 i, sal_Int16 radix=2 )
6015 // for negative value
6016 // testing the method append( sal_Int32 i, sal_Int16 radix=8 )
6017 // for negative value
6018 // testing the method append( sal_Int32 i, sal_Int16 radix=10 )
6019 // for negative value
6020 // testing the method append( sal_Int32 i, sal_Int16 radix=16 )
6021 // for negative value
6022 // testing the method append( sal_Int32 i, sal_Int16 radix=36 )
6023 // for negative value
6025 class append_006_Int32_Negative
: public CppUnit::TestFixture
6030 void setUp() override
6032 arrOUS
[0] = OString( kTestStr7
);
6033 arrOUS
[1] = OString( );
6034 arrOUS
[2] = OString( kTestStr25
);
6035 arrOUS
[3] = OString( "" );
6036 arrOUS
[4] = OString( kTestStr28
);
6041 OStringBuffer
aStrBuf( arrOUS
[0] );
6042 OString
expVal( aStrBuf
.getStr() );
6043 sal_Int32 input
= -0;
6044 sal_Int16 radix
= 2;
6046 expVal
+= OString( "0" );
6047 aStrBuf
.append( input
, radix
);
6049 CPPUNIT_ASSERT_MESSAGE
6051 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6052 aStrBuf
.getStr()== expVal
&&
6053 aStrBuf
.getLength() == expVal
.getLength()
6060 OStringBuffer
aStrBuf( arrOUS
[0] );
6061 OString
expVal( aStrBuf
.getStr() );
6062 sal_Int32 input
= -4;
6063 sal_Int16 radix
= 2;
6065 expVal
+= OString( "-" );
6066 expVal
+= OString( "100" );
6067 aStrBuf
.append( input
, radix
);
6069 CPPUNIT_ASSERT_MESSAGE
6071 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6072 aStrBuf
.getStr()== expVal
&&
6073 aStrBuf
.getLength() == expVal
.getLength()
6080 OStringBuffer
aStrBuf( arrOUS
[0] );
6081 OString
expVal( aStrBuf
.getStr() );
6082 sal_Int32 input
= -8;
6083 sal_Int16 radix
= 2;
6085 expVal
+= OString( "-" );
6086 expVal
+= OString( "1000" );
6087 aStrBuf
.append( input
, radix
);
6089 CPPUNIT_ASSERT_MESSAGE
6091 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6092 aStrBuf
.getStr()== expVal
&&
6093 aStrBuf
.getLength() == expVal
.getLength()
6100 OStringBuffer
aStrBuf( arrOUS
[0] );
6101 OString
expVal( aStrBuf
.getStr() );
6102 sal_Int32 input
= -15;
6103 sal_Int16 radix
= 2;
6105 expVal
+= OString( "-" );
6106 expVal
+= OString( "1111" );
6107 aStrBuf
.append( input
, radix
);
6109 CPPUNIT_ASSERT_MESSAGE
6111 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
6112 aStrBuf
.getStr()== expVal
&&
6113 aStrBuf
.getLength() == expVal
.getLength()
6120 OStringBuffer
aStrBuf( arrOUS
[0] );
6121 OString
expVal( aStrBuf
.getStr() );
6122 sal_Int32 input
= -0;
6123 sal_Int16 radix
= 8;
6125 expVal
+= OString( "0" );
6126 aStrBuf
.append( input
, radix
);
6128 CPPUNIT_ASSERT_MESSAGE
6130 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6131 aStrBuf
.getStr()== expVal
&&
6132 aStrBuf
.getLength() == expVal
.getLength()
6139 OStringBuffer
aStrBuf( arrOUS
[0] );
6140 OString
expVal( aStrBuf
.getStr() );
6141 sal_Int32 input
= -4;
6142 sal_Int16 radix
= 8;
6144 expVal
+= OString( "-" );
6145 expVal
+= OString( "4" );
6146 aStrBuf
.append( input
, radix
);
6148 CPPUNIT_ASSERT_MESSAGE
6150 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6151 aStrBuf
.getStr()== expVal
&&
6152 aStrBuf
.getLength() == expVal
.getLength()
6159 OStringBuffer
aStrBuf( arrOUS
[0] );
6160 OString
expVal( aStrBuf
.getStr() );
6161 sal_Int32 input
= -8;
6162 sal_Int16 radix
= 8;
6164 expVal
+= OString( "-" );
6165 expVal
+= OString( "10" );
6166 aStrBuf
.append( input
, radix
);
6168 CPPUNIT_ASSERT_MESSAGE
6170 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6171 aStrBuf
.getStr()== expVal
&&
6172 aStrBuf
.getLength() == expVal
.getLength()
6179 OStringBuffer
aStrBuf( arrOUS
[0] );
6180 OString
expVal( aStrBuf
.getStr() );
6181 sal_Int32 input
= -15;
6182 sal_Int16 radix
= 8;
6184 expVal
+= OString( "-" );
6185 expVal
+= OString( "17" );
6186 aStrBuf
.append( input
, radix
);
6188 CPPUNIT_ASSERT_MESSAGE
6190 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
6191 aStrBuf
.getStr()== expVal
&&
6192 aStrBuf
.getLength() == expVal
.getLength()
6199 OStringBuffer
aStrBuf( arrOUS
[0] );
6200 OString
expVal( aStrBuf
.getStr() );
6201 sal_Int32 input
= -0;
6202 sal_Int16 radix
= 10;
6204 expVal
+= OString( "0" );
6205 aStrBuf
.append( input
, radix
);
6207 CPPUNIT_ASSERT_MESSAGE
6209 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6210 aStrBuf
.getStr()== expVal
&&
6211 aStrBuf
.getLength() == expVal
.getLength()
6218 OStringBuffer
aStrBuf( arrOUS
[0] );
6219 OString
expVal( aStrBuf
.getStr() );
6220 sal_Int32 input
= -4;
6221 sal_Int16 radix
= 10;
6223 expVal
+= OString( "-" );
6224 expVal
+= OString( "4" );
6225 aStrBuf
.append( input
, radix
);
6227 CPPUNIT_ASSERT_MESSAGE
6229 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6230 aStrBuf
.getStr()== expVal
&&
6231 aStrBuf
.getLength() == expVal
.getLength()
6238 OStringBuffer
aStrBuf( arrOUS
[0] );
6239 OString
expVal( aStrBuf
.getStr() );
6240 sal_Int32 input
= -8;
6241 sal_Int16 radix
= 10;
6243 expVal
+= OString( "-" );
6244 expVal
+= OString( "8" );
6245 aStrBuf
.append( input
, radix
);
6247 CPPUNIT_ASSERT_MESSAGE
6249 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6250 aStrBuf
.getStr()== expVal
&&
6251 aStrBuf
.getLength() == expVal
.getLength()
6258 OStringBuffer
aStrBuf( arrOUS
[0] );
6259 OString
expVal( aStrBuf
.getStr() );
6260 sal_Int32 input
= -15;
6261 sal_Int16 radix
= 10;
6263 expVal
+= OString( "-" );
6264 expVal
+= OString( "15" );
6265 aStrBuf
.append( input
, radix
);
6267 CPPUNIT_ASSERT_MESSAGE
6269 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
6270 aStrBuf
.getStr()== expVal
&&
6271 aStrBuf
.getLength() == expVal
.getLength()
6278 OStringBuffer
aStrBuf( arrOUS
[0] );
6279 OString
expVal( aStrBuf
.getStr() );
6280 sal_Int32 input
= -0;
6281 sal_Int16 radix
= 16;
6283 expVal
+= OString( "0" );
6284 aStrBuf
.append( input
, radix
);
6286 CPPUNIT_ASSERT_MESSAGE
6288 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6289 aStrBuf
.getStr()== expVal
&&
6290 aStrBuf
.getLength() == expVal
.getLength()
6297 OStringBuffer
aStrBuf( arrOUS
[0] );
6298 OString
expVal( aStrBuf
.getStr() );
6299 sal_Int32 input
= -4;
6300 sal_Int16 radix
= 16;
6302 expVal
+= OString( "-" );
6303 expVal
+= OString( "4" );
6304 aStrBuf
.append( input
, radix
);
6306 CPPUNIT_ASSERT_MESSAGE
6308 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6309 aStrBuf
.getStr()== expVal
&&
6310 aStrBuf
.getLength() == expVal
.getLength()
6317 OStringBuffer
aStrBuf( arrOUS
[0] );
6318 OString
expVal( aStrBuf
.getStr() );
6319 sal_Int32 input
= -8;
6320 sal_Int16 radix
= 16;
6322 expVal
+= OString( "-" );
6323 expVal
+= OString( "8" );
6324 aStrBuf
.append( input
, radix
);
6326 CPPUNIT_ASSERT_MESSAGE
6328 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6329 aStrBuf
.getStr()== expVal
&&
6330 aStrBuf
.getLength() == expVal
.getLength()
6337 OStringBuffer
aStrBuf( arrOUS
[0] );
6338 OString
expVal( aStrBuf
.getStr() );
6339 sal_Int32 input
= -15;
6340 sal_Int16 radix
= 16;
6342 expVal
+= OString( "-" );
6343 expVal
+= OString( "f" );
6344 aStrBuf
.append( input
, radix
);
6346 CPPUNIT_ASSERT_MESSAGE
6348 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
6349 aStrBuf
.getStr()== expVal
&&
6350 aStrBuf
.getLength() == expVal
.getLength()
6357 OStringBuffer
aStrBuf( arrOUS
[0] );
6358 OString
expVal( aStrBuf
.getStr() );
6359 sal_Int32 input
= -0;
6360 sal_Int16 radix
= 36;
6362 expVal
+= OString( "0" );
6363 aStrBuf
.append( input
, radix
);
6365 CPPUNIT_ASSERT_MESSAGE
6367 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6368 aStrBuf
.getStr()== expVal
&&
6369 aStrBuf
.getLength() == expVal
.getLength()
6376 OStringBuffer
aStrBuf( arrOUS
[0] );
6377 OString
expVal( aStrBuf
.getStr() );
6378 sal_Int32 input
= -4;
6379 sal_Int16 radix
= 36;
6381 expVal
+= OString( "-" );
6382 expVal
+= OString( "4" );
6383 aStrBuf
.append( input
, radix
);
6385 CPPUNIT_ASSERT_MESSAGE
6387 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6388 aStrBuf
.getStr()== expVal
&&
6389 aStrBuf
.getLength() == expVal
.getLength()
6396 OStringBuffer
aStrBuf( arrOUS
[0] );
6397 OString
expVal( aStrBuf
.getStr() );
6398 sal_Int32 input
= -8;
6399 sal_Int16 radix
= 36;
6401 expVal
+= OString( "-" );
6402 expVal
+= OString( "8" );
6403 aStrBuf
.append( input
, radix
);
6405 CPPUNIT_ASSERT_MESSAGE
6407 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6408 aStrBuf
.getStr()== expVal
&&
6409 aStrBuf
.getLength() == expVal
.getLength()
6416 OStringBuffer
aStrBuf( arrOUS
[0] );
6417 OString
expVal( aStrBuf
.getStr() );
6418 sal_Int32 input
= -35;
6419 sal_Int16 radix
= 36;
6421 expVal
+= OString( "-" );
6422 expVal
+= OString( "z" );
6423 aStrBuf
.append( input
, radix
);
6425 CPPUNIT_ASSERT_MESSAGE
6427 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
6428 aStrBuf
.getStr()== expVal
&&
6429 aStrBuf
.getLength() == expVal
.getLength()
6436 OStringBuffer
aStrBuf( arrOUS
[1] );
6437 OString
expVal( aStrBuf
.getStr() );
6438 sal_Int32 input
= -0;
6439 sal_Int16 radix
= 2;
6441 expVal
+= OString( "0" );
6442 aStrBuf
.append( input
, radix
);
6444 CPPUNIT_ASSERT_MESSAGE
6446 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6447 aStrBuf
.getStr()== expVal
&&
6448 aStrBuf
.getLength() == expVal
.getLength()
6455 OStringBuffer
aStrBuf( arrOUS
[1] );
6456 OString
expVal( aStrBuf
.getStr() );
6457 sal_Int32 input
= -4;
6458 sal_Int16 radix
= 2;
6460 expVal
+= OString( "-" );
6461 expVal
+= OString( "100" );
6462 aStrBuf
.append( input
, radix
);
6464 CPPUNIT_ASSERT_MESSAGE
6466 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6467 aStrBuf
.getStr()== expVal
&&
6468 aStrBuf
.getLength() == expVal
.getLength()
6475 OStringBuffer
aStrBuf( arrOUS
[1] );
6476 OString
expVal( aStrBuf
.getStr() );
6477 sal_Int32 input
= -8;
6478 sal_Int16 radix
= 2;
6480 expVal
+= OString( "-" );
6481 expVal
+= OString( "1000" );
6482 aStrBuf
.append( input
, radix
);
6484 CPPUNIT_ASSERT_MESSAGE
6486 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6487 aStrBuf
.getStr()== expVal
&&
6488 aStrBuf
.getLength() == expVal
.getLength()
6495 OStringBuffer
aStrBuf( arrOUS
[1] );
6496 OString
expVal( aStrBuf
.getStr() );
6497 sal_Int32 input
= -15;
6498 sal_Int16 radix
= 2;
6500 expVal
+= OString( "-" );
6501 expVal
+= OString( "1111" );
6502 aStrBuf
.append( input
, radix
);
6504 CPPUNIT_ASSERT_MESSAGE
6506 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
6507 aStrBuf
.getStr()== expVal
&&
6508 aStrBuf
.getLength() == expVal
.getLength()
6515 OStringBuffer
aStrBuf( arrOUS
[1] );
6516 OString
expVal( aStrBuf
.getStr() );
6517 sal_Int32 input
= -0;
6518 sal_Int16 radix
= 8;
6520 expVal
+= OString( "0" );
6521 aStrBuf
.append( input
, radix
);
6523 CPPUNIT_ASSERT_MESSAGE
6525 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6526 aStrBuf
.getStr()== expVal
&&
6527 aStrBuf
.getLength() == expVal
.getLength()
6534 OStringBuffer
aStrBuf( arrOUS
[1] );
6535 OString
expVal( aStrBuf
.getStr() );
6536 sal_Int32 input
= -4;
6537 sal_Int16 radix
= 8;
6539 expVal
+= OString( "-" );
6540 expVal
+= OString( "4" );
6541 aStrBuf
.append( input
, radix
);
6543 CPPUNIT_ASSERT_MESSAGE
6545 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6546 aStrBuf
.getStr()== expVal
&&
6547 aStrBuf
.getLength() == expVal
.getLength()
6554 OStringBuffer
aStrBuf( arrOUS
[1] );
6555 OString
expVal( aStrBuf
.getStr() );
6556 sal_Int32 input
= -8;
6557 sal_Int16 radix
= 8;
6559 expVal
+= OString( "-" );
6560 expVal
+= OString( "10" );
6561 aStrBuf
.append( input
, radix
);
6563 CPPUNIT_ASSERT_MESSAGE
6565 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6566 aStrBuf
.getStr()== expVal
&&
6567 aStrBuf
.getLength() == expVal
.getLength()
6574 OStringBuffer
aStrBuf( arrOUS
[1] );
6575 OString
expVal( aStrBuf
.getStr() );
6576 sal_Int32 input
= -15;
6577 sal_Int16 radix
= 8;
6579 expVal
+= OString( "-" );
6580 expVal
+= OString( "17" );
6581 aStrBuf
.append( input
, radix
);
6583 CPPUNIT_ASSERT_MESSAGE
6585 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
6586 aStrBuf
.getStr()== expVal
&&
6587 aStrBuf
.getLength() == expVal
.getLength()
6594 OStringBuffer
aStrBuf( arrOUS
[1] );
6595 OString
expVal( aStrBuf
.getStr() );
6596 sal_Int32 input
= -0;
6597 sal_Int16 radix
= 10;
6599 expVal
+= OString( "0" );
6600 aStrBuf
.append( input
, radix
);
6602 CPPUNIT_ASSERT_MESSAGE
6604 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6605 aStrBuf
.getStr()== expVal
&&
6606 aStrBuf
.getLength() == expVal
.getLength()
6613 OStringBuffer
aStrBuf( arrOUS
[1] );
6614 OString
expVal( aStrBuf
.getStr() );
6615 sal_Int32 input
= -4;
6616 sal_Int16 radix
= 10;
6618 expVal
+= OString( "-" );
6619 expVal
+= OString( "4" );
6620 aStrBuf
.append( input
, radix
);
6622 CPPUNIT_ASSERT_MESSAGE
6624 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6625 aStrBuf
.getStr()== expVal
&&
6626 aStrBuf
.getLength() == expVal
.getLength()
6633 OStringBuffer
aStrBuf( arrOUS
[1] );
6634 OString
expVal( aStrBuf
.getStr() );
6635 sal_Int32 input
= -8;
6636 sal_Int16 radix
= 10;
6638 expVal
+= OString( "-" );
6639 expVal
+= OString( "8" );
6640 aStrBuf
.append( input
, radix
);
6642 CPPUNIT_ASSERT_MESSAGE
6644 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6645 aStrBuf
.getStr()== expVal
&&
6646 aStrBuf
.getLength() == expVal
.getLength()
6653 OStringBuffer
aStrBuf( arrOUS
[1] );
6654 OString
expVal( aStrBuf
.getStr() );
6655 sal_Int32 input
= -15;
6656 sal_Int16 radix
= 10;
6658 expVal
+= OString( "-" );
6659 expVal
+= OString( "15" );
6660 aStrBuf
.append( input
, radix
);
6662 CPPUNIT_ASSERT_MESSAGE
6664 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
6665 aStrBuf
.getStr()== expVal
&&
6666 aStrBuf
.getLength() == expVal
.getLength()
6673 OStringBuffer
aStrBuf( arrOUS
[1] );
6674 OString
expVal( aStrBuf
.getStr() );
6675 sal_Int32 input
= -0;
6676 sal_Int16 radix
= 16;
6678 expVal
+= OString( "0" );
6679 aStrBuf
.append( input
, radix
);
6681 CPPUNIT_ASSERT_MESSAGE
6683 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6684 aStrBuf
.getStr()== expVal
&&
6685 aStrBuf
.getLength() == expVal
.getLength()
6692 OStringBuffer
aStrBuf( arrOUS
[1] );
6693 OString
expVal( aStrBuf
.getStr() );
6694 sal_Int32 input
= -4;
6695 sal_Int16 radix
= 16;
6697 expVal
+= OString( "-" );
6698 expVal
+= OString( "4" );
6699 aStrBuf
.append( input
, radix
);
6701 CPPUNIT_ASSERT_MESSAGE
6703 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6704 aStrBuf
.getStr()== expVal
&&
6705 aStrBuf
.getLength() == expVal
.getLength()
6712 OStringBuffer
aStrBuf( arrOUS
[1] );
6713 OString
expVal( aStrBuf
.getStr() );
6714 sal_Int32 input
= -8;
6715 sal_Int16 radix
= 16;
6717 expVal
+= OString( "-" );
6718 expVal
+= OString( "8" );
6719 aStrBuf
.append( input
, radix
);
6721 CPPUNIT_ASSERT_MESSAGE
6723 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6724 aStrBuf
.getStr()== expVal
&&
6725 aStrBuf
.getLength() == expVal
.getLength()
6732 OStringBuffer
aStrBuf( arrOUS
[1] );
6733 OString
expVal( aStrBuf
.getStr() );
6734 sal_Int32 input
= -15;
6735 sal_Int16 radix
= 16;
6737 expVal
+= OString( "-" );
6738 expVal
+= OString( "f" );
6739 aStrBuf
.append( input
, radix
);
6741 CPPUNIT_ASSERT_MESSAGE
6743 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
6744 aStrBuf
.getStr()== expVal
&&
6745 aStrBuf
.getLength() == expVal
.getLength()
6752 OStringBuffer
aStrBuf( arrOUS
[1] );
6753 OString
expVal( aStrBuf
.getStr() );
6754 sal_Int32 input
= -0;
6755 sal_Int16 radix
= 36;
6757 expVal
+= OString( "0" );
6758 aStrBuf
.append( input
, radix
);
6760 CPPUNIT_ASSERT_MESSAGE
6762 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6763 aStrBuf
.getStr()== expVal
&&
6764 aStrBuf
.getLength() == expVal
.getLength()
6771 OStringBuffer
aStrBuf( arrOUS
[1] );
6772 OString
expVal( aStrBuf
.getStr() );
6773 sal_Int32 input
= -4;
6774 sal_Int16 radix
= 36;
6776 expVal
+= OString( "-" );
6777 expVal
+= OString( "4" );
6778 aStrBuf
.append( input
, radix
);
6780 CPPUNIT_ASSERT_MESSAGE
6782 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6783 aStrBuf
.getStr()== expVal
&&
6784 aStrBuf
.getLength() == expVal
.getLength()
6791 OStringBuffer
aStrBuf( arrOUS
[1] );
6792 OString
expVal( aStrBuf
.getStr() );
6793 sal_Int32 input
= -8;
6794 sal_Int16 radix
= 36;
6796 expVal
+= OString( "-" );
6797 expVal
+= OString( "8" );
6798 aStrBuf
.append( input
, radix
);
6800 CPPUNIT_ASSERT_MESSAGE
6802 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6803 aStrBuf
.getStr()== expVal
&&
6804 aStrBuf
.getLength() == expVal
.getLength()
6811 OStringBuffer
aStrBuf( arrOUS
[1] );
6812 OString
expVal( aStrBuf
.getStr() );
6813 sal_Int32 input
= -35;
6814 sal_Int16 radix
= 36;
6816 expVal
+= OString( "-" );
6817 expVal
+= OString( "z" );
6818 aStrBuf
.append( input
, radix
);
6820 CPPUNIT_ASSERT_MESSAGE
6822 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
6823 aStrBuf
.getStr()== expVal
&&
6824 aStrBuf
.getLength() == expVal
.getLength()
6831 OStringBuffer
aStrBuf( arrOUS
[2] );
6832 OString
expVal( aStrBuf
.getStr() );
6833 sal_Int32 input
= -0;
6834 sal_Int16 radix
= 2;
6836 expVal
+= OString( "0" );
6837 aStrBuf
.append( input
, radix
);
6839 CPPUNIT_ASSERT_MESSAGE
6841 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
6842 aStrBuf
.getStr()== expVal
&&
6843 aStrBuf
.getLength() == expVal
.getLength()
6850 OStringBuffer
aStrBuf( arrOUS
[2] );
6851 OString
expVal( aStrBuf
.getStr() );
6852 sal_Int32 input
= -4;
6853 sal_Int16 radix
= 2;
6855 expVal
+= OString( "-" );
6856 expVal
+= OString( "100" );
6857 aStrBuf
.append( input
, radix
);
6859 CPPUNIT_ASSERT_MESSAGE
6861 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
6862 aStrBuf
.getStr()== expVal
&&
6863 aStrBuf
.getLength() == expVal
.getLength()
6870 OStringBuffer
aStrBuf( arrOUS
[2] );
6871 OString
expVal( aStrBuf
.getStr() );
6872 sal_Int32 input
= -8;
6873 sal_Int16 radix
= 2;
6875 expVal
+= OString( "-" );
6876 expVal
+= OString( "1000" );
6877 aStrBuf
.append( input
, radix
);
6879 CPPUNIT_ASSERT_MESSAGE
6881 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
6882 aStrBuf
.getStr()== expVal
&&
6883 aStrBuf
.getLength() == expVal
.getLength()
6890 OStringBuffer
aStrBuf( arrOUS
[2] );
6891 OString
expVal( aStrBuf
.getStr() );
6892 sal_Int32 input
= -15;
6893 sal_Int16 radix
= 2;
6895 expVal
+= OString( "-" );
6896 expVal
+= OString( "1111" );
6897 aStrBuf
.append( input
, radix
);
6899 CPPUNIT_ASSERT_MESSAGE
6901 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
6902 aStrBuf
.getStr()== expVal
&&
6903 aStrBuf
.getLength() == expVal
.getLength()
6910 OStringBuffer
aStrBuf( arrOUS
[2] );
6911 OString
expVal( aStrBuf
.getStr() );
6912 sal_Int32 input
= -0;
6913 sal_Int16 radix
= 8;
6915 expVal
+= OString( "0" );
6916 aStrBuf
.append( input
, radix
);
6918 CPPUNIT_ASSERT_MESSAGE
6920 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
6921 aStrBuf
.getStr()== expVal
&&
6922 aStrBuf
.getLength() == expVal
.getLength()
6929 OStringBuffer
aStrBuf( arrOUS
[2] );
6930 OString
expVal( aStrBuf
.getStr() );
6931 sal_Int32 input
= -4;
6932 sal_Int16 radix
= 8;
6934 expVal
+= OString( "-" );
6935 expVal
+= OString( "4" );
6936 aStrBuf
.append( input
, radix
);
6938 CPPUNIT_ASSERT_MESSAGE
6940 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
6941 aStrBuf
.getStr()== expVal
&&
6942 aStrBuf
.getLength() == expVal
.getLength()
6949 OStringBuffer
aStrBuf( arrOUS
[2] );
6950 OString
expVal( aStrBuf
.getStr() );
6951 sal_Int32 input
= -8;
6952 sal_Int16 radix
= 8;
6954 expVal
+= OString( "-" );
6955 expVal
+= OString( "10" );
6956 aStrBuf
.append( input
, radix
);
6958 CPPUNIT_ASSERT_MESSAGE
6960 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
6961 aStrBuf
.getStr()== expVal
&&
6962 aStrBuf
.getLength() == expVal
.getLength()
6969 OStringBuffer
aStrBuf( arrOUS
[2] );
6970 OString
expVal( aStrBuf
.getStr() );
6971 sal_Int32 input
= -15;
6972 sal_Int16 radix
= 8;
6974 expVal
+= OString( "-" );
6975 expVal
+= OString( "17" );
6976 aStrBuf
.append( input
, radix
);
6978 CPPUNIT_ASSERT_MESSAGE
6980 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
6981 aStrBuf
.getStr()== expVal
&&
6982 aStrBuf
.getLength() == expVal
.getLength()
6989 OStringBuffer
aStrBuf( arrOUS
[2] );
6990 OString
expVal( aStrBuf
.getStr() );
6991 sal_Int32 input
= -0;
6992 sal_Int16 radix
= 10;
6994 expVal
+= OString( "0" );
6995 aStrBuf
.append( input
, radix
);
6997 CPPUNIT_ASSERT_MESSAGE
6999 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7000 aStrBuf
.getStr()== expVal
&&
7001 aStrBuf
.getLength() == expVal
.getLength()
7008 OStringBuffer
aStrBuf( arrOUS
[2] );
7009 OString
expVal( aStrBuf
.getStr() );
7010 sal_Int32 input
= -4;
7011 sal_Int16 radix
= 10;
7013 expVal
+= OString( "-" );
7014 expVal
+= OString( "4" );
7015 aStrBuf
.append( input
, radix
);
7017 CPPUNIT_ASSERT_MESSAGE
7019 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7020 aStrBuf
.getStr()== expVal
&&
7021 aStrBuf
.getLength() == expVal
.getLength()
7028 OStringBuffer
aStrBuf( arrOUS
[2] );
7029 OString
expVal( aStrBuf
.getStr() );
7030 sal_Int32 input
= -8;
7031 sal_Int16 radix
= 10;
7033 expVal
+= OString( "-" );
7034 expVal
+= OString( "8" );
7035 aStrBuf
.append( input
, radix
);
7037 CPPUNIT_ASSERT_MESSAGE
7039 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7040 aStrBuf
.getStr()== expVal
&&
7041 aStrBuf
.getLength() == expVal
.getLength()
7048 OStringBuffer
aStrBuf( arrOUS
[2] );
7049 OString
expVal( aStrBuf
.getStr() );
7050 sal_Int32 input
= -15;
7051 sal_Int16 radix
= 10;
7053 expVal
+= OString( "-" );
7054 expVal
+= OString( "15" );
7055 aStrBuf
.append( input
, radix
);
7057 CPPUNIT_ASSERT_MESSAGE
7059 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
7060 aStrBuf
.getStr()== expVal
&&
7061 aStrBuf
.getLength() == expVal
.getLength()
7068 OStringBuffer
aStrBuf( arrOUS
[2] );
7069 OString
expVal( aStrBuf
.getStr() );
7070 sal_Int32 input
= -0;
7071 sal_Int16 radix
= 16;
7073 expVal
+= OString( "0" );
7074 aStrBuf
.append( input
, radix
);
7076 CPPUNIT_ASSERT_MESSAGE
7078 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7079 aStrBuf
.getStr()== expVal
&&
7080 aStrBuf
.getLength() == expVal
.getLength()
7087 OStringBuffer
aStrBuf( arrOUS
[2] );
7088 OString
expVal( aStrBuf
.getStr() );
7089 sal_Int32 input
= -4;
7090 sal_Int16 radix
= 16;
7092 expVal
+= OString( "-" );
7093 expVal
+= OString( "4" );
7094 aStrBuf
.append( input
, radix
);
7096 CPPUNIT_ASSERT_MESSAGE
7098 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7099 aStrBuf
.getStr()== expVal
&&
7100 aStrBuf
.getLength() == expVal
.getLength()
7107 OStringBuffer
aStrBuf( arrOUS
[2] );
7108 OString
expVal( aStrBuf
.getStr() );
7109 sal_Int32 input
= -8;
7110 sal_Int16 radix
= 16;
7112 expVal
+= OString( "-" );
7113 expVal
+= OString( "8" );
7114 aStrBuf
.append( input
, radix
);
7116 CPPUNIT_ASSERT_MESSAGE
7118 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7119 aStrBuf
.getStr()== expVal
&&
7120 aStrBuf
.getLength() == expVal
.getLength()
7127 OStringBuffer
aStrBuf( arrOUS
[2] );
7128 OString
expVal( aStrBuf
.getStr() );
7129 sal_Int32 input
= -15;
7130 sal_Int16 radix
= 16;
7132 expVal
+= OString( "-" );
7133 expVal
+= OString( "f" );
7134 aStrBuf
.append( input
, radix
);
7136 CPPUNIT_ASSERT_MESSAGE
7138 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
7139 aStrBuf
.getStr()== expVal
&&
7140 aStrBuf
.getLength() == expVal
.getLength()
7147 OStringBuffer
aStrBuf( arrOUS
[2] );
7148 OString
expVal( aStrBuf
.getStr() );
7149 sal_Int32 input
= -0;
7150 sal_Int16 radix
= 36;
7152 expVal
+= OString( "0" );
7153 aStrBuf
.append( input
, radix
);
7155 CPPUNIT_ASSERT_MESSAGE
7157 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7158 aStrBuf
.getStr()== expVal
&&
7159 aStrBuf
.getLength() == expVal
.getLength()
7166 OStringBuffer
aStrBuf( arrOUS
[2] );
7167 OString
expVal( aStrBuf
.getStr() );
7168 sal_Int32 input
= -4;
7169 sal_Int16 radix
= 36;
7171 expVal
+= OString( "-" );
7172 expVal
+= OString( "4" );
7173 aStrBuf
.append( input
, radix
);
7175 CPPUNIT_ASSERT_MESSAGE
7177 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7178 aStrBuf
.getStr()== expVal
&&
7179 aStrBuf
.getLength() == expVal
.getLength()
7186 OStringBuffer
aStrBuf( arrOUS
[2] );
7187 OString
expVal( aStrBuf
.getStr() );
7188 sal_Int32 input
= -8;
7189 sal_Int16 radix
= 36;
7191 expVal
+= OString( "-" );
7192 expVal
+= OString( "8" );
7193 aStrBuf
.append( input
, radix
);
7195 CPPUNIT_ASSERT_MESSAGE
7197 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7198 aStrBuf
.getStr()== expVal
&&
7199 aStrBuf
.getLength() == expVal
.getLength()
7206 OStringBuffer
aStrBuf( arrOUS
[2] );
7207 OString
expVal( aStrBuf
.getStr() );
7208 sal_Int32 input
= -35;
7209 sal_Int16 radix
= 36;
7211 expVal
+= OString( "-" );
7212 expVal
+= OString( "z" );
7213 aStrBuf
.append( input
, radix
);
7215 CPPUNIT_ASSERT_MESSAGE
7217 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
7218 aStrBuf
.getStr()== expVal
&&
7219 aStrBuf
.getLength() == expVal
.getLength()
7226 OStringBuffer
aStrBuf( arrOUS
[3] );
7227 OString
expVal( aStrBuf
.getStr() );
7228 sal_Int32 input
= -0;
7229 sal_Int16 radix
= 2;
7231 expVal
+= OString( "0" );
7232 aStrBuf
.append( input
, radix
);
7234 CPPUNIT_ASSERT_MESSAGE
7236 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7237 aStrBuf
.getStr()== expVal
&&
7238 aStrBuf
.getLength() == expVal
.getLength()
7245 OStringBuffer
aStrBuf( arrOUS
[3] );
7246 OString
expVal( aStrBuf
.getStr() );
7247 sal_Int32 input
= -4;
7248 sal_Int16 radix
= 2;
7250 expVal
+= OString( "-" );
7251 expVal
+= OString( "100" );
7252 aStrBuf
.append( input
, radix
);
7254 CPPUNIT_ASSERT_MESSAGE
7256 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7257 aStrBuf
.getStr()== expVal
&&
7258 aStrBuf
.getLength() == expVal
.getLength()
7265 OStringBuffer
aStrBuf( arrOUS
[3] );
7266 OString
expVal( aStrBuf
.getStr() );
7267 sal_Int32 input
= -8;
7268 sal_Int16 radix
= 2;
7270 expVal
+= OString( "-" );
7271 expVal
+= OString( "1000" );
7272 aStrBuf
.append( input
, radix
);
7274 CPPUNIT_ASSERT_MESSAGE
7276 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7277 aStrBuf
.getStr()== expVal
&&
7278 aStrBuf
.getLength() == expVal
.getLength()
7285 OStringBuffer
aStrBuf( arrOUS
[3] );
7286 OString
expVal( aStrBuf
.getStr() );
7287 sal_Int32 input
= -15;
7288 sal_Int16 radix
= 2;
7290 expVal
+= OString( "-" );
7291 expVal
+= OString( "1111" );
7292 aStrBuf
.append( input
, radix
);
7294 CPPUNIT_ASSERT_MESSAGE
7296 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
7297 aStrBuf
.getStr()== expVal
&&
7298 aStrBuf
.getLength() == expVal
.getLength()
7305 OStringBuffer
aStrBuf( arrOUS
[3] );
7306 OString
expVal( aStrBuf
.getStr() );
7307 sal_Int32 input
= -0;
7308 sal_Int16 radix
= 8;
7310 expVal
+= OString( "0" );
7311 aStrBuf
.append( input
, radix
);
7313 CPPUNIT_ASSERT_MESSAGE
7315 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7316 aStrBuf
.getStr()== expVal
&&
7317 aStrBuf
.getLength() == expVal
.getLength()
7324 OStringBuffer
aStrBuf( arrOUS
[3] );
7325 OString
expVal( aStrBuf
.getStr() );
7326 sal_Int32 input
= -4;
7327 sal_Int16 radix
= 8;
7329 expVal
+= OString( "-" );
7330 expVal
+= OString( "4" );
7331 aStrBuf
.append( input
, radix
);
7333 CPPUNIT_ASSERT_MESSAGE
7335 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7336 aStrBuf
.getStr()== expVal
&&
7337 aStrBuf
.getLength() == expVal
.getLength()
7344 OStringBuffer
aStrBuf( arrOUS
[3] );
7345 OString
expVal( aStrBuf
.getStr() );
7346 sal_Int32 input
= -8;
7347 sal_Int16 radix
= 8;
7349 expVal
+= OString( "-" );
7350 expVal
+= OString( "10" );
7351 aStrBuf
.append( input
, radix
);
7353 CPPUNIT_ASSERT_MESSAGE
7355 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7356 aStrBuf
.getStr()== expVal
&&
7357 aStrBuf
.getLength() == expVal
.getLength()
7364 OStringBuffer
aStrBuf( arrOUS
[3] );
7365 OString
expVal( aStrBuf
.getStr() );
7366 sal_Int32 input
= -15;
7367 sal_Int16 radix
= 8;
7369 expVal
+= OString( "-" );
7370 expVal
+= OString( "17" );
7371 aStrBuf
.append( input
, radix
);
7373 CPPUNIT_ASSERT_MESSAGE
7375 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
7376 aStrBuf
.getStr()== expVal
&&
7377 aStrBuf
.getLength() == expVal
.getLength()
7384 OStringBuffer
aStrBuf( arrOUS
[3] );
7385 OString
expVal( aStrBuf
.getStr() );
7386 sal_Int32 input
= -0;
7387 sal_Int16 radix
= 10;
7389 expVal
+= OString( "0" );
7390 aStrBuf
.append( input
, radix
);
7392 CPPUNIT_ASSERT_MESSAGE
7394 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7395 aStrBuf
.getStr()== expVal
&&
7396 aStrBuf
.getLength() == expVal
.getLength()
7403 OStringBuffer
aStrBuf( arrOUS
[3] );
7404 OString
expVal( aStrBuf
.getStr() );
7405 sal_Int32 input
= -4;
7406 sal_Int16 radix
= 10;
7408 expVal
+= OString( "-" );
7409 expVal
+= OString( "4" );
7410 aStrBuf
.append( input
, radix
);
7412 CPPUNIT_ASSERT_MESSAGE
7414 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7415 aStrBuf
.getStr()== expVal
&&
7416 aStrBuf
.getLength() == expVal
.getLength()
7423 OStringBuffer
aStrBuf( arrOUS
[3] );
7424 OString
expVal( aStrBuf
.getStr() );
7425 sal_Int32 input
= -8;
7426 sal_Int16 radix
= 10;
7428 expVal
+= OString( "-" );
7429 expVal
+= OString( "8" );
7430 aStrBuf
.append( input
, radix
);
7432 CPPUNIT_ASSERT_MESSAGE
7434 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7435 aStrBuf
.getStr()== expVal
&&
7436 aStrBuf
.getLength() == expVal
.getLength()
7443 OStringBuffer
aStrBuf( arrOUS
[3] );
7444 OString
expVal( aStrBuf
.getStr() );
7445 sal_Int32 input
= -15;
7446 sal_Int16 radix
= 10;
7448 expVal
+= OString( "-" );
7449 expVal
+= OString( "15" );
7450 aStrBuf
.append( input
, radix
);
7452 CPPUNIT_ASSERT_MESSAGE
7454 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
7455 aStrBuf
.getStr()== expVal
&&
7456 aStrBuf
.getLength() == expVal
.getLength()
7463 OStringBuffer
aStrBuf( arrOUS
[3] );
7464 OString
expVal( aStrBuf
.getStr() );
7465 sal_Int32 input
= -0;
7466 sal_Int16 radix
= 16;
7468 expVal
+= OString( "0" );
7469 aStrBuf
.append( input
, radix
);
7471 CPPUNIT_ASSERT_MESSAGE
7473 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7474 aStrBuf
.getStr()== expVal
&&
7475 aStrBuf
.getLength() == expVal
.getLength()
7482 OStringBuffer
aStrBuf( arrOUS
[3] );
7483 OString
expVal( aStrBuf
.getStr() );
7484 sal_Int32 input
= -4;
7485 sal_Int16 radix
= 16;
7487 expVal
+= OString( "-" );
7488 expVal
+= OString( "4" );
7489 aStrBuf
.append( input
, radix
);
7491 CPPUNIT_ASSERT_MESSAGE
7493 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7494 aStrBuf
.getStr()== expVal
&&
7495 aStrBuf
.getLength() == expVal
.getLength()
7502 OStringBuffer
aStrBuf( arrOUS
[3] );
7503 OString
expVal( aStrBuf
.getStr() );
7504 sal_Int32 input
= -8;
7505 sal_Int16 radix
= 16;
7507 expVal
+= OString( "-" );
7508 expVal
+= OString( "8" );
7509 aStrBuf
.append( input
, radix
);
7511 CPPUNIT_ASSERT_MESSAGE
7513 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7514 aStrBuf
.getStr()== expVal
&&
7515 aStrBuf
.getLength() == expVal
.getLength()
7522 OStringBuffer
aStrBuf( arrOUS
[3] );
7523 OString
expVal( aStrBuf
.getStr() );
7524 sal_Int32 input
= -15;
7525 sal_Int16 radix
= 16;
7527 expVal
+= OString( "-" );
7528 expVal
+= OString( "f" );
7529 aStrBuf
.append( input
, radix
);
7531 CPPUNIT_ASSERT_MESSAGE
7533 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
7534 aStrBuf
.getStr()== expVal
&&
7535 aStrBuf
.getLength() == expVal
.getLength()
7542 OStringBuffer
aStrBuf( arrOUS
[3] );
7543 OString
expVal( aStrBuf
.getStr() );
7544 sal_Int32 input
= -0;
7545 sal_Int16 radix
= 36;
7547 expVal
+= OString( "0" );
7548 aStrBuf
.append( input
, radix
);
7550 CPPUNIT_ASSERT_MESSAGE
7552 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7553 aStrBuf
.getStr()== expVal
&&
7554 aStrBuf
.getLength() == expVal
.getLength()
7561 OStringBuffer
aStrBuf( arrOUS
[3] );
7562 OString
expVal( aStrBuf
.getStr() );
7563 sal_Int32 input
= -4;
7564 sal_Int16 radix
= 36;
7566 expVal
+= OString( "-" );
7567 expVal
+= OString( "4" );
7568 aStrBuf
.append( input
, radix
);
7570 CPPUNIT_ASSERT_MESSAGE
7572 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7573 aStrBuf
.getStr()== expVal
&&
7574 aStrBuf
.getLength() == expVal
.getLength()
7581 OStringBuffer
aStrBuf( arrOUS
[3] );
7582 OString
expVal( aStrBuf
.getStr() );
7583 sal_Int32 input
= -8;
7584 sal_Int16 radix
= 36;
7586 expVal
+= OString( "-" );
7587 expVal
+= OString( "8" );
7588 aStrBuf
.append( input
, radix
);
7590 CPPUNIT_ASSERT_MESSAGE
7592 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7593 aStrBuf
.getStr()== expVal
&&
7594 aStrBuf
.getLength() == expVal
.getLength()
7601 OStringBuffer
aStrBuf( arrOUS
[3] );
7602 OString
expVal( aStrBuf
.getStr() );
7603 sal_Int32 input
= -35;
7604 sal_Int16 radix
= 36;
7606 expVal
+= OString( "-" );
7607 expVal
+= OString( "z" );
7608 aStrBuf
.append( input
, radix
);
7610 CPPUNIT_ASSERT_MESSAGE
7612 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
7613 aStrBuf
.getStr()== expVal
&&
7614 aStrBuf
.getLength() == expVal
.getLength()
7621 OStringBuffer
aStrBuf( arrOUS
[4] );
7622 OString
expVal( aStrBuf
.getStr() );
7623 sal_Int32 input
= -0;
7624 sal_Int16 radix
= 2;
7626 expVal
+= OString( "0" );
7627 aStrBuf
.append( input
, radix
);
7629 CPPUNIT_ASSERT_MESSAGE
7631 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7632 aStrBuf
.getStr()== expVal
&&
7633 aStrBuf
.getLength() == expVal
.getLength()
7640 OStringBuffer
aStrBuf( arrOUS
[4] );
7641 OString
expVal( aStrBuf
.getStr() );
7642 sal_Int32 input
= -4;
7643 sal_Int16 radix
= 2;
7645 expVal
+= OString( "-" );
7646 expVal
+= OString( "100" );
7647 aStrBuf
.append( input
, radix
);
7649 CPPUNIT_ASSERT_MESSAGE
7651 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7652 aStrBuf
.getStr()== expVal
&&
7653 aStrBuf
.getLength() == expVal
.getLength()
7660 OStringBuffer
aStrBuf( arrOUS
[4] );
7661 OString
expVal( aStrBuf
.getStr() );
7662 sal_Int32 input
= -8;
7663 sal_Int16 radix
= 2;
7665 expVal
+= OString( "-" );
7666 expVal
+= OString( "1000" );
7667 aStrBuf
.append( input
, radix
);
7669 CPPUNIT_ASSERT_MESSAGE
7671 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7672 aStrBuf
.getStr()== expVal
&&
7673 aStrBuf
.getLength() == expVal
.getLength()
7680 OStringBuffer
aStrBuf( arrOUS
[4] );
7681 OString
expVal( aStrBuf
.getStr() );
7682 sal_Int32 input
= -15;
7683 sal_Int16 radix
= 2;
7685 expVal
+= OString( "-" );
7686 expVal
+= OString( "1111" );
7687 aStrBuf
.append( input
, radix
);
7689 CPPUNIT_ASSERT_MESSAGE
7691 "append(sal_Int32, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
7692 aStrBuf
.getStr()== expVal
&&
7693 aStrBuf
.getLength() == expVal
.getLength()
7700 OStringBuffer
aStrBuf( arrOUS
[4] );
7701 OString
expVal( aStrBuf
.getStr() );
7702 sal_Int32 input
= -0;
7703 sal_Int16 radix
= 8;
7705 expVal
+= OString( "0" );
7706 aStrBuf
.append( input
, radix
);
7708 CPPUNIT_ASSERT_MESSAGE
7710 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7711 aStrBuf
.getStr()== expVal
&&
7712 aStrBuf
.getLength() == expVal
.getLength()
7719 OStringBuffer
aStrBuf( arrOUS
[4] );
7720 OString
expVal( aStrBuf
.getStr() );
7721 sal_Int32 input
= -4;
7722 sal_Int16 radix
= 8;
7724 expVal
+= OString( "-" );
7725 expVal
+= OString( "4" );
7726 aStrBuf
.append( input
, radix
);
7728 CPPUNIT_ASSERT_MESSAGE
7730 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7731 aStrBuf
.getStr()== expVal
&&
7732 aStrBuf
.getLength() == expVal
.getLength()
7739 OStringBuffer
aStrBuf( arrOUS
[4] );
7740 OString
expVal( aStrBuf
.getStr() );
7741 sal_Int32 input
= -8;
7742 sal_Int16 radix
= 8;
7744 expVal
+= OString( "-" );
7745 expVal
+= OString( "10" );
7746 aStrBuf
.append( input
, radix
);
7748 CPPUNIT_ASSERT_MESSAGE
7750 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7751 aStrBuf
.getStr()== expVal
&&
7752 aStrBuf
.getLength() == expVal
.getLength()
7759 OStringBuffer
aStrBuf( arrOUS
[4] );
7760 OString
expVal( aStrBuf
.getStr() );
7761 sal_Int32 input
= -15;
7762 sal_Int16 radix
= 8;
7764 expVal
+= OString( "-" );
7765 expVal
+= OString( "17" );
7766 aStrBuf
.append( input
, radix
);
7768 CPPUNIT_ASSERT_MESSAGE
7770 "append(sal_Int32, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
7771 aStrBuf
.getStr()== expVal
&&
7772 aStrBuf
.getLength() == expVal
.getLength()
7779 OStringBuffer
aStrBuf( arrOUS
[4] );
7780 OString
expVal( aStrBuf
.getStr() );
7781 sal_Int32 input
= -0;
7782 sal_Int16 radix
= 10;
7784 expVal
+= OString( "0" );
7785 aStrBuf
.append( input
, radix
);
7787 CPPUNIT_ASSERT_MESSAGE
7789 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
7790 aStrBuf
.getStr()== expVal
&&
7791 aStrBuf
.getLength() == expVal
.getLength()
7798 OStringBuffer
aStrBuf( arrOUS
[4] );
7799 OString
expVal( aStrBuf
.getStr() );
7800 sal_Int32 input
= -4;
7801 sal_Int16 radix
= 10;
7803 expVal
+= OString( "-" );
7804 expVal
+= OString( "4" );
7805 aStrBuf
.append( input
, radix
);
7807 CPPUNIT_ASSERT_MESSAGE
7809 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
7810 aStrBuf
.getStr()== expVal
&&
7811 aStrBuf
.getLength() == expVal
.getLength()
7818 OStringBuffer
aStrBuf( arrOUS
[4] );
7819 OString
expVal( aStrBuf
.getStr() );
7820 sal_Int32 input
= -8;
7821 sal_Int16 radix
= 10;
7823 expVal
+= OString( "-" );
7824 expVal
+= OString( "8" );
7825 aStrBuf
.append( input
, radix
);
7827 CPPUNIT_ASSERT_MESSAGE
7829 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
7830 aStrBuf
.getStr()== expVal
&&
7831 aStrBuf
.getLength() == expVal
.getLength()
7838 OStringBuffer
aStrBuf( arrOUS
[4] );
7839 OString
expVal( aStrBuf
.getStr() );
7840 sal_Int32 input
= -15;
7841 sal_Int16 radix
= 10;
7843 expVal
+= OString( "-" );
7844 expVal
+= OString( "15" );
7845 aStrBuf
.append( input
, radix
);
7847 CPPUNIT_ASSERT_MESSAGE
7849 "append(sal_Int32, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
7850 aStrBuf
.getStr()== expVal
&&
7851 aStrBuf
.getLength() == expVal
.getLength()
7858 OStringBuffer
aStrBuf( arrOUS
[4] );
7859 OString
expVal( aStrBuf
.getStr() );
7860 sal_Int32 input
= -0;
7861 sal_Int16 radix
= 16;
7863 expVal
+= OString( "0" );
7864 aStrBuf
.append( input
, radix
);
7866 CPPUNIT_ASSERT_MESSAGE
7868 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
7869 aStrBuf
.getStr()== expVal
&&
7870 aStrBuf
.getLength() == expVal
.getLength()
7877 OStringBuffer
aStrBuf( arrOUS
[4] );
7878 OString
expVal( aStrBuf
.getStr() );
7879 sal_Int32 input
= -4;
7880 sal_Int16 radix
= 16;
7882 expVal
+= OString( "-" );
7883 expVal
+= OString( "4" );
7884 aStrBuf
.append( input
, radix
);
7886 CPPUNIT_ASSERT_MESSAGE
7888 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
7889 aStrBuf
.getStr()== expVal
&&
7890 aStrBuf
.getLength() == expVal
.getLength()
7897 OStringBuffer
aStrBuf( arrOUS
[4] );
7898 OString
expVal( aStrBuf
.getStr() );
7899 sal_Int32 input
= -8;
7900 sal_Int16 radix
= 16;
7902 expVal
+= OString( "-" );
7903 expVal
+= OString( "8" );
7904 aStrBuf
.append( input
, radix
);
7906 CPPUNIT_ASSERT_MESSAGE
7908 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
7909 aStrBuf
.getStr()== expVal
&&
7910 aStrBuf
.getLength() == expVal
.getLength()
7917 OStringBuffer
aStrBuf( arrOUS
[4] );
7918 OString
expVal( aStrBuf
.getStr() );
7919 sal_Int32 input
= -15;
7920 sal_Int16 radix
= 16;
7922 expVal
+= OString( "-" );
7923 expVal
+= OString( "f" );
7924 aStrBuf
.append( input
, radix
);
7926 CPPUNIT_ASSERT_MESSAGE
7928 "append(sal_Int32, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
7929 aStrBuf
.getStr()== expVal
&&
7930 aStrBuf
.getLength() == expVal
.getLength()
7937 OStringBuffer
aStrBuf( arrOUS
[4] );
7938 OString
expVal( aStrBuf
.getStr() );
7939 sal_Int32 input
= -0;
7940 sal_Int16 radix
= 36;
7942 expVal
+= OString( "0" );
7943 aStrBuf
.append( input
, radix
);
7945 CPPUNIT_ASSERT_MESSAGE
7947 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
7948 aStrBuf
.getStr()== expVal
&&
7949 aStrBuf
.getLength() == expVal
.getLength()
7956 OStringBuffer
aStrBuf( arrOUS
[4] );
7957 OString
expVal( aStrBuf
.getStr() );
7958 sal_Int32 input
= -4;
7959 sal_Int16 radix
= 36;
7961 expVal
+= OString( "-" );
7962 expVal
+= OString( "4" );
7963 aStrBuf
.append( input
, radix
);
7965 CPPUNIT_ASSERT_MESSAGE
7967 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
7968 aStrBuf
.getStr()== expVal
&&
7969 aStrBuf
.getLength() == expVal
.getLength()
7975 OStringBuffer
aStrBuf( arrOUS
[4] );
7976 OString
expVal( aStrBuf
.getStr() );
7977 sal_Int32 input
= -8;
7978 sal_Int16 radix
= 36;
7980 expVal
+= OString( "-" );
7981 expVal
+= OString( "8" );
7982 aStrBuf
.append( input
, radix
);
7984 CPPUNIT_ASSERT_MESSAGE
7986 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
7987 aStrBuf
.getStr()== expVal
&&
7988 aStrBuf
.getLength() == expVal
.getLength()
7994 OStringBuffer
aStrBuf( arrOUS
[4] );
7995 OString
expVal( aStrBuf
.getStr() );
7996 sal_Int32 input
= -35;
7997 sal_Int16 radix
= 36;
7999 expVal
+= OString( "-" );
8000 expVal
+= OString( "z" );
8001 aStrBuf
.append( input
, radix
);
8003 CPPUNIT_ASSERT_MESSAGE
8005 "append(sal_Int32, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
8006 aStrBuf
.getStr()== expVal
&&
8007 aStrBuf
.getLength() == expVal
.getLength()
8011 CPPUNIT_TEST_SUITE( append_006_Int32_Negative
);
8012 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
8013 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
8014 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
8015 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
8016 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
8017 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
8018 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
8019 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
8020 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
8021 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
8022 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
8023 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
8024 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
8025 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
8026 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
8027 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
8028 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
8029 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
8030 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
8031 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
8032 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
8033 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
8034 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
8035 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
8036 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
8037 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
8038 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
8039 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
8040 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
8041 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
8042 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
8043 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
8044 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
8045 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
8046 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
8047 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
8048 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
8049 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
8050 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
8051 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
8052 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
8053 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
8054 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
8055 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
8056 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
8057 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
8058 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
8059 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
8060 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
8061 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
8062 CPPUNIT_TEST_SUITE_END();
8065 class append_006_Int32_defaultParam
: public CppUnit::TestFixture
8070 void setUp() override
8072 arrOUS
[0] = OString( kTestStr7
);
8073 arrOUS
[1] = OString( );
8074 arrOUS
[2] = OString( kTestStr25
);
8075 arrOUS
[3] = OString( "" );
8076 arrOUS
[4] = OString( kTestStr28
);
8081 OStringBuffer
aStrBuf( arrOUS
[0] );
8082 OString
expVal( kTestStr59
);
8083 sal_Int32 input
= 11;
8085 aStrBuf
.append( input
);
8087 CPPUNIT_ASSERT_MESSAGE
8089 "input Int32 11 and return OStringBuffer[0]+11",
8090 (aStrBuf
.toString() == expVal
&&
8091 aStrBuf
.getLength() == expVal
.getLength())
8098 OStringBuffer
aStrBuf( arrOUS
[0] );
8099 OString
expVal( kTestStr62
);
8100 sal_Int32 input
= 0;
8102 aStrBuf
.append( input
);
8104 CPPUNIT_ASSERT_MESSAGE
8106 "input Int32 0 and return OStringBuffer[0]+0",
8107 (aStrBuf
.toString() == expVal
&&
8108 aStrBuf
.getLength() == expVal
.getLength())
8115 OStringBuffer
aStrBuf( arrOUS
[0] );
8116 OString
expVal( kTestStr63
);
8117 sal_Int32 input
= -11;
8119 aStrBuf
.append( input
);
8121 CPPUNIT_ASSERT_MESSAGE
8123 "input Int32 -11 and return OStringBuffer[0]+(-11)",
8124 (aStrBuf
.toString() == expVal
&&
8125 aStrBuf
.getLength() == expVal
.getLength())
8132 OStringBuffer
aStrBuf( arrOUS
[0] );
8133 OString
expVal( kTestStr64
);
8134 sal_Int32 input
= 2147483647;
8136 aStrBuf
.append( input
);
8138 CPPUNIT_ASSERT_MESSAGE
8140 "input Int32 2147483647 and return OStringBuffer[0]+2147483647",
8141 (aStrBuf
.toString() == expVal
&&
8142 aStrBuf
.getLength() == expVal
.getLength())
8149 OStringBuffer
aStrBuf( arrOUS
[0] );
8150 OString
expVal( kTestStr65
);
8151 sal_Int32 input
= kNonSInt32Max
;
8153 aStrBuf
.append( input
);
8155 CPPUNIT_ASSERT_MESSAGE
8157 "input Int32 -2147483648 and return OStringBuffer[0]+(-2147483648)",
8158 (aStrBuf
.toString() == expVal
&&
8159 aStrBuf
.getLength() == expVal
.getLength())
8166 OStringBuffer
aStrBuf( arrOUS
[1] );
8167 OString
expVal( kTestStr60
);
8168 sal_Int32 input
= 11;
8170 aStrBuf
.append( input
);
8172 CPPUNIT_ASSERT_MESSAGE
8174 "input Int32 11 and return OStringBuffer[1]+11",
8175 (aStrBuf
.toString() == expVal
&&
8176 aStrBuf
.getLength() == expVal
.getLength())
8183 OStringBuffer
aStrBuf( arrOUS
[1] );
8184 OString
expVal( kTestStr66
);
8185 sal_Int32 input
= 0;
8187 aStrBuf
.append( input
);
8189 CPPUNIT_ASSERT_MESSAGE
8191 "input Int32 0 and return OStringBuffer[1]+0",
8192 (aStrBuf
.toString() == expVal
&&
8193 aStrBuf
.getLength() == expVal
.getLength())
8200 OStringBuffer
aStrBuf( arrOUS
[1] );
8201 OString
expVal( kTestStr67
);
8202 sal_Int32 input
= -11;
8204 aStrBuf
.append( input
);
8206 CPPUNIT_ASSERT_MESSAGE
8208 "input Int32 -11 and return OStringBuffer[1]+(-11)",
8209 (aStrBuf
.toString() == expVal
&&
8210 aStrBuf
.getLength() == expVal
.getLength())
8217 OStringBuffer
aStrBuf( arrOUS
[1] );
8218 OString
expVal( kTestStr68
);
8219 sal_Int32 input
= 2147483647;
8221 aStrBuf
.append( input
);
8223 CPPUNIT_ASSERT_MESSAGE
8225 "input Int32 2147483647 and return OStringBuffer[1]+2147483647",
8226 (aStrBuf
.toString() == expVal
&&
8227 aStrBuf
.getLength() == expVal
.getLength())
8234 OStringBuffer
aStrBuf( arrOUS
[1] );
8235 OString
expVal( kTestStr69
);
8236 sal_Int32 input
= SAL_MIN_INT32
/*-2147483648*/;
8238 aStrBuf
.append( input
);
8240 CPPUNIT_ASSERT_MESSAGE
8242 "input Int32 -2147483648 and return OStringBuffer[1]+(-2147483648)",
8243 (aStrBuf
.toString() == expVal
&&
8244 aStrBuf
.getLength() == expVal
.getLength())
8251 OStringBuffer
aStrBuf( arrOUS
[2] );
8252 OString
expVal( kTestStr60
);
8253 sal_Int32 input
= 11;
8255 aStrBuf
.append( input
);
8257 CPPUNIT_ASSERT_MESSAGE
8259 "input Int32 11 and return OStringBuffer[2]+11",
8260 (aStrBuf
.toString() == expVal
&&
8261 aStrBuf
.getLength() == expVal
.getLength())
8268 OStringBuffer
aStrBuf( arrOUS
[2] );
8269 OString
expVal( kTestStr66
);
8270 sal_Int32 input
= 0;
8272 aStrBuf
.append( input
);
8274 CPPUNIT_ASSERT_MESSAGE
8276 "input Int32 0 and return OUStringBuffer[2]+0",
8277 (aStrBuf
.toString() == expVal
&&
8278 aStrBuf
.getLength() == expVal
.getLength())
8285 OStringBuffer
aStrBuf( arrOUS
[2] );
8286 OString
expVal( kTestStr67
);
8287 sal_Int32 input
= -11;
8289 aStrBuf
.append( input
);
8291 CPPUNIT_ASSERT_MESSAGE
8293 "input Int32 -11 and return OUStringBuffer[2]+(-11)",
8294 (aStrBuf
.toString() == expVal
&&
8295 aStrBuf
.getLength() == expVal
.getLength())
8302 OStringBuffer
aStrBuf( arrOUS
[2] );
8303 OString
expVal( kTestStr68
);
8304 sal_Int32 input
= 2147483647;
8306 aStrBuf
.append( input
);
8308 CPPUNIT_ASSERT_MESSAGE
8310 "input Int32 2147483647 and return OStringBuffer[2]+2147483647",
8311 (aStrBuf
.toString() == expVal
&&
8312 aStrBuf
.getLength() == expVal
.getLength())
8319 OStringBuffer
aStrBuf( arrOUS
[2] );
8320 OString
expVal( kTestStr69
);
8321 sal_Int32 input
= SAL_MIN_INT32
;
8323 aStrBuf
.append( input
);
8325 CPPUNIT_ASSERT_MESSAGE
8327 "input Int32 -2147483648 and return OStringBuffer[2]+(-2147483648)",
8328 (aStrBuf
.toString() == expVal
&&
8329 aStrBuf
.getLength() == expVal
.getLength())
8336 OStringBuffer
aStrBuf( arrOUS
[3] );
8337 OString
expVal( kTestStr60
);
8338 sal_Int32 input
= 11;
8340 aStrBuf
.append( input
);
8342 CPPUNIT_ASSERT_MESSAGE
8344 "input Int32 11 and return OStringBuffer[3]+11",
8345 (aStrBuf
.toString() == expVal
&&
8346 aStrBuf
.getLength() == expVal
.getLength())
8353 OStringBuffer
aStrBuf( arrOUS
[3] );
8354 OString
expVal( kTestStr66
);
8355 sal_Int32 input
= 0;
8357 aStrBuf
.append( input
);
8359 CPPUNIT_ASSERT_MESSAGE
8361 "input Int32 0 and return OStringBuffer[3]+0",
8362 (aStrBuf
.toString() == expVal
&&
8363 aStrBuf
.getLength() == expVal
.getLength())
8370 OStringBuffer
aStrBuf( arrOUS
[3] );
8371 OString
expVal( kTestStr67
);
8372 sal_Int32 input
= -11;
8374 aStrBuf
.append( input
);
8376 CPPUNIT_ASSERT_MESSAGE
8378 "input Int32 -11 and return OStringBuffer[3]+(-11)",
8379 (aStrBuf
.toString() == expVal
&&
8380 aStrBuf
.getLength() == expVal
.getLength())
8387 OStringBuffer
aStrBuf( arrOUS
[3] );
8388 OString
expVal( kTestStr68
);
8389 sal_Int32 input
= 2147483647;
8391 aStrBuf
.append( input
);
8393 CPPUNIT_ASSERT_MESSAGE
8395 "input Int32 2147483647 and return OStringBuffer[3]+2147483647",
8396 (aStrBuf
.toString() == expVal
&&
8397 aStrBuf
.getLength() == expVal
.getLength())
8404 OStringBuffer
aStrBuf( arrOUS
[3] );
8405 OString
expVal( kTestStr69
);
8406 sal_Int32 input
= SAL_MIN_INT32
;
8408 aStrBuf
.append( input
);
8410 CPPUNIT_ASSERT_MESSAGE
8412 "input Int32 -2147483648 and return OStringBuffer[3]+(-2147483648)",
8413 (aStrBuf
.toString() == expVal
&&
8414 aStrBuf
.getLength() == expVal
.getLength())
8421 OStringBuffer
aStrBuf( arrOUS
[4] );
8422 OString
expVal( kTestStr61
);
8423 sal_Int32 input
= 11;
8425 aStrBuf
.append( input
);
8427 CPPUNIT_ASSERT_MESSAGE
8429 "input Int32 11 and return OStringBuffer[4]+11",
8430 (aStrBuf
.toString() == expVal
&&
8431 aStrBuf
.getLength() == expVal
.getLength())
8438 OStringBuffer
aStrBuf( arrOUS
[4] );
8439 OString
expVal( kTestStr70
);
8440 sal_Int32 input
= 0;
8442 aStrBuf
.append( input
);
8444 CPPUNIT_ASSERT_MESSAGE
8446 "input Int32 0 and return OStringBuffer[4]+0",
8447 (aStrBuf
.toString() == expVal
&&
8448 aStrBuf
.getLength() == expVal
.getLength())
8455 OStringBuffer
aStrBuf( arrOUS
[4] );
8456 OString
expVal( kTestStr71
);
8457 sal_Int32 input
= -11;
8459 aStrBuf
.append( input
);
8461 CPPUNIT_ASSERT_MESSAGE
8463 "input Int32 -11 and return OStringBuffer[4]+(-11)",
8464 (aStrBuf
.toString() == expVal
&&
8465 aStrBuf
.getLength() == expVal
.getLength())
8472 OStringBuffer
aStrBuf( arrOUS
[4] );
8473 OString
expVal( kTestStr72
);
8474 sal_Int32 input
= 2147483647;
8476 aStrBuf
.append( input
);
8478 CPPUNIT_ASSERT_MESSAGE
8480 "input Int32 2147483647 and return OStringBuffer[4]+2147483647",
8481 (aStrBuf
.toString() == expVal
&&
8482 aStrBuf
.getLength() == expVal
.getLength())
8489 OStringBuffer
aStrBuf( arrOUS
[4] );
8490 OString
expVal( kTestStr73
);
8491 sal_Int32 input
= SAL_MIN_INT32
;
8493 aStrBuf
.append( input
);
8495 CPPUNIT_ASSERT_MESSAGE
8497 "input Int32 -2147483648 and return OStringBuffer[4]+(-2147483648)",
8498 (aStrBuf
.toString() == expVal
&&
8499 aStrBuf
.getLength() == expVal
.getLength())
8506 OStringBuffer
aStrBuf( kSInt32Max
);
8507 OString
expVal( kTestStr60
);
8508 sal_Int32 input
= 11;
8510 aStrBuf
.append( input
);
8512 CPPUNIT_ASSERT_MESSAGE
8514 "input Int32 11 and return OStringBuffer(kSInt32Max)+11",
8515 (aStrBuf
.toString() == expVal
&&
8516 aStrBuf
.getLength() == expVal
.getLength())
8523 OStringBuffer
aStrBuf( kSInt32Max
);
8524 OString
expVal( kTestStr66
);
8525 sal_Int32 input
= 0;
8527 aStrBuf
.append( input
);
8529 CPPUNIT_ASSERT_MESSAGE
8531 "input Int32 0 and return OStringBuffer(kSInt32Max)+0",
8532 (aStrBuf
.toString() == expVal
&&
8533 aStrBuf
.getLength() == expVal
.getLength())
8540 OStringBuffer
aStrBuf( kSInt32Max
);
8541 OString
expVal( kTestStr67
);
8542 sal_Int32 input
= -11;
8544 aStrBuf
.append( input
);
8546 CPPUNIT_ASSERT_MESSAGE
8548 "input Int32 -11 and return OStringBuffer(kSInt32Max)+(-11)",
8549 (aStrBuf
.toString() == expVal
&&
8550 aStrBuf
.getLength() == expVal
.getLength())
8557 OStringBuffer
aStrBuf( kSInt32Max
);
8558 OString
expVal( kTestStr68
);
8559 sal_Int32 input
= 2147483647;
8561 aStrBuf
.append( input
);
8563 CPPUNIT_ASSERT_MESSAGE
8565 "input Int32 2147483647 and return OStringBuffer(kSInt32Max)+2147483647",
8566 (aStrBuf
.toString() == expVal
&&
8567 aStrBuf
.getLength() == expVal
.getLength())
8574 OStringBuffer
aStrBuf( kSInt32Max
);
8575 OString
expVal( kTestStr69
);
8576 sal_Int32 input
= SAL_MIN_INT32
;
8578 aStrBuf
.append( input
);
8580 CPPUNIT_ASSERT_MESSAGE
8582 "input Int32 -2147483648 and return OStringBuffer(kSInt32Max)+(-2147483648)",
8583 (aStrBuf
.toString() == expVal
&&
8584 aStrBuf
.getLength() == expVal
.getLength())
8590 CPPUNIT_TEST_SUITE( append_006_Int32_defaultParam
);
8591 CPPUNIT_TEST( append_001
);
8592 CPPUNIT_TEST( append_002
);
8593 CPPUNIT_TEST( append_003
);
8594 CPPUNIT_TEST( append_004
);
8595 CPPUNIT_TEST( append_005
);
8596 CPPUNIT_TEST( append_006
);
8597 CPPUNIT_TEST( append_007
);
8598 CPPUNIT_TEST( append_008
);
8599 CPPUNIT_TEST( append_009
);
8600 CPPUNIT_TEST( append_010
);
8601 CPPUNIT_TEST( append_011
);
8602 CPPUNIT_TEST( append_012
);
8603 CPPUNIT_TEST( append_013
);
8604 CPPUNIT_TEST( append_014
);
8605 CPPUNIT_TEST( append_015
);
8606 CPPUNIT_TEST( append_016
);
8607 CPPUNIT_TEST( append_017
);
8608 CPPUNIT_TEST( append_018
);
8609 CPPUNIT_TEST( append_019
);
8610 CPPUNIT_TEST( append_020
);
8611 CPPUNIT_TEST( append_021
);
8612 CPPUNIT_TEST( append_022
);
8613 CPPUNIT_TEST( append_023
);
8614 CPPUNIT_TEST( append_024
);
8615 CPPUNIT_TEST( append_025
);
8617 CPPUNIT_TEST( append_026
);
8618 CPPUNIT_TEST( append_027
);
8619 CPPUNIT_TEST( append_028
);
8620 CPPUNIT_TEST( append_029
);
8621 CPPUNIT_TEST( append_030
);
8623 CPPUNIT_TEST_SUITE_END();
8626 // testing the method append( sal_Int64 l, sal_Int16 radix=2 )
8627 // testing the method append( sal_Int64 l, sal_Int16 radix=8 )
8628 // testing the method append( sal_Int64 l, sal_Int16 radix=10 )
8629 // testing the method append( sal_Int64 l, sal_Int16 radix=16 )
8630 // testing the method append( sal_Int64 l, sal_Int16 radix=36 )
8632 class append_007_Int64
: public CppUnit::TestFixture
8637 void setUp() override
8639 arrOUS
[0] = OString( kTestStr7
);
8640 arrOUS
[1] = OString( );
8641 arrOUS
[2] = OString( kTestStr25
);
8642 arrOUS
[3] = OString( "" );
8643 arrOUS
[4] = OString( kTestStr28
);
8648 OStringBuffer
aStrBuf( arrOUS
[0] );
8649 OString
expVal( aStrBuf
.getStr() );
8650 sal_Int64 input
= 0;
8651 sal_Int16 radix
= 2;
8653 expVal
+= OString( "0" );
8654 aStrBuf
.append( input
, radix
);
8656 CPPUNIT_ASSERT_MESSAGE
8658 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
8659 aStrBuf
.getStr()== expVal
&&
8660 aStrBuf
.getLength() == expVal
.getLength()
8667 OStringBuffer
aStrBuf( arrOUS
[0] );
8668 OString
expVal( aStrBuf
.getStr() );
8669 sal_Int64 input
= 4;
8670 sal_Int16 radix
= 2;
8672 expVal
+= OString( "100" );
8673 aStrBuf
.append( input
, radix
);
8675 CPPUNIT_ASSERT_MESSAGE
8677 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
8678 aStrBuf
.getStr()== expVal
&&
8679 aStrBuf
.getLength() == expVal
.getLength()
8686 OStringBuffer
aStrBuf( arrOUS
[0] );
8687 OString
expVal( aStrBuf
.getStr() );
8688 sal_Int64 input
= 8;
8689 sal_Int16 radix
= 2;
8691 expVal
+= OString( "1000" );
8692 aStrBuf
.append( input
, radix
);
8694 CPPUNIT_ASSERT_MESSAGE
8696 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
8697 aStrBuf
.getStr()== expVal
&&
8698 aStrBuf
.getLength() == expVal
.getLength()
8705 OStringBuffer
aStrBuf( arrOUS
[0] );
8706 OString
expVal( aStrBuf
.getStr() );
8707 sal_Int64 input
= 15;
8708 sal_Int16 radix
= 2;
8710 expVal
+= OString( "1111" );
8711 aStrBuf
.append( input
, radix
);
8713 CPPUNIT_ASSERT_MESSAGE
8715 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[0]",
8716 aStrBuf
.getStr()== expVal
&&
8717 aStrBuf
.getLength() == expVal
.getLength()
8724 OStringBuffer
aStrBuf( arrOUS
[0] );
8725 OString
expVal( aStrBuf
.getStr() );
8726 sal_Int64 input
= 0;
8727 sal_Int16 radix
= 8;
8729 expVal
+= OString( "0" );
8730 aStrBuf
.append( input
, radix
);
8732 CPPUNIT_ASSERT_MESSAGE
8734 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
8735 aStrBuf
.getStr()== expVal
&&
8736 aStrBuf
.getLength() == expVal
.getLength()
8743 OStringBuffer
aStrBuf( arrOUS
[0] );
8744 OString
expVal( aStrBuf
.getStr() );
8745 sal_Int64 input
= 4;
8746 sal_Int16 radix
= 8;
8748 expVal
+= OString( "4" );
8749 aStrBuf
.append( input
, radix
);
8751 CPPUNIT_ASSERT_MESSAGE
8753 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
8754 aStrBuf
.getStr()== expVal
&&
8755 aStrBuf
.getLength() == expVal
.getLength()
8762 OStringBuffer
aStrBuf( arrOUS
[0] );
8763 OString
expVal( aStrBuf
.getStr() );
8764 sal_Int64 input
= 8;
8765 sal_Int16 radix
= 8;
8767 expVal
+= OString( "10" );
8768 aStrBuf
.append( input
, radix
);
8770 CPPUNIT_ASSERT_MESSAGE
8772 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
8773 aStrBuf
.getStr()== expVal
&&
8774 aStrBuf
.getLength() == expVal
.getLength()
8781 OStringBuffer
aStrBuf( arrOUS
[0] );
8782 OString
expVal( aStrBuf
.getStr() );
8783 sal_Int64 input
= 15;
8784 sal_Int16 radix
= 8;
8786 expVal
+= OString( "17" );
8787 aStrBuf
.append( input
, radix
);
8789 CPPUNIT_ASSERT_MESSAGE
8791 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[0]",
8792 aStrBuf
.getStr()== expVal
&&
8793 aStrBuf
.getLength() == expVal
.getLength()
8800 OStringBuffer
aStrBuf( arrOUS
[0] );
8801 OString
expVal( aStrBuf
.getStr() );
8802 sal_Int64 input
= 0;
8803 sal_Int16 radix
= 10;
8805 expVal
+= OString( "0" );
8806 aStrBuf
.append( input
, radix
);
8808 CPPUNIT_ASSERT_MESSAGE
8810 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
8811 aStrBuf
.getStr()== expVal
&&
8812 aStrBuf
.getLength() == expVal
.getLength()
8819 OStringBuffer
aStrBuf( arrOUS
[0] );
8820 OString
expVal( aStrBuf
.getStr() );
8821 sal_Int64 input
= 4;
8822 sal_Int16 radix
= 10;
8824 expVal
+= OString( "4" );
8825 aStrBuf
.append( input
, radix
);
8827 CPPUNIT_ASSERT_MESSAGE
8829 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
8830 aStrBuf
.getStr()== expVal
&&
8831 aStrBuf
.getLength() == expVal
.getLength()
8838 OStringBuffer
aStrBuf( arrOUS
[0] );
8839 OString
expVal( aStrBuf
.getStr() );
8840 sal_Int64 input
= 8;
8841 sal_Int16 radix
= 10;
8843 expVal
+= OString( "8" );
8844 aStrBuf
.append( input
, radix
);
8846 CPPUNIT_ASSERT_MESSAGE
8848 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
8849 aStrBuf
.getStr()== expVal
&&
8850 aStrBuf
.getLength() == expVal
.getLength()
8857 OStringBuffer
aStrBuf( arrOUS
[0] );
8858 OString
expVal( aStrBuf
.getStr() );
8859 sal_Int64 input
= 15;
8860 sal_Int16 radix
= 10;
8862 expVal
+= OString( "15" );
8863 aStrBuf
.append( input
, radix
);
8865 CPPUNIT_ASSERT_MESSAGE
8867 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[0]",
8868 aStrBuf
.getStr()== expVal
&&
8869 aStrBuf
.getLength() == expVal
.getLength()
8876 OStringBuffer
aStrBuf( arrOUS
[0] );
8877 OString
expVal( aStrBuf
.getStr() );
8878 sal_Int64 input
= 0;
8879 sal_Int16 radix
= 16;
8881 expVal
+= OString( "0" );
8882 aStrBuf
.append( input
, radix
);
8884 CPPUNIT_ASSERT_MESSAGE
8886 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
8887 aStrBuf
.getStr()== expVal
&&
8888 aStrBuf
.getLength() == expVal
.getLength()
8895 OStringBuffer
aStrBuf( arrOUS
[0] );
8896 OString
expVal( aStrBuf
.getStr() );
8897 sal_Int64 input
= 4;
8898 sal_Int16 radix
= 16;
8900 expVal
+= OString( "4" );
8901 aStrBuf
.append( input
, radix
);
8903 CPPUNIT_ASSERT_MESSAGE
8905 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
8906 aStrBuf
.getStr()== expVal
&&
8907 aStrBuf
.getLength() == expVal
.getLength()
8914 OStringBuffer
aStrBuf( arrOUS
[0] );
8915 OString
expVal( aStrBuf
.getStr() );
8916 sal_Int64 input
= 8;
8917 sal_Int16 radix
= 16;
8919 expVal
+= OString( "8" );
8920 aStrBuf
.append( input
, radix
);
8922 CPPUNIT_ASSERT_MESSAGE
8924 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
8925 aStrBuf
.getStr()== expVal
&&
8926 aStrBuf
.getLength() == expVal
.getLength()
8933 OStringBuffer
aStrBuf( arrOUS
[0] );
8934 OString
expVal( aStrBuf
.getStr() );
8935 sal_Int64 input
= 15;
8936 sal_Int16 radix
= 16;
8938 expVal
+= OString( "f" );
8939 aStrBuf
.append( input
, radix
);
8941 CPPUNIT_ASSERT_MESSAGE
8943 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[0]",
8944 aStrBuf
.getStr()== expVal
&&
8945 aStrBuf
.getLength() == expVal
.getLength()
8952 OStringBuffer
aStrBuf( arrOUS
[0] );
8953 OString
expVal( aStrBuf
.getStr() );
8954 sal_Int64 input
= 0;
8955 sal_Int16 radix
= 36;
8957 expVal
+= OString( "0" );
8958 aStrBuf
.append( input
, radix
);
8960 CPPUNIT_ASSERT_MESSAGE
8962 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
8963 aStrBuf
.getStr()== expVal
&&
8964 aStrBuf
.getLength() == expVal
.getLength()
8971 OStringBuffer
aStrBuf( arrOUS
[0] );
8972 OString
expVal( aStrBuf
.getStr() );
8973 sal_Int64 input
= 4;
8974 sal_Int16 radix
= 36;
8976 expVal
+= OString( "4" );
8977 aStrBuf
.append( input
, radix
);
8979 CPPUNIT_ASSERT_MESSAGE
8981 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
8982 aStrBuf
.getStr()== expVal
&&
8983 aStrBuf
.getLength() == expVal
.getLength()
8990 OStringBuffer
aStrBuf( arrOUS
[0] );
8991 OString
expVal( aStrBuf
.getStr() );
8992 sal_Int64 input
= 8;
8993 sal_Int16 radix
= 36;
8995 expVal
+= OString( "8" );
8996 aStrBuf
.append( input
, radix
);
8998 CPPUNIT_ASSERT_MESSAGE
9000 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9001 aStrBuf
.getStr()== expVal
&&
9002 aStrBuf
.getLength() == expVal
.getLength()
9009 OStringBuffer
aStrBuf( arrOUS
[0] );
9010 OString
expVal( aStrBuf
.getStr() );
9011 sal_Int64 input
= 35;
9012 sal_Int16 radix
= 36;
9014 expVal
+= OString( "z" );
9015 aStrBuf
.append( input
, radix
);
9017 CPPUNIT_ASSERT_MESSAGE
9019 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[0]",
9020 aStrBuf
.getStr()== expVal
&&
9021 aStrBuf
.getLength() == expVal
.getLength()
9028 OStringBuffer
aStrBuf( arrOUS
[1] );
9029 OString
expVal( aStrBuf
.getStr() );
9030 sal_Int64 input
= 0;
9031 sal_Int16 radix
= 2;
9033 expVal
+= OString( "0" );
9034 aStrBuf
.append( input
, radix
);
9036 CPPUNIT_ASSERT_MESSAGE
9038 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9039 aStrBuf
.getStr()== expVal
&&
9040 aStrBuf
.getLength() == expVal
.getLength()
9047 OStringBuffer
aStrBuf( arrOUS
[1] );
9048 OString
expVal( aStrBuf
.getStr() );
9049 sal_Int64 input
= 4;
9050 sal_Int16 radix
= 2;
9052 expVal
+= OString( "100" );
9053 aStrBuf
.append( input
, radix
);
9055 CPPUNIT_ASSERT_MESSAGE
9057 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9058 aStrBuf
.getStr()== expVal
&&
9059 aStrBuf
.getLength() == expVal
.getLength()
9066 OStringBuffer
aStrBuf( arrOUS
[1] );
9067 OString
expVal( aStrBuf
.getStr() );
9068 sal_Int64 input
= 8;
9069 sal_Int16 radix
= 2;
9071 expVal
+= OString( "1000" );
9072 aStrBuf
.append( input
, radix
);
9074 CPPUNIT_ASSERT_MESSAGE
9076 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9077 aStrBuf
.getStr()== expVal
&&
9078 aStrBuf
.getLength() == expVal
.getLength()
9085 OStringBuffer
aStrBuf( arrOUS
[1] );
9086 OString
expVal( aStrBuf
.getStr() );
9087 sal_Int64 input
= 15;
9088 sal_Int16 radix
= 2;
9090 expVal
+= OString( "1111" );
9091 aStrBuf
.append( input
, radix
);
9093 CPPUNIT_ASSERT_MESSAGE
9095 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[1]",
9096 aStrBuf
.getStr()== expVal
&&
9097 aStrBuf
.getLength() == expVal
.getLength()
9104 OStringBuffer
aStrBuf( arrOUS
[1] );
9105 OString
expVal( aStrBuf
.getStr() );
9106 sal_Int64 input
= 0;
9107 sal_Int16 radix
= 8;
9109 expVal
+= OString( "0" );
9110 aStrBuf
.append( input
, radix
);
9112 CPPUNIT_ASSERT_MESSAGE
9114 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9115 aStrBuf
.getStr()== expVal
&&
9116 aStrBuf
.getLength() == expVal
.getLength()
9123 OStringBuffer
aStrBuf( arrOUS
[1] );
9124 OString
expVal( aStrBuf
.getStr() );
9125 sal_Int64 input
= 4;
9126 sal_Int16 radix
= 8;
9128 expVal
+= OString( "4" );
9129 aStrBuf
.append( input
, radix
);
9131 CPPUNIT_ASSERT_MESSAGE
9133 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9134 aStrBuf
.getStr()== expVal
&&
9135 aStrBuf
.getLength() == expVal
.getLength()
9142 OStringBuffer
aStrBuf( arrOUS
[1] );
9143 OString
expVal( aStrBuf
.getStr() );
9144 sal_Int64 input
= 8;
9145 sal_Int16 radix
= 8;
9147 expVal
+= OString( "10" );
9148 aStrBuf
.append( input
, radix
);
9150 CPPUNIT_ASSERT_MESSAGE
9152 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9153 aStrBuf
.getStr()== expVal
&&
9154 aStrBuf
.getLength() == expVal
.getLength()
9161 OStringBuffer
aStrBuf( arrOUS
[1] );
9162 OString
expVal( aStrBuf
.getStr() );
9163 sal_Int64 input
= 15;
9164 sal_Int16 radix
= 8;
9166 expVal
+= OString( "17" );
9167 aStrBuf
.append( input
, radix
);
9169 CPPUNIT_ASSERT_MESSAGE
9171 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[1]",
9172 aStrBuf
.getStr()== expVal
&&
9173 aStrBuf
.getLength() == expVal
.getLength()
9180 OStringBuffer
aStrBuf( arrOUS
[1] );
9181 OString
expVal( aStrBuf
.getStr() );
9182 sal_Int64 input
= 0;
9183 sal_Int16 radix
= 10;
9185 expVal
+= OString( "0" );
9186 aStrBuf
.append( input
, radix
);
9188 CPPUNIT_ASSERT_MESSAGE
9190 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9191 aStrBuf
.getStr()== expVal
&&
9192 aStrBuf
.getLength() == expVal
.getLength()
9199 OStringBuffer
aStrBuf( arrOUS
[1] );
9200 OString
expVal( aStrBuf
.getStr() );
9201 sal_Int64 input
= 4;
9202 sal_Int16 radix
= 10;
9204 expVal
+= OString( "4" );
9205 aStrBuf
.append( input
, radix
);
9207 CPPUNIT_ASSERT_MESSAGE
9209 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9210 aStrBuf
.getStr()== expVal
&&
9211 aStrBuf
.getLength() == expVal
.getLength()
9218 OStringBuffer
aStrBuf( arrOUS
[1] );
9219 OString
expVal( aStrBuf
.getStr() );
9220 sal_Int64 input
= 8;
9221 sal_Int16 radix
= 10;
9223 expVal
+= OString( "8" );
9224 aStrBuf
.append( input
, radix
);
9226 CPPUNIT_ASSERT_MESSAGE
9228 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9229 aStrBuf
.getStr()== expVal
&&
9230 aStrBuf
.getLength() == expVal
.getLength()
9237 OStringBuffer
aStrBuf( arrOUS
[1] );
9238 OString
expVal( aStrBuf
.getStr() );
9239 sal_Int64 input
= 15;
9240 sal_Int16 radix
= 10;
9242 expVal
+= OString( "15" );
9243 aStrBuf
.append( input
, radix
);
9245 CPPUNIT_ASSERT_MESSAGE
9247 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[1]",
9248 aStrBuf
.getStr()== expVal
&&
9249 aStrBuf
.getLength() == expVal
.getLength()
9256 OStringBuffer
aStrBuf( arrOUS
[1] );
9257 OString
expVal( aStrBuf
.getStr() );
9258 sal_Int64 input
= 0;
9259 sal_Int16 radix
= 16;
9261 expVal
+= OString( "0" );
9262 aStrBuf
.append( input
, radix
);
9264 CPPUNIT_ASSERT_MESSAGE
9266 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9267 aStrBuf
.getStr()== expVal
&&
9268 aStrBuf
.getLength() == expVal
.getLength()
9275 OStringBuffer
aStrBuf( arrOUS
[1] );
9276 OString
expVal( aStrBuf
.getStr() );
9277 sal_Int64 input
= 4;
9278 sal_Int16 radix
= 16;
9280 expVal
+= OString( "4" );
9281 aStrBuf
.append( input
, radix
);
9283 CPPUNIT_ASSERT_MESSAGE
9285 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9286 aStrBuf
.getStr()== expVal
&&
9287 aStrBuf
.getLength() == expVal
.getLength()
9294 OStringBuffer
aStrBuf( arrOUS
[1] );
9295 OString
expVal( aStrBuf
.getStr() );
9296 sal_Int64 input
= 8;
9297 sal_Int16 radix
= 16;
9299 expVal
+= OString( "8" );
9300 aStrBuf
.append( input
, radix
);
9302 CPPUNIT_ASSERT_MESSAGE
9304 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9305 aStrBuf
.getStr()== expVal
&&
9306 aStrBuf
.getLength() == expVal
.getLength()
9313 OStringBuffer
aStrBuf( arrOUS
[1] );
9314 OString
expVal( aStrBuf
.getStr() );
9315 sal_Int64 input
= 15;
9316 sal_Int16 radix
= 16;
9318 expVal
+= OString( "f" );
9319 aStrBuf
.append( input
, radix
);
9321 CPPUNIT_ASSERT_MESSAGE
9323 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[1]",
9324 aStrBuf
.getStr()== expVal
&&
9325 aStrBuf
.getLength() == expVal
.getLength()
9332 OStringBuffer
aStrBuf( arrOUS
[1] );
9333 OString
expVal( aStrBuf
.getStr() );
9334 sal_Int64 input
= 0;
9335 sal_Int16 radix
= 36;
9337 expVal
+= OString( "0" );
9338 aStrBuf
.append( input
, radix
);
9340 CPPUNIT_ASSERT_MESSAGE
9342 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9343 aStrBuf
.getStr()== expVal
&&
9344 aStrBuf
.getLength() == expVal
.getLength()
9351 OStringBuffer
aStrBuf( arrOUS
[1] );
9352 OString
expVal( aStrBuf
.getStr() );
9353 sal_Int64 input
= 4;
9354 sal_Int16 radix
= 36;
9356 expVal
+= OString( "4" );
9357 aStrBuf
.append( input
, radix
);
9359 CPPUNIT_ASSERT_MESSAGE
9361 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9362 aStrBuf
.getStr()== expVal
&&
9363 aStrBuf
.getLength() == expVal
.getLength()
9370 OStringBuffer
aStrBuf( arrOUS
[1] );
9371 OString
expVal( aStrBuf
.getStr() );
9372 sal_Int64 input
= 8;
9373 sal_Int16 radix
= 36;
9375 expVal
+= OString( "8" );
9376 aStrBuf
.append( input
, radix
);
9378 CPPUNIT_ASSERT_MESSAGE
9380 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9381 aStrBuf
.getStr()== expVal
&&
9382 aStrBuf
.getLength() == expVal
.getLength()
9389 OStringBuffer
aStrBuf( arrOUS
[1] );
9390 OString
expVal( aStrBuf
.getStr() );
9391 sal_Int64 input
= 35;
9392 sal_Int16 radix
= 36;
9394 expVal
+= OString( "z" );
9395 aStrBuf
.append( input
, radix
);
9397 CPPUNIT_ASSERT_MESSAGE
9399 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[1]",
9400 aStrBuf
.getStr()== expVal
&&
9401 aStrBuf
.getLength() == expVal
.getLength()
9408 OStringBuffer
aStrBuf( arrOUS
[2] );
9409 OString
expVal( aStrBuf
.getStr() );
9410 sal_Int64 input
= 0;
9411 sal_Int16 radix
= 2;
9413 expVal
+= OString( "0" );
9414 aStrBuf
.append( input
, radix
);
9416 CPPUNIT_ASSERT_MESSAGE
9418 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9419 aStrBuf
.getStr()== expVal
&&
9420 aStrBuf
.getLength() == expVal
.getLength()
9427 OStringBuffer
aStrBuf( arrOUS
[2] );
9428 OString
expVal( aStrBuf
.getStr() );
9429 sal_Int64 input
= 4;
9430 sal_Int16 radix
= 2;
9432 expVal
+= OString( "100" );
9433 aStrBuf
.append( input
, radix
);
9435 CPPUNIT_ASSERT_MESSAGE
9437 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9438 aStrBuf
.getStr()== expVal
&&
9439 aStrBuf
.getLength() == expVal
.getLength()
9446 OStringBuffer
aStrBuf( arrOUS
[2] );
9447 OString
expVal( aStrBuf
.getStr() );
9448 sal_Int64 input
= 8;
9449 sal_Int16 radix
= 2;
9451 expVal
+= OString( "1000" );
9452 aStrBuf
.append( input
, radix
);
9454 CPPUNIT_ASSERT_MESSAGE
9456 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9457 aStrBuf
.getStr()== expVal
&&
9458 aStrBuf
.getLength() == expVal
.getLength()
9465 OStringBuffer
aStrBuf( arrOUS
[2] );
9466 OString
expVal( aStrBuf
.getStr() );
9467 sal_Int64 input
= 15;
9468 sal_Int16 radix
= 2;
9470 expVal
+= OString( "1111" );
9471 aStrBuf
.append( input
, radix
);
9473 CPPUNIT_ASSERT_MESSAGE
9475 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[2]",
9476 aStrBuf
.getStr()== expVal
&&
9477 aStrBuf
.getLength() == expVal
.getLength()
9484 OStringBuffer
aStrBuf( arrOUS
[2] );
9485 OString
expVal( aStrBuf
.getStr() );
9486 sal_Int64 input
= 0;
9487 sal_Int16 radix
= 8;
9489 expVal
+= OString( "0" );
9490 aStrBuf
.append( input
, radix
);
9492 CPPUNIT_ASSERT_MESSAGE
9494 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9495 aStrBuf
.getStr()== expVal
&&
9496 aStrBuf
.getLength() == expVal
.getLength()
9503 OStringBuffer
aStrBuf( arrOUS
[2] );
9504 OString
expVal( aStrBuf
.getStr() );
9505 sal_Int64 input
= 4;
9506 sal_Int16 radix
= 8;
9508 expVal
+= OString( "4" );
9509 aStrBuf
.append( input
, radix
);
9511 CPPUNIT_ASSERT_MESSAGE
9513 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9514 aStrBuf
.getStr()== expVal
&&
9515 aStrBuf
.getLength() == expVal
.getLength()
9522 OStringBuffer
aStrBuf( arrOUS
[2] );
9523 OString
expVal( aStrBuf
.getStr() );
9524 sal_Int64 input
= 8;
9525 sal_Int16 radix
= 8;
9527 expVal
+= OString( "10" );
9528 aStrBuf
.append( input
, radix
);
9530 CPPUNIT_ASSERT_MESSAGE
9532 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9533 aStrBuf
.getStr()== expVal
&&
9534 aStrBuf
.getLength() == expVal
.getLength()
9541 OStringBuffer
aStrBuf( arrOUS
[2] );
9542 OString
expVal( aStrBuf
.getStr() );
9543 sal_Int64 input
= 15;
9544 sal_Int16 radix
= 8;
9546 expVal
+= OString( "17" );
9547 aStrBuf
.append( input
, radix
);
9549 CPPUNIT_ASSERT_MESSAGE
9551 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[2]",
9552 aStrBuf
.getStr()== expVal
&&
9553 aStrBuf
.getLength() == expVal
.getLength()
9560 OStringBuffer
aStrBuf( arrOUS
[2] );
9561 OString
expVal( aStrBuf
.getStr() );
9562 sal_Int64 input
= 0;
9563 sal_Int16 radix
= 10;
9565 expVal
+= OString( "0" );
9566 aStrBuf
.append( input
, radix
);
9568 CPPUNIT_ASSERT_MESSAGE
9570 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9571 aStrBuf
.getStr()== expVal
&&
9572 aStrBuf
.getLength() == expVal
.getLength()
9579 OStringBuffer
aStrBuf( arrOUS
[2] );
9580 OString
expVal( aStrBuf
.getStr() );
9581 sal_Int64 input
= 4;
9582 sal_Int16 radix
= 10;
9584 expVal
+= OString( "4" );
9585 aStrBuf
.append( input
, radix
);
9587 CPPUNIT_ASSERT_MESSAGE
9589 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9590 aStrBuf
.getStr()== expVal
&&
9591 aStrBuf
.getLength() == expVal
.getLength()
9598 OStringBuffer
aStrBuf( arrOUS
[2] );
9599 OString
expVal( aStrBuf
.getStr() );
9600 sal_Int64 input
= 8;
9601 sal_Int16 radix
= 10;
9603 expVal
+= OString( "8" );
9604 aStrBuf
.append( input
, radix
);
9606 CPPUNIT_ASSERT_MESSAGE
9608 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9609 aStrBuf
.getStr()== expVal
&&
9610 aStrBuf
.getLength() == expVal
.getLength()
9617 OStringBuffer
aStrBuf( arrOUS
[2] );
9618 OString
expVal( aStrBuf
.getStr() );
9619 sal_Int64 input
= 15;
9620 sal_Int16 radix
= 10;
9622 expVal
+= OString( "15" );
9623 aStrBuf
.append( input
, radix
);
9625 CPPUNIT_ASSERT_MESSAGE
9627 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[2]",
9628 aStrBuf
.getStr()== expVal
&&
9629 aStrBuf
.getLength() == expVal
.getLength()
9636 OStringBuffer
aStrBuf( arrOUS
[2] );
9637 OString
expVal( aStrBuf
.getStr() );
9638 sal_Int64 input
= 0;
9639 sal_Int16 radix
= 16;
9641 expVal
+= OString( "0" );
9642 aStrBuf
.append( input
, radix
);
9644 CPPUNIT_ASSERT_MESSAGE
9646 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
9647 aStrBuf
.getStr()== expVal
&&
9648 aStrBuf
.getLength() == expVal
.getLength()
9655 OStringBuffer
aStrBuf( arrOUS
[2] );
9656 OString
expVal( aStrBuf
.getStr() );
9657 sal_Int64 input
= 4;
9658 sal_Int16 radix
= 16;
9660 expVal
+= OString( "4" );
9661 aStrBuf
.append( input
, radix
);
9663 CPPUNIT_ASSERT_MESSAGE
9665 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
9666 aStrBuf
.getStr()== expVal
&&
9667 aStrBuf
.getLength() == expVal
.getLength()
9674 OStringBuffer
aStrBuf( arrOUS
[2] );
9675 OString
expVal( aStrBuf
.getStr() );
9676 sal_Int64 input
= 8;
9677 sal_Int16 radix
= 16;
9679 expVal
+= OString( "8" );
9680 aStrBuf
.append( input
, radix
);
9682 CPPUNIT_ASSERT_MESSAGE
9684 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
9685 aStrBuf
.getStr()== expVal
&&
9686 aStrBuf
.getLength() == expVal
.getLength()
9693 OStringBuffer
aStrBuf( arrOUS
[2] );
9694 OString
expVal( aStrBuf
.getStr() );
9695 sal_Int64 input
= 15;
9696 sal_Int16 radix
= 16;
9698 expVal
+= OString( "f" );
9699 aStrBuf
.append( input
, radix
);
9701 CPPUNIT_ASSERT_MESSAGE
9703 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[2]",
9704 aStrBuf
.getStr()== expVal
&&
9705 aStrBuf
.getLength() == expVal
.getLength()
9712 OStringBuffer
aStrBuf( arrOUS
[2] );
9713 OString
expVal( aStrBuf
.getStr() );
9714 sal_Int64 input
= 0;
9715 sal_Int16 radix
= 36;
9717 expVal
+= OString( "0" );
9718 aStrBuf
.append( input
, radix
);
9720 CPPUNIT_ASSERT_MESSAGE
9722 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
9723 aStrBuf
.getStr()== expVal
&&
9724 aStrBuf
.getLength() == expVal
.getLength()
9731 OStringBuffer
aStrBuf( arrOUS
[2] );
9732 OString
expVal( aStrBuf
.getStr() );
9733 sal_Int64 input
= 4;
9734 sal_Int16 radix
= 36;
9736 expVal
+= OString( "4" );
9737 aStrBuf
.append( input
, radix
);
9739 CPPUNIT_ASSERT_MESSAGE
9741 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
9742 aStrBuf
.getStr()== expVal
&&
9743 aStrBuf
.getLength() == expVal
.getLength()
9750 OStringBuffer
aStrBuf( arrOUS
[2] );
9751 OString
expVal( aStrBuf
.getStr() );
9752 sal_Int64 input
= 8;
9753 sal_Int16 radix
= 36;
9755 expVal
+= OString( "8" );
9756 aStrBuf
.append( input
, radix
);
9758 CPPUNIT_ASSERT_MESSAGE
9760 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
9761 aStrBuf
.getStr()== expVal
&&
9762 aStrBuf
.getLength() == expVal
.getLength()
9769 OStringBuffer
aStrBuf( arrOUS
[2] );
9770 OString
expVal( aStrBuf
.getStr() );
9771 sal_Int64 input
= 35;
9772 sal_Int16 radix
= 36;
9774 expVal
+= OString( "z" );
9775 aStrBuf
.append( input
, radix
);
9777 CPPUNIT_ASSERT_MESSAGE
9779 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[2]",
9780 aStrBuf
.getStr()== expVal
&&
9781 aStrBuf
.getLength() == expVal
.getLength()
9788 OStringBuffer
aStrBuf( arrOUS
[3] );
9789 OString
expVal( aStrBuf
.getStr() );
9790 sal_Int64 input
= 0;
9791 sal_Int16 radix
= 2;
9793 expVal
+= OString( "0" );
9794 aStrBuf
.append( input
, radix
);
9796 CPPUNIT_ASSERT_MESSAGE
9798 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
9799 aStrBuf
.getStr()== expVal
&&
9800 aStrBuf
.getLength() == expVal
.getLength()
9807 OStringBuffer
aStrBuf( arrOUS
[3] );
9808 OString
expVal( aStrBuf
.getStr() );
9809 sal_Int64 input
= 4;
9810 sal_Int16 radix
= 2;
9812 expVal
+= OString( "100" );
9813 aStrBuf
.append( input
, radix
);
9815 CPPUNIT_ASSERT_MESSAGE
9817 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
9818 aStrBuf
.getStr()== expVal
&&
9819 aStrBuf
.getLength() == expVal
.getLength()
9826 OStringBuffer
aStrBuf( arrOUS
[3] );
9827 OString
expVal( aStrBuf
.getStr() );
9828 sal_Int64 input
= 8;
9829 sal_Int16 radix
= 2;
9831 expVal
+= OString( "1000" );
9832 aStrBuf
.append( input
, radix
);
9834 CPPUNIT_ASSERT_MESSAGE
9836 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
9837 aStrBuf
.getStr()== expVal
&&
9838 aStrBuf
.getLength() == expVal
.getLength()
9845 OStringBuffer
aStrBuf( arrOUS
[3] );
9846 OString
expVal( aStrBuf
.getStr() );
9847 sal_Int64 input
= 15;
9848 sal_Int16 radix
= 2;
9850 expVal
+= OString( "1111" );
9851 aStrBuf
.append( input
, radix
);
9853 CPPUNIT_ASSERT_MESSAGE
9855 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[3]",
9856 aStrBuf
.getStr()== expVal
&&
9857 aStrBuf
.getLength() == expVal
.getLength()
9864 OStringBuffer
aStrBuf( arrOUS
[3] );
9865 OString
expVal( aStrBuf
.getStr() );
9866 sal_Int64 input
= 0;
9867 sal_Int16 radix
= 8;
9869 expVal
+= OString( "0" );
9870 aStrBuf
.append( input
, radix
);
9872 CPPUNIT_ASSERT_MESSAGE
9874 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
9875 aStrBuf
.getStr()== expVal
&&
9876 aStrBuf
.getLength() == expVal
.getLength()
9883 OStringBuffer
aStrBuf( arrOUS
[3] );
9884 OString
expVal( aStrBuf
.getStr() );
9885 sal_Int64 input
= 4;
9886 sal_Int16 radix
= 8;
9888 expVal
+= OString( "4" );
9889 aStrBuf
.append( input
, radix
);
9891 CPPUNIT_ASSERT_MESSAGE
9893 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
9894 aStrBuf
.getStr()== expVal
&&
9895 aStrBuf
.getLength() == expVal
.getLength()
9902 OStringBuffer
aStrBuf( arrOUS
[3] );
9903 OString
expVal( aStrBuf
.getStr() );
9904 sal_Int64 input
= 8;
9905 sal_Int16 radix
= 8;
9907 expVal
+= OString( "10" );
9908 aStrBuf
.append( input
, radix
);
9910 CPPUNIT_ASSERT_MESSAGE
9912 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
9913 aStrBuf
.getStr()== expVal
&&
9914 aStrBuf
.getLength() == expVal
.getLength()
9921 OStringBuffer
aStrBuf( arrOUS
[3] );
9922 OString
expVal( aStrBuf
.getStr() );
9923 sal_Int64 input
= 15;
9924 sal_Int16 radix
= 8;
9926 expVal
+= OString( "17" );
9927 aStrBuf
.append( input
, radix
);
9929 CPPUNIT_ASSERT_MESSAGE
9931 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[3]",
9932 aStrBuf
.getStr()== expVal
&&
9933 aStrBuf
.getLength() == expVal
.getLength()
9940 OStringBuffer
aStrBuf( arrOUS
[3] );
9941 OString
expVal( aStrBuf
.getStr() );
9942 sal_Int64 input
= 0;
9943 sal_Int16 radix
= 10;
9945 expVal
+= OString( "0" );
9946 aStrBuf
.append( input
, radix
);
9948 CPPUNIT_ASSERT_MESSAGE
9950 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
9951 aStrBuf
.getStr()== expVal
&&
9952 aStrBuf
.getLength() == expVal
.getLength()
9959 OStringBuffer
aStrBuf( arrOUS
[3] );
9960 OString
expVal( aStrBuf
.getStr() );
9961 sal_Int64 input
= 4;
9962 sal_Int16 radix
= 10;
9964 expVal
+= OString( "4" );
9965 aStrBuf
.append( input
, radix
);
9967 CPPUNIT_ASSERT_MESSAGE
9969 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
9970 aStrBuf
.getStr()== expVal
&&
9971 aStrBuf
.getLength() == expVal
.getLength()
9978 OStringBuffer
aStrBuf( arrOUS
[3] );
9979 OString
expVal( aStrBuf
.getStr() );
9980 sal_Int64 input
= 8;
9981 sal_Int16 radix
= 10;
9983 expVal
+= OString( "8" );
9984 aStrBuf
.append( input
, radix
);
9986 CPPUNIT_ASSERT_MESSAGE
9988 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
9989 aStrBuf
.getStr()== expVal
&&
9990 aStrBuf
.getLength() == expVal
.getLength()
9997 OStringBuffer
aStrBuf( arrOUS
[3] );
9998 OString
expVal( aStrBuf
.getStr() );
9999 sal_Int64 input
= 15;
10000 sal_Int16 radix
= 10;
10002 expVal
+= OString( "15" );
10003 aStrBuf
.append( input
, radix
);
10005 CPPUNIT_ASSERT_MESSAGE
10007 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[3]",
10008 aStrBuf
.getStr()== expVal
&&
10009 aStrBuf
.getLength() == expVal
.getLength()
10016 OStringBuffer
aStrBuf( arrOUS
[3] );
10017 OString
expVal( aStrBuf
.getStr() );
10018 sal_Int64 input
= 0;
10019 sal_Int16 radix
= 16;
10021 expVal
+= OString( "0" );
10022 aStrBuf
.append( input
, radix
);
10024 CPPUNIT_ASSERT_MESSAGE
10026 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10027 aStrBuf
.getStr()== expVal
&&
10028 aStrBuf
.getLength() == expVal
.getLength()
10035 OStringBuffer
aStrBuf( arrOUS
[3] );
10036 OString
expVal( aStrBuf
.getStr() );
10037 sal_Int64 input
= 4;
10038 sal_Int16 radix
= 16;
10040 expVal
+= OString( "4" );
10041 aStrBuf
.append( input
, radix
);
10043 CPPUNIT_ASSERT_MESSAGE
10045 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10046 aStrBuf
.getStr()== expVal
&&
10047 aStrBuf
.getLength() == expVal
.getLength()
10054 OStringBuffer
aStrBuf( arrOUS
[3] );
10055 OString
expVal( aStrBuf
.getStr() );
10056 sal_Int64 input
= 8;
10057 sal_Int16 radix
= 16;
10059 expVal
+= OString( "8" );
10060 aStrBuf
.append( input
, radix
);
10062 CPPUNIT_ASSERT_MESSAGE
10064 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10065 aStrBuf
.getStr()== expVal
&&
10066 aStrBuf
.getLength() == expVal
.getLength()
10073 OStringBuffer
aStrBuf( arrOUS
[3] );
10074 OString
expVal( aStrBuf
.getStr() );
10075 sal_Int64 input
= 15;
10076 sal_Int16 radix
= 16;
10078 expVal
+= OString( "f" );
10079 aStrBuf
.append( input
, radix
);
10081 CPPUNIT_ASSERT_MESSAGE
10083 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[3]",
10084 aStrBuf
.getStr()== expVal
&&
10085 aStrBuf
.getLength() == expVal
.getLength()
10092 OStringBuffer
aStrBuf( arrOUS
[3] );
10093 OString
expVal( aStrBuf
.getStr() );
10094 sal_Int64 input
= 0;
10095 sal_Int16 radix
= 36;
10097 expVal
+= OString( "0" );
10098 aStrBuf
.append( input
, radix
);
10100 CPPUNIT_ASSERT_MESSAGE
10102 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10103 aStrBuf
.getStr()== expVal
&&
10104 aStrBuf
.getLength() == expVal
.getLength()
10111 OStringBuffer
aStrBuf( arrOUS
[3] );
10112 OString
expVal( aStrBuf
.getStr() );
10113 sal_Int64 input
= 4;
10114 sal_Int16 radix
= 36;
10116 expVal
+= OString( "4" );
10117 aStrBuf
.append( input
, radix
);
10119 CPPUNIT_ASSERT_MESSAGE
10121 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10122 aStrBuf
.getStr()== expVal
&&
10123 aStrBuf
.getLength() == expVal
.getLength()
10130 OStringBuffer
aStrBuf( arrOUS
[3] );
10131 OString
expVal( aStrBuf
.getStr() );
10132 sal_Int64 input
= 8;
10133 sal_Int16 radix
= 36;
10135 expVal
+= OString( "8" );
10136 aStrBuf
.append( input
, radix
);
10138 CPPUNIT_ASSERT_MESSAGE
10140 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10141 aStrBuf
.getStr()== expVal
&&
10142 aStrBuf
.getLength() == expVal
.getLength()
10149 OStringBuffer
aStrBuf( arrOUS
[3] );
10150 OString
expVal( aStrBuf
.getStr() );
10151 sal_Int64 input
= 35;
10152 sal_Int16 radix
= 36;
10154 expVal
+= OString( "z" );
10155 aStrBuf
.append( input
, radix
);
10157 CPPUNIT_ASSERT_MESSAGE
10159 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[3]",
10160 aStrBuf
.getStr()== expVal
&&
10161 aStrBuf
.getLength() == expVal
.getLength()
10168 OStringBuffer
aStrBuf( arrOUS
[4] );
10169 OString
expVal( aStrBuf
.getStr() );
10170 sal_Int64 input
= 0;
10171 sal_Int16 radix
= 2;
10173 expVal
+= OString( "0" );
10174 aStrBuf
.append( input
, radix
);
10176 CPPUNIT_ASSERT_MESSAGE
10178 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10179 aStrBuf
.getStr()== expVal
&&
10180 aStrBuf
.getLength() == expVal
.getLength()
10187 OStringBuffer
aStrBuf( arrOUS
[4] );
10188 OString
expVal( aStrBuf
.getStr() );
10189 sal_Int64 input
= 4;
10190 sal_Int16 radix
= 2;
10192 expVal
+= OString( "100" );
10193 aStrBuf
.append( input
, radix
);
10195 CPPUNIT_ASSERT_MESSAGE
10197 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10198 aStrBuf
.getStr()== expVal
&&
10199 aStrBuf
.getLength() == expVal
.getLength()
10206 OStringBuffer
aStrBuf( arrOUS
[4] );
10207 OString
expVal( aStrBuf
.getStr() );
10208 sal_Int64 input
= 8;
10209 sal_Int16 radix
= 2;
10211 expVal
+= OString( "1000" );
10212 aStrBuf
.append( input
, radix
);
10214 CPPUNIT_ASSERT_MESSAGE
10216 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10217 aStrBuf
.getStr()== expVal
&&
10218 aStrBuf
.getLength() == expVal
.getLength()
10225 OStringBuffer
aStrBuf( arrOUS
[4] );
10226 OString
expVal( aStrBuf
.getStr() );
10227 sal_Int64 input
= 15;
10228 sal_Int16 radix
= 2;
10230 expVal
+= OString( "1111" );
10231 aStrBuf
.append( input
, radix
);
10233 CPPUNIT_ASSERT_MESSAGE
10235 "append(sal_Int64, radix 2)_006_kRadixBinary for arrOUS[4]",
10236 aStrBuf
.getStr()== expVal
&&
10237 aStrBuf
.getLength() == expVal
.getLength()
10244 OStringBuffer
aStrBuf( arrOUS
[4] );
10245 OString
expVal( aStrBuf
.getStr() );
10246 sal_Int64 input
= 0;
10247 sal_Int16 radix
= 8;
10249 expVal
+= OString( "0" );
10250 aStrBuf
.append( input
, radix
);
10252 CPPUNIT_ASSERT_MESSAGE
10254 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10255 aStrBuf
.getStr()== expVal
&&
10256 aStrBuf
.getLength() == expVal
.getLength()
10263 OStringBuffer
aStrBuf( arrOUS
[4] );
10264 OString
expVal( aStrBuf
.getStr() );
10265 sal_Int64 input
= 4;
10266 sal_Int16 radix
= 8;
10268 expVal
+= OString( "4" );
10269 aStrBuf
.append( input
, radix
);
10271 CPPUNIT_ASSERT_MESSAGE
10273 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10274 aStrBuf
.getStr()== expVal
&&
10275 aStrBuf
.getLength() == expVal
.getLength()
10282 OStringBuffer
aStrBuf( arrOUS
[4] );
10283 OString
expVal( aStrBuf
.getStr() );
10284 sal_Int64 input
= 8;
10285 sal_Int16 radix
= 8;
10287 expVal
+= OString( "10" );
10288 aStrBuf
.append( input
, radix
);
10290 CPPUNIT_ASSERT_MESSAGE
10292 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10293 aStrBuf
.getStr()== expVal
&&
10294 aStrBuf
.getLength() == expVal
.getLength()
10301 OStringBuffer
aStrBuf( arrOUS
[4] );
10302 OString
expVal( aStrBuf
.getStr() );
10303 sal_Int64 input
= 15;
10304 sal_Int16 radix
= 8;
10306 expVal
+= OString( "17" );
10307 aStrBuf
.append( input
, radix
);
10309 CPPUNIT_ASSERT_MESSAGE
10311 "append(sal_Int64, radix 8)_006_kRadixOctol for arrOUS[4]",
10312 aStrBuf
.getStr()== expVal
&&
10313 aStrBuf
.getLength() == expVal
.getLength()
10320 OStringBuffer
aStrBuf( arrOUS
[4] );
10321 OString
expVal( aStrBuf
.getStr() );
10322 sal_Int64 input
= 0;
10323 sal_Int16 radix
= 10;
10325 expVal
+= OString( "0" );
10326 aStrBuf
.append( input
, radix
);
10328 CPPUNIT_ASSERT_MESSAGE
10330 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10331 aStrBuf
.getStr()== expVal
&&
10332 aStrBuf
.getLength() == expVal
.getLength()
10339 OStringBuffer
aStrBuf( arrOUS
[4] );
10340 OString
expVal( aStrBuf
.getStr() );
10341 sal_Int64 input
= 4;
10342 sal_Int16 radix
= 10;
10344 expVal
+= OString( "4" );
10345 aStrBuf
.append( input
, radix
);
10347 CPPUNIT_ASSERT_MESSAGE
10349 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10350 aStrBuf
.getStr()== expVal
&&
10351 aStrBuf
.getLength() == expVal
.getLength()
10358 OStringBuffer
aStrBuf( arrOUS
[4] );
10359 OString
expVal( aStrBuf
.getStr() );
10360 sal_Int64 input
= 8;
10361 sal_Int16 radix
= 10;
10363 expVal
+= OString( "8" );
10364 aStrBuf
.append( input
, radix
);
10366 CPPUNIT_ASSERT_MESSAGE
10368 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10369 aStrBuf
.getStr()== expVal
&&
10370 aStrBuf
.getLength() == expVal
.getLength()
10377 OStringBuffer
aStrBuf( arrOUS
[4] );
10378 OString
expVal( aStrBuf
.getStr() );
10379 sal_Int64 input
= 15;
10380 sal_Int16 radix
= 10;
10382 expVal
+= OString( "15" );
10383 aStrBuf
.append( input
, radix
);
10385 CPPUNIT_ASSERT_MESSAGE
10387 "append(sal_Int64, radix 10)_006_kRadixDecimal for arrOUS[4]",
10388 aStrBuf
.getStr()== expVal
&&
10389 aStrBuf
.getLength() == expVal
.getLength()
10396 OStringBuffer
aStrBuf( arrOUS
[4] );
10397 OString
expVal( aStrBuf
.getStr() );
10398 sal_Int64 input
= 0;
10399 sal_Int16 radix
= 16;
10401 expVal
+= OString( "0" );
10402 aStrBuf
.append( input
, radix
);
10404 CPPUNIT_ASSERT_MESSAGE
10406 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10407 aStrBuf
.getStr()== expVal
&&
10408 aStrBuf
.getLength() == expVal
.getLength()
10415 OStringBuffer
aStrBuf( arrOUS
[4] );
10416 OString
expVal( aStrBuf
.getStr() );
10417 sal_Int64 input
= 4;
10418 sal_Int16 radix
= 16;
10420 expVal
+= OString( "4" );
10421 aStrBuf
.append( input
, radix
);
10423 CPPUNIT_ASSERT_MESSAGE
10425 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10426 aStrBuf
.getStr()== expVal
&&
10427 aStrBuf
.getLength() == expVal
.getLength()
10434 OStringBuffer
aStrBuf( arrOUS
[4] );
10435 OString
expVal( aStrBuf
.getStr() );
10436 sal_Int64 input
= 8;
10437 sal_Int16 radix
= 16;
10439 expVal
+= OString( "8" );
10440 aStrBuf
.append( input
, radix
);
10442 CPPUNIT_ASSERT_MESSAGE
10444 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10445 aStrBuf
.getStr()== expVal
&&
10446 aStrBuf
.getLength() == expVal
.getLength()
10453 OStringBuffer
aStrBuf( arrOUS
[4] );
10454 OString
expVal( aStrBuf
.getStr() );
10455 sal_Int64 input
= 15;
10456 sal_Int16 radix
= 16;
10458 expVal
+= OString( "f" );
10459 aStrBuf
.append( input
, radix
);
10461 CPPUNIT_ASSERT_MESSAGE
10463 "append(sal_Int64, radix 16)_006_kRadixHexdecimal for arrOUS[4]",
10464 aStrBuf
.getStr()== expVal
&&
10465 aStrBuf
.getLength() == expVal
.getLength()
10472 OStringBuffer
aStrBuf( arrOUS
[4] );
10473 OString
expVal( aStrBuf
.getStr() );
10474 sal_Int64 input
= 0;
10475 sal_Int16 radix
= 36;
10477 expVal
+= OString( "0" );
10478 aStrBuf
.append( input
, radix
);
10480 CPPUNIT_ASSERT_MESSAGE
10482 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10483 aStrBuf
.getStr()== expVal
&&
10484 aStrBuf
.getLength() == expVal
.getLength()
10491 OStringBuffer
aStrBuf( arrOUS
[4] );
10492 OString
expVal( aStrBuf
.getStr() );
10493 sal_Int64 input
= 4;
10494 sal_Int16 radix
= 36;
10496 expVal
+= OString( "4" );
10497 aStrBuf
.append( input
, radix
);
10499 CPPUNIT_ASSERT_MESSAGE
10501 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10502 aStrBuf
.getStr()== expVal
&&
10503 aStrBuf
.getLength() == expVal
.getLength()
10510 OStringBuffer
aStrBuf( arrOUS
[4] );
10511 OString
expVal( aStrBuf
.getStr() );
10512 sal_Int64 input
= 8;
10513 sal_Int16 radix
= 36;
10515 expVal
+= OString( "8" );
10516 aStrBuf
.append( input
, radix
);
10518 CPPUNIT_ASSERT_MESSAGE
10520 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10521 aStrBuf
.getStr()== expVal
&&
10522 aStrBuf
.getLength() == expVal
.getLength()
10529 OStringBuffer
aStrBuf( arrOUS
[4] );
10530 OString
expVal( aStrBuf
.getStr() );
10531 sal_Int64 input
= 35;
10532 sal_Int16 radix
= 36;
10534 expVal
+= OString( "z" );
10535 aStrBuf
.append( input
, radix
);
10537 CPPUNIT_ASSERT_MESSAGE
10539 "append(sal_Int64, radix 36)_006_kRadixBase36 for arrOUS[4]",
10540 aStrBuf
.getStr()== expVal
&&
10541 aStrBuf
.getLength() == expVal
.getLength()
10546 CPPUNIT_TEST_SUITE( append_007_Int64
);
10547 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
10548 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
10549 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
10550 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
10551 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
10552 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
10553 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
10554 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
10555 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
10556 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
10557 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
10558 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
10559 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
10560 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
10561 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
10562 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
10563 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
10564 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
10565 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
10566 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
10567 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
10568 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
10569 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
10570 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
10571 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
10572 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
10573 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
10574 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
10575 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
10576 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
10577 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
10578 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
10579 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
10580 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
10581 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
10582 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
10583 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
10584 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
10585 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
10586 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
10587 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
10588 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
10589 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
10590 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
10591 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
10592 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
10593 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
10594 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
10595 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
10596 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
10597 CPPUNIT_TEST_SUITE_END();
10600 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
10601 // where i = large constants
10602 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
10603 // where i = large constants
10604 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
10605 // where i = large constants
10606 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
10607 // where i = large constants
10608 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
10609 // where i = large constants
10611 class append_007_Int64_Bounderies
: public CppUnit::TestFixture
10616 void setUp() override
10618 arrOUS
[0] = OString( kTestStr7
);
10619 arrOUS
[1] = OString( );
10620 arrOUS
[2] = OString( kTestStr25
);
10621 arrOUS
[3] = OString( "" );
10622 arrOUS
[4] = OString( kTestStr28
);
10627 OStringBuffer
aStrBuf( arrOUS
[0] );
10628 OString
expVal( aStrBuf
.getStr() );
10629 sal_Int64 input
= kSInt8Max
;
10630 sal_Int16 radix
= 2;
10632 expVal
+= OString( "1111111" );
10633 aStrBuf
.append( input
, radix
);
10635 CPPUNIT_ASSERT_MESSAGE
10637 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
10638 aStrBuf
.getStr()== expVal
&&
10639 aStrBuf
.getLength() == expVal
.getLength()
10646 OStringBuffer
aStrBuf( arrOUS
[0] );
10647 OString
expVal( aStrBuf
.getStr() );
10648 sal_Int64 input
= kSInt64Max
;
10649 sal_Int16 radix
= 2;
10651 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
10652 aStrBuf
.append( input
, radix
);
10654 CPPUNIT_ASSERT_MESSAGE
10656 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[0]",
10657 aStrBuf
.getStr()== expVal
&&
10658 aStrBuf
.getLength() == expVal
.getLength()
10665 OStringBuffer
aStrBuf( arrOUS
[0] );
10666 OString
expVal( aStrBuf
.getStr() );
10667 sal_Int64 input
= kSInt8Max
;
10668 sal_Int16 radix
= 8;
10670 expVal
+= OString( "177" );
10671 aStrBuf
.append( input
, radix
);
10673 CPPUNIT_ASSERT_MESSAGE
10675 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
10676 aStrBuf
.getStr()== expVal
&&
10677 aStrBuf
.getLength() == expVal
.getLength()
10684 OStringBuffer
aStrBuf( arrOUS
[0] );
10685 OString
expVal( aStrBuf
.getStr() );
10686 sal_Int64 input
= kSInt64Max
;
10687 sal_Int16 radix
= 8;
10689 expVal
+= OString( "777777777777777777777" );
10690 aStrBuf
.append( input
, radix
);
10692 CPPUNIT_ASSERT_MESSAGE
10694 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[0]",
10695 aStrBuf
.getStr()== expVal
&&
10696 aStrBuf
.getLength() == expVal
.getLength()
10703 OStringBuffer
aStrBuf( arrOUS
[0] );
10704 OString
expVal( aStrBuf
.getStr() );
10705 sal_Int64 input
= kSInt8Max
;
10706 sal_Int16 radix
= 10;
10708 expVal
+= OString( "127" );
10709 aStrBuf
.append( input
, radix
);
10711 CPPUNIT_ASSERT_MESSAGE
10713 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
10714 aStrBuf
.getStr()== expVal
&&
10715 aStrBuf
.getLength() == expVal
.getLength()
10722 OStringBuffer
aStrBuf( arrOUS
[0] );
10723 OString
expVal( aStrBuf
.getStr() );
10724 sal_Int64 input
= kSInt64Max
;
10725 sal_Int16 radix
= 10;
10727 expVal
+= OString( "9223372036854775807" );
10728 aStrBuf
.append( input
, radix
);
10730 CPPUNIT_ASSERT_MESSAGE
10732 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[0]",
10733 aStrBuf
.getStr()== expVal
&&
10734 aStrBuf
.getLength() == expVal
.getLength()
10741 OStringBuffer
aStrBuf( arrOUS
[0] );
10742 OString
expVal( aStrBuf
.getStr() );
10743 sal_Int64 input
= kSInt8Max
;
10744 sal_Int16 radix
= 16;
10746 expVal
+= OString( "7f" );
10747 aStrBuf
.append( input
, radix
);
10749 CPPUNIT_ASSERT_MESSAGE
10751 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
10752 aStrBuf
.getStr()== expVal
&&
10753 aStrBuf
.getLength() == expVal
.getLength()
10760 OStringBuffer
aStrBuf( arrOUS
[0] );
10761 OString
expVal( aStrBuf
.getStr() );
10762 sal_Int64 input
= kSInt64Max
;
10763 sal_Int16 radix
= 16;
10765 expVal
+= OString( "7fffffffffffffff" );
10766 aStrBuf
.append( input
, radix
);
10768 CPPUNIT_ASSERT_MESSAGE
10770 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[0]",
10771 aStrBuf
.getStr()== expVal
&&
10772 aStrBuf
.getLength() == expVal
.getLength()
10779 OStringBuffer
aStrBuf( arrOUS
[0] );
10780 OString
expVal( aStrBuf
.getStr() );
10781 sal_Int64 input
= kSInt8Max
;
10782 sal_Int16 radix
= 36;
10784 expVal
+= OString( "3j" );
10785 aStrBuf
.append( input
, radix
);
10787 CPPUNIT_ASSERT_MESSAGE
10789 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
10790 aStrBuf
.getStr()== expVal
&&
10791 aStrBuf
.getLength() == expVal
.getLength()
10798 OStringBuffer
aStrBuf( arrOUS
[0] );
10799 OString
expVal( aStrBuf
.getStr() );
10800 sal_Int64 input
= kSInt64Max
;
10801 sal_Int16 radix
= 36;
10803 expVal
+= OString( "1y2p0ij32e8e7" );
10804 aStrBuf
.append( input
, radix
);
10806 CPPUNIT_ASSERT_MESSAGE
10808 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[0]",
10809 aStrBuf
.getStr()== expVal
&&
10810 aStrBuf
.getLength() == expVal
.getLength()
10817 OStringBuffer
aStrBuf( arrOUS
[1] );
10818 OString
expVal( aStrBuf
.getStr() );
10819 sal_Int64 input
= kSInt8Max
;
10820 sal_Int16 radix
= 2;
10822 expVal
+= OString( "1111111" );
10823 aStrBuf
.append( input
, radix
);
10825 CPPUNIT_ASSERT_MESSAGE
10827 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
10828 aStrBuf
.getStr()== expVal
&&
10829 aStrBuf
.getLength() == expVal
.getLength()
10836 OStringBuffer
aStrBuf( arrOUS
[1] );
10837 OString
expVal( aStrBuf
.getStr() );
10838 sal_Int64 input
= kSInt64Max
;
10839 sal_Int16 radix
= 2;
10841 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
10842 aStrBuf
.append( input
, radix
);
10844 CPPUNIT_ASSERT_MESSAGE
10846 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[1]",
10847 aStrBuf
.getStr()== expVal
&&
10848 aStrBuf
.getLength() == expVal
.getLength()
10855 OStringBuffer
aStrBuf( arrOUS
[1] );
10856 OString
expVal( aStrBuf
.getStr() );
10857 sal_Int64 input
= kSInt8Max
;
10858 sal_Int16 radix
= 8;
10860 expVal
+= OString( "177" );
10861 aStrBuf
.append( input
, radix
);
10863 CPPUNIT_ASSERT_MESSAGE
10865 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
10866 aStrBuf
.getStr()== expVal
&&
10867 aStrBuf
.getLength() == expVal
.getLength()
10874 OStringBuffer
aStrBuf( arrOUS
[1] );
10875 OString
expVal( aStrBuf
.getStr() );
10876 sal_Int64 input
= kSInt64Max
;
10877 sal_Int16 radix
= 8;
10879 expVal
+= OString( "777777777777777777777" );
10880 aStrBuf
.append( input
, radix
);
10882 CPPUNIT_ASSERT_MESSAGE
10884 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[1]",
10885 aStrBuf
.getStr()== expVal
&&
10886 aStrBuf
.getLength() == expVal
.getLength()
10893 OStringBuffer
aStrBuf( arrOUS
[1] );
10894 OString
expVal( aStrBuf
.getStr() );
10895 sal_Int64 input
= kSInt8Max
;
10896 sal_Int16 radix
= 10;
10898 expVal
+= OString( "127" );
10899 aStrBuf
.append( input
, radix
);
10901 CPPUNIT_ASSERT_MESSAGE
10903 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
10904 aStrBuf
.getStr()== expVal
&&
10905 aStrBuf
.getLength() == expVal
.getLength()
10912 OStringBuffer
aStrBuf( arrOUS
[1] );
10913 OString
expVal( aStrBuf
.getStr() );
10914 sal_Int64 input
= kSInt64Max
;
10915 sal_Int16 radix
= 10;
10917 expVal
+= OString( "9223372036854775807" );
10918 aStrBuf
.append( input
, radix
);
10920 CPPUNIT_ASSERT_MESSAGE
10922 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[1]",
10923 aStrBuf
.getStr()== expVal
&&
10924 aStrBuf
.getLength() == expVal
.getLength()
10931 OStringBuffer
aStrBuf( arrOUS
[1] );
10932 OString
expVal( aStrBuf
.getStr() );
10933 sal_Int64 input
= kSInt8Max
;
10934 sal_Int16 radix
= 16;
10936 expVal
+= OString( "7f" );
10937 aStrBuf
.append( input
, radix
);
10939 CPPUNIT_ASSERT_MESSAGE
10941 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
10942 aStrBuf
.getStr()== expVal
&&
10943 aStrBuf
.getLength() == expVal
.getLength()
10950 OStringBuffer
aStrBuf( arrOUS
[1] );
10951 OString
expVal( aStrBuf
.getStr() );
10952 sal_Int64 input
= kSInt64Max
;
10953 sal_Int16 radix
= 16;
10955 expVal
+= OString( "7fffffffffffffff" );
10956 aStrBuf
.append( input
, radix
);
10958 CPPUNIT_ASSERT_MESSAGE
10960 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[1]",
10961 aStrBuf
.getStr()== expVal
&&
10962 aStrBuf
.getLength() == expVal
.getLength()
10969 OStringBuffer
aStrBuf( arrOUS
[1] );
10970 OString
expVal( aStrBuf
.getStr() );
10971 sal_Int64 input
= kSInt8Max
;
10972 sal_Int16 radix
= 36;
10974 expVal
+= OString( "3j" );
10975 aStrBuf
.append( input
, radix
);
10977 CPPUNIT_ASSERT_MESSAGE
10979 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
10980 aStrBuf
.getStr()== expVal
&&
10981 aStrBuf
.getLength() == expVal
.getLength()
10988 OStringBuffer
aStrBuf( arrOUS
[1] );
10989 OString
expVal( aStrBuf
.getStr() );
10990 sal_Int64 input
= kSInt64Max
;
10991 sal_Int16 radix
= 36;
10993 expVal
+= OString( "1y2p0ij32e8e7" );
10994 aStrBuf
.append( input
, radix
);
10996 CPPUNIT_ASSERT_MESSAGE
10998 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[1]",
10999 aStrBuf
.getStr()== expVal
&&
11000 aStrBuf
.getLength() == expVal
.getLength()
11007 OStringBuffer
aStrBuf( arrOUS
[2] );
11008 OString
expVal( aStrBuf
.getStr() );
11009 sal_Int64 input
= kSInt8Max
;
11010 sal_Int16 radix
= 2;
11012 expVal
+= OString( "1111111" );
11013 aStrBuf
.append( input
, radix
);
11015 CPPUNIT_ASSERT_MESSAGE
11017 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11018 aStrBuf
.getStr()== expVal
&&
11019 aStrBuf
.getLength() == expVal
.getLength()
11026 OStringBuffer
aStrBuf( arrOUS
[2] );
11027 OString
expVal( aStrBuf
.getStr() );
11028 sal_Int64 input
= kSInt64Max
;
11029 sal_Int16 radix
= 2;
11031 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11032 aStrBuf
.append( input
, radix
);
11034 CPPUNIT_ASSERT_MESSAGE
11036 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[2]",
11037 aStrBuf
.getStr()== expVal
&&
11038 aStrBuf
.getLength() == expVal
.getLength()
11045 OStringBuffer
aStrBuf( arrOUS
[2] );
11046 OString
expVal( aStrBuf
.getStr() );
11047 sal_Int64 input
= kSInt8Max
;
11048 sal_Int16 radix
= 8;
11050 expVal
+= OString( "177" );
11051 aStrBuf
.append( input
, radix
);
11053 CPPUNIT_ASSERT_MESSAGE
11055 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11056 aStrBuf
.getStr()== expVal
&&
11057 aStrBuf
.getLength() == expVal
.getLength()
11064 OStringBuffer
aStrBuf( arrOUS
[2] );
11065 OString
expVal( aStrBuf
.getStr() );
11066 sal_Int64 input
= kSInt64Max
;
11067 sal_Int16 radix
= 8;
11069 expVal
+= OString( "777777777777777777777" );
11070 aStrBuf
.append( input
, radix
);
11072 CPPUNIT_ASSERT_MESSAGE
11074 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[2]",
11075 aStrBuf
.getStr()== expVal
&&
11076 aStrBuf
.getLength() == expVal
.getLength()
11083 OStringBuffer
aStrBuf( arrOUS
[2] );
11084 OString
expVal( aStrBuf
.getStr() );
11085 sal_Int64 input
= kSInt8Max
;
11086 sal_Int16 radix
= 10;
11088 expVal
+= OString( "127" );
11089 aStrBuf
.append( input
, radix
);
11091 CPPUNIT_ASSERT_MESSAGE
11093 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
11094 aStrBuf
.getStr()== expVal
&&
11095 aStrBuf
.getLength() == expVal
.getLength()
11102 OStringBuffer
aStrBuf( arrOUS
[2] );
11103 OString
expVal( aStrBuf
.getStr() );
11104 sal_Int64 input
= kSInt64Max
;
11105 sal_Int16 radix
= 10;
11107 expVal
+= OString( "9223372036854775807" );
11108 aStrBuf
.append( input
, radix
);
11110 CPPUNIT_ASSERT_MESSAGE
11112 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[2]",
11113 aStrBuf
.getStr()== expVal
&&
11114 aStrBuf
.getLength() == expVal
.getLength()
11121 OStringBuffer
aStrBuf( arrOUS
[2] );
11122 OString
expVal( aStrBuf
.getStr() );
11123 sal_Int64 input
= kSInt8Max
;
11124 sal_Int16 radix
= 16;
11126 expVal
+= OString( "7f" );
11127 aStrBuf
.append( input
, radix
);
11129 CPPUNIT_ASSERT_MESSAGE
11131 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
11132 aStrBuf
.getStr()== expVal
&&
11133 aStrBuf
.getLength() == expVal
.getLength()
11140 OStringBuffer
aStrBuf( arrOUS
[2] );
11141 OString
expVal( aStrBuf
.getStr() );
11142 sal_Int64 input
= kSInt64Max
;
11143 sal_Int16 radix
= 16;
11145 expVal
+= OString( "7fffffffffffffff" );
11146 aStrBuf
.append( input
, radix
);
11148 CPPUNIT_ASSERT_MESSAGE
11150 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[2]",
11151 aStrBuf
.getStr()== expVal
&&
11152 aStrBuf
.getLength() == expVal
.getLength()
11159 OStringBuffer
aStrBuf( arrOUS
[2] );
11160 OString
expVal( aStrBuf
.getStr() );
11161 sal_Int64 input
= kSInt8Max
;
11162 sal_Int16 radix
= 36;
11164 expVal
+= OString( "3j" );
11165 aStrBuf
.append( input
, radix
);
11167 CPPUNIT_ASSERT_MESSAGE
11169 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
11170 aStrBuf
.getStr()== expVal
&&
11171 aStrBuf
.getLength() == expVal
.getLength()
11178 OStringBuffer
aStrBuf( arrOUS
[2] );
11179 OString
expVal( aStrBuf
.getStr() );
11180 sal_Int64 input
= kSInt64Max
;
11181 sal_Int16 radix
= 36;
11183 expVal
+= OString( "1y2p0ij32e8e7" );
11184 aStrBuf
.append( input
, radix
);
11186 CPPUNIT_ASSERT_MESSAGE
11188 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[2]",
11189 aStrBuf
.getStr()== expVal
&&
11190 aStrBuf
.getLength() == expVal
.getLength()
11197 OStringBuffer
aStrBuf( arrOUS
[3] );
11198 OString
expVal( aStrBuf
.getStr() );
11199 sal_Int64 input
= kSInt8Max
;
11200 sal_Int16 radix
= 2;
11202 expVal
+= OString( "1111111" );
11203 aStrBuf
.append( input
, radix
);
11205 CPPUNIT_ASSERT_MESSAGE
11207 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
11208 aStrBuf
.getStr()== expVal
&&
11209 aStrBuf
.getLength() == expVal
.getLength()
11216 OStringBuffer
aStrBuf( arrOUS
[3] );
11217 OString
expVal( aStrBuf
.getStr() );
11218 sal_Int64 input
= kSInt64Max
;
11219 sal_Int16 radix
= 2;
11221 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11222 aStrBuf
.append( input
, radix
);
11224 CPPUNIT_ASSERT_MESSAGE
11226 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[3]",
11227 aStrBuf
.getStr()== expVal
&&
11228 aStrBuf
.getLength() == expVal
.getLength()
11235 OStringBuffer
aStrBuf( arrOUS
[3] );
11236 OString
expVal( aStrBuf
.getStr() );
11237 sal_Int64 input
= kSInt8Max
;
11238 sal_Int16 radix
= 8;
11240 expVal
+= OString( "177" );
11241 aStrBuf
.append( input
, radix
);
11243 CPPUNIT_ASSERT_MESSAGE
11245 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
11246 aStrBuf
.getStr()== expVal
&&
11247 aStrBuf
.getLength() == expVal
.getLength()
11254 OStringBuffer
aStrBuf( arrOUS
[3] );
11255 OString
expVal( aStrBuf
.getStr() );
11256 sal_Int64 input
= kSInt64Max
;
11257 sal_Int16 radix
= 8;
11259 expVal
+= OString( "777777777777777777777" );
11260 aStrBuf
.append( input
, radix
);
11262 CPPUNIT_ASSERT_MESSAGE
11264 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[3]",
11265 aStrBuf
.getStr()== expVal
&&
11266 aStrBuf
.getLength() == expVal
.getLength()
11273 OStringBuffer
aStrBuf( arrOUS
[3] );
11274 OString
expVal( aStrBuf
.getStr() );
11275 sal_Int64 input
= kSInt8Max
;
11276 sal_Int16 radix
= 10;
11278 expVal
+= OString( "127" );
11279 aStrBuf
.append( input
, radix
);
11281 CPPUNIT_ASSERT_MESSAGE
11283 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
11284 aStrBuf
.getStr()== expVal
&&
11285 aStrBuf
.getLength() == expVal
.getLength()
11292 OStringBuffer
aStrBuf( arrOUS
[3] );
11293 OString
expVal( aStrBuf
.getStr() );
11294 sal_Int64 input
= kSInt64Max
;
11295 sal_Int16 radix
= 10;
11297 expVal
+= OString( "9223372036854775807" );
11298 aStrBuf
.append( input
, radix
);
11300 CPPUNIT_ASSERT_MESSAGE
11302 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[3]",
11303 aStrBuf
.getStr()== expVal
&&
11304 aStrBuf
.getLength() == expVal
.getLength()
11311 OStringBuffer
aStrBuf( arrOUS
[3] );
11312 OString
expVal( aStrBuf
.getStr() );
11313 sal_Int64 input
= kSInt8Max
;
11314 sal_Int16 radix
= 16;
11316 expVal
+= OString( "7f" );
11317 aStrBuf
.append( input
, radix
);
11319 CPPUNIT_ASSERT_MESSAGE
11321 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
11322 aStrBuf
.getStr()== expVal
&&
11323 aStrBuf
.getLength() == expVal
.getLength()
11330 OStringBuffer
aStrBuf( arrOUS
[3] );
11331 OString
expVal( aStrBuf
.getStr() );
11332 sal_Int64 input
= kSInt64Max
;
11333 sal_Int16 radix
= 16;
11335 expVal
+= OString( "7fffffffffffffff" );
11336 aStrBuf
.append( input
, radix
);
11338 CPPUNIT_ASSERT_MESSAGE
11340 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[3]",
11341 aStrBuf
.getStr()== expVal
&&
11342 aStrBuf
.getLength() == expVal
.getLength()
11349 OStringBuffer
aStrBuf( arrOUS
[3] );
11350 OString
expVal( aStrBuf
.getStr() );
11351 sal_Int64 input
= kSInt8Max
;
11352 sal_Int16 radix
= 36;
11354 expVal
+= OString( "3j" );
11355 aStrBuf
.append( input
, radix
);
11357 CPPUNIT_ASSERT_MESSAGE
11359 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
11360 aStrBuf
.getStr()== expVal
&&
11361 aStrBuf
.getLength() == expVal
.getLength()
11368 OStringBuffer
aStrBuf( arrOUS
[3] );
11369 OString
expVal( aStrBuf
.getStr() );
11370 sal_Int64 input
= kSInt64Max
;
11371 sal_Int16 radix
= 36;
11373 expVal
+= OString( "1y2p0ij32e8e7" );
11374 aStrBuf
.append( input
, radix
);
11376 CPPUNIT_ASSERT_MESSAGE
11378 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[3]",
11379 aStrBuf
.getStr()== expVal
&&
11380 aStrBuf
.getLength() == expVal
.getLength()
11387 OStringBuffer
aStrBuf( arrOUS
[4] );
11388 OString
expVal( aStrBuf
.getStr() );
11389 sal_Int64 input
= kSInt8Max
;
11390 sal_Int16 radix
= 2;
11392 expVal
+= OString( "1111111" );
11393 aStrBuf
.append( input
, radix
);
11395 CPPUNIT_ASSERT_MESSAGE
11397 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
11398 aStrBuf
.getStr()== expVal
&&
11399 aStrBuf
.getLength() == expVal
.getLength()
11406 OStringBuffer
aStrBuf( arrOUS
[4] );
11407 OString
expVal( aStrBuf
.getStr() );
11408 sal_Int64 input
= kSInt64Max
;
11409 sal_Int16 radix
= 2;
11411 expVal
+= OString( "111111111111111111111111111111111111111111111111111111111111111" );
11412 aStrBuf
.append( input
, radix
);
11414 CPPUNIT_ASSERT_MESSAGE
11416 "append(sal_Int64, radix 2)_006_Bounderies_kRadixBinary for arrOUS[4]",
11417 aStrBuf
.getStr()== expVal
&&
11418 aStrBuf
.getLength() == expVal
.getLength()
11425 OStringBuffer
aStrBuf( arrOUS
[4] );
11426 OString
expVal( aStrBuf
.getStr() );
11427 sal_Int64 input
= kSInt8Max
;
11428 sal_Int16 radix
= 8;
11430 expVal
+= OString( "177" );
11431 aStrBuf
.append( input
, radix
);
11433 CPPUNIT_ASSERT_MESSAGE
11435 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
11436 aStrBuf
.getStr()== expVal
&&
11437 aStrBuf
.getLength() == expVal
.getLength()
11444 OStringBuffer
aStrBuf( arrOUS
[4] );
11445 OString
expVal( aStrBuf
.getStr() );
11446 sal_Int64 input
= kSInt64Max
;
11447 sal_Int16 radix
= 8;
11449 expVal
+= OString( "777777777777777777777" );
11450 aStrBuf
.append( input
, radix
);
11452 CPPUNIT_ASSERT_MESSAGE
11454 "append(sal_Int64, radix 8)_006_Bounderies_kRadixBinary for arrOUS[4]",
11455 aStrBuf
.getStr()== expVal
&&
11456 aStrBuf
.getLength() == expVal
.getLength()
11463 OStringBuffer
aStrBuf( arrOUS
[4] );
11464 OString
expVal( aStrBuf
.getStr() );
11465 sal_Int64 input
= kSInt8Max
;
11466 sal_Int16 radix
= 10;
11468 expVal
+= OString( "127" );
11469 aStrBuf
.append( input
, radix
);
11471 CPPUNIT_ASSERT_MESSAGE
11473 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
11474 aStrBuf
.getStr()== expVal
&&
11475 aStrBuf
.getLength() == expVal
.getLength()
11482 OStringBuffer
aStrBuf( arrOUS
[4] );
11483 OString
expVal( aStrBuf
.getStr() );
11484 sal_Int64 input
= kSInt64Max
;
11485 sal_Int16 radix
= 10;
11487 expVal
+= OString( "9223372036854775807" );
11488 aStrBuf
.append( input
, radix
);
11490 CPPUNIT_ASSERT_MESSAGE
11492 "append(sal_Int64, radix 10)_006_Bounderies_kRadixBinary for arrOUS[4]",
11493 aStrBuf
.getStr()== expVal
&&
11494 aStrBuf
.getLength() == expVal
.getLength()
11501 OStringBuffer
aStrBuf( arrOUS
[4] );
11502 OString
expVal( aStrBuf
.getStr() );
11503 sal_Int64 input
= kSInt8Max
;
11504 sal_Int16 radix
= 16;
11506 expVal
+= OString( "7f" );
11507 aStrBuf
.append( input
, radix
);
11509 CPPUNIT_ASSERT_MESSAGE
11511 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
11512 aStrBuf
.getStr()== expVal
&&
11513 aStrBuf
.getLength() == expVal
.getLength()
11520 OStringBuffer
aStrBuf( arrOUS
[4] );
11521 OString
expVal( aStrBuf
.getStr() );
11522 sal_Int64 input
= kSInt64Max
;
11523 sal_Int16 radix
= 16;
11525 expVal
+= OString( "7fffffffffffffff" );
11526 aStrBuf
.append( input
, radix
);
11528 CPPUNIT_ASSERT_MESSAGE
11530 "append(sal_Int64, radix 16)_006_Bounderies_kRadixBinary for arrOUS[4]",
11531 aStrBuf
.getStr()== expVal
&&
11532 aStrBuf
.getLength() == expVal
.getLength()
11539 OStringBuffer
aStrBuf( arrOUS
[4] );
11540 OString
expVal( aStrBuf
.getStr() );
11541 sal_Int64 input
= kSInt8Max
;
11542 sal_Int16 radix
= 36;
11544 expVal
+= OString( "3j" );
11545 aStrBuf
.append( input
, radix
);
11547 CPPUNIT_ASSERT_MESSAGE
11549 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
11550 aStrBuf
.getStr()== expVal
&&
11551 aStrBuf
.getLength() == expVal
.getLength()
11558 OStringBuffer
aStrBuf( arrOUS
[4] );
11559 OString
expVal( aStrBuf
.getStr() );
11560 sal_Int64 input
= kSInt64Max
;
11561 sal_Int16 radix
= 36;
11563 expVal
+= OString( "1y2p0ij32e8e7" );
11564 aStrBuf
.append( input
, radix
);
11566 CPPUNIT_ASSERT_MESSAGE
11568 "append(sal_Int64, radix 36)_006_Bounderies_kRadixBinary for arrOUS[4]",
11569 aStrBuf
.getStr()== expVal
&&
11570 aStrBuf
.getLength() == expVal
.getLength()
11575 CPPUNIT_TEST_SUITE( append_007_Int64_Bounderies
);
11576 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
11577 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
11578 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
11579 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
11580 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
11581 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
11582 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
11583 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
11584 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
11585 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
11586 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
11587 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
11588 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
11589 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
11590 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
11591 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
11592 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
11593 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
11594 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
11595 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
11596 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
11597 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
11598 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
11599 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
11600 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
11601 CPPUNIT_TEST_SUITE_END();
11604 // testing the method append( sal_Int64 i, sal_Int16 radix=2 )
11605 // for negative value
11606 // testing the method append( sal_Int64 i, sal_Int16 radix=8 )
11607 // for negative value
11608 // testing the method append( sal_Int64 i, sal_Int16 radix=10 )
11609 // for negative value
11610 // testing the method append( sal_Int64 i, sal_Int16 radix=16 )
11611 // for negative value
11612 // testing the method append( sal_Int64 i, sal_Int16 radix=36 )
11613 // for negative value
11615 class append_007_Int64_Negative
: public CppUnit::TestFixture
11620 void setUp() override
11622 arrOUS
[0] = OString( kTestStr7
);
11623 arrOUS
[1] = OString( );
11624 arrOUS
[2] = OString( kTestStr25
);
11625 arrOUS
[3] = OString( "" );
11626 arrOUS
[4] = OString( kTestStr28
);
11631 OStringBuffer
aStrBuf( arrOUS
[0] );
11632 OString
expVal( aStrBuf
.getStr() );
11633 sal_Int64 input
= -0;
11634 sal_Int16 radix
= 2;
11636 expVal
+= OString( "0" );
11637 aStrBuf
.append( input
, radix
);
11639 CPPUNIT_ASSERT_MESSAGE
11641 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
11642 aStrBuf
.getStr()== expVal
&&
11643 aStrBuf
.getLength() == expVal
.getLength()
11650 OStringBuffer
aStrBuf( arrOUS
[0] );
11651 OString
expVal( aStrBuf
.getStr() );
11652 sal_Int64 input
= -4;
11653 sal_Int16 radix
= 2;
11655 expVal
+= OString( "-" );
11656 expVal
+= OString( "100" );
11657 aStrBuf
.append( input
, radix
);
11659 CPPUNIT_ASSERT_MESSAGE
11661 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
11662 aStrBuf
.getStr()== expVal
&&
11663 aStrBuf
.getLength() == expVal
.getLength()
11670 OStringBuffer
aStrBuf( arrOUS
[0] );
11671 OString
expVal( aStrBuf
.getStr() );
11672 sal_Int64 input
= -8;
11673 sal_Int16 radix
= 2;
11675 expVal
+= OString( "-" );
11676 expVal
+= OString( "1000" );
11677 aStrBuf
.append( input
, radix
);
11679 CPPUNIT_ASSERT_MESSAGE
11681 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
11682 aStrBuf
.getStr()== expVal
&&
11683 aStrBuf
.getLength() == expVal
.getLength()
11690 OStringBuffer
aStrBuf( arrOUS
[0] );
11691 OString
expVal( aStrBuf
.getStr() );
11692 sal_Int64 input
= -15;
11693 sal_Int16 radix
= 2;
11695 expVal
+= OString( "-" );
11696 expVal
+= OString( "1111" );
11697 aStrBuf
.append( input
, radix
);
11699 CPPUNIT_ASSERT_MESSAGE
11701 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[0]",
11702 aStrBuf
.getStr()== expVal
&&
11703 aStrBuf
.getLength() == expVal
.getLength()
11710 OStringBuffer
aStrBuf( arrOUS
[0] );
11711 OString
expVal( aStrBuf
.getStr() );
11712 sal_Int64 input
= -0;
11713 sal_Int16 radix
= 8;
11715 expVal
+= OString( "0" );
11716 aStrBuf
.append( input
, radix
);
11718 CPPUNIT_ASSERT_MESSAGE
11720 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
11721 aStrBuf
.getStr()== expVal
&&
11722 aStrBuf
.getLength() == expVal
.getLength()
11729 OStringBuffer
aStrBuf( arrOUS
[0] );
11730 OString
expVal( aStrBuf
.getStr() );
11731 sal_Int64 input
= -4;
11732 sal_Int16 radix
= 8;
11734 expVal
+= OString( "-" );
11735 expVal
+= OString( "4" );
11736 aStrBuf
.append( input
, radix
);
11738 CPPUNIT_ASSERT_MESSAGE
11740 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
11741 aStrBuf
.getStr()== expVal
&&
11742 aStrBuf
.getLength() == expVal
.getLength()
11749 OStringBuffer
aStrBuf( arrOUS
[0] );
11750 OString
expVal( aStrBuf
.getStr() );
11751 sal_Int64 input
= -8;
11752 sal_Int16 radix
= 8;
11754 expVal
+= OString( "-" );
11755 expVal
+= OString( "10" );
11756 aStrBuf
.append( input
, radix
);
11758 CPPUNIT_ASSERT_MESSAGE
11760 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
11761 aStrBuf
.getStr()== expVal
&&
11762 aStrBuf
.getLength() == expVal
.getLength()
11769 OStringBuffer
aStrBuf( arrOUS
[0] );
11770 OString
expVal( aStrBuf
.getStr() );
11771 sal_Int64 input
= -15;
11772 sal_Int16 radix
= 8;
11774 expVal
+= OString( "-" );
11775 expVal
+= OString( "17" );
11776 aStrBuf
.append( input
, radix
);
11778 CPPUNIT_ASSERT_MESSAGE
11780 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[0]",
11781 aStrBuf
.getStr()== expVal
&&
11782 aStrBuf
.getLength() == expVal
.getLength()
11789 OStringBuffer
aStrBuf( arrOUS
[0] );
11790 OString
expVal( aStrBuf
.getStr() );
11791 sal_Int64 input
= -0;
11792 sal_Int16 radix
= 10;
11794 expVal
+= OString( "0" );
11795 aStrBuf
.append( input
, radix
);
11797 CPPUNIT_ASSERT_MESSAGE
11799 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
11800 aStrBuf
.getStr()== expVal
&&
11801 aStrBuf
.getLength() == expVal
.getLength()
11808 OStringBuffer
aStrBuf( arrOUS
[0] );
11809 OString
expVal( aStrBuf
.getStr() );
11810 sal_Int64 input
= -4;
11811 sal_Int16 radix
= 10;
11813 expVal
+= OString( "-" );
11814 expVal
+= OString( "4" );
11815 aStrBuf
.append( input
, radix
);
11817 CPPUNIT_ASSERT_MESSAGE
11819 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
11820 aStrBuf
.getStr()== expVal
&&
11821 aStrBuf
.getLength() == expVal
.getLength()
11828 OStringBuffer
aStrBuf( arrOUS
[0] );
11829 OString
expVal( aStrBuf
.getStr() );
11830 sal_Int64 input
= -8;
11831 sal_Int16 radix
= 10;
11833 expVal
+= OString( "-" );
11834 expVal
+= OString( "8" );
11835 aStrBuf
.append( input
, radix
);
11837 CPPUNIT_ASSERT_MESSAGE
11839 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
11840 aStrBuf
.getStr()== expVal
&&
11841 aStrBuf
.getLength() == expVal
.getLength()
11848 OStringBuffer
aStrBuf( arrOUS
[0] );
11849 OString
expVal( aStrBuf
.getStr() );
11850 sal_Int64 input
= -15;
11851 sal_Int16 radix
= 10;
11853 expVal
+= OString( "-" );
11854 expVal
+= OString( "15" );
11855 aStrBuf
.append( input
, radix
);
11857 CPPUNIT_ASSERT_MESSAGE
11859 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[0]",
11860 aStrBuf
.getStr()== expVal
&&
11861 aStrBuf
.getLength() == expVal
.getLength()
11868 OStringBuffer
aStrBuf( arrOUS
[0] );
11869 OString
expVal( aStrBuf
.getStr() );
11870 sal_Int64 input
= -0;
11871 sal_Int16 radix
= 16;
11873 expVal
+= OString( "0" );
11874 aStrBuf
.append( input
, radix
);
11876 CPPUNIT_ASSERT_MESSAGE
11878 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
11879 aStrBuf
.getStr()== expVal
&&
11880 aStrBuf
.getLength() == expVal
.getLength()
11887 OStringBuffer
aStrBuf( arrOUS
[0] );
11888 OString
expVal( aStrBuf
.getStr() );
11889 sal_Int64 input
= -4;
11890 sal_Int16 radix
= 16;
11892 expVal
+= OString( "-" );
11893 expVal
+= OString( "4" );
11894 aStrBuf
.append( input
, radix
);
11896 CPPUNIT_ASSERT_MESSAGE
11898 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
11899 aStrBuf
.getStr()== expVal
&&
11900 aStrBuf
.getLength() == expVal
.getLength()
11907 OStringBuffer
aStrBuf( arrOUS
[0] );
11908 OString
expVal( aStrBuf
.getStr() );
11909 sal_Int64 input
= -8;
11910 sal_Int16 radix
= 16;
11912 expVal
+= OString( "-" );
11913 expVal
+= OString( "8" );
11914 aStrBuf
.append( input
, radix
);
11916 CPPUNIT_ASSERT_MESSAGE
11918 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
11919 aStrBuf
.getStr()== expVal
&&
11920 aStrBuf
.getLength() == expVal
.getLength()
11927 OStringBuffer
aStrBuf( arrOUS
[0] );
11928 OString
expVal( aStrBuf
.getStr() );
11929 sal_Int64 input
= -15;
11930 sal_Int16 radix
= 16;
11932 expVal
+= OString( "-" );
11933 expVal
+= OString( "f" );
11934 aStrBuf
.append( input
, radix
);
11936 CPPUNIT_ASSERT_MESSAGE
11938 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[0]",
11939 aStrBuf
.getStr()== expVal
&&
11940 aStrBuf
.getLength() == expVal
.getLength()
11947 OStringBuffer
aStrBuf( arrOUS
[0] );
11948 OString
expVal( aStrBuf
.getStr() );
11949 sal_Int64 input
= -0;
11950 sal_Int16 radix
= 36;
11952 expVal
+= OString( "0" );
11953 aStrBuf
.append( input
, radix
);
11955 CPPUNIT_ASSERT_MESSAGE
11957 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
11958 aStrBuf
.getStr()== expVal
&&
11959 aStrBuf
.getLength() == expVal
.getLength()
11966 OStringBuffer
aStrBuf( arrOUS
[0] );
11967 OString
expVal( aStrBuf
.getStr() );
11968 sal_Int64 input
= -4;
11969 sal_Int16 radix
= 36;
11971 expVal
+= OString( "-" );
11972 expVal
+= OString( "4" );
11973 aStrBuf
.append( input
, radix
);
11975 CPPUNIT_ASSERT_MESSAGE
11977 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
11978 aStrBuf
.getStr()== expVal
&&
11979 aStrBuf
.getLength() == expVal
.getLength()
11986 OStringBuffer
aStrBuf( arrOUS
[0] );
11987 OString
expVal( aStrBuf
.getStr() );
11988 sal_Int64 input
= -8;
11989 sal_Int16 radix
= 36;
11991 expVal
+= OString( "-" );
11992 expVal
+= OString( "8" );
11993 aStrBuf
.append( input
, radix
);
11995 CPPUNIT_ASSERT_MESSAGE
11997 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
11998 aStrBuf
.getStr()== expVal
&&
11999 aStrBuf
.getLength() == expVal
.getLength()
12006 OStringBuffer
aStrBuf( arrOUS
[0] );
12007 OString
expVal( aStrBuf
.getStr() );
12008 sal_Int64 input
= -35;
12009 sal_Int16 radix
= 36;
12011 expVal
+= OString( "-" );
12012 expVal
+= OString( "z" );
12013 aStrBuf
.append( input
, radix
);
12015 CPPUNIT_ASSERT_MESSAGE
12017 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[0]",
12018 aStrBuf
.getStr()== expVal
&&
12019 aStrBuf
.getLength() == expVal
.getLength()
12026 OStringBuffer
aStrBuf( arrOUS
[1] );
12027 OString
expVal( aStrBuf
.getStr() );
12028 sal_Int64 input
= -0;
12029 sal_Int16 radix
= 2;
12031 expVal
+= OString( "0" );
12032 aStrBuf
.append( input
, radix
);
12034 CPPUNIT_ASSERT_MESSAGE
12036 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12037 aStrBuf
.getStr()== expVal
&&
12038 aStrBuf
.getLength() == expVal
.getLength()
12045 OStringBuffer
aStrBuf( arrOUS
[1] );
12046 OString
expVal( aStrBuf
.getStr() );
12047 sal_Int64 input
= -4;
12048 sal_Int16 radix
= 2;
12050 expVal
+= OString( "-" );
12051 expVal
+= OString( "100" );
12052 aStrBuf
.append( input
, radix
);
12054 CPPUNIT_ASSERT_MESSAGE
12056 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12057 aStrBuf
.getStr()== expVal
&&
12058 aStrBuf
.getLength() == expVal
.getLength()
12065 OStringBuffer
aStrBuf( arrOUS
[1] );
12066 OString
expVal( aStrBuf
.getStr() );
12067 sal_Int64 input
= -8;
12068 sal_Int16 radix
= 2;
12070 expVal
+= OString( "-" );
12071 expVal
+= OString( "1000" );
12072 aStrBuf
.append( input
, radix
);
12074 CPPUNIT_ASSERT_MESSAGE
12076 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12077 aStrBuf
.getStr()== expVal
&&
12078 aStrBuf
.getLength() == expVal
.getLength()
12085 OStringBuffer
aStrBuf( arrOUS
[1] );
12086 OString
expVal( aStrBuf
.getStr() );
12087 sal_Int64 input
= -15;
12088 sal_Int16 radix
= 2;
12090 expVal
+= OString( "-" );
12091 expVal
+= OString( "1111" );
12092 aStrBuf
.append( input
, radix
);
12094 CPPUNIT_ASSERT_MESSAGE
12096 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[1]",
12097 aStrBuf
.getStr()== expVal
&&
12098 aStrBuf
.getLength() == expVal
.getLength()
12105 OStringBuffer
aStrBuf( arrOUS
[1] );
12106 OString
expVal( aStrBuf
.getStr() );
12107 sal_Int64 input
= -0;
12108 sal_Int16 radix
= 8;
12110 expVal
+= OString( "0" );
12111 aStrBuf
.append( input
, radix
);
12113 CPPUNIT_ASSERT_MESSAGE
12115 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12116 aStrBuf
.getStr()== expVal
&&
12117 aStrBuf
.getLength() == expVal
.getLength()
12124 OStringBuffer
aStrBuf( arrOUS
[1] );
12125 OString
expVal( aStrBuf
.getStr() );
12126 sal_Int64 input
= -4;
12127 sal_Int16 radix
= 8;
12129 expVal
+= OString( "-" );
12130 expVal
+= OString( "4" );
12131 aStrBuf
.append( input
, radix
);
12133 CPPUNIT_ASSERT_MESSAGE
12135 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12136 aStrBuf
.getStr()== expVal
&&
12137 aStrBuf
.getLength() == expVal
.getLength()
12144 OStringBuffer
aStrBuf( arrOUS
[1] );
12145 OString
expVal( aStrBuf
.getStr() );
12146 sal_Int64 input
= -8;
12147 sal_Int16 radix
= 8;
12149 expVal
+= OString( "-" );
12150 expVal
+= OString( "10" );
12151 aStrBuf
.append( input
, radix
);
12153 CPPUNIT_ASSERT_MESSAGE
12155 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12156 aStrBuf
.getStr()== expVal
&&
12157 aStrBuf
.getLength() == expVal
.getLength()
12164 OStringBuffer
aStrBuf( arrOUS
[1] );
12165 OString
expVal( aStrBuf
.getStr() );
12166 sal_Int64 input
= -15;
12167 sal_Int16 radix
= 8;
12169 expVal
+= OString( "-" );
12170 expVal
+= OString( "17" );
12171 aStrBuf
.append( input
, radix
);
12173 CPPUNIT_ASSERT_MESSAGE
12175 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[1]",
12176 aStrBuf
.getStr()== expVal
&&
12177 aStrBuf
.getLength() == expVal
.getLength()
12184 OStringBuffer
aStrBuf( arrOUS
[1] );
12185 OString
expVal( aStrBuf
.getStr() );
12186 sal_Int64 input
= -0;
12187 sal_Int16 radix
= 10;
12189 expVal
+= OString( "0" );
12190 aStrBuf
.append( input
, radix
);
12192 CPPUNIT_ASSERT_MESSAGE
12194 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12195 aStrBuf
.getStr()== expVal
&&
12196 aStrBuf
.getLength() == expVal
.getLength()
12203 OStringBuffer
aStrBuf( arrOUS
[1] );
12204 OString
expVal( aStrBuf
.getStr() );
12205 sal_Int64 input
= -4;
12206 sal_Int16 radix
= 10;
12208 expVal
+= OString( "-" );
12209 expVal
+= OString( "4" );
12210 aStrBuf
.append( input
, radix
);
12212 CPPUNIT_ASSERT_MESSAGE
12214 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12215 aStrBuf
.getStr()== expVal
&&
12216 aStrBuf
.getLength() == expVal
.getLength()
12223 OStringBuffer
aStrBuf( arrOUS
[1] );
12224 OString
expVal( aStrBuf
.getStr() );
12225 sal_Int64 input
= -8;
12226 sal_Int16 radix
= 10;
12228 expVal
+= OString( "-" );
12229 expVal
+= OString( "8" );
12230 aStrBuf
.append( input
, radix
);
12232 CPPUNIT_ASSERT_MESSAGE
12234 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12235 aStrBuf
.getStr()== expVal
&&
12236 aStrBuf
.getLength() == expVal
.getLength()
12243 OStringBuffer
aStrBuf( arrOUS
[1] );
12244 OString
expVal( aStrBuf
.getStr() );
12245 sal_Int64 input
= -15;
12246 sal_Int16 radix
= 10;
12248 expVal
+= OString( "-" );
12249 expVal
+= OString( "15" );
12250 aStrBuf
.append( input
, radix
);
12252 CPPUNIT_ASSERT_MESSAGE
12254 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[1]",
12255 aStrBuf
.getStr()== expVal
&&
12256 aStrBuf
.getLength() == expVal
.getLength()
12263 OStringBuffer
aStrBuf( arrOUS
[1] );
12264 OString
expVal( aStrBuf
.getStr() );
12265 sal_Int64 input
= -0;
12266 sal_Int16 radix
= 16;
12268 expVal
+= OString( "0" );
12269 aStrBuf
.append( input
, radix
);
12271 CPPUNIT_ASSERT_MESSAGE
12273 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12274 aStrBuf
.getStr()== expVal
&&
12275 aStrBuf
.getLength() == expVal
.getLength()
12282 OStringBuffer
aStrBuf( arrOUS
[1] );
12283 OString
expVal( aStrBuf
.getStr() );
12284 sal_Int64 input
= -4;
12285 sal_Int16 radix
= 16;
12287 expVal
+= OString( "-" );
12288 expVal
+= OString( "4" );
12289 aStrBuf
.append( input
, radix
);
12291 CPPUNIT_ASSERT_MESSAGE
12293 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12294 aStrBuf
.getStr()== expVal
&&
12295 aStrBuf
.getLength() == expVal
.getLength()
12302 OStringBuffer
aStrBuf( arrOUS
[1] );
12303 OString
expVal( aStrBuf
.getStr() );
12304 sal_Int64 input
= -8;
12305 sal_Int16 radix
= 16;
12307 expVal
+= OString( "-" );
12308 expVal
+= OString( "8" );
12309 aStrBuf
.append( input
, radix
);
12311 CPPUNIT_ASSERT_MESSAGE
12313 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12314 aStrBuf
.getStr()== expVal
&&
12315 aStrBuf
.getLength() == expVal
.getLength()
12322 OStringBuffer
aStrBuf( arrOUS
[1] );
12323 OString
expVal( aStrBuf
.getStr() );
12324 sal_Int64 input
= -15;
12325 sal_Int16 radix
= 16;
12327 expVal
+= OString( "-" );
12328 expVal
+= OString( "f" );
12329 aStrBuf
.append( input
, radix
);
12331 CPPUNIT_ASSERT_MESSAGE
12333 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[1]",
12334 aStrBuf
.getStr()== expVal
&&
12335 aStrBuf
.getLength() == expVal
.getLength()
12342 OStringBuffer
aStrBuf( arrOUS
[1] );
12343 OString
expVal( aStrBuf
.getStr() );
12344 sal_Int64 input
= -0;
12345 sal_Int16 radix
= 36;
12347 expVal
+= OString( "0" );
12348 aStrBuf
.append( input
, radix
);
12350 CPPUNIT_ASSERT_MESSAGE
12352 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12353 aStrBuf
.getStr()== expVal
&&
12354 aStrBuf
.getLength() == expVal
.getLength()
12361 OStringBuffer
aStrBuf( arrOUS
[1] );
12362 OString
expVal( aStrBuf
.getStr() );
12363 sal_Int64 input
= -4;
12364 sal_Int16 radix
= 36;
12366 expVal
+= OString( "-" );
12367 expVal
+= OString( "4" );
12368 aStrBuf
.append( input
, radix
);
12370 CPPUNIT_ASSERT_MESSAGE
12372 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12373 aStrBuf
.getStr()== expVal
&&
12374 aStrBuf
.getLength() == expVal
.getLength()
12381 OStringBuffer
aStrBuf( arrOUS
[1] );
12382 OString
expVal( aStrBuf
.getStr() );
12383 sal_Int64 input
= -8;
12384 sal_Int16 radix
= 36;
12386 expVal
+= OString( "-" );
12387 expVal
+= OString( "8" );
12388 aStrBuf
.append( input
, radix
);
12390 CPPUNIT_ASSERT_MESSAGE
12392 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12393 aStrBuf
.getStr()== expVal
&&
12394 aStrBuf
.getLength() == expVal
.getLength()
12401 OStringBuffer
aStrBuf( arrOUS
[1] );
12402 OString
expVal( aStrBuf
.getStr() );
12403 sal_Int64 input
= -35;
12404 sal_Int16 radix
= 36;
12406 expVal
+= OString( "-" );
12407 expVal
+= OString( "z" );
12408 aStrBuf
.append( input
, radix
);
12410 CPPUNIT_ASSERT_MESSAGE
12412 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[1]",
12413 aStrBuf
.getStr()== expVal
&&
12414 aStrBuf
.getLength() == expVal
.getLength()
12421 OStringBuffer
aStrBuf( arrOUS
[2] );
12422 OString
expVal( aStrBuf
.getStr() );
12423 sal_Int64 input
= -0;
12424 sal_Int16 radix
= 2;
12426 expVal
+= OString( "0" );
12427 aStrBuf
.append( input
, radix
);
12429 CPPUNIT_ASSERT_MESSAGE
12431 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12432 aStrBuf
.getStr()== expVal
&&
12433 aStrBuf
.getLength() == expVal
.getLength()
12440 OStringBuffer
aStrBuf( arrOUS
[2] );
12441 OString
expVal( aStrBuf
.getStr() );
12442 sal_Int64 input
= -4;
12443 sal_Int16 radix
= 2;
12445 expVal
+= OString( "-" );
12446 expVal
+= OString( "100" );
12447 aStrBuf
.append( input
, radix
);
12449 CPPUNIT_ASSERT_MESSAGE
12451 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12452 aStrBuf
.getStr()== expVal
&&
12453 aStrBuf
.getLength() == expVal
.getLength()
12460 OStringBuffer
aStrBuf( arrOUS
[2] );
12461 OString
expVal( aStrBuf
.getStr() );
12462 sal_Int64 input
= -8;
12463 sal_Int16 radix
= 2;
12465 expVal
+= OString( "-" );
12466 expVal
+= OString( "1000" );
12467 aStrBuf
.append( input
, radix
);
12469 CPPUNIT_ASSERT_MESSAGE
12471 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12472 aStrBuf
.getStr()== expVal
&&
12473 aStrBuf
.getLength() == expVal
.getLength()
12480 OStringBuffer
aStrBuf( arrOUS
[2] );
12481 OString
expVal( aStrBuf
.getStr() );
12482 sal_Int64 input
= -15;
12483 sal_Int16 radix
= 2;
12485 expVal
+= OString( "-" );
12486 expVal
+= OString( "1111" );
12487 aStrBuf
.append( input
, radix
);
12489 CPPUNIT_ASSERT_MESSAGE
12491 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[2]",
12492 aStrBuf
.getStr()== expVal
&&
12493 aStrBuf
.getLength() == expVal
.getLength()
12500 OStringBuffer
aStrBuf( arrOUS
[2] );
12501 OString
expVal( aStrBuf
.getStr() );
12502 sal_Int64 input
= -0;
12503 sal_Int16 radix
= 8;
12505 expVal
+= OString( "0" );
12506 aStrBuf
.append( input
, radix
);
12508 CPPUNIT_ASSERT_MESSAGE
12510 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12511 aStrBuf
.getStr()== expVal
&&
12512 aStrBuf
.getLength() == expVal
.getLength()
12519 OStringBuffer
aStrBuf( arrOUS
[2] );
12520 OString
expVal( aStrBuf
.getStr() );
12521 sal_Int64 input
= -4;
12522 sal_Int16 radix
= 8;
12524 expVal
+= OString( "-" );
12525 expVal
+= OString( "4" );
12526 aStrBuf
.append( input
, radix
);
12528 CPPUNIT_ASSERT_MESSAGE
12530 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12531 aStrBuf
.getStr()== expVal
&&
12532 aStrBuf
.getLength() == expVal
.getLength()
12539 OStringBuffer
aStrBuf( arrOUS
[2] );
12540 OString
expVal( aStrBuf
.getStr() );
12541 sal_Int64 input
= -8;
12542 sal_Int16 radix
= 8;
12544 expVal
+= OString( "-" );
12545 expVal
+= OString( "10" );
12546 aStrBuf
.append( input
, radix
);
12548 CPPUNIT_ASSERT_MESSAGE
12550 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12551 aStrBuf
.getStr()== expVal
&&
12552 aStrBuf
.getLength() == expVal
.getLength()
12559 OStringBuffer
aStrBuf( arrOUS
[2] );
12560 OString
expVal( aStrBuf
.getStr() );
12561 sal_Int64 input
= -15;
12562 sal_Int16 radix
= 8;
12564 expVal
+= OString( "-" );
12565 expVal
+= OString( "17" );
12566 aStrBuf
.append( input
, radix
);
12568 CPPUNIT_ASSERT_MESSAGE
12570 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[2]",
12571 aStrBuf
.getStr()== expVal
&&
12572 aStrBuf
.getLength() == expVal
.getLength()
12579 OStringBuffer
aStrBuf( arrOUS
[2] );
12580 OString
expVal( aStrBuf
.getStr() );
12581 sal_Int64 input
= -0;
12582 sal_Int16 radix
= 10;
12584 expVal
+= OString( "0" );
12585 aStrBuf
.append( input
, radix
);
12587 CPPUNIT_ASSERT_MESSAGE
12589 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12590 aStrBuf
.getStr()== expVal
&&
12591 aStrBuf
.getLength() == expVal
.getLength()
12598 OStringBuffer
aStrBuf( arrOUS
[2] );
12599 OString
expVal( aStrBuf
.getStr() );
12600 sal_Int64 input
= -4;
12601 sal_Int16 radix
= 10;
12603 expVal
+= OString( "-" );
12604 expVal
+= OString( "4" );
12605 aStrBuf
.append( input
, radix
);
12607 CPPUNIT_ASSERT_MESSAGE
12609 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12610 aStrBuf
.getStr()== expVal
&&
12611 aStrBuf
.getLength() == expVal
.getLength()
12618 OStringBuffer
aStrBuf( arrOUS
[2] );
12619 OString
expVal( aStrBuf
.getStr() );
12620 sal_Int64 input
= -8;
12621 sal_Int16 radix
= 10;
12623 expVal
+= OString( "-" );
12624 expVal
+= OString( "8" );
12625 aStrBuf
.append( input
, radix
);
12627 CPPUNIT_ASSERT_MESSAGE
12629 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12630 aStrBuf
.getStr()== expVal
&&
12631 aStrBuf
.getLength() == expVal
.getLength()
12638 OStringBuffer
aStrBuf( arrOUS
[2] );
12639 OString
expVal( aStrBuf
.getStr() );
12640 sal_Int64 input
= -15;
12641 sal_Int16 radix
= 10;
12643 expVal
+= OString( "-" );
12644 expVal
+= OString( "15" );
12645 aStrBuf
.append( input
, radix
);
12647 CPPUNIT_ASSERT_MESSAGE
12649 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[2]",
12650 aStrBuf
.getStr()== expVal
&&
12651 aStrBuf
.getLength() == expVal
.getLength()
12658 OStringBuffer
aStrBuf( arrOUS
[2] );
12659 OString
expVal( aStrBuf
.getStr() );
12660 sal_Int64 input
= -0;
12661 sal_Int16 radix
= 16;
12663 expVal
+= OString( "0" );
12664 aStrBuf
.append( input
, radix
);
12666 CPPUNIT_ASSERT_MESSAGE
12668 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
12669 aStrBuf
.getStr()== expVal
&&
12670 aStrBuf
.getLength() == expVal
.getLength()
12677 OStringBuffer
aStrBuf( arrOUS
[2] );
12678 OString
expVal( aStrBuf
.getStr() );
12679 sal_Int64 input
= -4;
12680 sal_Int16 radix
= 16;
12682 expVal
+= OString( "-" );
12683 expVal
+= OString( "4" );
12684 aStrBuf
.append( input
, radix
);
12686 CPPUNIT_ASSERT_MESSAGE
12688 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
12689 aStrBuf
.getStr()== expVal
&&
12690 aStrBuf
.getLength() == expVal
.getLength()
12697 OStringBuffer
aStrBuf( arrOUS
[2] );
12698 OString
expVal( aStrBuf
.getStr() );
12699 sal_Int64 input
= -8;
12700 sal_Int16 radix
= 16;
12702 expVal
+= OString( "-" );
12703 expVal
+= OString( "8" );
12704 aStrBuf
.append( input
, radix
);
12706 CPPUNIT_ASSERT_MESSAGE
12708 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
12709 aStrBuf
.getStr()== expVal
&&
12710 aStrBuf
.getLength() == expVal
.getLength()
12717 OStringBuffer
aStrBuf( arrOUS
[2] );
12718 OString
expVal( aStrBuf
.getStr() );
12719 sal_Int64 input
= -15;
12720 sal_Int16 radix
= 16;
12722 expVal
+= OString( "-" );
12723 expVal
+= OString( "f" );
12724 aStrBuf
.append( input
, radix
);
12726 CPPUNIT_ASSERT_MESSAGE
12728 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[2]",
12729 aStrBuf
.getStr()== expVal
&&
12730 aStrBuf
.getLength() == expVal
.getLength()
12737 OStringBuffer
aStrBuf( arrOUS
[2] );
12738 OString
expVal( aStrBuf
.getStr() );
12739 sal_Int64 input
= -0;
12740 sal_Int16 radix
= 36;
12742 expVal
+= OString( "0" );
12743 aStrBuf
.append( input
, radix
);
12745 CPPUNIT_ASSERT_MESSAGE
12747 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
12748 aStrBuf
.getStr()== expVal
&&
12749 aStrBuf
.getLength() == expVal
.getLength()
12756 OStringBuffer
aStrBuf( arrOUS
[2] );
12757 OString
expVal( aStrBuf
.getStr() );
12758 sal_Int64 input
= -4;
12759 sal_Int16 radix
= 36;
12761 expVal
+= OString( "-" );
12762 expVal
+= OString( "4" );
12763 aStrBuf
.append( input
, radix
);
12765 CPPUNIT_ASSERT_MESSAGE
12767 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
12768 aStrBuf
.getStr()== expVal
&&
12769 aStrBuf
.getLength() == expVal
.getLength()
12776 OStringBuffer
aStrBuf( arrOUS
[2] );
12777 OString
expVal( aStrBuf
.getStr() );
12778 sal_Int64 input
= -8;
12779 sal_Int16 radix
= 36;
12781 expVal
+= OString( "-" );
12782 expVal
+= OString( "8" );
12783 aStrBuf
.append( input
, radix
);
12785 CPPUNIT_ASSERT_MESSAGE
12787 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
12788 aStrBuf
.getStr()== expVal
&&
12789 aStrBuf
.getLength() == expVal
.getLength()
12796 OStringBuffer
aStrBuf( arrOUS
[2] );
12797 OString
expVal( aStrBuf
.getStr() );
12798 sal_Int64 input
= -35;
12799 sal_Int16 radix
= 36;
12801 expVal
+= OString( "-" );
12802 expVal
+= OString( "z" );
12803 aStrBuf
.append( input
, radix
);
12805 CPPUNIT_ASSERT_MESSAGE
12807 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[2]",
12808 aStrBuf
.getStr()== expVal
&&
12809 aStrBuf
.getLength() == expVal
.getLength()
12816 OStringBuffer
aStrBuf( arrOUS
[3] );
12817 OString
expVal( aStrBuf
.getStr() );
12818 sal_Int64 input
= -0;
12819 sal_Int16 radix
= 2;
12821 expVal
+= OString( "0" );
12822 aStrBuf
.append( input
, radix
);
12824 CPPUNIT_ASSERT_MESSAGE
12826 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
12827 aStrBuf
.getStr()== expVal
&&
12828 aStrBuf
.getLength() == expVal
.getLength()
12835 OStringBuffer
aStrBuf( arrOUS
[3] );
12836 OString
expVal( aStrBuf
.getStr() );
12837 sal_Int64 input
= -4;
12838 sal_Int16 radix
= 2;
12840 expVal
+= OString( "-" );
12841 expVal
+= OString( "100" );
12842 aStrBuf
.append( input
, radix
);
12844 CPPUNIT_ASSERT_MESSAGE
12846 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
12847 aStrBuf
.getStr()== expVal
&&
12848 aStrBuf
.getLength() == expVal
.getLength()
12855 OStringBuffer
aStrBuf( arrOUS
[3] );
12856 OString
expVal( aStrBuf
.getStr() );
12857 sal_Int64 input
= -8;
12858 sal_Int16 radix
= 2;
12860 expVal
+= OString( "-" );
12861 expVal
+= OString( "1000" );
12862 aStrBuf
.append( input
, radix
);
12864 CPPUNIT_ASSERT_MESSAGE
12866 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
12867 aStrBuf
.getStr()== expVal
&&
12868 aStrBuf
.getLength() == expVal
.getLength()
12875 OStringBuffer
aStrBuf( arrOUS
[3] );
12876 OString
expVal( aStrBuf
.getStr() );
12877 sal_Int64 input
= -15;
12878 sal_Int16 radix
= 2;
12880 expVal
+= OString( "-" );
12881 expVal
+= OString( "1111" );
12882 aStrBuf
.append( input
, radix
);
12884 CPPUNIT_ASSERT_MESSAGE
12886 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[3]",
12887 aStrBuf
.getStr()== expVal
&&
12888 aStrBuf
.getLength() == expVal
.getLength()
12895 OStringBuffer
aStrBuf( arrOUS
[3] );
12896 OString
expVal( aStrBuf
.getStr() );
12897 sal_Int64 input
= -0;
12898 sal_Int16 radix
= 8;
12900 expVal
+= OString( "0" );
12901 aStrBuf
.append( input
, radix
);
12903 CPPUNIT_ASSERT_MESSAGE
12905 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
12906 aStrBuf
.getStr()== expVal
&&
12907 aStrBuf
.getLength() == expVal
.getLength()
12914 OStringBuffer
aStrBuf( arrOUS
[3] );
12915 OString
expVal( aStrBuf
.getStr() );
12916 sal_Int64 input
= -4;
12917 sal_Int16 radix
= 8;
12919 expVal
+= OString( "-" );
12920 expVal
+= OString( "4" );
12921 aStrBuf
.append( input
, radix
);
12923 CPPUNIT_ASSERT_MESSAGE
12925 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
12926 aStrBuf
.getStr()== expVal
&&
12927 aStrBuf
.getLength() == expVal
.getLength()
12934 OStringBuffer
aStrBuf( arrOUS
[3] );
12935 OString
expVal( aStrBuf
.getStr() );
12936 sal_Int64 input
= -8;
12937 sal_Int16 radix
= 8;
12939 expVal
+= OString( "-" );
12940 expVal
+= OString( "10" );
12941 aStrBuf
.append( input
, radix
);
12943 CPPUNIT_ASSERT_MESSAGE
12945 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
12946 aStrBuf
.getStr()== expVal
&&
12947 aStrBuf
.getLength() == expVal
.getLength()
12954 OStringBuffer
aStrBuf( arrOUS
[3] );
12955 OString
expVal( aStrBuf
.getStr() );
12956 sal_Int64 input
= -15;
12957 sal_Int16 radix
= 8;
12959 expVal
+= OString( "-" );
12960 expVal
+= OString( "17" );
12961 aStrBuf
.append( input
, radix
);
12963 CPPUNIT_ASSERT_MESSAGE
12965 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[3]",
12966 aStrBuf
.getStr()== expVal
&&
12967 aStrBuf
.getLength() == expVal
.getLength()
12974 OStringBuffer
aStrBuf( arrOUS
[3] );
12975 OString
expVal( aStrBuf
.getStr() );
12976 sal_Int64 input
= -0;
12977 sal_Int16 radix
= 10;
12979 expVal
+= OString( "0" );
12980 aStrBuf
.append( input
, radix
);
12982 CPPUNIT_ASSERT_MESSAGE
12984 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
12985 aStrBuf
.getStr()== expVal
&&
12986 aStrBuf
.getLength() == expVal
.getLength()
12993 OStringBuffer
aStrBuf( arrOUS
[3] );
12994 OString
expVal( aStrBuf
.getStr() );
12995 sal_Int64 input
= -4;
12996 sal_Int16 radix
= 10;
12998 expVal
+= OString( "-" );
12999 expVal
+= OString( "4" );
13000 aStrBuf
.append( input
, radix
);
13002 CPPUNIT_ASSERT_MESSAGE
13004 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13005 aStrBuf
.getStr()== expVal
&&
13006 aStrBuf
.getLength() == expVal
.getLength()
13013 OStringBuffer
aStrBuf( arrOUS
[3] );
13014 OString
expVal( aStrBuf
.getStr() );
13015 sal_Int64 input
= -8;
13016 sal_Int16 radix
= 10;
13018 expVal
+= OString( "-" );
13019 expVal
+= OString( "8" );
13020 aStrBuf
.append( input
, radix
);
13022 CPPUNIT_ASSERT_MESSAGE
13024 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13025 aStrBuf
.getStr()== expVal
&&
13026 aStrBuf
.getLength() == expVal
.getLength()
13033 OStringBuffer
aStrBuf( arrOUS
[3] );
13034 OString
expVal( aStrBuf
.getStr() );
13035 sal_Int64 input
= -15;
13036 sal_Int16 radix
= 10;
13038 expVal
+= OString( "-" );
13039 expVal
+= OString( "15" );
13040 aStrBuf
.append( input
, radix
);
13042 CPPUNIT_ASSERT_MESSAGE
13044 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[3]",
13045 aStrBuf
.getStr()== expVal
&&
13046 aStrBuf
.getLength() == expVal
.getLength()
13053 OStringBuffer
aStrBuf( arrOUS
[3] );
13054 OString
expVal( aStrBuf
.getStr() );
13055 sal_Int64 input
= -0;
13056 sal_Int16 radix
= 16;
13058 expVal
+= OString( "0" );
13059 aStrBuf
.append( input
, radix
);
13061 CPPUNIT_ASSERT_MESSAGE
13063 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13064 aStrBuf
.getStr()== expVal
&&
13065 aStrBuf
.getLength() == expVal
.getLength()
13072 OStringBuffer
aStrBuf( arrOUS
[3] );
13073 OString
expVal( aStrBuf
.getStr() );
13074 sal_Int64 input
= -4;
13075 sal_Int16 radix
= 16;
13077 expVal
+= OString( "-" );
13078 expVal
+= OString( "4" );
13079 aStrBuf
.append( input
, radix
);
13081 CPPUNIT_ASSERT_MESSAGE
13083 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13084 aStrBuf
.getStr()== expVal
&&
13085 aStrBuf
.getLength() == expVal
.getLength()
13092 OStringBuffer
aStrBuf( arrOUS
[3] );
13093 OString
expVal( aStrBuf
.getStr() );
13094 sal_Int64 input
= -8;
13095 sal_Int16 radix
= 16;
13097 expVal
+= OString( "-" );
13098 expVal
+= OString( "8" );
13099 aStrBuf
.append( input
, radix
);
13101 CPPUNIT_ASSERT_MESSAGE
13103 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13104 aStrBuf
.getStr()== expVal
&&
13105 aStrBuf
.getLength() == expVal
.getLength()
13112 OStringBuffer
aStrBuf( arrOUS
[3] );
13113 OString
expVal( aStrBuf
.getStr() );
13114 sal_Int64 input
= -15;
13115 sal_Int16 radix
= 16;
13117 expVal
+= OString( "-" );
13118 expVal
+= OString( "f" );
13119 aStrBuf
.append( input
, radix
);
13121 CPPUNIT_ASSERT_MESSAGE
13123 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[3]",
13124 aStrBuf
.getStr()== expVal
&&
13125 aStrBuf
.getLength() == expVal
.getLength()
13132 OStringBuffer
aStrBuf( arrOUS
[3] );
13133 OString
expVal( aStrBuf
.getStr() );
13134 sal_Int64 input
= -0;
13135 sal_Int16 radix
= 36;
13137 expVal
+= OString( "0" );
13138 aStrBuf
.append( input
, radix
);
13140 CPPUNIT_ASSERT_MESSAGE
13142 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13143 aStrBuf
.getStr()== expVal
&&
13144 aStrBuf
.getLength() == expVal
.getLength()
13151 OStringBuffer
aStrBuf( arrOUS
[3] );
13152 OString
expVal( aStrBuf
.getStr() );
13153 sal_Int64 input
= -4;
13154 sal_Int16 radix
= 36;
13156 expVal
+= OString( "-" );
13157 expVal
+= OString( "4" );
13158 aStrBuf
.append( input
, radix
);
13160 CPPUNIT_ASSERT_MESSAGE
13162 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13163 aStrBuf
.getStr()== expVal
&&
13164 aStrBuf
.getLength() == expVal
.getLength()
13171 OStringBuffer
aStrBuf( arrOUS
[3] );
13172 OString
expVal( aStrBuf
.getStr() );
13173 sal_Int64 input
= -8;
13174 sal_Int16 radix
= 36;
13176 expVal
+= OString( "-" );
13177 expVal
+= OString( "8" );
13178 aStrBuf
.append( input
, radix
);
13180 CPPUNIT_ASSERT_MESSAGE
13182 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13183 aStrBuf
.getStr()== expVal
&&
13184 aStrBuf
.getLength() == expVal
.getLength()
13191 OStringBuffer
aStrBuf( arrOUS
[3] );
13192 OString
expVal( aStrBuf
.getStr() );
13193 sal_Int64 input
= -35;
13194 sal_Int16 radix
= 36;
13196 expVal
+= OString( "-" );
13197 expVal
+= OString( "z" );
13198 aStrBuf
.append( input
, radix
);
13200 CPPUNIT_ASSERT_MESSAGE
13202 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[3]",
13203 aStrBuf
.getStr()== expVal
&&
13204 aStrBuf
.getLength() == expVal
.getLength()
13211 OStringBuffer
aStrBuf( arrOUS
[4] );
13212 OString
expVal( aStrBuf
.getStr() );
13213 sal_Int64 input
= -0;
13214 sal_Int16 radix
= 2;
13216 expVal
+= OString( "0" );
13217 aStrBuf
.append( input
, radix
);
13219 CPPUNIT_ASSERT_MESSAGE
13221 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13222 aStrBuf
.getStr()== expVal
&&
13223 aStrBuf
.getLength() == expVal
.getLength()
13230 OStringBuffer
aStrBuf( arrOUS
[4] );
13231 OString
expVal( aStrBuf
.getStr() );
13232 sal_Int64 input
= -4;
13233 sal_Int16 radix
= 2;
13235 expVal
+= OString( "-" );
13236 expVal
+= OString( "100" );
13237 aStrBuf
.append( input
, radix
);
13239 CPPUNIT_ASSERT_MESSAGE
13241 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13242 aStrBuf
.getStr()== expVal
&&
13243 aStrBuf
.getLength() == expVal
.getLength()
13250 OStringBuffer
aStrBuf( arrOUS
[4] );
13251 OString
expVal( aStrBuf
.getStr() );
13252 sal_Int64 input
= -8;
13253 sal_Int16 radix
= 2;
13255 expVal
+= OString( "-" );
13256 expVal
+= OString( "1000" );
13257 aStrBuf
.append( input
, radix
);
13259 CPPUNIT_ASSERT_MESSAGE
13261 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13262 aStrBuf
.getStr()== expVal
&&
13263 aStrBuf
.getLength() == expVal
.getLength()
13270 OStringBuffer
aStrBuf( arrOUS
[4] );
13271 OString
expVal( aStrBuf
.getStr() );
13272 sal_Int64 input
= -15;
13273 sal_Int16 radix
= 2;
13275 expVal
+= OString( "-" );
13276 expVal
+= OString( "1111" );
13277 aStrBuf
.append( input
, radix
);
13279 CPPUNIT_ASSERT_MESSAGE
13281 "append(sal_Int64, radix 2)_006_negative_kRadixBinary for arrOUS[4]",
13282 aStrBuf
.getStr()== expVal
&&
13283 aStrBuf
.getLength() == expVal
.getLength()
13290 OStringBuffer
aStrBuf( arrOUS
[4] );
13291 OString
expVal( aStrBuf
.getStr() );
13292 sal_Int64 input
= -0;
13293 sal_Int16 radix
= 8;
13295 expVal
+= OString( "0" );
13296 aStrBuf
.append( input
, radix
);
13298 CPPUNIT_ASSERT_MESSAGE
13300 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13301 aStrBuf
.getStr()== expVal
&&
13302 aStrBuf
.getLength() == expVal
.getLength()
13309 OStringBuffer
aStrBuf( arrOUS
[4] );
13310 OString
expVal( aStrBuf
.getStr() );
13311 sal_Int64 input
= -4;
13312 sal_Int16 radix
= 8;
13314 expVal
+= OString( "-" );
13315 expVal
+= OString( "4" );
13316 aStrBuf
.append( input
, radix
);
13318 CPPUNIT_ASSERT_MESSAGE
13320 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13321 aStrBuf
.getStr()== expVal
&&
13322 aStrBuf
.getLength() == expVal
.getLength()
13329 OStringBuffer
aStrBuf( arrOUS
[4] );
13330 OString
expVal( aStrBuf
.getStr() );
13331 sal_Int64 input
= -8;
13332 sal_Int16 radix
= 8;
13334 expVal
+= OString( "-" );
13335 expVal
+= OString( "10" );
13336 aStrBuf
.append( input
, radix
);
13338 CPPUNIT_ASSERT_MESSAGE
13340 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13341 aStrBuf
.getStr()== expVal
&&
13342 aStrBuf
.getLength() == expVal
.getLength()
13349 OStringBuffer
aStrBuf( arrOUS
[4] );
13350 OString
expVal( aStrBuf
.getStr() );
13351 sal_Int64 input
= -15;
13352 sal_Int16 radix
= 8;
13354 expVal
+= OString( "-" );
13355 expVal
+= OString( "17" );
13356 aStrBuf
.append( input
, radix
);
13358 CPPUNIT_ASSERT_MESSAGE
13360 "append(sal_Int64, radix 8)_006_negative_kRadixOctol for arrOUS[4]",
13361 aStrBuf
.getStr()== expVal
&&
13362 aStrBuf
.getLength() == expVal
.getLength()
13369 OStringBuffer
aStrBuf( arrOUS
[4] );
13370 OString
expVal( aStrBuf
.getStr() );
13371 sal_Int64 input
= -0;
13372 sal_Int16 radix
= 10;
13374 expVal
+= OString( "0" );
13375 aStrBuf
.append( input
, radix
);
13377 CPPUNIT_ASSERT_MESSAGE
13379 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13380 aStrBuf
.getStr()== expVal
&&
13381 aStrBuf
.getLength() == expVal
.getLength()
13388 OStringBuffer
aStrBuf( arrOUS
[4] );
13389 OString
expVal( aStrBuf
.getStr() );
13390 sal_Int64 input
= -4;
13391 sal_Int16 radix
= 10;
13393 expVal
+= OString( "-" );
13394 expVal
+= OString( "4" );
13395 aStrBuf
.append( input
, radix
);
13397 CPPUNIT_ASSERT_MESSAGE
13399 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13400 aStrBuf
.getStr()== expVal
&&
13401 aStrBuf
.getLength() == expVal
.getLength()
13408 OStringBuffer
aStrBuf( arrOUS
[4] );
13409 OString
expVal( aStrBuf
.getStr() );
13410 sal_Int64 input
= -8;
13411 sal_Int16 radix
= 10;
13413 expVal
+= OString( "-" );
13414 expVal
+= OString( "8" );
13415 aStrBuf
.append( input
, radix
);
13417 CPPUNIT_ASSERT_MESSAGE
13419 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13420 aStrBuf
.getStr()== expVal
&&
13421 aStrBuf
.getLength() == expVal
.getLength()
13428 OStringBuffer
aStrBuf( arrOUS
[4] );
13429 OString
expVal( aStrBuf
.getStr() );
13430 sal_Int64 input
= -15;
13431 sal_Int16 radix
= 10;
13433 expVal
+= OString( "-" );
13434 expVal
+= OString( "15" );
13435 aStrBuf
.append( input
, radix
);
13437 CPPUNIT_ASSERT_MESSAGE
13439 "append(sal_Int64, radix 10)_006_negative_kRadixDecimal for arrOUS[4]",
13440 aStrBuf
.getStr()== expVal
&&
13441 aStrBuf
.getLength() == expVal
.getLength()
13448 OStringBuffer
aStrBuf( arrOUS
[4] );
13449 OString
expVal( aStrBuf
.getStr() );
13450 sal_Int64 input
= -0;
13451 sal_Int16 radix
= 16;
13453 expVal
+= OString( "0" );
13454 aStrBuf
.append( input
, radix
);
13456 CPPUNIT_ASSERT_MESSAGE
13458 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13459 aStrBuf
.getStr()== expVal
&&
13460 aStrBuf
.getLength() == expVal
.getLength()
13467 OStringBuffer
aStrBuf( arrOUS
[4] );
13468 OString
expVal( aStrBuf
.getStr() );
13469 sal_Int64 input
= -4;
13470 sal_Int16 radix
= 16;
13472 expVal
+= OString( "-" );
13473 expVal
+= OString( "4" );
13474 aStrBuf
.append( input
, radix
);
13476 CPPUNIT_ASSERT_MESSAGE
13478 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13479 aStrBuf
.getStr()== expVal
&&
13480 aStrBuf
.getLength() == expVal
.getLength()
13487 OStringBuffer
aStrBuf( arrOUS
[4] );
13488 OString
expVal( aStrBuf
.getStr() );
13489 sal_Int64 input
= -8;
13490 sal_Int16 radix
= 16;
13492 expVal
+= OString( "-" );
13493 expVal
+= OString( "8" );
13494 aStrBuf
.append( input
, radix
);
13496 CPPUNIT_ASSERT_MESSAGE
13498 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13499 aStrBuf
.getStr()== expVal
&&
13500 aStrBuf
.getLength() == expVal
.getLength()
13507 OStringBuffer
aStrBuf( arrOUS
[4] );
13508 OString
expVal( aStrBuf
.getStr() );
13509 sal_Int64 input
= -15;
13510 sal_Int16 radix
= 16;
13512 expVal
+= OString( "-" );
13513 expVal
+= OString( "f" );
13514 aStrBuf
.append( input
, radix
);
13516 CPPUNIT_ASSERT_MESSAGE
13518 "append(sal_Int64, radix 16)_006_negative_kRadixHexdecimal for arrOUS[4]",
13519 aStrBuf
.getStr()== expVal
&&
13520 aStrBuf
.getLength() == expVal
.getLength()
13527 OStringBuffer
aStrBuf( arrOUS
[4] );
13528 OString
expVal( aStrBuf
.getStr() );
13529 sal_Int64 input
= -0;
13530 sal_Int16 radix
= 36;
13532 expVal
+= OString( "0" );
13533 aStrBuf
.append( input
, radix
);
13535 CPPUNIT_ASSERT_MESSAGE
13537 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13538 aStrBuf
.getStr()== expVal
&&
13539 aStrBuf
.getLength() == expVal
.getLength()
13546 OStringBuffer
aStrBuf( arrOUS
[4] );
13547 OString
expVal( aStrBuf
.getStr() );
13548 sal_Int64 input
= -4;
13549 sal_Int16 radix
= 36;
13551 expVal
+= OString( "-" );
13552 expVal
+= OString( "4" );
13553 aStrBuf
.append( input
, radix
);
13555 CPPUNIT_ASSERT_MESSAGE
13557 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13558 aStrBuf
.getStr()== expVal
&&
13559 aStrBuf
.getLength() == expVal
.getLength()
13566 OStringBuffer
aStrBuf( arrOUS
[4] );
13567 OString
expVal( aStrBuf
.getStr() );
13568 sal_Int64 input
= -8;
13569 sal_Int16 radix
= 36;
13571 expVal
+= OString( "-" );
13572 expVal
+= OString( "8" );
13573 aStrBuf
.append( input
, radix
);
13575 CPPUNIT_ASSERT_MESSAGE
13577 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13578 aStrBuf
.getStr()== expVal
&&
13579 aStrBuf
.getLength() == expVal
.getLength()
13586 OStringBuffer
aStrBuf( arrOUS
[4] );
13587 OString
expVal( aStrBuf
.getStr() );
13588 sal_Int64 input
= -35;
13589 sal_Int16 radix
= 36;
13591 expVal
+= OString( "-" );
13592 expVal
+= OString( "z" );
13593 aStrBuf
.append( input
, radix
);
13595 CPPUNIT_ASSERT_MESSAGE
13597 "append(sal_Int64, radix 36)_006_negative_kRadixBase36 for arrOUS[4]",
13598 aStrBuf
.getStr()== expVal
&&
13599 aStrBuf
.getLength() == expVal
.getLength()
13604 CPPUNIT_TEST_SUITE( append_007_Int64_Negative
);
13605 CPPUNIT_TEST( append_001
); CPPUNIT_TEST( append_002
);
13606 CPPUNIT_TEST( append_003
); CPPUNIT_TEST( append_004
);
13607 CPPUNIT_TEST( append_005
); CPPUNIT_TEST( append_006
);
13608 CPPUNIT_TEST( append_007
); CPPUNIT_TEST( append_008
);
13609 CPPUNIT_TEST( append_009
); CPPUNIT_TEST( append_010
);
13610 CPPUNIT_TEST( append_011
); CPPUNIT_TEST( append_012
);
13611 CPPUNIT_TEST( append_013
); CPPUNIT_TEST( append_014
);
13612 CPPUNIT_TEST( append_015
); CPPUNIT_TEST( append_016
);
13613 CPPUNIT_TEST( append_017
); CPPUNIT_TEST( append_018
);
13614 CPPUNIT_TEST( append_019
); CPPUNIT_TEST( append_020
);
13615 CPPUNIT_TEST( append_021
); CPPUNIT_TEST( append_022
);
13616 CPPUNIT_TEST( append_023
); CPPUNIT_TEST( append_024
);
13617 CPPUNIT_TEST( append_025
); CPPUNIT_TEST( append_026
);
13618 CPPUNIT_TEST( append_027
); CPPUNIT_TEST( append_028
);
13619 CPPUNIT_TEST( append_029
); CPPUNIT_TEST( append_030
);
13620 CPPUNIT_TEST( append_031
); CPPUNIT_TEST( append_032
);
13621 CPPUNIT_TEST( append_033
); CPPUNIT_TEST( append_034
);
13622 CPPUNIT_TEST( append_035
); CPPUNIT_TEST( append_036
);
13623 CPPUNIT_TEST( append_037
); CPPUNIT_TEST( append_038
);
13624 CPPUNIT_TEST( append_039
); CPPUNIT_TEST( append_040
);
13625 CPPUNIT_TEST( append_041
); CPPUNIT_TEST( append_042
);
13626 CPPUNIT_TEST( append_043
); CPPUNIT_TEST( append_044
);
13627 CPPUNIT_TEST( append_045
); CPPUNIT_TEST( append_046
);
13628 CPPUNIT_TEST( append_047
); CPPUNIT_TEST( append_048
);
13629 CPPUNIT_TEST( append_049
); CPPUNIT_TEST( append_050
);
13630 CPPUNIT_TEST( append_051
); CPPUNIT_TEST( append_052
);
13631 CPPUNIT_TEST( append_053
); CPPUNIT_TEST( append_054
);
13632 CPPUNIT_TEST( append_055
); CPPUNIT_TEST( append_056
);
13633 CPPUNIT_TEST( append_057
); CPPUNIT_TEST( append_058
);
13634 CPPUNIT_TEST( append_059
); CPPUNIT_TEST( append_060
);
13635 CPPUNIT_TEST( append_061
); CPPUNIT_TEST( append_062
);
13636 CPPUNIT_TEST( append_063
); CPPUNIT_TEST( append_064
);
13637 CPPUNIT_TEST( append_065
); CPPUNIT_TEST( append_066
);
13638 CPPUNIT_TEST( append_067
); CPPUNIT_TEST( append_068
);
13639 CPPUNIT_TEST( append_069
); CPPUNIT_TEST( append_070
);
13640 CPPUNIT_TEST( append_071
); CPPUNIT_TEST( append_072
);
13641 CPPUNIT_TEST( append_073
); CPPUNIT_TEST( append_074
);
13642 CPPUNIT_TEST( append_075
); CPPUNIT_TEST( append_076
);
13643 CPPUNIT_TEST( append_077
); CPPUNIT_TEST( append_078
);
13644 CPPUNIT_TEST( append_079
); CPPUNIT_TEST( append_080
);
13645 CPPUNIT_TEST( append_081
); CPPUNIT_TEST( append_082
);
13646 CPPUNIT_TEST( append_083
); CPPUNIT_TEST( append_084
);
13647 CPPUNIT_TEST( append_085
); CPPUNIT_TEST( append_086
);
13648 CPPUNIT_TEST( append_087
); CPPUNIT_TEST( append_088
);
13649 CPPUNIT_TEST( append_089
); CPPUNIT_TEST( append_090
);
13650 CPPUNIT_TEST( append_091
); CPPUNIT_TEST( append_092
);
13651 CPPUNIT_TEST( append_093
); CPPUNIT_TEST( append_094
);
13652 CPPUNIT_TEST( append_095
); CPPUNIT_TEST( append_096
);
13653 CPPUNIT_TEST( append_097
); CPPUNIT_TEST( append_098
);
13654 CPPUNIT_TEST( append_099
); CPPUNIT_TEST( append_100
);
13655 CPPUNIT_TEST_SUITE_END();
13658 class append_007_Int64_defaultParam
: public CppUnit::TestFixture
13663 void setUp() override
13665 arrOUS
[0] = OString( kTestStr7
);
13666 arrOUS
[1] = OString( );
13667 arrOUS
[2] = OString( kTestStr25
);
13668 arrOUS
[3] = OString( "" );
13669 arrOUS
[4] = OString( kTestStr28
);
13674 OStringBuffer
aStrBuf( arrOUS
[0] );
13675 OString
expVal( kTestStr59
);
13676 sal_Int64 input
= 11;
13678 aStrBuf
.append( input
);
13680 CPPUNIT_ASSERT_MESSAGE
13682 "input Int64 11 and return OStringBuffer[0]+11",
13683 (aStrBuf
.toString() == expVal
&&
13684 aStrBuf
.getLength() == expVal
.getLength())
13691 OStringBuffer
aStrBuf( arrOUS
[0] );
13692 OString
expVal( kTestStr62
);
13693 sal_Int64 input
= 0;
13695 aStrBuf
.append( input
);
13697 CPPUNIT_ASSERT_MESSAGE
13699 "input Int64 0 and return OStringBuffer[0]+0",
13700 (aStrBuf
.toString() == expVal
&&
13701 aStrBuf
.getLength() == expVal
.getLength())
13708 OStringBuffer
aStrBuf( arrOUS
[0] );
13709 OString
expVal( kTestStr63
);
13710 sal_Int64 input
= -11;
13712 aStrBuf
.append( input
);
13714 CPPUNIT_ASSERT_MESSAGE
13716 "input Int64 -11 and return OStringBuffer[0]+(-11)",
13717 (aStrBuf
.toString() == expVal
&&
13718 aStrBuf
.getLength() == expVal
.getLength())
13725 OStringBuffer
aStrBuf( arrOUS
[0] );
13726 OString
expVal( kTestStr116
);
13727 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
13728 aStrBuf
.append( input
);
13730 CPPUNIT_ASSERT_MESSAGE
13732 "input Int64 9223372036854775807 and return OStringBuffer[0]+9223372036854775807",
13733 (aStrBuf
.toString() == expVal
&&
13734 aStrBuf
.getLength() == expVal
.getLength())
13741 OStringBuffer
aStrBuf( arrOUS
[0] );
13742 OString
expVal( kTestStr117
);
13743 sal_Int64 input
= SAL_MIN_INT64
/*-9223372036854775808*/; // LLA: this is not the same :-( kNonSInt64Max;
13745 aStrBuf
.append( input
);
13747 bool bRes
= expVal
== aStrBuf
.getStr();
13748 CPPUNIT_ASSERT_MESSAGE
13750 "input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)",
13751 bRes
&& aStrBuf
.getLength() == expVal
.getLength()
13758 OStringBuffer
aStrBuf( arrOUS
[1] );
13759 OString
expVal( kTestStr60
);
13760 sal_Int64 input
= 11;
13762 aStrBuf
.append( input
);
13764 CPPUNIT_ASSERT_MESSAGE
13766 "input Int64 11 and return OStringBuffer[1]+11",
13767 (aStrBuf
.toString() == expVal
&&
13768 aStrBuf
.getLength() == expVal
.getLength())
13775 OStringBuffer
aStrBuf( arrOUS
[1] );
13776 OString
expVal( kTestStr66
);
13777 sal_Int64 input
= 0;
13779 aStrBuf
.append( input
);
13781 CPPUNIT_ASSERT_MESSAGE
13783 "input Int64 0 and return OStringBuffer[1]+0",
13784 (aStrBuf
.toString() == expVal
&&
13785 aStrBuf
.getLength() == expVal
.getLength())
13792 OStringBuffer
aStrBuf( arrOUS
[1] );
13793 OString
expVal( kTestStr67
);
13794 sal_Int64 input
= -11;
13796 aStrBuf
.append( input
);
13798 CPPUNIT_ASSERT_MESSAGE
13800 "input Int64 -11 and return OStringBuffer[1]+(-11)",
13801 (aStrBuf
.toString() == expVal
&&
13802 aStrBuf
.getLength() == expVal
.getLength())
13809 OStringBuffer
aStrBuf( arrOUS
[1] );
13810 OString
expVal( kTestStr118
);
13811 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
13812 aStrBuf
.append( input
);
13814 CPPUNIT_ASSERT_MESSAGE
13816 "input Int64 9223372036854775807 and return OStringBuffer[1]+9223372036854775807",
13817 (aStrBuf
.toString() == expVal
&&
13818 aStrBuf
.getLength() == expVal
.getLength())
13825 OStringBuffer
aStrBuf( arrOUS
[1] );
13826 OString
expVal( kTestStr119
);
13827 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
13829 aStrBuf
.append( input
);
13831 CPPUNIT_ASSERT_MESSAGE
13833 "input Int64 -9223372036854775808 and return OStringBuffer[1]+(-9223372036854775808)",
13834 (aStrBuf
.toString() == expVal
&&
13835 aStrBuf
.getLength() == expVal
.getLength())
13842 OStringBuffer
aStrBuf( arrOUS
[2] );
13843 OString
expVal( kTestStr60
);
13844 sal_Int64 input
= 11;
13846 aStrBuf
.append( input
);
13848 CPPUNIT_ASSERT_MESSAGE
13850 "input Int64 11 and return OStringBuffer[2]+11",
13851 (aStrBuf
.toString() == expVal
&&
13852 aStrBuf
.getLength() == expVal
.getLength())
13859 OStringBuffer
aStrBuf( arrOUS
[2] );
13860 OString
expVal( kTestStr66
);
13861 sal_Int64 input
= 0;
13863 aStrBuf
.append( input
);
13865 CPPUNIT_ASSERT_MESSAGE
13867 "input Int64 0 and return OUStringBuffer[2]+0",
13868 (aStrBuf
.toString() == expVal
&&
13869 aStrBuf
.getLength() == expVal
.getLength())
13876 OStringBuffer
aStrBuf( arrOUS
[2] );
13877 OString
expVal( kTestStr67
);
13878 sal_Int64 input
= -11;
13880 aStrBuf
.append( input
);
13882 CPPUNIT_ASSERT_MESSAGE
13884 "input Int64 -11 and return OUStringBuffer[2]+(-11)",
13885 (aStrBuf
.toString() == expVal
&&
13886 aStrBuf
.getLength() == expVal
.getLength())
13893 OStringBuffer
aStrBuf( arrOUS
[2] );
13894 OString
expVal( kTestStr118
);
13895 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
13896 aStrBuf
.append( input
);
13898 CPPUNIT_ASSERT_MESSAGE
13900 "input Int64 9223372036854775807 and return OStringBuffer[2]+9223372036854775807",
13901 (aStrBuf
.toString() == expVal
&&
13902 aStrBuf
.getLength() == expVal
.getLength())
13909 OStringBuffer
aStrBuf( arrOUS
[2] );
13910 OString
expVal( kTestStr119
);
13911 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
13913 aStrBuf
.append( input
);
13915 CPPUNIT_ASSERT_MESSAGE
13917 "input Int64 -9223372036854775808 and return OStringBuffer[2]+(-9223372036854775808)",
13918 (aStrBuf
.toString() == expVal
&&
13919 aStrBuf
.getLength() == expVal
.getLength())
13926 OStringBuffer
aStrBuf( arrOUS
[3] );
13927 OString
expVal( kTestStr60
);
13928 sal_Int64 input
= 11;
13930 aStrBuf
.append( input
);
13932 CPPUNIT_ASSERT_MESSAGE
13934 "input Int64 11 and return OStringBuffer[3]+11",
13935 (aStrBuf
.toString() == expVal
&&
13936 aStrBuf
.getLength() == expVal
.getLength())
13943 OStringBuffer
aStrBuf( arrOUS
[3] );
13944 OString
expVal( kTestStr66
);
13945 sal_Int64 input
= 0;
13947 aStrBuf
.append( input
);
13949 CPPUNIT_ASSERT_MESSAGE
13951 "input Int64 0 and return OStringBuffer[3]+0",
13952 (aStrBuf
.toString() == expVal
&&
13953 aStrBuf
.getLength() == expVal
.getLength())
13960 OStringBuffer
aStrBuf( arrOUS
[3] );
13961 OString
expVal( kTestStr67
);
13962 sal_Int64 input
= -11;
13964 aStrBuf
.append( input
);
13966 CPPUNIT_ASSERT_MESSAGE
13968 "input Int64 -11 and return OStringBuffer[3]+(-11)",
13969 (aStrBuf
.toString() == expVal
&&
13970 aStrBuf
.getLength() == expVal
.getLength())
13977 OStringBuffer
aStrBuf( arrOUS
[3] );
13978 OString
expVal( kTestStr118
);
13979 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
13980 aStrBuf
.append( input
);
13982 CPPUNIT_ASSERT_MESSAGE
13984 "input Int64 9223372036854775807 and return OStringBuffer[3]+9223372036854775807",
13985 (aStrBuf
.toString() == expVal
&&
13986 aStrBuf
.getLength() == expVal
.getLength())
13993 OStringBuffer
aStrBuf( arrOUS
[3] );
13994 OString
expVal( kTestStr119
);
13995 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
13997 aStrBuf
.append( input
);
13999 CPPUNIT_ASSERT_MESSAGE
14001 "input Int64 -9223372036854775808 and return OStringBuffer[3]+(-9223372036854775808)",
14002 (aStrBuf
.toString() == expVal
&&
14003 aStrBuf
.getLength() == expVal
.getLength())
14010 OStringBuffer
aStrBuf( arrOUS
[4] );
14011 OString
expVal( kTestStr61
);
14012 sal_Int64 input
= 11;
14014 aStrBuf
.append( input
);
14016 CPPUNIT_ASSERT_MESSAGE
14018 "input Int64 11 and return OStringBuffer[4]+11",
14019 (aStrBuf
.toString() == expVal
&&
14020 aStrBuf
.getLength() == expVal
.getLength())
14027 OStringBuffer
aStrBuf( arrOUS
[4] );
14028 OString
expVal( kTestStr70
);
14029 sal_Int64 input
= 0;
14031 aStrBuf
.append( input
);
14033 CPPUNIT_ASSERT_MESSAGE
14035 "input Int64 0 and return OStringBuffer[4]+0",
14036 (aStrBuf
.toString() == expVal
&&
14037 aStrBuf
.getLength() == expVal
.getLength())
14044 OStringBuffer
aStrBuf( arrOUS
[4] );
14045 OString
expVal( kTestStr71
);
14046 sal_Int64 input
= -11;
14048 aStrBuf
.append( input
);
14050 CPPUNIT_ASSERT_MESSAGE
14052 "input Int64 -11 and return OStringBuffer[4]+(-11)",
14053 (aStrBuf
.toString() == expVal
&&
14054 aStrBuf
.getLength() == expVal
.getLength())
14061 OStringBuffer
aStrBuf( arrOUS
[4] );
14062 OString
expVal( kTestStr120
);
14063 sal_Int64 input
= SAL_CONST_INT64(9223372036854775807);
14064 aStrBuf
.append( input
);
14066 CPPUNIT_ASSERT_MESSAGE
14068 "input Int64 9223372036854775807 and return OStringBuffer[4]+9223372036854775807",
14069 (aStrBuf
.toString() == expVal
&&
14070 aStrBuf
.getLength() == expVal
.getLength())
14077 OStringBuffer
aStrBuf( arrOUS
[4] );
14078 OString
expVal( kTestStr121
);
14079 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14081 aStrBuf
.append( input
);
14083 CPPUNIT_ASSERT_MESSAGE
14085 "input Int64 -9223372036854775808 and return OStringBuffer[4]+(-9223372036854775808)",
14086 (aStrBuf
.toString() == expVal
&&
14087 aStrBuf
.getLength() == expVal
.getLength())
14094 OStringBuffer
aStrBuf( kSInt64Max
);
14095 OString
expVal( kTestStr60
);
14096 sal_Int64 input
= 11;
14098 aStrBuf
.append( input
);
14100 CPPUNIT_ASSERT_MESSAGE
14102 "input Int64 11 and return OStringBuffer(kSInt64Max)+11",
14103 (aStrBuf
.toString() == expVal
&&
14104 aStrBuf
.getLength() == expVal
.getLength())
14111 OStringBuffer
aStrBuf( kSInt64Max
);
14112 OString
expVal( kTestStr66
);
14113 sal_Int64 input
= 0;
14115 aStrBuf
.append( input
);
14117 CPPUNIT_ASSERT_MESSAGE
14119 "input Int64 0 and return OStringBuffer(kSInt64Max)+0",
14120 (aStrBuf
.toString() == expVal
&&
14121 aStrBuf
.getLength() == expVal
.getLength())
14128 OStringBuffer
aStrBuf( kSInt64Max
);
14129 OString
expVal( kTestStr67
);
14130 sal_Int64 input
= -11;
14132 aStrBuf
.append( input
);
14134 CPPUNIT_ASSERT_MESSAGE
14136 "input Int64 -11 and return OStringBuffer(kSInt64Max)+(-11)",
14137 (aStrBuf
.toString() == expVal
&&
14138 aStrBuf
.getLength() == expVal
.getLength())
14145 OStringBuffer
aStrBuf( kSInt64Max
);
14146 OString
expVal( kTestStr118
);
14147 sal_Int64 input
= 9223372036854775807;
14149 aStrBuf
.append( input
);
14151 CPPUNIT_ASSERT_MESSAGE
14153 "input Int64 9223372036854775807 and return OStringBuffer(kSInt64Max)+9223372036854775807",
14154 (aStrBuf
.toString() == expVal
&&
14155 aStrBuf
.getLength() == expVal
.getLength())
14162 OStringBuffer
aStrBuf( kSInt64Max
);
14163 OString
expVal( kTestStr119
);
14164 sal_Int64 input
= SAL_MIN_INT64
; // LLA: this is not the same :-( kNonSInt64Max;
14166 aStrBuf
.append( input
);
14168 CPPUNIT_ASSERT_MESSAGE
14170 "input Int64 -9223372036854775808 and return OStringBuffer(kSInt64Max)+(-9223372036854775808)",
14171 (aStrBuf
.toString() == expVal
&&
14172 aStrBuf
.getLength() == expVal
.getLength())
14178 CPPUNIT_TEST_SUITE( append_007_Int64_defaultParam
);
14179 CPPUNIT_TEST( append_001
);
14180 CPPUNIT_TEST( append_002
);
14181 CPPUNIT_TEST( append_003
);
14182 CPPUNIT_TEST( append_004
);
14183 CPPUNIT_TEST( append_005
);
14184 CPPUNIT_TEST( append_006
);
14185 CPPUNIT_TEST( append_007
);
14186 CPPUNIT_TEST( append_008
);
14187 CPPUNIT_TEST( append_009
);
14188 CPPUNIT_TEST( append_010
);
14189 CPPUNIT_TEST( append_011
);
14190 CPPUNIT_TEST( append_012
);
14191 CPPUNIT_TEST( append_013
);
14192 CPPUNIT_TEST( append_014
);
14193 CPPUNIT_TEST( append_015
);
14194 CPPUNIT_TEST( append_016
);
14195 CPPUNIT_TEST( append_017
);
14196 CPPUNIT_TEST( append_018
);
14197 CPPUNIT_TEST( append_019
);
14198 CPPUNIT_TEST( append_020
);
14199 CPPUNIT_TEST( append_021
);
14200 CPPUNIT_TEST( append_022
);
14201 CPPUNIT_TEST( append_023
);
14202 CPPUNIT_TEST( append_024
);
14203 CPPUNIT_TEST( append_025
);
14205 CPPUNIT_TEST( append_026
);
14206 CPPUNIT_TEST( append_027
);
14207 CPPUNIT_TEST( append_028
);
14208 CPPUNIT_TEST( append_029
);
14209 CPPUNIT_TEST( append_030
);
14211 CPPUNIT_TEST_SUITE_END();
14214 // testing the method append( float f )
14216 class checkfloat
: public CppUnit::TestFixture
14219 bool checkIfStrBufContainAtPosTheFloat(OStringBuffer
const& _sStrBuf
, sal_Int32 _nLen
, float _nFloat
)
14221 OString sFloatValue
= OString::number(_nFloat
);
14223 OString
sBufferString(_sStrBuf
.getStr());
14224 sal_Int32 nPos
= sBufferString
.indexOf(sFloatValue
);
14225 return nPos
>= 0 && nPos
== _nLen
;
14229 class append_008_float
: public checkfloat
14234 void setUp() override
14236 arrOUS
[0] = OString( kTestStr7
);
14237 arrOUS
[1] = OString( );
14238 arrOUS
[2] = OString( kTestStr25
);
14239 arrOUS
[3] = OString( "" );
14240 arrOUS
[4] = OString( kTestStr28
);
14245 OStringBuffer
aStrBuf( arrOUS
[0] );
14246 float input
= static_cast<float>(atof("3.0"));
14249 // the complex problem is here, that a float value is not really what we write.
14250 // So a 3.0 could also be 3 or 3.0 or 3.0000001 or 2.9999999
14251 // this has to be checked.
14252 sal_Int32 nLen
= aStrBuf
.getLength();
14253 aStrBuf
.append( input
);
14255 CPPUNIT_ASSERT_MESSAGE
14257 "arrOUS[0] append 3.0",
14258 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14265 OStringBuffer
aStrBuf( arrOUS
[0] );
14266 float input
= static_cast<float>(atof("3.5"));
14268 sal_Int32 nLen
= aStrBuf
.getLength();
14269 aStrBuf
.append( input
);
14271 CPPUNIT_ASSERT_MESSAGE
14273 "arrOUS[0] append 3.5",
14274 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14281 OStringBuffer
aStrBuf( arrOUS
[0] );
14282 float input
= static_cast<float>(atof("3.0625"));
14284 sal_Int32 nLen
= aStrBuf
.getLength();
14285 aStrBuf
.append( input
);
14287 CPPUNIT_ASSERT_MESSAGE
14289 "arrOUS[0] append 3.0625",
14290 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14297 OStringBuffer
aStrBuf( arrOUS
[0] );
14298 float input
= static_cast<float>(atof("3.502525"));
14300 sal_Int32 nLen
= aStrBuf
.getLength();
14301 aStrBuf
.append( input
);
14303 CPPUNIT_ASSERT_MESSAGE
14305 "arrOUS[0] append 3.502525",
14306 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14313 OStringBuffer
aStrBuf( arrOUS
[0] );
14314 float input
= static_cast<float>(atof("3.141592"));
14316 sal_Int32 nLen
= aStrBuf
.getLength();
14317 aStrBuf
.append( input
);
14319 CPPUNIT_ASSERT_MESSAGE
14321 "arrOUS[0] append 3.141592",
14322 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14329 OStringBuffer
aStrBuf( arrOUS
[0] );
14330 float input
= static_cast<float>(atof("3.5025255"));
14332 sal_Int32 nLen
= aStrBuf
.getLength();
14333 aStrBuf
.append( input
);
14335 CPPUNIT_ASSERT_MESSAGE
14337 "arrOUS[0] append 3.5025255",
14338 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14345 OStringBuffer
aStrBuf( arrOUS
[0] );
14346 float input
= static_cast<float>(atof("3.00390625"));
14348 sal_Int32 nLen
= aStrBuf
.getLength();
14349 aStrBuf
.append( input
);
14351 CPPUNIT_ASSERT_MESSAGE
14353 "arrOUS[0] append 3.0039062",
14354 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14361 OStringBuffer
aStrBuf( arrOUS
[1] );
14362 float input
= static_cast<float>(atof("3.0"));
14364 sal_Int32 nLen
= aStrBuf
.getLength();
14365 aStrBuf
.append( input
);
14367 CPPUNIT_ASSERT_MESSAGE
14369 "arrOUS[1] append 3.0",
14370 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14377 OStringBuffer
aStrBuf( arrOUS
[1] );
14378 float input
= static_cast<float>(atof("3.5"));
14380 sal_Int32 nLen
= aStrBuf
.getLength();
14381 aStrBuf
.append( input
);
14383 CPPUNIT_ASSERT_MESSAGE
14385 "arrOUS[1] append 3.5",
14386 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14393 OStringBuffer
aStrBuf( arrOUS
[1] );
14394 float input
= static_cast<float>(atof("3.0625"));
14396 sal_Int32 nLen
= aStrBuf
.getLength();
14397 aStrBuf
.append( input
);
14399 CPPUNIT_ASSERT_MESSAGE
14401 "arrOUS[1] append 3.0625",
14402 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14409 OStringBuffer
aStrBuf( arrOUS
[1] );
14410 float input
= static_cast<float>(atof("3.502525"));
14412 sal_Int32 nLen
= aStrBuf
.getLength();
14413 aStrBuf
.append( input
);
14415 CPPUNIT_ASSERT_MESSAGE
14417 "arrOUS[1] append 3.502525",
14418 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14425 OStringBuffer
aStrBuf( arrOUS
[1] );
14426 float input
= static_cast<float>(atof("3.141592"));
14428 sal_Int32 nLen
= aStrBuf
.getLength();
14429 aStrBuf
.append( input
);
14431 CPPUNIT_ASSERT_MESSAGE
14433 "arrOUS[1] append 3.141592",
14434 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14441 OStringBuffer
aStrBuf( arrOUS
[1] );
14442 float input
= static_cast<float>(atof("3.5025255"));
14444 sal_Int32 nLen
= aStrBuf
.getLength();
14445 aStrBuf
.append( input
);
14447 CPPUNIT_ASSERT_MESSAGE
14449 "arrOUS[1] append 3.5025255",
14450 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14457 OStringBuffer
aStrBuf( arrOUS
[1] );
14458 float input
= static_cast<float>(atof("3.00390625"));
14460 sal_Int32 nLen
= aStrBuf
.getLength();
14461 aStrBuf
.append( input
);
14463 CPPUNIT_ASSERT_MESSAGE
14465 "arrOUS[1] append 3.0039062",
14466 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14473 OStringBuffer
aStrBuf( arrOUS
[2] );
14474 float input
= static_cast<float>(atof("3.0"));
14476 sal_Int32 nLen
= aStrBuf
.getLength();
14477 aStrBuf
.append( input
);
14479 CPPUNIT_ASSERT_MESSAGE
14481 "arrOUS[2] append 3.0",
14482 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14489 OStringBuffer
aStrBuf( arrOUS
[2] );
14490 float input
= static_cast<float>(atof("3.5"));
14492 sal_Int32 nLen
= aStrBuf
.getLength();
14493 aStrBuf
.append( input
);
14495 CPPUNIT_ASSERT_MESSAGE
14497 "arrOUS[2] append 3.5",
14498 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14505 OStringBuffer
aStrBuf( arrOUS
[2] );
14506 float input
= static_cast<float>(atof("3.0625"));
14508 sal_Int32 nLen
= aStrBuf
.getLength();
14509 aStrBuf
.append( input
);
14511 CPPUNIT_ASSERT_MESSAGE
14513 "arrOUS[2] append 3.0625",
14514 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14521 OStringBuffer
aStrBuf( arrOUS
[2] );
14522 float input
= static_cast<float>(atof("3.502525"));
14524 sal_Int32 nLen
= aStrBuf
.getLength();
14525 aStrBuf
.append( input
);
14527 CPPUNIT_ASSERT_MESSAGE
14529 "arrOUS[2] append 3.502525",
14530 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14537 OStringBuffer
aStrBuf( arrOUS
[2] );
14538 float input
= static_cast<float>(atof("3.141592"));
14540 sal_Int32 nLen
= aStrBuf
.getLength();
14541 aStrBuf
.append( input
);
14543 CPPUNIT_ASSERT_MESSAGE
14545 "arrOUS[2] append 3.141592",
14546 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14553 OStringBuffer
aStrBuf( arrOUS
[2] );
14554 float input
= static_cast<float>(atof("3.5025255"));
14556 sal_Int32 nLen
= aStrBuf
.getLength();
14557 aStrBuf
.append( input
);
14559 CPPUNIT_ASSERT_MESSAGE
14561 "arrOUS[2] append 3.5025255",
14562 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14569 OStringBuffer
aStrBuf( arrOUS
[2] );
14570 float input
= static_cast<float>(atof("3.00390625"));
14572 sal_Int32 nLen
= aStrBuf
.getLength();
14573 aStrBuf
.append( input
);
14575 CPPUNIT_ASSERT_MESSAGE
14577 "arrOUS[2] append 3.0039062",
14578 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14585 OStringBuffer
aStrBuf( arrOUS
[3] );
14586 float input
= static_cast<float>(atof("3.0"));
14588 sal_Int32 nLen
= aStrBuf
.getLength();
14589 aStrBuf
.append( input
);
14591 CPPUNIT_ASSERT_MESSAGE
14593 "arrOUS[3] append 3.0",
14594 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14601 OStringBuffer
aStrBuf( arrOUS
[3] );
14602 float input
= static_cast<float>(atof("3.5"));
14604 sal_Int32 nLen
= aStrBuf
.getLength();
14605 aStrBuf
.append( input
);
14607 CPPUNIT_ASSERT_MESSAGE
14609 "arrOUS[3] append 3.5",
14610 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14617 OStringBuffer
aStrBuf( arrOUS
[3] );
14618 float input
= static_cast<float>(atof("3.0625"));
14620 sal_Int32 nLen
= aStrBuf
.getLength();
14621 aStrBuf
.append( input
);
14623 CPPUNIT_ASSERT_MESSAGE
14625 "arrOUS[3] append 3.0625",
14626 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14633 OStringBuffer
aStrBuf( arrOUS
[3] );
14634 float input
= static_cast<float>(atof("3.502525"));
14636 sal_Int32 nLen
= aStrBuf
.getLength();
14637 aStrBuf
.append( input
);
14639 CPPUNIT_ASSERT_MESSAGE
14641 "arrOUS[3] append 3.502525",
14642 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14650 OStringBuffer
aStrBuf( kSInt32Max
);
14651 float input
= (float)atof("3.0");
14653 sal_Int32 nLen
= aStrBuf
.getLength();
14654 aStrBuf
.append( input
);
14656 CPPUNIT_ASSERT_MESSAGE
14658 "OStringBuffer( kSInt32Max ) append 3.0",
14659 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14666 OStringBuffer
aStrBuf( kSInt32Max
);
14667 float input
= (float)atof("3.5");
14669 sal_Int32 nLen
= aStrBuf
.getLength();
14670 aStrBuf
.append( input
);
14672 CPPUNIT_ASSERT_MESSAGE
14674 "OStringBuffer( kSInt32Max ) append 3.5",
14675 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14682 OStringBuffer
aStrBuf( kSInt32Max
);
14683 float input
= (float)atof("3.0625");
14685 sal_Int32 nLen
= aStrBuf
.getLength();
14686 aStrBuf
.append( input
);
14688 CPPUNIT_ASSERT_MESSAGE
14690 "OStringBuffer( kSInt32Max ) append 3.0625",
14691 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14698 OStringBuffer
aStrBuf( kSInt32Max
);
14699 float input
= (float)atof("3.502525");
14701 sal_Int32 nLen
= aStrBuf
.getLength();
14702 aStrBuf
.append( input
);
14704 CPPUNIT_ASSERT_MESSAGE
14706 "OStringBuffer( kSInt32Max ) append 3.502525",
14707 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14714 OStringBuffer
aStrBuf( kSInt32Max
);
14715 float input
= (float)atof("3.141592");
14717 sal_Int32 nLen
= aStrBuf
.getLength();
14718 aStrBuf
.append( input
);
14720 CPPUNIT_ASSERT_MESSAGE
14722 "OStringBuffer( kSInt32Max ) append 3.141592",
14723 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14730 OStringBuffer
aStrBuf( kSInt32Max
);
14731 float input
= (float)atof("3.5025255");
14733 sal_Int32 nLen
= aStrBuf
.getLength();
14734 aStrBuf
.append( input
);
14736 CPPUNIT_ASSERT_MESSAGE
14738 "OStringBuffer( kSInt32Max ) append 3.5025255",
14739 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14746 OStringBuffer
aStrBuf( kSInt32Max
);
14747 float input
= (float)atof("3.00390625");
14749 sal_Int32 nLen
= aStrBuf
.getLength();
14750 aStrBuf
.append( input
);
14752 CPPUNIT_ASSERT_MESSAGE
14754 "OStringBuffer( kSInt32Max ) append 3.0039062",
14755 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14761 CPPUNIT_TEST_SUITE( append_008_float
);
14762 CPPUNIT_TEST( append_001
);
14763 CPPUNIT_TEST( append_002
);
14764 CPPUNIT_TEST( append_003
);
14765 CPPUNIT_TEST( append_004
);
14766 CPPUNIT_TEST( append_005
);
14767 CPPUNIT_TEST( append_006
);
14768 CPPUNIT_TEST( append_007
);
14769 CPPUNIT_TEST( append_008
);
14770 CPPUNIT_TEST( append_009
);
14771 CPPUNIT_TEST( append_010
);
14772 CPPUNIT_TEST( append_011
);
14773 CPPUNIT_TEST( append_012
);
14774 CPPUNIT_TEST( append_013
);
14775 CPPUNIT_TEST( append_014
);
14776 CPPUNIT_TEST( append_015
);
14777 CPPUNIT_TEST( append_016
);
14778 CPPUNIT_TEST( append_017
);
14779 CPPUNIT_TEST( append_018
);
14780 CPPUNIT_TEST( append_019
);
14781 CPPUNIT_TEST( append_020
);
14782 CPPUNIT_TEST( append_021
);
14783 CPPUNIT_TEST( append_022
);
14784 CPPUNIT_TEST( append_023
);
14785 CPPUNIT_TEST( append_024
);
14786 CPPUNIT_TEST( append_025
);
14788 CPPUNIT_TEST( append_026
);
14789 CPPUNIT_TEST( append_027
);
14790 CPPUNIT_TEST( append_028
);
14791 CPPUNIT_TEST( append_029
);
14792 CPPUNIT_TEST( append_030
);
14794 CPPUNIT_TEST_SUITE_END();
14797 // testing the method append( float f ) for negative value
14799 class append_008_Float_Negative
: public checkfloat
14804 void setUp() override
14806 arrOUS
[0] = OString( kTestStr7
);
14807 arrOUS
[1] = OString( );
14808 arrOUS
[2] = OString( kTestStr25
);
14809 arrOUS
[3] = OString( "" );
14810 arrOUS
[4] = OString( kTestStr28
);
14815 OStringBuffer
aStrBuf( arrOUS
[0] );
14816 float input
= static_cast<float>(atof("-3.0"));
14818 sal_Int32 nLen
= aStrBuf
.getLength();
14819 aStrBuf
.append( input
);
14821 CPPUNIT_ASSERT_MESSAGE
14823 "arrOUS[0] append -3.0",
14824 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14831 OStringBuffer
aStrBuf( arrOUS
[0] );
14832 float input
= static_cast<float>(atof("-3.5"));
14834 sal_Int32 nLen
= aStrBuf
.getLength();
14835 aStrBuf
.append( input
);
14837 CPPUNIT_ASSERT_MESSAGE
14839 "arrOUS[0] append -3.5",
14840 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14847 OStringBuffer
aStrBuf( arrOUS
[0] );
14848 float input
= static_cast<float>(atof("-3.0625"));
14850 sal_Int32 nLen
= aStrBuf
.getLength();
14851 aStrBuf
.append( input
);
14853 CPPUNIT_ASSERT_MESSAGE
14855 "arrOUS[0] append -3.0625",
14856 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14863 OStringBuffer
aStrBuf( arrOUS
[0] );
14864 float input
= static_cast<float>(atof("-3.502525"));
14866 sal_Int32 nLen
= aStrBuf
.getLength();
14867 aStrBuf
.append( input
);
14869 CPPUNIT_ASSERT_MESSAGE
14871 "arrOUS[0] append -3.502525",
14872 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14879 OStringBuffer
aStrBuf( arrOUS
[0] );
14880 float input
= static_cast<float>(atof("-3.141592"));
14882 sal_Int32 nLen
= aStrBuf
.getLength();
14883 aStrBuf
.append( input
);
14885 CPPUNIT_ASSERT_MESSAGE
14887 "arrOUS[0] append -3.141592",
14888 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14895 OStringBuffer
aStrBuf( arrOUS
[0] );
14896 float input
= static_cast<float>(atof("-3.5025255"));
14898 sal_Int32 nLen
= aStrBuf
.getLength();
14899 aStrBuf
.append( input
);
14901 CPPUNIT_ASSERT_MESSAGE
14903 "arrOUS[0] append -3.5025255",
14904 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14911 OStringBuffer
aStrBuf( arrOUS
[0] );
14912 float input
= static_cast<float>(atof("-3.00390625"));
14914 sal_Int32 nLen
= aStrBuf
.getLength();
14915 aStrBuf
.append( input
);
14917 CPPUNIT_ASSERT_MESSAGE
14919 "arrOUS[0] append -3.0039062",
14920 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14927 OStringBuffer
aStrBuf( arrOUS
[1] );
14928 float input
= static_cast<float>(atof("-3.0"));
14930 sal_Int32 nLen
= aStrBuf
.getLength();
14931 aStrBuf
.append( input
);
14933 CPPUNIT_ASSERT_MESSAGE
14935 "arrOUS[1] append -3.0",
14936 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14943 OStringBuffer
aStrBuf( arrOUS
[1] );
14944 float input
= static_cast<float>(atof("-3.5"));
14946 sal_Int32 nLen
= aStrBuf
.getLength();
14947 aStrBuf
.append( input
);
14949 CPPUNIT_ASSERT_MESSAGE
14951 "arrOUS[1] append -3.5",
14952 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14959 OStringBuffer
aStrBuf( arrOUS
[1] );
14960 float input
= static_cast<float>(atof("-3.0625"));
14962 sal_Int32 nLen
= aStrBuf
.getLength();
14963 aStrBuf
.append( input
);
14965 CPPUNIT_ASSERT_MESSAGE
14967 "arrOUS[1] append -3.0625",
14968 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14975 OStringBuffer
aStrBuf( arrOUS
[1] );
14976 float input
= static_cast<float>(atof("-3.502525"));
14978 sal_Int32 nLen
= aStrBuf
.getLength();
14979 aStrBuf
.append( input
);
14981 CPPUNIT_ASSERT_MESSAGE
14983 "arrOUS[1] append -3.502525",
14984 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
14991 OStringBuffer
aStrBuf( arrOUS
[1] );
14992 float input
= static_cast<float>(atof("-3.141592"));
14994 sal_Int32 nLen
= aStrBuf
.getLength();
14995 aStrBuf
.append( input
);
14997 CPPUNIT_ASSERT_MESSAGE
14999 "arrOUS[1] append -3.141592",
15000 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15007 OStringBuffer
aStrBuf( arrOUS
[1] );
15008 float input
= static_cast<float>(atof("-3.5025255"));
15010 sal_Int32 nLen
= aStrBuf
.getLength();
15011 aStrBuf
.append( input
);
15013 CPPUNIT_ASSERT_MESSAGE
15015 "arrOUS[1] append -3.5025255",
15016 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15023 OStringBuffer
aStrBuf( arrOUS
[1] );
15024 float input
= static_cast<float>(atof("-3.00390625"));
15026 sal_Int32 nLen
= aStrBuf
.getLength();
15027 aStrBuf
.append( input
);
15029 CPPUNIT_ASSERT_MESSAGE
15031 "arrOUS[1] append -3.0039062",
15032 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15039 OStringBuffer
aStrBuf( arrOUS
[2] );
15040 float input
= static_cast<float>(atof("-3.0"));
15042 sal_Int32 nLen
= aStrBuf
.getLength();
15043 aStrBuf
.append( input
);
15045 CPPUNIT_ASSERT_MESSAGE
15047 "arrOUS[2] append -3.0",
15048 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15055 OStringBuffer
aStrBuf( arrOUS
[2] );
15056 float input
= static_cast<float>(atof("-3.5"));
15058 sal_Int32 nLen
= aStrBuf
.getLength();
15059 aStrBuf
.append( input
);
15061 CPPUNIT_ASSERT_MESSAGE
15063 "arrOUS[2] append -3.5",
15064 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15071 OStringBuffer
aStrBuf( arrOUS
[2] );
15072 float input
= static_cast<float>(atof("-3.0625"));
15074 sal_Int32 nLen
= aStrBuf
.getLength();
15075 aStrBuf
.append( input
);
15077 CPPUNIT_ASSERT_MESSAGE
15079 "arrOUS[2] append -3.0625",
15080 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15087 OStringBuffer
aStrBuf( arrOUS
[2] );
15088 float input
= static_cast<float>(atof("-3.502525"));
15090 sal_Int32 nLen
= aStrBuf
.getLength();
15091 aStrBuf
.append( input
);
15093 CPPUNIT_ASSERT_MESSAGE
15095 "arrOUS[2] append -3.502525",
15096 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15103 OStringBuffer
aStrBuf( arrOUS
[2] );
15104 float input
= static_cast<float>(atof("-3.141592"));
15106 sal_Int32 nLen
= aStrBuf
.getLength();
15107 aStrBuf
.append( input
);
15109 CPPUNIT_ASSERT_MESSAGE
15111 "arrOUS[2] append -3.141592",
15112 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15119 OStringBuffer
aStrBuf( arrOUS
[2] );
15120 float input
= static_cast<float>(atof("-3.5025255"));
15122 sal_Int32 nLen
= aStrBuf
.getLength();
15123 aStrBuf
.append( input
);
15125 CPPUNIT_ASSERT_MESSAGE
15127 "arrOUS[2] append -3.5025255",
15128 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15135 OStringBuffer
aStrBuf( arrOUS
[2] );
15136 float input
= static_cast<float>(atof("-3.00390625"));
15138 sal_Int32 nLen
= aStrBuf
.getLength();
15139 aStrBuf
.append( input
);
15141 CPPUNIT_ASSERT_MESSAGE
15143 "arrOUS[2] append -3.0039062",
15144 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15151 OStringBuffer
aStrBuf( arrOUS
[3] );
15152 float input
= static_cast<float>(atof("-3.0"));
15154 sal_Int32 nLen
= aStrBuf
.getLength();
15155 aStrBuf
.append( input
);
15157 CPPUNIT_ASSERT_MESSAGE
15159 "arrOUS[3] append -3.0",
15160 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15167 OStringBuffer
aStrBuf( arrOUS
[3] );
15168 float input
= static_cast<float>(atof("-3.5"));
15170 sal_Int32 nLen
= aStrBuf
.getLength();
15171 aStrBuf
.append( input
);
15173 CPPUNIT_ASSERT_MESSAGE
15175 "arrOUS[3] append -3.5",
15176 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15183 OStringBuffer
aStrBuf( arrOUS
[3] );
15184 float input
= static_cast<float>(atof("-3.0625"));
15186 sal_Int32 nLen
= aStrBuf
.getLength();
15187 aStrBuf
.append( input
);
15189 CPPUNIT_ASSERT_MESSAGE
15191 "arrOUS[3] append -3.0625",
15192 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15199 OStringBuffer
aStrBuf( arrOUS
[3] );
15200 float input
= static_cast<float>(atof("-3.502525"));
15202 sal_Int32 nLen
= aStrBuf
.getLength();
15203 aStrBuf
.append( input
);
15205 CPPUNIT_ASSERT_MESSAGE
15207 "arrOUS[3] append -3.502525",
15208 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15216 OStringBuffer
aStrBuf( kSInt32Max
);
15217 float input
= (float)atof("-3.0");
15219 sal_Int32 nLen
= aStrBuf
.getLength();
15220 aStrBuf
.append( input
);
15222 CPPUNIT_ASSERT_MESSAGE
15224 "OStringBuffer( kSInt32Max ) append -3.0",
15225 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15232 OStringBuffer
aStrBuf( kSInt32Max
);
15233 float input
= (float)atof("-3.5");
15235 sal_Int32 nLen
= aStrBuf
.getLength();
15236 aStrBuf
.append( input
);
15238 CPPUNIT_ASSERT_MESSAGE
15240 "OStringBuffer( kSInt32Max ) append -3.5",
15241 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15248 OStringBuffer
aStrBuf( kSInt32Max
);
15249 float input
= (float)atof("-3.0625");
15251 sal_Int32 nLen
= aStrBuf
.getLength();
15252 aStrBuf
.append( input
);
15254 CPPUNIT_ASSERT_MESSAGE
15256 "OStringBuffer( kSInt32Max ) append -3.0625",
15257 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15264 OStringBuffer
aStrBuf( kSInt32Max
);
15265 float input
= (float)atof("-3.502525");
15267 sal_Int32 nLen
= aStrBuf
.getLength();
15268 aStrBuf
.append( input
);
15270 CPPUNIT_ASSERT_MESSAGE
15272 "OStringBuffer( kSInt32Max ) append -3.502525",
15273 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15280 OStringBuffer
aStrBuf( kSInt32Max
);
15281 float input
= (float)atof("-3.141592");
15283 sal_Int32 nLen
= aStrBuf
.getLength();
15284 aStrBuf
.append( input
);
15286 CPPUNIT_ASSERT_MESSAGE
15288 "OStringBuffer( kSInt32Max ) append -3.141592",
15289 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15296 OStringBuffer
aStrBuf( kSInt32Max
);
15297 float input
= (float)atof("-3.5025255");
15299 sal_Int32 nLen
= aStrBuf
.getLength();
15300 aStrBuf
.append( input
);
15302 CPPUNIT_ASSERT_MESSAGE
15304 "OStringBuffer( kSInt32Max ) append -3.5025255",
15305 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15312 OStringBuffer
aStrBuf( kSInt32Max
);
15313 float input
= (float)atof("-3.00390625");
15315 sal_Int32 nLen
= aStrBuf
.getLength();
15316 aStrBuf
.append( input
);
15318 CPPUNIT_ASSERT_MESSAGE
15320 "OStringBuffer( kSInt32Max ) append -3.0039062",
15321 checkIfStrBufContainAtPosTheFloat(aStrBuf
, nLen
, input
)
15327 CPPUNIT_TEST_SUITE( append_008_Float_Negative
);
15328 CPPUNIT_TEST( append_001
);
15329 CPPUNIT_TEST( append_002
);
15330 CPPUNIT_TEST( append_003
);
15331 CPPUNIT_TEST( append_004
);
15332 CPPUNIT_TEST( append_005
);
15333 CPPUNIT_TEST( append_006
);
15334 CPPUNIT_TEST( append_007
);
15335 CPPUNIT_TEST( append_008
);
15336 CPPUNIT_TEST( append_009
);
15337 CPPUNIT_TEST( append_010
);
15338 CPPUNIT_TEST( append_011
);
15339 CPPUNIT_TEST( append_012
);
15340 CPPUNIT_TEST( append_013
);
15341 CPPUNIT_TEST( append_014
);
15342 CPPUNIT_TEST( append_015
);
15343 CPPUNIT_TEST( append_016
);
15344 CPPUNIT_TEST( append_017
);
15345 CPPUNIT_TEST( append_018
);
15346 CPPUNIT_TEST( append_019
);
15347 CPPUNIT_TEST( append_020
);
15348 CPPUNIT_TEST( append_021
);
15349 CPPUNIT_TEST( append_022
);
15350 CPPUNIT_TEST( append_023
);
15351 CPPUNIT_TEST( append_024
);
15352 CPPUNIT_TEST( append_025
);
15354 CPPUNIT_TEST( append_026
);
15355 CPPUNIT_TEST( append_027
);
15356 CPPUNIT_TEST( append_028
);
15357 CPPUNIT_TEST( append_029
);
15358 CPPUNIT_TEST( append_030
);
15360 CPPUNIT_TEST_SUITE_END();
15363 // testing the method append( double d )
15365 class checkdouble
: public CppUnit::TestFixture
15368 bool checkIfStrBufContainAtPosTheDouble(OStringBuffer
const& _sStrBuf
, sal_Int32 _nLen
, double _nDouble
)
15370 OString sDoubleValue
= OString::number(_nDouble
);
15372 OString
sBufferString(_sStrBuf
.getStr());
15373 sal_Int32 nPos
= sBufferString
.indexOf(sDoubleValue
);
15374 return nPos
>= 0 && nPos
== _nLen
;
15378 class append_009_double
: public checkdouble
15383 void setUp() override
15385 arrOUS
[0] = OString( kTestStr7
);
15386 arrOUS
[1] = OString( );
15387 arrOUS
[2] = OString( kTestStr25
);
15388 arrOUS
[3] = OString( "" );
15389 arrOUS
[4] = OString( kTestStr28
);
15394 OStringBuffer
aStrBuf( arrOUS
[0] );
15395 double input
= atof("3.0");
15397 sal_Int32 nLen
= aStrBuf
.getLength();
15398 aStrBuf
.append( input
);
15400 CPPUNIT_ASSERT_MESSAGE
15402 "arrOUS[0] append 3.0",
15403 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15410 OStringBuffer
aStrBuf( arrOUS
[4] );
15411 double input
= atof("3.141592653589793238462643");
15413 sal_Int32 nLen
= aStrBuf
.getLength();
15414 aStrBuf
.append( input
);
15416 CPPUNIT_ASSERT_MESSAGE
15418 "arrOUS[4] append 3.141592653589793238462643",
15419 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15424 CPPUNIT_TEST_SUITE( append_009_double
);
15425 CPPUNIT_TEST( append_001
);
15426 CPPUNIT_TEST( append_035
);
15427 CPPUNIT_TEST_SUITE_END();
15430 // testing the method append( double f ) for negative value
15432 class append_009_Double_Negative
: public checkdouble
15437 void setUp() override
15439 arrOUS
[0] = OString( kTestStr7
);
15440 arrOUS
[1] = OString( );
15441 arrOUS
[2] = OString( kTestStr25
);
15442 arrOUS
[3] = OString( "" );
15443 arrOUS
[4] = OString( kTestStr28
);
15448 OStringBuffer
aStrBuf( arrOUS
[0] );
15449 double input
= atof("-3.0");
15451 sal_Int32 nLen
= aStrBuf
.getLength();
15452 aStrBuf
.append( input
);
15454 CPPUNIT_ASSERT_MESSAGE
15456 "arrOUS[0] append -3.0",
15457 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15464 OStringBuffer
aStrBuf( arrOUS
[4] );
15465 double input
= atof("-3.141592653589793238462643");
15467 sal_Int32 nLen
= aStrBuf
.getLength();
15468 aStrBuf
.append( input
);
15470 CPPUNIT_ASSERT_MESSAGE
15472 "arrOUS[4] append -3.141592653589793238462643",
15473 checkIfStrBufContainAtPosTheDouble(aStrBuf
, nLen
, input
)
15478 CPPUNIT_TEST_SUITE( append_009_Double_Negative
);
15479 CPPUNIT_TEST( append_001
);
15480 CPPUNIT_TEST( append_035
);
15481 CPPUNIT_TEST_SUITE_END();
15484 class AppendUninitialized
: public CppUnit::TestFixture
{
15488 void testNonEmpty();
15492 CPPUNIT_TEST_SUITE(AppendUninitialized
);
15493 CPPUNIT_TEST(testEmpty
);
15494 CPPUNIT_TEST(testNonEmpty
);
15495 CPPUNIT_TEST(testZero
);
15496 CPPUNIT_TEST_SUITE_END();
15499 void AppendUninitialized::testEmpty() {
15501 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), s
.getLength());
15502 char * p
= s
.appendUninitialized(5);
15503 CPPUNIT_ASSERT_EQUAL(
15504 static_cast<void const *>(s
.getStr()),
15505 static_cast<void const *>(p
));
15506 CPPUNIT_ASSERT_EQUAL(sal_Int32(5), s
.getLength());
15509 void AppendUninitialized::testNonEmpty() {
15510 OStringBuffer
s("ab");
15511 CPPUNIT_ASSERT_EQUAL(sal_Int32(2), s
.getLength());
15512 char * p
= s
.appendUninitialized(5);
15513 CPPUNIT_ASSERT_EQUAL(
15514 static_cast<void const *>(s
.getStr() + 2),
15515 static_cast<void const *>(p
));
15516 CPPUNIT_ASSERT_EQUAL(sal_Int32(7), s
.getLength());
15519 void AppendUninitialized::testZero() {
15521 char * p
= s
.appendUninitialized(0);
15522 CPPUNIT_ASSERT_EQUAL(
15523 static_cast<void const *>(s
.getStr()),
15524 static_cast<void const *>(p
));
15525 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), s
.getLength());
15527 } // namespace rtl_OStringBuffer
15529 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ctors
);
15530 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::makeStringAndClear
);
15531 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getLength
);
15532 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getCapacity
);
15533 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ensureCapacity
);
15534 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::setLength
);
15535 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::csuc
);
15536 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getStr
);
15537 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_001
);
15538 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_002
);
15539 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_003
);
15540 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_004
);
15541 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_005
);
15542 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32
);
15543 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Bounderies
);
15544 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Negative
);
15545 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_defaultParam
);
15546 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64
);
15547 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Bounderies
);
15548 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Negative
);
15549 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_defaultParam
);
15550 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_float
);
15551 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative
);
15552 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_double
);
15553 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative
);
15554 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::AppendUninitialized
);
15555 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::remove
);
15557 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */