Proposal: grouping tests according to the directory/logical structure

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Proposal: grouping tests according to the directory/logical structure

Adam Wulkiewicz
Hi,

We have many tests at Geometry in a single matrix:
http://www.boost.org/development/tests/develop/developer/geometry.html
For me it is sometimes hard to quickly find the test I'm looking for.

I propose to group the tests the same way how they're grouped in the
directories structure by naming them accordingly. Each test name would
contain:
1. a name (or names) of a logical part of the library taken from the
containing directory (algorithms, strategies, core, etc.)
2. a name of the tested algorithm, class, concept (within, box, etc.)
3. a name of test variant (e.g. areal_areal or multi)

Furthermore I propose to keep the file and directories structure short
(i.e. in many cases the same as they are now) and to specify the names
in Jamfiles.
This can be done by setting the target-name in run/compile/compile-fail
rules, as mentioned here:
http://www.boost.org/build/doc/html/bbv2/builtins/testing.html

The target-name would be created from the directory name,
algorithm/concept name and test variant name separated by underscore, e.g.:
algorithms/area_multi.cpp  ->  algorithms_area_multi
algorithms/buffer/buffer_point.cpp  ->  algorithms_buffer_point
algorithms/distance/distance.cpp  ->  algorithms_distance
algorithms/relational_operations/relate/relate_areal_areal.cpp ->  
algorithms_relate_areal_areal
core/access.cpp  ->  core_access
geometries/box.cpp  ->  geometries_box
strategies/andoyer.cpp  ->  strategies_andoyer
util/range.cpp  ->  util_range
etc.

I also propose to rename some of the files to reflect the new naming
convention, i.e. to always keep test variant identifier at the end (as
on the list above), e.g.:
multi_area.cpp  ->  area_multi.cpp
point_buffer.cpp  ->  buffer_point.cpp
etc.

Alternatively, sometimes the name of an algorithm could also be ommited
in a file name if it was redundant and clear enough, e.g.:
buffer/point_buffer.cpp  ->  buffer/point.cpp
however personally I'd prefer keeping the redundant algorithm name. At
least for now. And if we agreed that it should be done this way, do it
in the future (as the next step) consistently for all of the tests.

Regards,
Adam

_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: grouping tests according to the directory/logical structure

Barend
Hi Adam,


Adam Wulkiewicz schreef op 27-5-2015 om 19:39:

>
> We have many tests at Geometry in a single matrix:
> http://www.boost.org/development/tests/develop/developer/geometry.html
> For me it is sometimes hard to quickly find the test I'm looking for.
>
> I propose to group the tests the same way how they're grouped in the
> directories structure by naming them accordingly. Each test name would
> contain:
> 1. a name (or names) of a logical part of the library taken from the
> containing directory (algorithms, strategies, core, etc.)
> 2. a name of the tested algorithm, class, concept (within, box, etc.)
> 3. a name of test variant (e.g. areal_areal or multi)
>
> Furthermore I propose to keep the file and directories structure short
> (i.e. in many cases the same as they are now) and to specify the names
> in Jamfiles.
> This can be done by setting the target-name in
> run/compile/compile-fail rules, as mentioned here:
> http://www.boost.org/build/doc/html/bbv2/builtins/testing.html
>
> The target-name would be created from the directory name,
> algorithm/concept name and test variant name separated by underscore,
> e.g.:
> algorithms/area_multi.cpp  ->  algorithms_area_multi
> algorithms/buffer/buffer_point.cpp  ->  algorithms_buffer_point
> algorithms/distance/distance.cpp  ->  algorithms_distance
> algorithms/relational_operations/relate/relate_areal_areal.cpp ->  
> algorithms_relate_areal_areal
> core/access.cpp  ->  core_access
> geometries/box.cpp  ->  geometries_box
> strategies/andoyer.cpp  ->  strategies_andoyer
> util/range.cpp  ->  util_range
> etc.
>
> I also propose to rename some of the files to reflect the new naming
> convention, i.e. to always keep test variant identifier at the end (as
> on the list above), e.g.:
> multi_area.cpp  ->  area_multi.cpp
> point_buffer.cpp  ->  buffer_point.cpp
> etc.

Thanks for the proposal. I agree with this, both the target-names and
the renaming of some of the files.
If there are no objections, I can take care for the buffer part (as it
needs also the same renaming in my non-committed project files)


>
> Alternatively, sometimes the name of an algorithm could also be
> ommited in a file name if it was redundant and clear enough, e.g.:
> buffer/point_buffer.cpp  ->  buffer/point.cpp
> however personally I'd prefer keeping the redundant algorithm name. At
> least for now. And if we agreed that it should be done this way, do it
> in the future (as the next step) consistently for all of the tests.

OK for me.


Regards, Barend

_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: grouping tests according to the directory/logical structure

Adam Wulkiewicz
Hi Barend,

Barend Gehrels wrote:
> Adam Wulkiewicz schreef op 27-5-2015 om 19:39:
>> I propose to group the tests the same way how they're grouped in the
>> directories structure by naming them accordingly.
<snip>
>
> Thanks for the proposal. I agree with this, both the target-names and
> the renaming of some of the files.
> If there are no objections, I can take care for the buffer part (as it
> needs also the same renaming in my non-committed project files)
>

Ok, I'll leave the buffer tests to you.

I've already renamed some of the tests: arithmetic, core, geometries,
io, util and relation operations. Not all of them, to not interfere with
the opened pull requests.

Regarding the concepts and point_concept directories. Do you have
something against putting the tests from these two directories in one -
concepts?

Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: grouping tests according to the directory/logical structure

Barend
Hi Adam,

Adam Wulkiewicz schreef op 29-5-2015 om 13:23:

> Hi Barend,
>
> Barend Gehrels wrote:
>> Adam Wulkiewicz schreef op 27-5-2015 om 19:39:
>>> I propose to group the tests the same way how they're grouped in the
>>> directories structure by naming them accordingly.
> <snip>
>>
>> Thanks for the proposal. I agree with this, both the target-names and
>> the renaming of some of the files.
>> If there are no objections, I can take care for the buffer part (as
>> it needs also the same renaming in my non-committed project files)
>>
>
> Ok, I'll leave the buffer tests to you.

Done.


>
> I've already renamed some of the tests: arithmetic, core, geometries,
> io, util and relation operations. Not all of them, to not interfere
> with the opened pull requests.

I see it - the matrix will temporary be twice as large, until all tests
have been remained and all test-sets did run.

>
> Regarding the concepts and point_concept directories. Do you have
> something against putting the tests from these two directories in one
> - concepts?

OK for me, indeed better.

Regards, Barend

_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Loading...