Hi Steve,

>> Just my usual request for a meaningful test-case name: This one could
>> be class_result_4.f90. (I don't want to be pedantic about this, but in
>> a growing testsuite of 4000+ files, I really think it makes sense to
>> have meaningful names. It does have various advantages and, to be
>> honest, I don't see any disadvantage).
>>
>
> Well, the main disadvantage is thinking up a suitable file name.
> I would have never arrived at class_result_4.f90 given that the
> fixes are in gfc_check_vardef_context() and matching_typebound_op().
> Neither suggest to me that I'm dealing with a class_result.

well, but obviously the test case does. It defines a FUNCTION that
returns a CLASS, which led me straightforward to the name
class_result_*, but I guess anything like class_* would be fine as
well (since the problem in this specific PR was mainly due to wrong
usage of a CLASS variable, as indicated by the repeated use of
BT_CLASS and CLASS_DATA in the patch).


> The only benefit that I see is that during development one can
> run regression testing on a subset of the testcases via
> "make RUNTESTFLAGS='dg.exp=\*class\*.f90'" where filenames matched
> by the regex pattern are tested.

Yes, that is one important benefit. Another is that if you break
something, you immediately get an idea what sort of stuff you break.

In general the use of meaningful names simply helps with organization
and overview. Having a folder with 4000 files that all have arbitrary
(and very similar names) like pr12345.f90 just isn't very nice. It
also provokes typos (swapped digits etc).

If you are looking for the test case that belongs to a certain PR
number, you can still grep for that number (if it is included as a
comment in the test case) or look in bugzilla which should show the
commit and the corresponding files.

I'm not trying to force you to do this, just trying to explain why I
think meaningful names are useful. But it's not a hell of a problem
and if you insist to keep the name you proposed, please go ahead and
commit.

Cheers,
Janus

Reply via email to