lazarus-ccr/components/fpspreadsheet/tests
2015-03-06 12:12:45 +00:00
..
celltypetests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
colortests.pas fpspreadsheet: Massive reconstruction: remove formatting attributes of TCell record and collect in TCellFormatList. TCell only has index into this list. Introduce record helpers to keep the old syntax. Reduction of memory consumption per cell by 50%. 2015-01-23 21:54:23 +00:00
commenttests.pas fpspreadsheet: Add test cases for cell comments. Fix some bugs related to comments. 2015-02-08 18:26:47 +00:00
copytests.pas fpspreadsheet: Add background fill styles for cells. Fully implemented for Biff5, Biff8 and OOXML; ODS writes an interpolated solid fill (like Open/LibreOffice); Biff2 supports only the 50% gray black&white fill. 2015-02-17 23:32:00 +00:00
datetests.pas fpspreadsheet: Improve codepage handling for biff2 and biff2 files. 2015-02-04 18:15:19 +00:00
dbexporttests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
emptycelltests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
enumeratortests.pas fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration. 2015-03-04 17:30:59 +00:00
errortests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
fonttests.pas fpspreadsheet: Massive reconstruction: remove formatting attributes of TCell record and collect in TCellFormatList. TCell only has index into this list. Introduce record helpers to keep the old syntax. Reduction of memory consumption per cell by 50%. 2015-01-23 21:54:23 +00:00
formattests.pas fpspreadsheet: Shorten fpspreadsheet.pas by putting NumFormatList and CustomReader/Writer to separate units 2015-02-25 09:43:37 +00:00
formulatests.pas fpspreadsheet: Reduce support for shared formulas (too many problems...), only reading from xls and xlsx files supported. 2015-03-06 12:12:45 +00:00
insertdeletetests.pas fpspreadsheet: Reduce support for shared formulas (too many problems...), only reading from xls and xlsx files supported. 2015-03-06 12:12:45 +00:00
internaltests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
manualtests.pas fpspreadsheet: Add mission routines of the cell record helper. Some cosmetics. Clean up commented lines from previous commit. 2015-01-24 00:36:10 +00:00
numberstests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
numformatparsertests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
optiontests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
readme.txt
rpnformulaunit.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
sortingtests.pas fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration. 2015-03-04 17:30:59 +00:00
spreadtestcli.lpi fpspreadsheet: Move InitFormatRecord from unit fpstypes to fpsutils. Add enumeratortests to spreadtestcli. 2015-03-05 10:54:06 +00:00
spreadtestcli.lpr fpspreadsheet: Move InitFormatRecord from unit fpstypes to fpsutils. Add enumeratortests to spreadtestcli. 2015-03-05 10:54:06 +00:00
spreadtestgui.lpi fpspreadsheet: Replace for-to loops by for-in loops if possible. Update example demos. 2015-03-05 10:35:32 +00:00
spreadtestgui.lpr fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration. 2015-03-04 17:30:59 +00:00
spreadtestgui.res
stringtests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
testbiff8_1899.xls
testbiff8_1904.xls
testcases_calcrpnformula.inc fpspreadsheet: Improve codepage handling for biff2 and biff2 files. 2015-02-04 18:15:19 +00:00
testdbwriter_firebird.sql
testdbwriter_postgresql.sql
testdbwriter.ini
testdbwriter.pas
testdbwriter.rc
testdbwriter.res
testodf_1899.ods
testodf_1904.ods
testooxml_1899.xlsx
testooxml_1904.xlsx
testsutility.pas
virtualmodetests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00

Tests for fpspreadsheet

spreadtestgui
=============
Lets you quickly run tests in a GUI.
If there are problems, you can open the spreadtestgui.lpr in Lazarus, compile it with debug mode, and trace through the offending test and the fpspreadsheet code it calls.
More details: FPCUnit documentation

spreadtestcli
=============
Command line version of the above, extended with database output. Useful for scripting use (use e.g. --all --format=plain.

For output to an embedded Firebird database, make sure the required dlls/packages are present and run the program, e.g:
spreadtestcli --comment="Hoped to have fixed that string issue" --revision="482"
(the revision is the SVN revision number, so you can keep track of regresssions)

More details: FPCUnit documentation and
https://bitbucket.org/reiniero/testdbwriter

The tests
=========
Basic tests read XLS files and check the retrieved values against a list. This tests whether reading dates, text etc works.

Another test is to take that list of normative values, write it to an xls file, then read back and compare with the original list. This basically tests whether write support is correct.
The files are written to the temp directory. They are deleted on succesful test completion; otherwise they are kept so you can open them up with a spreadsheet application/mso dumper tool/hex editor and check what exactly got written.

Finally, there is a manual test unit: these tests write out cells to a spreadsheet file (testmanual.xls) that the user should inspect himself. Examples are tests for colors, formatting etc.

Adding tests
============
For most tests:
- Add new cells to the A column in the relevant xls files; see comments in files.
- Add corresponding normative/expected value in the relevant test unit; increase array size
- Add your tests that read the data from xls and checks against the norm array.

Note that tests that check for known failures are quite valuable. You can indicate you expect an exception etc. 

Ideas for more tests:
- add more tests to internaltests to explicitly tests fpspreadsheet functions/procedures/properties that don't read/write to xls/xml files
- writing RPN formulas in the manualtests unit
- more xls/xml file formats tested
- more corner cases
- writing all data available to various sheets and reading it back to test whether complex sheets work
- reading faulty files to test exception handling

For more details, please see the FPCUnit documentation.