diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-03-16 17:40:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-16 21:25:16 +0000 |
commit | 67bdb8f14b30f4af03676d11dab4bfe3cfb536a2 (patch) | |
tree | ad9a5aa6ab2d5d9975e2f7a3a7d07972a75c22f9 /tools | |
parent | Fix Python problem in pyAltFCFGMerge at least on OS X (diff) | |
download | core-67bdb8f14b30f4af03676d11dab4bfe3cfb536a2.tar.gz core-67bdb8f14b30f4af03676d11dab4bfe3cfb536a2.zip |
use SAL_N_ELEMENTS
Change-Id: I6610f8e888389d09b673504f1eb9387dd38fb6c1
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qa/cppunit/test_stream.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx index 894ad7d3e030..a65b6be290cb 100644 --- a/tools/qa/cppunit/test_stream.cxx +++ b/tools/qa/cppunit/test_stream.cxx @@ -61,7 +61,7 @@ namespace { char foo[] = "foo"; std::istringstream iss(foo, std::istringstream::in); - SvMemoryStream aMemStream((void *) foo, strlen(foo), STREAM_READ); + SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); char std_a(78); iss >> std_a; @@ -152,7 +152,7 @@ namespace void Test::test_fastostring() { char foo[] = "foobar"; - SvMemoryStream aMemStream((void *) foo, strlen(foo), STREAM_READ); + SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); rtl::OString aOne = read_uInt8s_ToOString(aMemStream, 3); CPPUNIT_ASSERT(aOne == "foo"); @@ -172,7 +172,7 @@ namespace void Test::test_read_cstring() { char foo[] = "foobar"; - SvMemoryStream aMemStream((void *) foo, strlen(foo), STREAM_READ); + SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); rtl::OString aOne = read_zeroTerminated_uInt8s_ToOString(aMemStream); CPPUNIT_ASSERT(aOne == "foobar"); @@ -190,7 +190,7 @@ namespace void Test::test_read_pstring() { char foo[] = "\3foobar"; - SvMemoryStream aMemStream((void *) foo, strlen(foo), STREAM_READ); + SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); rtl::OString aFoo = read_lenPrefixed_uInt8s_ToOString<sal_uInt8>(aMemStream); CPPUNIT_ASSERT(aFoo == "foo"); @@ -232,7 +232,7 @@ namespace void Test::test_readline() { char foo[] = "foo\nbar\n\n"; - SvMemoryStream aMemStream((void *) foo, strlen(foo), STREAM_READ); + SvMemoryStream aMemStream(foo, SAL_N_ELEMENTS(foo)-1, STREAM_READ); rtl::OString aFoo; sal_Bool bRet; @@ -291,7 +291,7 @@ namespace CPPUNIT_ASSERT(iss.eof() && !iss.bad()); char bar[] = "foo"; - SvMemoryStream aMemStreamB((void *) bar, strlen(bar), STREAM_READ); + SvMemoryStream aMemStreamB(bar, SAL_N_ELEMENTS(bar)-1, STREAM_READ); bRet = aMemStreamB.ReadLine(aFoo); CPPUNIT_ASSERT(bRet); CPPUNIT_ASSERT(aFoo == "foo"); |