Andreas Heinisch
522f5ad4d8
tdf#147529 - BASIC MsgBox: Check for missing optional parameters
...
Change-Id: Iecb47e0005c609ee1117d6fb141e810c0166806a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136339
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-06-24 09:20:45 +02:00
Andreas Heinisch
90d33f5945
tdf#148358 - Compare Non-ASCII variable names case-insensitive
...
Change-Id: I761eb27b16c92d58df1be8e6011fc9b94db2a59c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133774
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-05-07 16:00:50 +02:00
Stephan Bergmann
b5ab864096
Just use Any ctor instead of makeAny in basic
...
Change-Id: I21d9679064c4e68a1492d3550f083c3c91b5b43b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133848
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2022-05-05 07:13:54 +02:00
Xisco Fauli
07bf0ce4e7
tdf#148651: basic_macros: Add unittest
...
Change-Id: Iadbe470de5a33dc633fe8f53083520988e497df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133255
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
2022-04-21 19:52:16 +02:00
Andreas Heinisch
3ba8b56b32
tdf#147089 - Round Integral Division (IDIV) literals to Integer values
...
Change-Id: Ia243c6117a437d0c6efb33a4e76c5e9ee539fbdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130302
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-02-21 23:10:46 +01:00
VaibhavMalik4187
8b327cd86d
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
...
Change-Id: I4f5258ca5b37e9b1b4237c5d29e4a9e5362fa855
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129116
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Tested-by: Jenkins
2022-02-06 21:38:32 +01:00
Andreas Heinisch
35aa82ef1c
tdf#145693 - Argument name should be 'charcode' instead of 'string'
...
In addition, changed argument datatype from Int to Long.
Change-Id: I702e09b6b8061d7cf00dd403e4681a0ab348d4c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128100
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2022-01-08 11:48:32 +01:00
Andreas Heinisch
565a5fdee3
tdf#145960 - Return type of boolean operators should be of type boolean
...
In addition, added missing vba test to the test routine.
Change-Id: I3ee837e1eab30f10e0a4169d11014f9b6574ad1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127631
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-12-28 19:54:58 +01:00
Stephan Bergmann
af2d15a494
Fix Windows build
...
...after cf3971a941
"Simplify Sequence in b*"
Change-Id: If8650faa7a45258729e54b3df37e9084221babfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123792
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-10-19 09:14:47 +02:00
Julien Nabet
cf3971a941
Simplify Sequence in b*
...
Change-Id: I0817d9a35a9c3fc43badb6cc60727de69849b063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123720
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-10-17 14:13:10 +02:00
Andreas Heinisch
e090afc29b
tdf#144924 - Change return type of array elements of the split function
...
If VBA is not enabled, allow the assignment of variables with different
data types to the individual array elements created by the split
function.
Change-Id: I7bdd432cdebbfded5f7fb3acc0216474eb6b6821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123122
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-10-07 08:21:58 +02:00
Andreas Heinisch
adb38e36e3
tdf#123144 - Always translate an error number to a vba error message
...
In addition, create a meaningful error message and don't create and
artificial error message if there exists a custom one.
Change-Id: I682e497ee3fdfe4da80fb17ab41c1b4cf90eb2cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122206
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-09-19 18:46:35 +02:00
Andreas Heinisch
092740eddd
tdf#144245 - Added test file to automatic test
...
Change-Id: I92b71b7e7ac8c2262d36875e4b04ed91e17bc495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121791
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de >
2021-09-07 20:52:00 +02:00
Mike Kaganski
357c0e2a4a
Move utility code out of test directories
...
This simplifies iteration over the test files, and avoids relying
on file URLs being the same (e.g., having no /./ segments).
Change-Id: I227785806e474a3a2dffeb46df21617eae43327e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118329
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Tested-by: Jenkins
2021-07-02 21:53:39 +02:00
Mike Kaganski
97c3280afb
Fix build after 042033f1e6
...
Change-Id: Ifca32f434442f7838aae6f47dc2831dfa6a3f5db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108496
Tested-by: Stephan Bergmann <sbergman@redhat.com >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2020-12-30 14:55:44 +01:00
Stephan Bergmann
042033f1e6
loplugin:stringviewparam: operator +
...
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2020-12-29 16:42:33 +01:00
Mike Kaganski
66b135fa80
Related: tdf#84098 Unify tests
...
Shorten the tools module name; use TestUtil.AssertEqual where applicable;
remove unnecessary variables that only made noise and masked what was
actually asserted; add missing licence headers.
Change-Id: If891ed8ceb38fed18335aad061b2b09d341264f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108118
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-12-22 06:18:50 +01:00
George Bateman
73ba462935
tdf#84098 kill copy+paste in VBA tests
...
Move repeated code into _test_asserts.vb
Change-Id: Idfe124a8dbab4925309fa5f1322e0cce5f097b7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107860
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-12-19 23:40:13 +01:00
LibreOfficiant
45435e2ac0
VBA Err object raise method TestCases
...
Err.Raise(#) enables 'User-Defined Exceptions'
Std Basic alternative is: Error # 'without parentheses
which throws pre-defined error codes.
Change-Id: I76229b237066e33229d4d13e6742c660887fda2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-03-24 11:16:21 +01:00
Andreas Heinisch
8e323fcace
tdf#36737 - Initialize default values of optionals
...
Initialize default values of optionals in function headers.
In LO Basic, optional parameters are allowed, but without
any default values. Missing parameters will not be initialized
to their respective default values of its datatype, either.
With option Compatible, optional parameters are allowed
with default values. Missing optional parameters that
don't have explicit default values will not be initialized
to their default values of its datatype.
With option VBASupport, optional parameters are allowed with
default values. Missing optional parameters that don't have
explicit default values will be initialized to their default
values of its datatype.
Change-Id: I57aabae5f70d1cf6c4e8feb95ce0db6af753383c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87550
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2020-03-02 10:08:58 +01:00
LibreOfficiant
4171b99905
VBA Enum statement TestCases
...
Change-Id: Ib8f730d22bc7de00736c9fb1bb9c1af1784eb5df
Reviewed-on: https://gerrit.libreoffice.org/85074
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Tested-by: Mike Kaganski <mike.kaganski@collabora.com >
2019-12-14 10:40:29 +01:00
lbenes
1b83d562fb
fix windows builds after commit 7ddedd2594
...
Change-Id: I2990da77a91f6c8fdb6fd9e4112d0451bc3342da
Reviewed-on: https://gerrit.libreoffice.org/82547
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-11-13 09:30:46 +01:00
Gabor Kelemen
7ddedd2594
tdf#42949 Fix IWYU warnings in basic/
...
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I325149be2ea7697b5b4a2ce4a662edd2f8be6e50
Reviewed-on: https://gerrit.libreoffice.org/82312
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com >
2019-11-12 09:20:55 +01:00
Stephan Bergmann
e1e39fac22
Some more WIN32 -> _WIN32
...
...at least some of which have presumably been missing from
ce43d0ae92
"use consistent #define checks for the
Windows platform" by accident (and some just clean up comments)
Change-Id: I5532685c7df96ae3c8a25b73d8064d7433964a9b
Reviewed-on: https://gerrit.libreoffice.org/68580
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2019-03-01 17:40:47 +01:00
Tamás Zolnai
afbfe42e63
clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2
...
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d
Reviewed-on: https://gerrit.libreoffice.org/63241
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com >
2018-11-10 23:11:28 +01:00
Mike Kaganski
59d53910de
Small cleanup and simplification
...
Change-Id: I1e8a750832f365f080f6f60c81560dc942003049
Reviewed-on: https://gerrit.libreoffice.org/56788
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2018-07-02 06:34:43 +02:00
Zdeněk Crhonek
c5417a21f5
VBA tests (4) - don't pass when all tests fail
...
Change-Id: Ib4f9b5df1cffe104ba27be95183d075f24f28bb3
Reviewed-on: https://gerrit.libreoffice.org/45774
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-12-23 12:48:39 +01:00
Zdeněk Crhonek
baaf6c12c8
VB tests (3)-don't pass whe all tests fail
...
Change-Id: I7dd99a43a3d41c8ca31a070028a19bd032d06435
Reviewed-on: https://gerrit.libreoffice.org/45739
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-12-22 00:04:01 +01:00
Tor Lillqvist
66b3970c94
Seems that testMiscOLEStuff() works only as 64-bit on a current Windows 10
...
Change-Id: Ib43f8c185d2a2e9e93f34d918d6f9461586cf6a6
2017-10-17 18:57:54 +03:00
Mike Kaganski
1944e3ddc0
Rename and move SAL_U/W to o3tl::toU/W
...
Previosly (since commit 9ac98e6e34
)
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.
Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-10-05 16:02:52 +02:00
Mike Kaganski
c3609f107b
Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
...
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that
Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2017-09-30 19:08:28 +02:00
Mike Kaganski
aaa26a58ba
Some more WIN32_LEAN_AND_MEAN
...
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-09-18 19:24:31 +02:00
Zdeněk Crhonek
74da6d5f9f
VBA tests-add VAL,VARTYPE,WEEKDAY,WEEKDAYNAME,YEAR tests
...
Change-Id: I3f1803617a2bdeaab9922ebb375ec4fd67318d20
Reviewed-on: https://gerrit.libreoffice.org/41499
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-24 12:55:26 +02:00
Zdeněk Crhonek
57ece564ac
VBA functions tests-SYD, TIMESERIAL, TIMEVALUE, TRIM, TYPENAME, UBOUND,UCASE
...
Change-Id: I7ea7757291d996375584ef05d822701737020b1c
Reviewed-on: https://gerrit.libreoffice.org/40894
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-08 19:36:00 +02:00
Zdeněk Crhonek
f060d64507
VBA tests- add functions STRING,STRREVERSE,SWITCH
...
Change-Id: Ibba3b5cabee31af44f0e8dda5a11f152ab0cfe01
Reviewed-on: https://gerrit.libreoffice.org/40730
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-03 21:29:30 +02:00
Zdeněk Crhonek
3acfc281ad
VBA tests - STR and STRCOMP functions
...
Change-Id: I09daaa8be3687bf838f569849542d47c85907d1e
Reviewed-on: https://gerrit.libreoffice.org/40687
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-08-02 21:51:55 +02:00
Zdeněk Crhonek
fae4b84882
VBA tests-functions RIGHT,RTRIM,SECOND,SGN,SIN,SLN,SPACE,SQR
...
Change-Id: I0db9233f20fccbc4b2c4f4b3e36cf0aaa8583c99
Reviewed-on: https://gerrit.libreoffice.org/40339
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-07-24 18:05:44 +02:00
Zdeněk Crhonek
ad17c13cf1
VBA test - add RATE, RGB functions
...
Change-Id: I284597a54067049479c56d6e6eea6322f0e3ee2b
Reviewed-on: https://gerrit.libreoffice.org/39377
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-06-29 15:51:42 +02:00
Zdeněk Crhonek
f15afbcbb2
add VBA tests- PMT, PPMT, PV,QBCOLOR functions
...
Change-Id: Idcbecbdee6a6c054886d6a11ce22e525ecf23736
Reviewed-on: https://gerrit.libreoffice.org/38084
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-05-27 21:01:06 +02:00
Takeshi Abe
f060adefba
Test _WIN32 instead of WIN32
...
since the former is predefined by Visual C++ [0], but the latter
is not.
[0] https://msdn.microsoft.com/en-us/library/b0084kay.aspx
Change-Id: I9ecb84779cbaf5f0186ef0b05da61b32293f8f2b
Reviewed-on: https://gerrit.libreoffice.org/37808
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-05-22 22:00:47 +02:00
Takeshi Abe
666901bc82
basic: Test VBA's CDec() only on Windows
...
since it is not implemented on others.
Change-Id: If058207eb441caa65f93bbb554fe77cf469b1682
Reviewed-on: https://gerrit.libreoffice.org/37631
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-16 05:19:17 +02:00
Takeshi Abe
f99c95c80d
basic: Fix VBA constant vbNewLine with unit test
...
... making its value CRLF on Windows and LF on others.
A winding road of regressions passed through it;
first b680e35254
,
then 7beeced463
.
Change-Id: I9e4da4a17436949b4fea35481b8355b4321cb268
Reviewed-on: https://gerrit.libreoffice.org/37500
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp >
2017-05-15 04:57:59 +02:00
Zdeněk Crhonek
3cb581adde
VBA tests- MONTHNAME,NPER, NPV,OCT test case
...
Change-Id: Ia6c732d4c205ba2461007feacce1403b83e6043b
Reviewed-on: https://gerrit.libreoffice.org/37109
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-05-03 20:14:27 +02:00
Stephan Bergmann
38f70cd770
loplugin:cppunitassertequals: basic
...
Change-Id: Icaa3e0eace6ccff365d4ebdb007771fc8a78671a
2017-04-28 14:21:30 +02:00
Zdeněk Crhonek
377d2d4bed
add VBA test cases
...
functions - LEFT, LEN, LOG, LTRIM,
MID, MINUTE, MIRR, MONTH
Change-Id: Ifa4c6c1b715772644afc4280379b2a9e8429842f
Reviewed-on: https://gerrit.libreoffice.org/36551
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-16 18:01:59 +02:00
Zdeněk Crhonek
31dc11e7e3
add VBA test cases
...
tests: ISARRAY, ISDATE, ISEMPTY, ISERROR, ISMISSING,
ISNULL, ISNUMERIC, ISOBJECT, JOIN, LBOUND, LCASE
Change-Id: I0b0dacd0d62bf00680f33866ce7ec0152eec27e0
Reviewed-on: https://gerrit.libreoffice.org/36509
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-13 14:22:23 +02:00
Zdeněk Crhonek
ed4473abc1
VBA tests - INSTRREV, INT test case
...
Change-Id: I220b8dd57927486b697b46777e20db7d2f53e487
Reviewed-on: https://gerrit.libreoffice.org/36486
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-13 09:54:18 +02:00
Stephan Bergmann
c14ed11d77
Clean up uses of SAL_U/SAL_W: basic
...
Change-Id: I755b3b781c42cc9af61c0b90621d2eb7f544df62
2017-04-10 10:13:41 +02:00
Zdeněk Crhonek
d89a421352
VBA tests - HEX, HOUR, IIF, INSTR test cases
...
Change-Id: Ib9e05dcfbd72f56cb3b5fb4e4760f868c008c7ac
Reviewed-on: https://gerrit.libreoffice.org/36315
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-09 15:42:50 +02:00
Zdeněk Crhonek
6c34c5ff46
VBA tests - FORMATNUMBER function
...
Change-Id: Ibfb00e5be9a32e3767ec4e73cdbf81f53f07b42e
Reviewed-on: https://gerrit.libreoffice.org/36229
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com >
2017-04-09 07:27:05 +02:00