Commit graph

27 commits

Author SHA1 Message Date
Michael Meeks
328e2263fb targetted re-work of cppunit pieces. 2012-06-27 19:13:11 +01:00
Cédric Bosdonnat
fd32788092 CMIS UCP: changed URLs to have hierarchical path
Hierarchical path is assumed in loads of places, changed the URLs to the
following:
  * Binding URL is encoded in the authority part, the repository ID is
    set as a fragment of the binding URL.
  * The hierarchical path reflects one of the path to the document on
    the server
:x

Change-Id: I8214daeb1d9c9b0f6ab86bdf60875e7e4e5369f4
2012-06-04 13:28:14 +02:00
Caolán McNamara
3313f7a555 merge cppunit test dirs together
drop archaic makefile.mks and export.maps and use consistent naming
2012-02-23 10:31:24 +00:00
Caolán McNamara
55b71dcc18 convert workben inetmimetest to cppunit test 2012-02-23 10:31:23 +00:00
Olivier Hallot
81e50fb2e3 Fix for fdo43460 Part XXXIX getLength() to isEmpty()
Part XXXIX
Modules
testtools, toolkit, tools
2012-01-16 18:49:04 -02:00
Caolán McNamara
94a8737a54 drop strange embedded null handling behaviour 2012-01-16 15:40:53 +00:00
Caolán McNamara
9790e4457f document with unit test rather suspicious eof handling
ReadLine differs from std::getline with respect to final lines
that end at EOF with no EOL.

i.e. see Export::ConvertLineEnds in l10ntools/source/export2.cxx
which doesn't make a massive amount of sense the way things currently are.
2012-01-16 10:21:56 +00:00
Caolán McNamara
456853e96c document with unit test rather odd embedded null handling 2012-01-16 10:21:56 +00:00
Caolán McNamara
c4f0efc237 convert ReadByteString/WriteByteString from ByteString to OString
Nobody ever used the return values anyway, so for reading just
return the string and for writing the number of bytes written

Doesn't need to be members, make standalone functions

Rename  to
read_lenPrefixed_uInt8s_ToO[U]String and
write_lenPrefixed_uInt8s_FromO[U]String, lengthy,
but much less unambiguous, seeing as a lot of users of it don't
seem to be aware that they read/write pascal-style length
prefixed strings, which isn't surprising given the
apparent simplicity of their original name.

added a unit test
2011-12-21 13:44:52 +00:00
Caolán McNamara
6708977331 needs more work first
This reverts commit 92f396733e.
2011-12-21 10:30:10 +00:00
Caolán McNamara
92f396733e convert ReadByteString/WriteByteString from ByteString to OString
Nobody ever used the return values anyway, so for reading just
return the string and for writing the number of bytes written

Doesn't need to be members, make standalone functions

Rename  to
read_lenPrefixed_uInt8s_ToO[U]String and
write_lenPrefixed_uInt8s_FromO[U]String, lengthy,
but much less unambiguous, seeing as a lot of users of it don't
seem to be aware that they read/write pascal-style length
prefixed strings, which isn't surprising given the
apparent simplicity of their original name.

added a unit test
2011-12-21 10:10:58 +00:00
Caolán McNamara
66c3655a07 convert ReadCString from ByteString to OString
Nobody ever checked the return value anyway, so just return the string
and use the stream state bits if necessary to find failures.

Doesn't need to be a member, make a standalone function

Rename it to read_zeroTerminated_uInt8s_AsO[U]String, stupid perhaps,
but *shrug*, unambiguous.

Drop misleading overloaded String variants use:
read_zeroTerminated_uInt8s_AsOString or
read_zeroTerminated_uInt8s_AsOUString

added a unit test, valgrinded it, found and fixed invalid read
in original implementation.
2011-12-15 12:22:49 +00:00
Norbert Thiebaud
5f7649aead remove include of pch header from tools 2011-11-27 13:25:56 -06:00
Stephan Bergmann
70a6b9ffbd New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros.
* New SAL_STREAM supersedes OSL_FORMAT.
* oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now).
* TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site
  cleanup).
* Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet
  addressed.
* Some replacements tools String -> rtl::OUString.
2011-11-22 09:41:47 +01:00
Stephan Bergmann
3482b33aee Added #include "unotest/oustringostreaminserter.hxx" back in (will be needed once rtl::OUString::operator sal_Unicode const *() is removed); made tools explicitly depend on unotest. 2011-09-29 11:09:15 +02:00
Caolán McNamara
91f436f58a we're not using this header here 2011-09-29 09:35:01 +01:00
Markus Mohrhard
7743899403 fix another unotest/test breaker 2011-09-28 23:48:39 +02:00
Stephan Bergmann
6671fa81db Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *(). 2011-09-27 20:22:03 +02:00
Stephan Bergmann
d996328cd5 sb140: #i113503# mixing system CppUnit and OOo STLport does not work, backed out a6913c9677c2
For LibO, that just means replacing sal/cppunit.h with sal/precppunit.hxx.
2011-09-12 22:47:50 +02:00
Caolán McNamara
e99a072c0e add a fairly efficient read_LEuInt16s_AsOUString, merge similar things 2011-09-05 10:54:19 +01:00
Caolán McNamara
0ee8ec18c4 add a way to better construct an OString of len X from a SvStream 2011-09-02 09:54:18 +01:00
Tor Lillqvist
29acf735d4 Add statically linked unit tester for iOS 2011-08-03 01:13:34 +03:00
Caolán McNamara
8291b5884c make stream operators leave variables in original state on failure
this aligns them with the behaviour of std::stream, and makes things
like

sal_uInt32 n(0);
rSt >> n;
if (n)
{
   ...
}

safe if there was a short read of e.g. 3 bytes instead of the required 4
2011-07-29 10:56:42 +01:00
Caolán McNamara
56321c27af add a test for a nasty suspicion I have 2011-07-26 10:14:29 +01:00
Caolán McNamara
1f708c8be9 add a good(), eof(), bad() and a test case to demonstrate 2011-07-25 10:11:31 +01:00
Caolán McNamara
52cf287f69 add the legacy windows-only path utils test 2011-07-25 10:11:31 +01:00
Caolán McNamara
7c96874198 recover my cppunit test for tools again 2011-07-25 10:11:31 +01:00