summaryrefslogtreecommitdiff
path: root/testtools
AgeCommit message (Collapse)AuthorFilesLines
2019-05-02Use hasElements to check Sequence emptiness in [t-u]*Arkadiy Illarionov1-2/+2
Similar to clang-tidy readability-container-size-empty Change-Id: Idefe55e37f5c837c889548ffe7c5711400012a4d Reviewed-on: https://gerrit.libreoffice.org/71667 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin1-14/+14
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-19Fix typosAndrea Gelmini2-2/+2
Change-Id: I6d51e4eb4a49a30193b904b2c7d62df1e16ea3d9 Reviewed-on: https://gerrit.libreoffice.org/63475 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-12Fix typosAndrea Gelmini1-1/+1
Change-Id: Ibb94b2b16afbcca84dd55ae51fde6fd27afede3a Reviewed-on: https://gerrit.libreoffice.org/63297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-02fix signatures of deleted copy/assign operatorsNoel Grandin1-2/+2
Change-Id: Id1a0749b78a7021be3564487fb974d7084705129 Reviewed-on: https://gerrit.libreoffice.org/62718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24Simplify containers iterations in test..toolsArkadiy Illarionov1-12/+9
Use range-based loop or replace with STL functions. Change-Id: If8fac9236a4696c8e56c0e81c60c429782581b96 Reviewed-on: https://gerrit.libreoffice.org/62262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22loplugin:staticvar in variousNoel Grandin1-1/+1
looks for variables that can be declared const and static i.e. they can be stored in the read-only linker segment and shared between different processes Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892 Reviewed-on: https://gerrit.libreoffice.org/61591 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann2-3/+3
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-03loplugin:constfields in swNoel Grandin1-1/+1
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann2-5/+5
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-08tdf#84323 - sal - add sane sleep interface: cleanup osl_waitThreadKevin Dubrulle2-9/+4
Replace osl_waitThread by osl::Thread::wait. Use std::chrono instead of TimeValue. Change-Id: I71691d014feeeb0c5d0ba29d048bda8e25e6e7dd Reviewed-on: https://gerrit.libreoffice.org/57130 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-13Use PYTHON_FOR_BUILD instead of calling python directlyTomáš Chvátal1-1/+1
Change-Id: I85ff669c3cfd6d9b3284972cfa1d8a805ea3b6d4 Reviewed-on: https://gerrit.libreoffice.org/49637 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann1-2/+2
...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-16Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia976371bf52eb1216d8abe728d80bbb87a3c38a2 Reviewed-on: https://gerrit.libreoffice.org/47858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: testtoolsStephan Bergmann1-1/+1
Change-Id: I3f6b38bca0381c293a3f7532145536cdd21e6aba
2017-12-11loplugin:salcall fix functionsNoel Grandin3-11/+11
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: testtoolsStephan Bergmann7-82/+82
Change-Id: I5449b1d38b2ae2d2d92b40cd3b67b60cbb3447f1
2017-09-18Some more WIN32_LEAN_AND_MEANMike Kaganski1-0/+3
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874 Reviewed-on: https://gerrit.libreoffice.org/42419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-06-27Fix typosAndrea Gelmini1-1/+1
Change-Id: If4373f47fdf0ccfcbd490299f8b8d09e17bf92cd Reviewed-on: https://gerrit.libreoffice.org/39272 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-06One more test to suppressStephan Bergmann1-0/+4
Change-Id: I8ba67cc1d34ce25fe174887ab6cbca85e7ce8658
2017-06-05Improved loplugin:cstylecast to reference types: testtoolsStephan Bergmann2-8/+8
Change-Id: I39ff292f420bb59e79f4cf83fb453cf0e1bd6228
2017-05-28remove unnecessary use of OString::getStrNoel Grandin1-5/+0
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: testtoolsStephan Bergmann1-1/+1
Change-Id: I1be797b30ca5a06bb4bb4dfed9269d36efc4f964
2017-04-03use actual UNO enums in test..vbahelperNoel Grandin1-1/+1
Change-Id: I2e38462045efedc31903589a3fa4e6f62d74d8de Reviewed-on: https://gerrit.libreoffice.org/36042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: Ieea40e1b7282267157810f9f58ca083e68ae6715 Reviewed-on: https://gerrit.libreoffice.org/35659 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-21remove some unnecessary OUStringBuffer usageNoel Grandin1-23/+5
Change-Id: Iae9146a3be569107019d9c5af404b94e51e76cd5 Reviewed-on: https://gerrit.libreoffice.org/34469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann2-8/+2
Change-Id: Iaf7b4695e7930b8e7fa5dd3736d19744afb52fa3 Reviewed-on: https://gerrit.libreoffice.org/34254 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-06Add missing #includesStephan Bergmann1-0/+1
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-01-26Remove dynamic exception specificationsStephan Bergmann6-235/+154
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-09Remove irrelevant SAL_INFOsStephan Bergmann1-5/+0
Change-Id: Ieb58ed113c6a3e85a806ec57a6557e2d37bf9b06
2016-12-08OSL_TRACE -> SAL in sw..ucbNoel Grandin1-4/+2
Change-Id: I18f5511f70232d91095ac8527a6c5883c36294f5 Reviewed-on: https://gerrit.libreoffice.org/31762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-01loplugin:unnecessaryoverride (dtors) in testtoolsStephan Bergmann2-12/+0
Change-Id: If004c2c58cb92e211cea34b54c3c38c91ccb6e7d
2016-09-14Change the shared bridgetest code from static to dynamic libraryStephan Bergmann8-39/+73
...so ASan builds do not complain about ODR violations due to multiple instances of vtable for testtools::bridgetest::CurrentContextChecker after a53808c0ed577468393aced90963af6496706959 "loplugin:dllprivate" removed the SAL_DLLPRIVATE from class CurrentContextChecker (which apparently /did/ have an impact with -fvisibility-ms-compat, as used by Linux Clang ASan/UBSan builds). Change-Id: Ifb1ba1819f7ea989300f4696d44f9599a1436563
2016-09-13loplugin:dllprivateStephan Bergmann1-1/+1
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann5-7/+7
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-09python macros aren't listed under scripting organizeCaolán McNamara1-4/+4
since... commit deb989dd6d1f86e74864131be50ed92d8d43768c Author: Kenneth Koski <mechaxl@gmail.com> Date: Mon Feb 29 22:22:10 2016 -0600 blew away the uno.ByteSequence(str) path Change-Id: I8b73883c4f246ebafd2f810ca61b19da40f833e2
2016-07-15new loplugin unnecessary overrideNoel Grandin1-13/+0
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb Reviewed-on: https://gerrit.libreoffice.org/27135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-04typo: emtpy → emptyChristian Lohmaier1-1/+1
Change-Id: I60cdcdc7fc38c175243c071f34295efa8739b717
2016-06-27Clean up uses of Any::getValue() in testtoolsStephan Bergmann2-30/+11
Change-Id: I3440328371abfc223f39c6bd2994423bb9b38cf0
2016-05-30Just use Any::operator <<= for sal_Unicode valuesStephan Bergmann2-4/+3
...now that sal_Unicode no longer clashes with sal_uInt16 on any platform (in LIBO_INTERNAL_ONLY code), after e16fa715c43dcdf836ce8c400b6d54eae87b627d "Handle wchar_t as native C++11 type on windows" Change-Id: Id423dd6235bf14823fa5611b804c0974edbe64b3
2016-05-04While at it, delete Any functions on sal_Bool*Stephan Bergmann1-3/+2
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of sal_Bool across the code base Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-01Fix typos in codeAndrea Gelmini1-1/+1
Change-Id: I24f7b812fe625f3d91a49fb57701a36a8c68eb36 Reviewed-on: https://gerrit.libreoffice.org/24542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-21Use Sequence ctor taking initializer_listStephan Bergmann1-29/+18
needed adapting loplugin:implicitboolconversion to not warn about Sequence<sal_Bool> arBool({true, false, true}); Change-Id: I971918aab7c958ef8f1e4e0548a84314e95f8325
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-1/+1
Change-Id: If03cdd1fc6943c3783cedf8b735c8a29a3ecd0c7
2016-04-13tdf#94306 replace boost::noncopyable in stoc to xmlsec..Jochen Nitschke2-6/+7
Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes. Add missing default ctors. With this commit there should be no users of boost::noncopyable left. Change-Id: I6b1e47824912a6a80cc3f00f34938ebc048d8975 Reviewed-on: https://gerrit.libreoffice.org/24051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-11tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar2-4/+1
I replaced the OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 conditionals. At some places i removed the logs containing OSL_DEBUG_LEVEL > 1 as OSL_DEBUG_LEVEL > 0 is compiled in production code Change-Id: I4466e7a2025b055f89fc525d7412f10bd4d8a07f Reviewed-on: https://gerrit.libreoffice.org/23067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-02-09Remove excess newlinesChris Sherlock5-30/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-29testtools: disable MSVC warning C4503Michael Stahl1-0/+3
This was disabled by boost/config/compiler/visualc.hpp before commit 110d55cc11033d72bce908e65bbb6a9506ab39e5 Change-Id: Ic4757b0ab74c14fb49d7a0ec502253b667fae033
2016-01-10Fix typosAndrea Gelmini3-14/+14
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>