Code Review Request: More tests for 7184826: (reflect) Add support for Project Lambda concepts in core reflection
joel.franck at oracle.com
Thu Jul 25 14:25:50 UTC 2013
On Jul 24, 2013, at 3:30 AM, Amy Lu <amy.lu at oracle.com> wrote:
> Thank you Dan !
> Please see my comments inline...
> On 7/24/13 5:12 AM, Dan Smith wrote:
>> Per a request from Joel, I've taken a look at DefaultStaticTestData. I don't really have the full context here, but I'm assuming that the annotations get translated into tests that guarantee 1) the result of Class.getMethods is exactly (no more -- excepting Object methods -- and no less) those methods named by MethodDesc annotations; and 2) the result of Class.getDeclaredMethods is exactly (no more, no less) those methods that are marked "declared=YES".
>> The expected results seem accurate. I would personally focus testing more on different inheritance shapes and less on different combinations of (unrelated) method declarations or presence/absence type variables (!?), but it's a valid test in any case.
>> There ought to be some testing for scenarios that javac won't generate, like conflicting default method declarations.
> Testing on "javac" is out of this scope, it's covered by langtools tests, say test/tools/javac/defaultMethods/
I sort of agree with Dan here. This wouldn't be testing of javac, rather testing that Core Reflection works for combinations that javac doesn't currently emit. However I think that is an excellent candidate for a follow up test, we can address that after these test are finished. I will file a bug for this.
More information about the core-libs-dev