[Libreoffice] [PATCH] Basic Currency Issues #i31001# to #i107277#

John LeMoyne Castle jlc at mail2lee.com
Tue Nov 30 04:10:00 PST 2010


More About the Tester --  CurTestODS.ods :: Standard :: CurTestRunAll :

Most of the fix has been done for over a week, but a Basic test program was
required to identify the existing errors, to sort out the scaling factor
application and to demonstrate that the fix does not completely break Basic.
It took some effort to get a Basic program that did all the calculations on
scalar variables at the usual sub scope (partly to avoid issues reported
with Currency in array/as param).  Several refactorings were done to handle
run-time errors, to add more types and to prevent too much ugly
copy-and-paste bloat.  The mind-numbing explicitness seems necessary to
create a thorough fundamental test of just a little part of the language. 
The existing issues were general enough to need to test ~all types and math
operations that could produce a Currency value.  
I think Basic can only be well tested in Basic.  While it is possible that a
similar test program has already been written, it is fairly obvious that
this kind of test hasn't been run on the Currency type in a while.  All
permutations of operand types were tested because the Basic run-time
expression evaluation may change the type depending on other operand's type
and left or right position.  Sadly, this test does not completely
demonstrate that the fix does not break Basic in some way.
The test sheet is offered as a prototype for a unit test on one Basic
language type.  A set of similar tests would be useful to anyone hacking on
the Basic innards.  
-- LeMoyne
-- 
View this message in context: http://nabble.documentfoundation.org/PATCH-Basic-Currency-Issues-i31001-to-i107277-tp1991648p1992294.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list