On Mar 10, 2010, at 9:11 AM, Asiri Rathnayake wrote:
Hi Vincent,
If you are referring to this specific new feature or integration tests, No there are none.
Yes that's my question, why are there none? We shouldn't apply or accept patches that don't have tests to prove they work (unless when it's about some old code modifications and writing tests is just too hard).
Could you add some tests to prove this new feature?
ParameterDescriptor interface have the method getDefaultValue() which returns an object. WikiMacroParameterDescriptor class used to return null and what anamaria has done is to make it return a user specified (via a new constructor) default value object. I do not think this needs any test.
Yes you're right in term of unit test, there isn't much point in adding one. Now I can think of some functional tests to prove it works: * Verify that a macro can be written and that when calling $context.macro.params.myparam you get the default value if not specified * Verify that in the wysiwyg the default value is correctly displayed when a default value is specified wdyt? would these make sense? Thanks -Vincent