diff options
author | Kurt Zenker <kz@openoffice.org> | 2003-11-18 15:37:03 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2003-11-18 15:37:03 +0000 |
commit | 3d593b6579e7c73e4a1156d778ccfca81ad7a03e (patch) | |
tree | b304aa86d4567b90a4c0da7c37bb5004924584d0 /sal/qa/OStringBuffer | |
parent | b8941294ae93d09eb8b49f4ffcdb5a9687aeb989 (diff) |
INTEGRATION: CWS qadev13 (1.6.96); FILE MERGED
2003/11/12 11:05:05 lla 1.6.96.3: #112598# was not compileable within windows
2003/11/11 09:58:57 lla 1.6.96.2: #112598# fixes
2003/10/31 09:27:11 lla 1.6.96.1: #112598# some hints
Diffstat (limited to 'sal/qa/OStringBuffer')
-rw-r--r-- | sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 755 |
1 files changed, 467 insertions, 288 deletions
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx index ea1ca22a7888..cd6e6e2db1ba 100644 --- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx +++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rtl_OStringBuffer.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: vg $ $Date: 2003-04-01 13:22:29 $ + * last change: $Author: kz $ $Date: 2003-11-18 16:37:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,6 +91,9 @@ const MAXBUFLENGTH = 255; // testing constructors //------------------------------------------------------------------------ +// LLA: there exist some #if WITH_CORE #endif envelopes, which contain test code, which will core dump +// due to the fact, that we can't handle MAXINT32 right. + namespace rtl_OStringBuffer { class ctors : public CppUnit::TestFixture @@ -100,12 +103,13 @@ namespace rtl_OStringBuffer void ctor_001() { ::rtl::OStringBuffer aStrBuf; + const sal_Char* pStr = aStrBuf.getStr(); CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters", aStrBuf.getLength() == 0 && - ! *(aStrBuf.getStr()) && aStrBuf.getCapacity() == 16 + *pStr == '\0' && aStrBuf.getCapacity() == 16 ); } @@ -114,13 +118,19 @@ namespace rtl_OStringBuffer ::rtl::OString aStrtmp( kTestStr1 ); ::rtl::OStringBuffer aStrBuftmp( aStrtmp ); ::rtl::OStringBuffer aStrBuf( aStrBuftmp ); - sal_Bool res = cmpstr(aStrBuftmp.getStr(),aStrBuf.getStr()); + // sal_Bool res = cmpstr(aStrBuftmp.getStr(),aStrBuf.getStr()); + + sal_Int32 nLenStrBuftmp = aStrBuftmp.getLength(); + + rtl::OString sStr(aStrBuftmp.getStr()); + sal_Bool res = aStrtmp.equals( sStr ); CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer from another OStringBuffer", - aStrBuf.getLength()==aStrBuftmp.getLength() && - aStrBuf.getCapacity() == aStrBuftmp.getCapacity() && res + aStrBuf.getLength() == nLenStrBuftmp && + aStrBuf.getCapacity() == aStrBuftmp.getCapacity() && + res ); } @@ -130,10 +140,15 @@ namespace rtl_OStringBuffer ::rtl::OStringBuffer aStrBuf1(kTestStr2Len); #ifdef WITH_CORE ::rtl::OStringBuffer aStrBuf2(kSInt32Max); //will core dump + // LLA: will core, due to the fact, that ksint32max is too big, the max length can't + // use, because there are some internal bytes, which we can't calculate. + #else ::rtl::OStringBuffer aStrBuf2(0); #endif - ::rtl::OStringBuffer aStrBuf3(kNonSInt32Max); + + const sal_Char* pStr1 = aStrBuf1.getStr(); + const sal_Char* pStr2 = aStrBuf2.getStr(); #ifdef WITH_CORE CPPUNIT_ASSERT_MESSAGE @@ -142,27 +157,39 @@ namespace rtl_OStringBuffer aStrBuf1.getLength() == 0 && ! *(aStrBuf1.getStr()) && aStrBuf1.getCapacity() == kTestStr2Len && aStrBuf2.getLength() == 0 && - ! *(aStrBuf2.getStr()) && aStrBuf2.getCapacity() == kSInt32Max && - aStrBuf3.getLength() == 0 && - ! *(aStrBuf3.getStr()) && aStrBuf3.getCapacity() == kNonSInt32Max + ! *(aStrBuf2.getStr()) && aStrBuf2.getCapacity() == kSInt32Max ); -#else - CPPUNIT_ASSERT_MESSAGE +#else CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters and contain assigned capacity", aStrBuf1.getLength() == 0 && - ! *(aStrBuf1.getStr()) && aStrBuf1.getCapacity() == kTestStr2Len && + *pStr1 == '\0' && + aStrBuf1.getCapacity() == kTestStr2Len && aStrBuf2.getLength() == 0 && - ! *(aStrBuf2.getStr()) && aStrBuf2.getCapacity() == 16 && - aStrBuf3.getLength() == 0 && - ! *(aStrBuf3.getStr()) && aStrBuf3.getCapacity() == kNonSInt32Max - + *pStr2 == '\0' && + aStrBuf2.getCapacity() == 16 ); #endif } + void ctor_003_1() + { + // LLA: StringBuffer with created negativ size are the same as empty StringBuffers + ::rtl::OStringBuffer aStrBuf3(kNonSInt32Max); + + const sal_Char* pStr = aStrBuf3.getStr(); + + CPPUNIT_ASSERT_MESSAGE + ( + "New OStringBuffer containing no characters and contain assigned capacity", + aStrBuf3.getLength() == 0 && + *pStr == '\0' && + aStrBuf3.getCapacity() == kNonSInt32Max + ); + } + void ctor_004() { ::rtl::OString aStrtmp( kTestStr1 ); @@ -183,6 +210,7 @@ namespace rtl_OStringBuffer CPPUNIT_TEST(ctor_001); CPPUNIT_TEST(ctor_002); CPPUNIT_TEST(ctor_003); + CPPUNIT_TEST(ctor_003_1); CPPUNIT_TEST(ctor_004); CPPUNIT_TEST_SUITE_END(); }; @@ -734,7 +762,7 @@ namespace rtl_OStringBuffer void ensureCapacity_004() //the testcase is based on comments { - sal_Int32 expVal = 34; + sal_Int32 expVal = 20; ::rtl::OStringBuffer aStrBuf; sal_Int32 input = 20; @@ -814,7 +842,7 @@ namespace rtl_OStringBuffer void ensureCapacity_009() //the testcase is based on comments { - sal_Int32 expVal = 14; + sal_Int32 expVal = 10; ::rtl::OStringBuffer aStrBuf( 6 ); sal_Int32 input = 10; @@ -846,7 +874,7 @@ namespace rtl_OStringBuffer void ensureCapacity_011() //the testcase is based on comments { - sal_Int32 expVal = 1; + sal_Int32 expVal = 2; // capacity is x = (str->length + 1) * 2; minimum < x ? x : minimum ::rtl::OStringBuffer aStrBuf( 0 ); sal_Int32 input = 1; @@ -1705,6 +1733,7 @@ namespace rtl_OStringBuffer }; // ----------------------------------------------------------------------------- + class csuc : public CppUnit::TestFixture { void csuc_001() @@ -1713,29 +1742,33 @@ namespace rtl_OStringBuffer ::rtl::OStringBuffer aStrBuf( kTestStr1 ); sal_Int32 cmpLen = kTestStr1Len; - const sal_Char* pstr = *&aStrBuf; + // LLA: wrong access! const sal_Char* pstr = *&aStrBuf; + const sal_Char* pstr = aStrBuf.getStr(); + int nEqual = strncmp(pstr, expVal, cmpLen); CPPUNIT_ASSERT_MESSAGE ( "test normal string", - cmpstr( pstr, expVal, cmpLen ) + /* cmpstr( pstr, expVal, cmpLen ) */ + nEqual == 0 ); } void csuc_002() { - const sal_Char expVal=0x0; ::rtl::OStringBuffer aStrBuf; - sal_Int32 cmpLen = 1; - const sal_Char* pstr = *&aStrBuf; + // LLA: wrong access! const sal_Char* pstr = *&aStrBuf; + const sal_Char* pstr = aStrBuf.getStr(); + sal_Int32 nLen = strlen(pstr); CPPUNIT_ASSERT_MESSAGE ( "test empty string", - cmpstr( pstr, &expVal, cmpLen ) - ); + // cmpstr( pstr, &expVal, cmpLen ) + nLen == 0 + ); } @@ -1758,28 +1791,31 @@ namespace rtl_OStringBuffer sal_Int32 cmpLen = kTestStr1Len; const sal_Char* pstr = aStrBuf.getStr(); + int nEqual = strncmp(pstr, expVal, cmpLen); CPPUNIT_ASSERT_MESSAGE ( "test normal string", - cmpstr( pstr, expVal, cmpLen ) + nEqual == 0 ); } void getStr_002() { - const sal_Char tmpUC=0x0; - const sal_Char* expVal=&tmpUC; + // const sal_Char tmpUC=0x0; + // const sal_Char* expVal=&tmpUC; ::rtl::OStringBuffer aStrBuf; - sal_Int32 cmpLen = 1; + // sal_Int32 cmpLen = 1; const sal_Char* pstr = aStrBuf.getStr(); + sal_Int32 nLen = strlen(pstr); CPPUNIT_ASSERT_MESSAGE ( "test empty string", - cmpstr( pstr, expVal, cmpLen ) + pstr != 0 && + nLen == 0 ); } @@ -2859,18 +2895,19 @@ namespace rtl_OStringBuffer void append_003_005() { - OString expVal( kTestStr41 ); - ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - const sal_Char* input1 = kTestStr2; - sal_Int32 input2 = -1; - - aStrBuf.append( input1, input2 ); - - CPPUNIT_ASSERT_MESSAGE - ( - "Appends the string(length less than 0) to the string buffer arrOUS[0]", - ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) - ); + // LLA: this is an illegal test, the input2 value must non-negative + // LLA: OString expVal( kTestStr41 ); + // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); + // LLA: const sal_Char* input1 = kTestStr2; + // LLA: sal_Int32 input2 = -1; + // LLA: + // LLA: aStrBuf.append( input1, input2 ); + // LLA: + // LLA: CPPUNIT_ASSERT_MESSAGE + // LLA: ( + // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[0]", + // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) + // LLA: ); } @@ -2944,19 +2981,19 @@ namespace rtl_OStringBuffer void append_003_010() { - OString expVal; - ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - const sal_Char* input1 = kTestStr2; - sal_Int32 input2 = -1; - - aStrBuf.append( input1, input2 ); - - CPPUNIT_ASSERT_MESSAGE - ( - "Appends the string(length less than 0) to the string buffer arrOUS[1]", - ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) - ); - + // LLA: this is an illegal test, the input2 value must non-negative + // LLA: OString expVal; + // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); + // LLA: const sal_Char* input1 = kTestStr2; + // LLA: sal_Int32 input2 = -1; + // LLA: + // LLA: aStrBuf.append( input1, input2 ); + // LLA: + // LLA: CPPUNIT_ASSERT_MESSAGE + // LLA: ( + // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[1]", + // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) + // LLA: ); } void append_003_011() @@ -3029,18 +3066,19 @@ namespace rtl_OStringBuffer void append_003_015() { - OString expVal; - ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - const sal_Char* input1 = kTestStr2; - sal_Int32 input2 = -1; - - aStrBuf.append( input1, input2 ); - - CPPUNIT_ASSERT_MESSAGE - ( - "Appends the string(length less than 0) to the string buffer arrOUS[2]", - ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) - ); + // LLA: this is an illegal test, the input2 value must non-negative + // LLA: OString expVal; + // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); + // LLA: const sal_Char* input1 = kTestStr2; + // LLA: sal_Int32 input2 = -1; + // LLA: + // LLA: aStrBuf.append( input1, input2 ); + // LLA: + // LLA: CPPUNIT_ASSERT_MESSAGE + // LLA: ( + // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[2]", + // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) + // LLA: ); } @@ -3114,18 +3152,19 @@ namespace rtl_OStringBuffer void append_003_020() { - OString expVal; - ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - const sal_Char* input1 = kTestStr2; - sal_Int32 input2 = -1; - - aStrBuf.append( input1, input2 ); - - CPPUNIT_ASSERT_MESSAGE - ( - "Appends the string(length less than 0) to the string buffer arrOUS[3]", - ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) - ); + // LLA: this is an illegal test, the input2 value must non-negative + // LLA: OString expVal; + // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); + // LLA: const sal_Char* input1 = kTestStr2; + // LLA: sal_Int32 input2 = -1; + // LLA: + // LLA: aStrBuf.append( input1, input2 ); + // LLA: + // LLA: CPPUNIT_ASSERT_MESSAGE + // LLA: ( + // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[3]", + // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) + // LLA: ); } @@ -3199,18 +3238,19 @@ namespace rtl_OStringBuffer void append_003_025() { - OString expVal( kTestStr42 ); - ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - const sal_Char* input1 = kTestStr2; - sal_Int32 input2 = -1; - - aStrBuf.append( input1, input2 ); - - CPPUNIT_ASSERT_MESSAGE - ( - "Appends the string(length less than 0) to the string buffer arrOUS[4]", - ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) - ); + // LLA: this is an illegal test, the input2 value must non-negative + // LLA: OString expVal( kTestStr42 ); + // LLA: ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); + // LLA: const sal_Char* input1 = kTestStr2; + // LLA: sal_Int32 input2 = -1; + // LLA: + // LLA: aStrBuf.append( input1, input2 ); + // LLA: + // LLA: CPPUNIT_ASSERT_MESSAGE + // LLA: ( + // LLA: "Appends the string(length less than 0) to the string buffer arrOUS[4]", + // LLA: ( aStrBuf.getStr()== expVal) &&( aStrBuf.getLength() == expVal.getLength() ) + // LLA: ); } @@ -14796,14 +14836,15 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); OString expVal( kTestStr117 ); - sal_Int64 input = kNonSInt64Max; + sal_Int64 input = -9223372036854775808; // LLA: this is not the same :-( kNonSInt64Max; aStrBuf.append( input ); + sal_Bool bRes = expVal.equals( aStrBuf.getStr() ); CPPUNIT_ASSERT_MESSAGE ( "input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + bRes && aStrBuf.getLength() == expVal.getLength() ); } @@ -14876,7 +14917,7 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); OString expVal( kTestStr119 ); - sal_Int64 input = kNonSInt64Max; + sal_Int64 input = -9223372036854775808; // LLA: this is not the same :-( kNonSInt64Max; aStrBuf.append( input ); @@ -14956,7 +14997,7 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); OString expVal( kTestStr119 ); - sal_Int64 input = kNonSInt64Max; + sal_Int64 input = -9223372036854775808; // LLA: this is not the same :-( kNonSInt64Max; aStrBuf.append( input ); @@ -15036,7 +15077,7 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); OString expVal( kTestStr119 ); - sal_Int64 input = kNonSInt64Max; + sal_Int64 input = -9223372036854775808; // LLA: this is not the same :-( kNonSInt64Max; aStrBuf.append( input ); @@ -15116,7 +15157,7 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); OString expVal( kTestStr121 ); - sal_Int64 input = kNonSInt64Max; + sal_Int64 input = -9223372036854775808; // LLA: this is not the same :-( kNonSInt64Max; aStrBuf.append( input ); @@ -15196,7 +15237,7 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, { ::rtl::OStringBuffer aStrBuf( kSInt64Max ); OString expVal( kTestStr119 ); - sal_Int64 input = kNonSInt64Max; + sal_Int64 input = -9223372036854775808; // LLA: this is not the same :-( kNonSInt64Max; aStrBuf.append( input ); @@ -15247,7 +15288,25 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, //------------------------------------------------------------------------ // testing the method append( float f ) //------------------------------------------------------------------------ - class append_008_float : public CppUnit::TestFixture + class checkfloat : public CppUnit::TestFixture + { + public: + bool checkIfStrBufContainAtPosTheFloat(rtl::OStringBuffer const& _sStrBuf, sal_Int32 _nLen, float _nFloat) + { + OString sFloatValue; + sFloatValue = rtl::OString::valueOf(_nFloat); + + OString sBufferString(_sStrBuf.getStr()); + sal_Int32 nPos = sBufferString.indexOf(sFloatValue); + if ( nPos >= 0 && nPos == _nLen) + { + return true; + } + return false; + } + }; +// ----------------------------------------------------------------------------- + class append_008_float : public checkfloat { OString* arrOUS[5]; @@ -15271,15 +15330,20 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_001() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr74 ); + // LLA: OString expVal( kTestStr74 ); float input = (float)atof("3.0"); + // LLA: + // the complex problem is here, that a float value is not really what we write. + // So a 3.0 could also be 3 or 3.0 or 3.0000001 or 2.9999999 + // this has to be checked. + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15287,15 +15351,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_002() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr75 ); + // LLA: OString expVal( kTestStr75 ); float input = (float)atof("3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15303,15 +15368,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_003() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr76 ); + // LLA: OString expVal( kTestStr76 ); float input = (float)atof("3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15319,15 +15385,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_004() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr77 ); + // LLA: OString expVal( kTestStr77 ); float input = (float)atof("3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15335,15 +15402,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_005() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr78 ); + // LLA: OString expVal( kTestStr78 ); float input = (float)atof("3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15351,15 +15419,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_006() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr79 ); + // LLA: OString expVal( kTestStr79 ); float input = (float)atof("3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15367,15 +15436,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_007() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr80 ); + // LLA: OString expVal( kTestStr80 ); float input = (float)atof("3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15383,15 +15453,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_008() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr81 ); + // LLA: OString expVal( kTestStr81 ); float input = (float)atof("3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15399,15 +15470,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_009() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr82 ); + // LLA: OString expVal( kTestStr82 ); float input = (float)atof("3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15415,15 +15487,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_010() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr83 ); + // LLA: OString expVal( kTestStr83 ); float input = (float)atof("3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15431,15 +15504,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_011() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr84 ); + // LLA: OString expVal( kTestStr84 ); float input = (float)atof("3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15447,15 +15521,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_012() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr85 ); + // LLA: OString expVal( kTestStr85 ); float input = (float)atof("3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15463,15 +15538,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_013() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr86 ); + // LLA: OString expVal( kTestStr86 ); float input = (float)atof("3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15479,15 +15555,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_014() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr87 ); + // LLA: OString expVal( kTestStr87 ); float input = (float)atof("3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append 3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15495,15 +15572,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_015() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr81 ); + // LLA: OString expVal( kTestStr81 ); float input = (float)atof("3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15511,15 +15589,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_016() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr82 ); + // LLA: OString expVal( kTestStr82 ); float input = (float)atof("3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15527,15 +15606,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_017() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr83 ); + // LLA: OString expVal( kTestStr83 ); float input = (float)atof("3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15543,15 +15623,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_018() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr84 ); + // LLA: OString expVal( kTestStr84 ); float input = (float)atof("3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15559,15 +15640,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_019() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr85 ); + // LLA: OString expVal( kTestStr85 ); float input = (float)atof("3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15575,15 +15657,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_020() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr86 ); + // LLA: OString expVal( kTestStr86 ); float input = (float)atof("3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15591,15 +15674,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_021() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr87 ); + // LLA: OString expVal( kTestStr87 ); float input = (float)atof("3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append 3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15607,15 +15691,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_022() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr81 ); + // LLA: OString expVal( kTestStr81 ); float input = (float)atof("3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15623,15 +15708,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_023() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr82 ); + // LLA: OString expVal( kTestStr82 ); float input = (float)atof("3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15639,15 +15725,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_024() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr83 ); + // LLA: OString expVal( kTestStr83 ); float input = (float)atof("3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15655,15 +15742,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_025() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr84 ); + // LLA: OString expVal( kTestStr84 ); float input = (float)atof("3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15671,15 +15759,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_026() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr85 ); + // LLA: OString expVal( kTestStr85 ); float input = (float)atof("3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15687,15 +15776,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_027() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr86 ); + // LLA: OString expVal( kTestStr86 ); float input = (float)atof("3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15703,15 +15793,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_028() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr87 ); + // LLA: OString expVal( kTestStr87 ); float input = (float)atof("3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append 3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15719,15 +15810,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_029() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr88 ); + // LLA: OString expVal( kTestStr88 ); float input = (float)atof("3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15735,15 +15827,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_030() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr89 ); + // LLA: OString expVal( kTestStr89 ); float input = (float)atof("3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15751,15 +15844,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_031() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr90 ); + // LLA: OString expVal( kTestStr90 ); float input = (float)atof("3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15767,15 +15861,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_032() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr91 ); + // LLA: OString expVal( kTestStr91 ); float input = (float)atof("3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15783,15 +15878,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_033() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr92 ); + // LLA: OString expVal( kTestStr92 ); float input = (float)atof("3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15799,15 +15895,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_034() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr93 ); + // LLA: OString expVal( kTestStr93 ); float input = (float)atof("3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15815,15 +15912,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_035() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr94 ); + // LLA: OString expVal( kTestStr94 ); float input = (float)atof("3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15831,15 +15929,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_036() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr81 ); + // LLA: OString expVal( kTestStr81 ); float input = (float)atof("3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15847,15 +15946,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_037() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr82 ); + // LLA: OString expVal( kTestStr82 ); float input = (float)atof("3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15863,15 +15963,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_038() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr83 ); + // LLA: OString expVal( kTestStr83 ); float input = (float)atof("3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15879,15 +15980,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_039() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr84 ); + // LLA: OString expVal( kTestStr84 ); float input = (float)atof("3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15895,15 +15997,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_040() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr85 ); + // LLA: OString expVal( kTestStr85 ); float input = (float)atof("3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15911,15 +16014,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_041() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr86 ); + // LLA: OString expVal( kTestStr86 ); float input = (float)atof("3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15927,15 +16031,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_042() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr87 ); + // LLA: OString expVal( kTestStr87 ); float input = (float)atof("3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append 3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -15979,7 +16084,7 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, //------------------------------------------------------------------------ // testing the method append( float f ) for negative value //------------------------------------------------------------------------ - class append_008_Float_Negative : public CppUnit::TestFixture + class append_008_Float_Negative : public checkfloat { OString* arrOUS[5]; @@ -16003,15 +16108,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_001() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr95 ); + // LLA: OString expVal( kTestStr95 ); float input = (float)atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16019,15 +16125,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_002() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr96 ); + // LLA: OString expVal( kTestStr96 ); float input = (float)atof("-3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16035,15 +16142,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_003() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr97 ); + // LLA: OString expVal( kTestStr97 ); float input = (float)atof("-3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16051,15 +16159,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_004() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr98 ); + // LLA: OString expVal( kTestStr98 ); float input = (float)atof("-3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16067,15 +16176,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_005() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr99 ); + // LLA: OString expVal( kTestStr99 ); float input = (float)atof("-3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16083,15 +16193,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_006() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr100 ); + // LLA: OString expVal( kTestStr100 ); float input = (float)atof("-3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16099,15 +16210,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_007() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr101 ); + // LLA: OString expVal( kTestStr101 ); float input = (float)atof("-3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16115,15 +16227,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_008() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr102 ); + // LLA: OString expVal( kTestStr102 ); float input = (float)atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16131,15 +16244,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_009() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr103 ); + // LLA: OString expVal( kTestStr103 ); float input = (float)atof("-3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16147,15 +16261,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_010() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr104 ); + // LLA: OString expVal( kTestStr104 ); float input = (float)atof("-3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16163,15 +16278,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_011() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr105 ); + // LLA: OString expVal( kTestStr105 ); float input = (float)atof("-3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16179,15 +16295,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_012() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr106 ); + // LLA: OString expVal( kTestStr106 ); float input = (float)atof("-3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16195,15 +16312,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_013() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr107 ); + // LLA: OString expVal( kTestStr107 ); float input = (float)atof("-3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16211,15 +16329,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_014() { ::rtl::OStringBuffer aStrBuf( *arrOUS[1] ); - OString expVal( kTestStr108 ); + // LLA: OString expVal( kTestStr108 ); float input = (float)atof("-3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[1] append -3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16227,15 +16346,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_015() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr102 ); + // LLA: OString expVal( kTestStr102 ); float input = (float)atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16243,15 +16363,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_016() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr103 ); + // LLA: OString expVal( kTestStr103 ); float input = (float)atof("-3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16259,15 +16380,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_017() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr104 ); + // LLA: OString expVal( kTestStr104 ); float input = (float)atof("-3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16275,15 +16397,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_018() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr105 ); + // LLA: OString expVal( kTestStr105 ); float input = (float)atof("-3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16291,15 +16414,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_019() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr106 ); + // LLA: OString expVal( kTestStr106 ); float input = (float)atof("-3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16307,15 +16431,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_020() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr107 ); + // LLA: OString expVal( kTestStr107 ); float input = (float)atof("-3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16323,15 +16448,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_021() { ::rtl::OStringBuffer aStrBuf( *arrOUS[2] ); - OString expVal( kTestStr108 ); + // LLA: OString expVal( kTestStr108 ); float input = (float)atof("-3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[2] append -3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16339,15 +16465,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_022() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr102 ); + // LLA: OString expVal( kTestStr102 ); float input = (float)atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16355,15 +16482,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_023() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr103 ); + // LLA: OString expVal( kTestStr103 ); float input = (float)atof("-3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16371,15 +16499,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_024() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr104 ); + // LLA: OString expVal( kTestStr104 ); float input = (float)atof("-3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16387,15 +16516,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_025() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr105 ); + // LLA: OString expVal( kTestStr105 ); float input = (float)atof("-3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16403,15 +16533,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_026() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr106 ); + // LLA: OString expVal( kTestStr106 ); float input = (float)atof("-3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16419,15 +16550,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_027() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr107 ); + // LLA: OString expVal( kTestStr107 ); float input = (float)atof("-3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16435,15 +16567,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_028() { ::rtl::OStringBuffer aStrBuf( *arrOUS[3] ); - OString expVal( kTestStr108 ); + // LLA: OString expVal( kTestStr108 ); float input = (float)atof("-3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[3] append -3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16451,15 +16584,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_029() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr109 ); + // LLA: OString expVal( kTestStr109 ); float input = (float)atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16467,15 +16601,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_030() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr110 ); + // LLA: OString expVal( kTestStr110 ); float input = (float)atof("-3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16483,15 +16618,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_031() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr111 ); + // LLA: OString expVal( kTestStr111 ); float input = (float)atof("-3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16499,15 +16635,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_032() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr112 ); + // LLA: OString expVal( kTestStr112 ); float input = (float)atof("-3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16515,15 +16652,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_033() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr113 ); + // LLA: OString expVal( kTestStr113 ); float input = (float)atof("-3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16531,15 +16669,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_034() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr114 ); + // LLA: OString expVal( kTestStr114 ); float input = (float)atof("-3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16547,15 +16686,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_035() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr115 ); + // LLA: OString expVal( kTestStr115 ); float input = (float)atof("-3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16563,15 +16703,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_036() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr102 ); + // LLA: OString expVal( kTestStr102 ); float input = (float)atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16579,15 +16720,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_037() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr103 ); + // LLA: OString expVal( kTestStr103 ); float input = (float)atof("-3.5"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.5", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16595,15 +16737,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_038() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr104 ); + // LLA: OString expVal( kTestStr104 ); float input = (float)atof("-3.0625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.0625", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16611,15 +16754,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_039() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr105 ); + // LLA: OString expVal( kTestStr105 ); float input = (float)atof("-3.502525"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.502525", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16627,15 +16771,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_040() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr106 ); + // LLA: OString expVal( kTestStr106 ); float input = (float)atof("-3.141592"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.141592", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16643,15 +16788,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_041() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr107 ); + // LLA: OString expVal( kTestStr107 ); float input = (float)atof("-3.5025255"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.5025255", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16659,15 +16805,16 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_042() { ::rtl::OStringBuffer aStrBuf( kSInt32Max ); - OString expVal( kTestStr108 ); + // LLA: OString expVal( kTestStr108 ); float input = (float)atof("-3.00390625"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "OStringBuffer( kSInt32Max ) append -3.0039062", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheFloat(aStrBuf, nLen, input) ); } @@ -16711,8 +16858,26 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, //------------------------------------------------------------------------ // testing the method append( double d ) //------------------------------------------------------------------------ -/* - class append_009_double : public CppUnit::TestFixture + + class checkdouble : public CppUnit::TestFixture + { + public: + bool checkIfStrBufContainAtPosTheDouble(rtl::OStringBuffer const& _sStrBuf, sal_Int32 _nLen, double _nDouble) + { + OString sDoubleValue; + sDoubleValue = rtl::OString::valueOf(_nDouble); + + OString sBufferString(_sStrBuf.getStr()); + sal_Int32 nPos = sBufferString.indexOf(sDoubleValue); + if ( nPos >= 0 && nPos == _nLen) + { + return true; + } + return false; + } + }; + + class append_009_double : public checkdouble { OString* arrOUS[5]; @@ -16736,19 +16901,21 @@ sal_Bool test_append( const char** resArray, int n, sal_Int16 radix, void append_001() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr74 ); + // LLA: OString expVal( kTestStr74 ); double input = atof("3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append 3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input) ); } +/* void append_002() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); @@ -17299,22 +17466,24 @@ printf("\n"); ); } - +*/ void append_035() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr133 ); + // LLA: OString expVal( kTestStr133 ); double input = atof("3.141592653589793238462643"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append 3.141592653589793238462643", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input) ); } +/* #ifdef WITH_CORE void append_036() { @@ -17428,9 +17597,10 @@ printf("\n"); } #endif - +*/ CPPUNIT_TEST_SUITE( append_009_double ); CPPUNIT_TEST( append_001 ); +/* CPPUNIT_TEST( append_002 ); CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 ); @@ -17462,12 +17632,14 @@ printf("\n"); CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 ); #endif +*/ + CPPUNIT_TEST( append_035 ); CPPUNIT_TEST_SUITE_END(); }; //------------------------------------------------------------------------ // testing the method append( double f ) for negative value //------------------------------------------------------------------------ - class append_009_Double_Negative : public CppUnit::TestFixture + class append_009_Double_Negative : public checkdouble { OString* arrOUS[5]; @@ -17491,19 +17663,20 @@ printf("\n"); void append_001() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); - OString expVal( kTestStr95 ); + // LLA: OString expVal( kTestStr95 ); double input = atof("-3.0"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[0] append -3.0", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input) ); } - +/* void append_002() { ::rtl::OStringBuffer aStrBuf( *arrOUS[0] ); @@ -18078,21 +18251,24 @@ printf("\n"); } +*/ void append_035() { ::rtl::OStringBuffer aStrBuf( *arrOUS[4] ); - OString expVal( kTestStr142 ); + // LLA: OString expVal( kTestStr142 ); double input = atof("-3.141592653589793238462643"); + sal_Int32 nLen = aStrBuf.getLength(); aStrBuf.append( input ); CPPUNIT_ASSERT_MESSAGE ( "arrOUS[4] append -3.141592653589793238462643", - aStrBuf == expVal && aStrBuf.getLength() == expVal.getLength() + checkIfStrBufContainAtPosTheDouble(aStrBuf, nLen, input) ); } +/* #ifdef WITH_CORE void append_036() { @@ -18206,9 +18382,10 @@ printf("\n"); } #endif - +*/ CPPUNIT_TEST_SUITE( append_009_Double_Negative ); CPPUNIT_TEST( append_001 ); +/* CPPUNIT_TEST( append_002 ); CPPUNIT_TEST( append_003 ); CPPUNIT_TEST( append_004 ); @@ -18240,8 +18417,10 @@ printf("\n"); CPPUNIT_TEST( append_029 ); CPPUNIT_TEST( append_030 ); #endif +*/ + CPPUNIT_TEST( append_035 ); CPPUNIT_TEST_SUITE_END(); - };*/ + }; } // namespace rtl_OStringBuffer @@ -18300,10 +18479,10 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_008_float, "rtl_OStringBuffer"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative, "rtl_OStringBuffer"); -/*CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_double, +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_double, "rtl_OStringBuffer"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative, - "rtl_OStringBuffer");*/ + "rtl_OStringBuffer"); // ----------------------------------------------------------------------------- |