|
A few comments.
Class SupportedStringMethods: - Typo (Map instead of String) in the title: "Supported Map methods" - How about using a different expression for the indexOf tests? We could run a Department query checking its name. There is a Department called 'Development'. This name includes two 'e' which allows us to test whether indexOf with a fromIndex skips the first letters: name.indexOf('e') == 1 name.indexOf('e', 2) == 3 - The array expectedResult is a list of names of result instances and not the result itself, correct? You might want to add this to the javadoc of the field. Class SupportedMathMethods: - Would it make sense to use the pc class PrimitiveTypes for testing the Math methods abs and sqrt? This would allow calling abs for int and double fields and AFAIK there are instances with negative field values. Class SupportedJDOHelperMethods: - How about adding another test query that calls JDOHelper.getObjectId in the filter: SELECT FROM Person WHERE JDOHelper.getObjectId(this) == oid PARAMETERS Object oid No comments for class SupportedMapMethods. The second patch contains the comments above.
I looked at the second patch, just two comments about class SupportedStringMethods:
- I think the filter of the matches test query should be firstname.matches('.*First'). - How about adding two other test queries for matches: one using a dot that shouldmatch any character and another query using (?i) for case insensitive matching? The third patch contains the comments above.
One comment about the query testing method matches: I'm afraid the argument 'emp1(?i)FIRST' is not portable. The spec talks about "global (?i) for case-insensitive matches. I think global in this context means it is used for the entire matches argument.
I propose to change the query to use '(?i)EMP1FIRST' instead. Other than that the patch looks good and is ready for checkin. I incorporated the proposed change above into the "matches" test and checked in all files (Revision 326519).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JDO-156andJDO-168. For this reason, these patches must be checked in first.