summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-12-06 13:33:18 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-12-06 13:35:19 +0100
commit8cf32d61a75b1dbb496b38cd95c54b972aea183f (patch)
tree7dd3e9403e026bf5ab86664290ebfa0931a97191 /sal/qa
parentf0d75874c3106b9e25e36ff338c7935813ad0c11 (diff)
int vs oslInterlockedCount ambiguity
Change-Id: I096b1232427ad6996e0b2cfafc9ba38386e19208
Diffstat (limited to 'sal/qa')
-rw-r--r--sal/qa/rtl/strings/test_ostring_concat.cxx16
-rw-r--r--sal/qa/rtl/strings/test_oustring_concat.cxx16
2 files changed, 16 insertions, 16 deletions
diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx
index a2b172c902a8..67089601d76d 100644
--- a/sal/qa/rtl/strings/test_ostring_concat.cxx
+++ b/sal/qa/rtl/strings/test_ostring_concat.cxx
@@ -60,7 +60,7 @@ CPPUNIT_TEST_SUITE_END();
void test::ostring::StringConcat::checkConcat()
{
// All the extra () are to protect commas againsts being treated as separators of macro arguments.
- CPPUNIT_ASSERT_EQUAL( OString(), OString(OString() + OString()) );
+ CPPUNIT_ASSERT_EQUAL( OString(), OString(OString() + OString()));
CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OString( "foo" ) + OString( "bar" )));
TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, OString > )), typeid( OString( "foo" ) + OString( "bar" )));
CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OString( "foo" ) + "bar" ));
@@ -93,33 +93,33 @@ void test::ostring::StringConcat::checkEnsureCapacity()
rtl_String* str = NULL;
rtl_string_newFromLiteral( &str, "test", strlen( "test" ), 0 );
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length );
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
rtl_String* oldStr = str;
rtl_string_ensureCapacity( &str, 4 ); // should be no-op
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length );
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
CPPUNIT_ASSERT( oldStr == str );
rtl_string_acquire( oldStr );
- CPPUNIT_ASSERT_EQUAL( 2, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 2, int( str->refCount ));
rtl_string_ensureCapacity( &str, 4 );
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length );
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
// a copy was forced because of refcount
CPPUNIT_ASSERT( oldStr != str );
CPPUNIT_ASSERT( strcmp( oldStr->buffer, str->buffer ) == 0 );
- CPPUNIT_ASSERT_EQUAL( 1, oldStr->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( oldStr->refCount ));
rtl_string_release( str );
str = oldStr;
rtl_string_acquire( oldStr );
rtl_string_ensureCapacity( &str, 1024 );
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length ); // size is still 4
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
CPPUNIT_ASSERT( oldStr != str );
CPPUNIT_ASSERT( strcmp( oldStr->buffer, str->buffer ) == 0 );
- CPPUNIT_ASSERT_EQUAL( 1, oldStr->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( oldStr->refCount ));
strcpy( str->buffer, "01234567890123456789" ); // but there should be extra capacity
str->length += 20;
rtl_string_release( str );
diff --git a/sal/qa/rtl/strings/test_oustring_concat.cxx b/sal/qa/rtl/strings/test_oustring_concat.cxx
index c5b549757ad7..9cde7b80bc66 100644
--- a/sal/qa/rtl/strings/test_oustring_concat.cxx
+++ b/sal/qa/rtl/strings/test_oustring_concat.cxx
@@ -60,7 +60,7 @@ CPPUNIT_TEST_SUITE_END();
void test::oustring::StringConcat::checkConcat()
{
// All the extra () are to protect commas againsts being treated as separators of macro arguments.
- CPPUNIT_ASSERT_EQUAL( OUString(), OUString(OUString() + OUString()) );
+ CPPUNIT_ASSERT_EQUAL( OUString(), OUString(OUString() + OUString()));
CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUString( "foo" ) + OUString( "bar" )));
TYPES_ASSERT_EQUAL(( typeid( OUStringConcat< OUString, OUString > )), typeid( OUString( "foo" ) + OUString( "bar" )));
CPPUNIT_ASSERT_EQUAL( OUString( "foobar" ), OUString( OUString( "foo" ) + "bar" ));
@@ -81,33 +81,33 @@ void test::oustring::StringConcat::checkEnsureCapacity()
rtl_uString* str = NULL;
rtl_uString_newFromLiteral( &str, "test", strlen( "test" ), 0 );
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length );
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
rtl_uString* oldStr = str;
rtl_uString_ensureCapacity( &str, 4 ); // should be no-op
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length );
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
CPPUNIT_ASSERT( oldStr == str );
rtl_uString_acquire( oldStr );
- CPPUNIT_ASSERT_EQUAL( 2, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 2, int( str->refCount ));
rtl_uString_ensureCapacity( &str, 4 );
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length );
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
// a copy was forced because of refcount
CPPUNIT_ASSERT( oldStr != str );
CPPUNIT_ASSERT( rtl_ustr_compare( oldStr->buffer, str->buffer ) == 0 );
- CPPUNIT_ASSERT_EQUAL( 1, oldStr->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( oldStr->refCount ));
rtl_uString_release( str );
str = oldStr;
rtl_uString_acquire( oldStr );
rtl_uString_ensureCapacity( &str, 1024 );
CPPUNIT_ASSERT_EQUAL( sal_Int32( 4 ), str->length ); // size is still 4
- CPPUNIT_ASSERT_EQUAL( 1, str->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( str->refCount ));
CPPUNIT_ASSERT( oldStr != str );
CPPUNIT_ASSERT( rtl_ustr_compare( oldStr->buffer, str->buffer ) == 0 );
- CPPUNIT_ASSERT_EQUAL( 1, oldStr->refCount );
+ CPPUNIT_ASSERT_EQUAL( 1, int( oldStr->refCount ));
// but there should be extra capacity
for( int i = 0;
i < 20;