Age | Commit message (Collapse) | Author |
|
The "UnitTest" service is implemented as a new
Basic library called 'SFUnitTests'.
ScriptForge unit tests (SF_UnitTest class module)
======================
Class providing a framework to execute and check sets of unit tests.
The UnitTest unit testing framework was originally
inspired by unittest.py in Python
and has a similar flavor as major unit testing
frameworks in other languages.
It supports
- test automation
- sharing of setupand shutdown code
- aggregation of tests into collections.
Both the
- code describing the unit tests
- code to be tested
must be written exclusively in Basic
(the code might call functions written in other languages).
The code to be tested may be released as an extension.
It does not need to make use of ScriptForge services.
The test reporting device is the Console.
Definitions:
- Test Case: each test case is a Basic Sub.
- Test Suite: a collection of test cases stored in 1 Basic module.
- Unit test: a set of test suites stored in 1 library.
Two modes:
- the normal mode ("full mode"), using test suites and test cases
The UnitTest service is passed as argument to each test case.
- the "simple mode" limited to the use of the Assert...() methods.
Service invocation examples:
- In full mode, the service creation is external to test cases
Dim myUnitTest As Variant
myUnitTest = CreateScriptService("UnitTest", ThisComponent, "Tests")
' Test code is in the library "Tests"
' located in the current document
- In simple mode, the service creation is internal to every test case
Dim myUnitTest As Variant
myUnitTest = CreateScriptService("UnitTest")
With myUnitTest
If Not .AssertTrue(...) Then ...
' ...
.Dispose()
End With
Error handling
To support the debugging of the tested code, the UnitTest service, in cases of
- assertion failure
- Basic run-time error in the tested code
- Basic run-time error in the testing code (the unit tests)
will comment the error location and description in a message box and in the console log,
providing every test case (in either mode) implements an error handler
containing at least a call to the ReportError() method.
Change-Id: I9d9b889b148f172cd868af455493c8c696d1e953
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135365
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
The SFWidgets library is intended to host the Toolbar,
ToolbarControl (both future) and PopupMenu services.
A popup menu is usually triggered by a mouse action
(typically a right-click) on a dialog, a form, or one of their controls.
In these cases the menu will be displayed below the clicked area.
When triggered by other events, including in the normal flow
of a user script, the script should provide the coordinates
of the topleft edge of the menu versus the actual component.
The menu is described from top to bottom with next methods:
AddItem()
AddCheckBox()
AddRadioButton()
Example:
.AddCheckBox("View>Toolbars>Dialog")
.AddCheckBox("View>Toolbars>Find", Status := True)
.AddCheckBox("View>Status Bar", Status := True)
.AddItem("View>Full Screen", Name := "FULLSCREEN")
The SubmenuCharacter (Default = ">") is modifiable.
Each menu item receives a numeric and a string identifier.
The execute() method returns the item selected by the user.
The service is available both from Basic and Python user scripts.
The commit includes the review of build files to include
the new library and the new modules.
Change-Id: I2940be25313cc8fff7b337766edd348b04a20584
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123654
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
modified: Repository.mk
modified: desktop/CppunitTest_desktop_lib.mk
modified: scp2/source/ooo/directory_ooo.scp
modified: wizards/Module_wizards.mk
modified: wizards/source/configshare/dialog.xlc
modified: wizards/source/configshare/script.xlc
Change-Id: Ia2c905179f3c1784a1bd31fcca7340e65c5ce27a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105410
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
results in inserting the english original so something can be found, now the
standard fallback of using the english original from the source key is used, so
partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
com::sun::star::resource::OfficeResourceLoader
com::sun::star::resource::XResourceBundleLoader
com::sun::star::resource::XResourceBundle
when translating strings via uno apis
com.sun.star.resource.StringResourceWithLocation
can continue to be used
Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
|
|
Change-Id: I165f85ee993995b54163061c7d378eea90eb276a
|
|
like LibreOffice java extensions, and nlpsolver and librelogo, do, removes the
magic number problem
Change-Id: I561249ccebe41c787cd8cdaa80e1d035f27052cc
Reviewed-on: https://gerrit.libreoffice.org/37986
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I4e334ac88e1e060bc07af9b174b9b8fb1401fc80
|
|
Change-Id: Ibc0f45a03e16f3fe4ee54b24de30ba88e43a4aab
Reviewed-on: https://gerrit.libreoffice.org/26381
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Quoting 56211a166ab25d80de84c2cccce22be15a9be051 "fdo#72394 Don't endlessly
expand $(share_subdir_name) into itself":
* The compile-time variable LIBO_SHARE_FOLDER should not end up as a runtime
framework path variable, esp. since accidentally re-substituting it for
"share" segments in unrelated URLs like <file:///export/share/for-all> does
not make sense. ac4e19f9085dbd0103c7336a5318aa1e55b3e3e0 "fdo#68552: Don't
(attempt to) do run-time expansion of build-time parameters" had already
attempted a fix for that, but it had to be reverted again with
791a8b96f754798192875da287c84f8cfa4e533e because it "Unfortunately does not
work if BUILDDIR is different from SRCDIR."
So this time fix it not via configure-expanded *.in files, but via xsltproc
(for officecfg/registry/ files) and sed (for wizards/soruce/configshare files).
The changes to officecfg/util/alllang.xsl will replace @LIBO_SHARE_FOLDER@ only
in oor:name attribues (and in <value> text), not in any other attributes,
because I have no idea how to write that generically in XSLT and it happens to
be only needed in oor:name for now.
Change-Id: Iec78eb70dcbf1a5bbabf4e42f21c44dc65c3e438
|
|
- this renames the 'almost' module target to non-l10n
- and adds a l10n target which is intended to only build l10n parts of
the product
- packagers should then be able to build l10n and non-l10n parts of the
product independently, thus:
- enable quicker rebuilds
- distribution of load
- updates to l10n without a full rebuild
- security fixes to binaries without rebuilding all l10n
- the new targets are called build-l10n-only and build-non-l10n-only
- note this is not intended to move a concept of split packages
upstream -- while this exsists in distros, the number of test
scenarios for this would explode upstream
Change-Id: Ib8ccc9bc52718d9b0ebbfee76ad93dc29c260863
Conflicts:
filter/Module_filter.mk
|
|
License text modified after gerrit review
Change-Id: I193d6d1fd477cca4c2880760f21f8d978643f634
Reviewed-on: https://gerrit.libreoffice.org/6232
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
|
|
Change-Id: Ib451bdb3c1c2ca42347abfde44651d5cf5eef4f3
|
|
Patches contributed by Mathias Bauer
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394707
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1397337
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
Patches contributed by Andre Fischer
Fixed getcsym.awk to handle #-comments that contain special regexp chars.
http://svn.apache.org/viewvc?view=revision&revision=1230971
118778: Added ADDITIONAL_REPOSITORIES environment variable and its
automatic setup in configure.
http://svn.apache.org/viewvc?view=revision&revision=1232004
118160: Added external CoinMP library.
http://svn.apache.org/viewvc?view=revision&revision=1233909
Patches contributed by Herbert Duerr
#i119168# use generic LICENSE file for langpacks and sdks
http://svn.apache.org/viewvc?view=revision&revision=1310178
macosxotoolhelper: need to quote perl regexp if it may contain regexp metachars
http://svn.apache.org/viewvc?view=revision&revision=1183367
allow gbuild with empty sysroot on linux
http://svn.apache.org/viewvc?view=revision&revision=1179186
Patches contributed by Ingo Schmidt
native373: #164472# improvements for msi database
http://svn.apache.org/viewvc?view=revision&revision=1167540
http://svn.apache.org/viewvc?view=revision&revision=1167539
Patches contributed by Jurgen Schmidt
adapt setup package scripts to handle special DS_Store file for
developer snapshot builds
http://svn.apache.org/viewvc?view=revision&revision=1232430
imported patch extensions_i117681.patch
http://svn.apache.org/viewvc?view=revision&revision=1172102
Patches contributed by Michael Stahl
gbuild: RepositoryFixes.mk should be optional
http://svn.apache.org/viewvc?view=revision&revision=1166123
xslt filter: remove the FLA horror
wordml import filter: replace FLA usage with plain XSLT
http://svn.apache.org/viewvc?view=revision&revision=1363727
Patch contributed by Oliver-Rainer Wittmann
i#88652: applied patch, remove unicows deps
http://svn.apache.org/viewvc?view=revision&revision=1177585
Remove lots of OS2 conditionals, re-extract Rhino Java, unwind
cppunit pieces, cleanup Mac image bits, remove coin-mp and
re-package lpsolve, Oxygen & Crystal, fixup qstart bits, expand
MPLv2 subset checking.
Change-Id: Iad5c8a76399620b892671633c0d8c29996db3564
|
|
Change-Id: Ia76a2d4ce93bf338c6ca22fd2cd991b42c195ae4
|
|
Change-Id: I8e43d228e842f24b054afc6bf59040667a6703d5
|
|
Change-Id: Ic7fa577fbdb527a75643c4e2919e0527432d5536
Reviewed-on: https://gerrit.libreoffice.org/3439
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
|
|
Change-Id: I76ed89c4a46e5a7b6a639e2c2717bc53d9b68bc9
Reviewed-on: https://gerrit.libreoffice.org/3438
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
|
|
Change-Id: I6c071f00eef88d3f56e76efddf6f0c71aa56b089
Reviewed-on: https://gerrit.libreoffice.org/3437
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
|
|
Change-Id: I3fc2b0f4e014d358d416c230b0450dcbe5d76363
|
|
Change-Id: I63a46f027c8e022dee35f57db19b2538be09b1fc
|
|
Change-Id: I4b9e2d22af810db367c705791376c99cb1860172
|
|
Change-Id: If910b37990677458dcb2c88007ad713b1f208fbe
|
|
Change-Id: I4161a7fe929c81ac0bdd8506d2e0697bdc7f9c9e
|
|
a) it doesn't work
b) isn't connected up to any menus
c) is arbitrarily localized to big 12 nations
d) out of date wrt public holidays in those anyway
Change-Id: I4a16490b3ae84c6e5dbe0774ea8eb0000ed6dc3d
|
|
Also improve exception handling and error printing in pythonloader
Allow registration of explicit .py components - the only method that works
|
|
|
|
|
|
|
|
|
|
|
|
|