Commit Graph

209 Commits

Author SHA1 Message Date
46297bb421 test: write to stream directly in MetafileXmlDump
Change-Id: If62a29af473f602f89e6e0e4a06772a320a23b9a
2014-05-19 00:01:14 +02:00
fb1e810553 test: don't create root element in startDocument() in xmlwriter
Change-Id: Ia08e9f8caf2a2fb42855dcb2245e013e1a181216
2014-05-15 23:50:58 +02:00
fb688d6446 test: dump staroffice metafile to XML & XML writer interface
Change-Id: Ie42f72e0fc281d1f51e1729be408c2b0042f4174
2014-05-15 19:51:08 +02:00
780cedb2cf test: parseXmlStream & parseHtmlStream added to test tools
Change-Id: Iff8af5e9ffefb4c3cecf387b16473d45e8b4a65a
2014-05-15 19:51:08 +02:00
969df2a069 -Werror,-Wunused-function
Change-Id: I894ca2eb865405a9991f921997cc22c5a34c4da2
2014-05-14 21:12:23 +02:00
d226c4726f Fail the test if executing the validator fails
Change-Id: I15aac53a817ca309697cba8a962e788aea1619d0
2014-05-14 15:28:29 +02:00
248145f99e Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.

Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-14 08:10:22 +00:00
f21c57c2bc WaE: -Werror=maybe-uninitialized
Change-Id: Iec05633cf1716079eee54c376bd0736b638673dd
2014-05-08 16:21:41 +01:00
78b9537b6a various: sal_Bool->bool
Change-Id: I30fa5227f30373f95060148f269450d2945c1bb9
2014-05-08 11:48:14 +02:00
9051160004 fix spelling error
Change-Id: If6c318f1a1f74a39083bf83eed2f80aca1e27bc5
2014-05-01 02:31:58 +02:00
76715b105f test: move XmlTestTools API documentation to the header
Change-Id: Iae56b1fb68fde0cbc44f6b9e37ba1a66194b25e0
2014-04-30 09:38:38 +02:00
dde833575e tests: add XML and HTML test tools to test module
XML and HTML parsing and XPath asserts are used by many test in
sw, sc and sd modules. This commit moves this functionallity to
test module, where it is available to all modules.

Change-Id: I53ad9c45b24f4c9bf106cb58ea619002968bfeda
2014-04-29 23:57:33 +02:00
fa801a69a2 -Werror,-Wunused-result
Change-Id: I8ec20e6a391bd835097af9be44a174e8e7b19cce
2014-04-19 11:10:13 +02:00
e6e4474aae set what system locale should resolve to for languagetag
normally this happens in desktop/source/app/langselect.cxx for
the fat app case

Change-Id: I4772172aa6f071ac03d74e2abe7a9e197f0dc964
2014-04-11 17:05:20 +01:00
8755eb0274 adapt XSheetAnnotation::testGetDate() to locale change
... in c0a4de1ede27c5911fea0829deabee0b599d5d40.

Change-Id: Ic93b6febe719a465d768338faa3e222e8fca2e97
2014-04-11 16:47:35 +02:00
d910a51498 Remove unused function
Change-Id: I5457124fe584d86953f3167303e92ae6134fa843
2014-04-09 10:21:01 +02:00
b10ed913dd whitespace cleanup in test
Change-Id: Iaf3f7c360cd8d081d706e92ec52c3c96fe68c57c
2014-04-06 17:19:55 +02:00
d00e9e7fe2 make the tolerance file optional
Change-Id: I172cbd54a231a4f9b621fb85c7f349839286143a
2014-04-03 01:10:52 +02:00
f9f7b70bd0 coverity#1194929 String not null terminated
Change-Id: I749f4cb8340b4642040baed7f3363e2f1e4b65ad
2014-03-30 21:21:30 +01:00
e1b8f3f6c5 coverity#735554 Dead default in switch
Change-Id: I12ebe5b9018109f35b6c6691fcf4497c56850d7c
2014-03-28 09:25:04 +00:00
eaeaf871f1 improve validation failure message
Change-Id: I1a613899d18a004149d3e637d796bc2f6687e6c4
2014-03-26 23:58:44 +01:00
86a32589e9 Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.

So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.

Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02:00
50532e3f63 enable ODF export validation
Change-Id: I09f517a49507a2eb31118f88f31dc2ff8b03de6a
2014-03-08 18:31:13 +01:00
9a7ca779cd move the export validation code to test
Change-Id: Iaafe30a1095bd5b6dac3637c394818ba8bd848ce
2014-03-05 11:14:55 +01:00
06b44f9961 coverity#738915 Uninitialized scalar field
Change-Id: I1ac675441b50ceab7df78fb9646e4e1bd8e6e36e
2014-02-18 15:18:11 +00:00
b55259eeb5 typo fixes
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-20 15:55:00 +01:00
08fe82e59c Remove unnecessary use of OUString constructor in + expressions
Convert code like
  aFilename =  OUString::number(nFilePostfixCount) + OUString(".bmp");
to
  aFilename =  OUString::number(nFilePostfixCount) + ".bmp";

Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-17 11:49:03 +02:00
665989cfc8 Fix integer ambiguity
Change-Id: I1247af709baf250b82a4156ea2cbf29c758f0c78
2013-12-06 14:32:26 +01:00
f992400f6f count notes - GetNotesInRange now include last tab
- refactor tests
- add unit test on counting notes on a sheet

Change-Id: I6762a0e791a745b828800645effdfc044ac33710
Reviewed-on: https://gerrit.libreoffice.org/6954
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2013-12-06 05:46:16 -06:00
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
ed8c4decb3 oups
Change-Id: I92eb65614b9c0afded3b9210208360a42747a34c
2013-11-09 17:51:28 +01:00
2062212d0a UnoApiTest does not dispose Desktop anymore
Change-Id: Ia6cd838426ff77af213f285a67a22223c7358585
2013-11-09 17:44:33 +01:00
edd4c694ab UnoApiTest don't dispose mxDesktop
It breaks CppunitTest_sc_outlineobj,
which runs several setUp/tearDown several times?

Change-Id: Ic81324d150aa64135cdbedc4cb99f78d415da1aa
2013-11-09 17:26:22 +01:00
fe2e43280f Don't dispose twice in CalcUnoApiTest::tearDown
...i.e., skip UnoApiTest::tearDown's dispose of mxDesktop and go directly to
BootstrapFixture::tearDown.

Change-Id: If4555c812cb42c4b76a36d4e59c1d96211915dba
2013-11-09 15:11:17 +01:00
6f40eec725 Calc UNO API test
Change-Id: I6dcd9ac05ff7c4a6fbae7947b0ceda8797feea2f
2013-11-09 06:36:49 +01:00
a071a29d4f UnoApiTest don't require Calc
There is no reason for the generic UnoApiTest to require Calc
specifically. Calc tests can/should instantiate a Calc instance.
We can create a CalcUnoApiTest for that that inherits from
UnoApiTest; however this does not seem necessary, "make sc.clean"
succeeds.

Anyway, the ScGlobals::ensure mentioned in the comment does not
seem to exist.

This allows us to eliminate some code duplication in tests
that were reimplementing UnoApiTest minus the Calc instantiation.

Change-Id: I37bea9df41e3960df0458fe689cf6c046a243617
2013-11-09 06:36:45 +01:00
5285beeaa4 remove redundant calls to OUString constructor in if expression
Convert code like:
  if( aStr == OUString("xxxx") )
to this:
  if( aStr == "xxxx" )

Change-Id: I8d201f048477731eff590fb988259ef0935c080c
2013-11-04 10:11:08 +02:00
4954e2a2f6 simplify code and fix out of bounds read
Change-Id: I5be3a28d3d1ae43974f844d143a30bfd989cbe5b
2013-10-30 16:30:33 +01:00
52a7238aed Improve test assertions
Change-Id: I5c5a76ca0e1db699dbb9f3fd381e050fc7256d27
2013-10-23 22:54:08 +02:00
2bcee80c62 WaE: unused variable
Change-Id: I55a0882def6f67719d8ba9d9b9bd41770486a812
2013-10-02 21:19:42 +03:00
03993b47c5 targetted clean of redundant header piece from 62badf3828
Change-Id: Ic1240114d667fb7797afae4847427cc889f3cb48
2013-07-26 14:18:52 +01:00
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
91ab2b6e9d Improve error messages for the xml-diff based unit tests.
Change-Id: Ided6749ebe4899a6d826d069c38d7b21b467d431
2013-05-14 16:50:46 +02:00
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +02:00
72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
add638b725 test: clean up namespacing
Change-Id: I7df07176bdbd15fdfdf8f9a7cdb26d4bee12997d
2013-04-26 14:41:36 +02:00
e35f2f0631 don't pollute global namespace
Change-Id: Iffeeffb015c59ea787838c737c6a11f6fbef2794
2013-04-25 22:20:04 +02:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
ebeae438db move Python tests in-process
This is nice to make them more easily debuggable.
A series of crude hacks are employed to bootstrap enough services from
python so the current tests run.
This is only tested with system python3 on Fedora.

Change-Id: I5e06741e55ead7fddec41ff776ff8ca5d2399469
Reviewed-on: https://gerrit.libreoffice.org/3215
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-04-09 05:52:49 +00:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
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-04-07 14:23:11 +02:00