summaryrefslogtreecommitdiff
path: root/tools/qa/cppunit
AgeCommit message (Collapse)AuthorFilesLines
2014-10-28fdo#81356: use boost::rational internally in FractionJuan Picca1-0/+7
Change-Id: I6f40eafee7652209395bd471e3508fe3a3d19d73 Reviewed-on: https://gerrit.libreoffice.org/12085 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-10-24Fix Fraction(-2147483648.0) for 32-bit wide longStephan Bergmann1-0/+7
Change-Id: I6465377de1edff5d0ccc0049fb6d24f6f1223fd2
2014-10-24Fract: enable testsJuan Picca1-0/+102
Change-Id: I00650503f15f2dcd45b07e3c529965336e8391e6 Reviewed-on: https://gerrit.libreoffice.org/12080 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky1-101/+0
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky1-4/+4
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-17another blind attempt to fix the testDavid Tardon1-2/+2
Change-Id: I7ac53b340cf3a9f72a90414e09ddd37148ecd28a
2014-10-17correct castDavid Tardon1-2/+2
Change-Id: Ic79ce25bf4ceb4d715aabdabf3824304b02b1f38
2014-10-17fix copypastaDavid Tardon1-1/+0
Change-Id: I08383e3086eef8e7c8136293d51b7108807a7def
2014-10-17fix comparisonDavid Tardon1-4/+4
Change-Id: Ia7f65d69c186056527a2beb72a18f4a66e4c6586
2014-10-17correct function nameDavid Tardon1-1/+1
Change-Id: Ibc3ab15bc830d68bf9d3d1d9ac9595d82c7fb6aa
2014-10-17allow construction of BigInt from sal_Int64 on 32 bitDavid Tardon1-0/+113
Change-Id: Ib68920fc9bd693d2f2679b4fc27d9956dc42fc86
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon1-4/+4
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca1-0/+101
* Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-09-26tools: change INetURLObject::getData to return std::unique_ptrMichael Stahl1-7/+7
Life-cycle becomes a lot more obvious this way. Change-Id: I1ca99607f609a2223011c40447ad1cd9ca5ccaa5
2014-06-06Various INetURLObject::getData() fixesStephan Bergmann1-0/+90
Change-Id: I5eafd6250bbde7227dcc0447a4280b7741c320de
2014-05-22cppcheck: add missing braketThomas Arnhold1-1/+1
Change-Id: I1e542455ad3e4ab1a445366517c92b102471840a
2014-05-22fix-includes.pl: toolsThomas Arnhold3-3/+3
Change-Id: I66b3dc79998de018eae1c7eff8ce23f95e3c3f33
2014-05-15tools: add AsRGBHexString to Color + unit testTomaž Vajngerl1-0/+61
AsRGBHexString returns the Color as a RGB hex string. For example "00ff00" for green color. Change-Id: Ia95c7f9eb6d9aefc3ca989046fa8d76b7b7f9e8f
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann1-2/+2
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-02-23Remove unneccessary commentsAlexander Wilms1-1/+1
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-12more SvStream:operator>> conversionNoel Grandin1-4/+4
Convert the template based read_lenPrefixed methods to regular methods. Change-Id: Ifd0e93aca055e55a0575e4377ec2b8e266dfb019 Reviewed-on: https://gerrit.libreoffice.org/7895 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12convert SvStream::operator>> methods to ReadXXX methodsNoel Grandin1-4/+4
First, I updated the clang rewriter to do the conversion. Then I lightly hand-tweaked the output for the few places where the rewriter messed up, mostly when dealing with calls on "this". Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9 Reviewed-on: https://gerrit.libreoffice.org/7879 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin1-56/+38
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-07-26fdo#33605: Handle http etc. URLs with no path but fragmentStephan Bergmann1-0/+22
Change-Id: I8c47cc55e7ad53e514c0bd46130cbbe6a1bb0357
2013-07-26targetted clean of redundant header piece from 62badf3828Michael Meeks2-6/+0
Change-Id: Ic1240114d667fb7797afae4847427cc889f3cb48
2013-06-30Clean String and sal_Bool in toolsNorbert Thiebaud2-1/+2
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655 Reviewed-on: https://gerrit.libreoffice.org/4627 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-04-30Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks1-23/+4
2013-04-22Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks2-42/+10
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák4-16/+16
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-03-16use SAL_N_ELEMENTSCaolán McNamara1-6/+6
Change-Id: I6610f8e888389d09b673504f1eb9387dd38fb6c1
2013-03-16Remove STRINGPARAM in tools (qa)Chr. Rossmanith2-37/+28
Change-Id: I1bff00d261c24e37f9ed41322c49c670850a940f Reviewed-on: https://gerrit.libreoffice.org/2768 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2012-10-31CMIS urls: remove +atom in the internal URLS as the binding is guessedCédric Bosdonnat1-4/+4
Change-Id: I9ae0704f1e5203778e97de5843efe777ba717271
2012-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud1-1/+0
the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-08-02Bin no longer used iOS cppunit stuff that even breaks the buildTor Lillqvist2-130/+0
Change-Id: I459f7fd097a81ef5977974f52b0cc2c2f155a810
2012-07-11re-base on ALv2 code. Includes:Michael Meeks3-75/+48
Avoid some uses of non portable #!/bin/bash in shell scripts. Patch contributed by Pedro Giffuni http://svn.apache.org/viewvc?view=revision&revision=1235297 remove redundant namespace, patch contributed Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1162610 removal of OS/2 port changes, and preferring our similiar tools/inc/tools/solar.h DLLPOSTFIX cleanup. i118595 - Removal of the use of getopt() from rscdep. Patch contributed by Andre Fische http://svn.apache.org/viewvc?view=revision&revision=1202270
2012-06-27targetted re-work of cppunit pieces.Michael Meeks6-18/+5
2012-06-04CMIS UCP: changed URLs to have hierarchical pathCédric Bosdonnat1-8/+23
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-02-23merge cppunit test dirs togetherCaolán McNamara2-0/+280
drop archaic makefile.mks and export.maps and use consistent naming
2012-02-23convert workben inetmimetest to cppunit testCaolán McNamara1-0/+69
2012-01-16Fix for fdo43460 Part XXXIX getLength() to isEmpty()Olivier Hallot1-1/+1
Part XXXIX Modules testtools, toolkit, tools
2012-01-16drop strange embedded null handling behaviourCaolán McNamara1-6/+4
2012-01-16document with unit test rather suspicious eof handlingCaolán McNamara1-3/+33
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-16document with unit test rather odd embedded null handlingCaolán McNamara1-0/+67
2011-12-21convert ReadByteString/WriteByteString from ByteString to OStringCaolán McNamara1-8/+51
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-21needs more work firstCaolán McNamara1-51/+8
This reverts commit 92f396733ebc518bcb7a9eae2dd3169d333b82b9.
2011-12-21convert ReadByteString/WriteByteString from ByteString to OStringCaolán McNamara1-8/+51
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-15convert ReadCString from ByteString to OStringCaolán McNamara1-0/+21
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-11-27remove include of pch header from toolsNorbert Thiebaud3-3/+0
2011-11-22New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.Stephan Bergmann1-1/+1
* 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-09-29Added #include "unotest/oustringostreaminserter.hxx" back in (will be needed ↵Stephan Bergmann1-0/+1
once rtl::OUString::operator sal_Unicode const *() is removed); made tools explicitly depend on unotest.