Better names for tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Better names for tests

Serge Stinckwich-4
Hi all,
for the purpose of an exercise for my students, i rewrite part of the  
RectangleTest methods in a more XP (eXtreme Programming) fashion in  
order to have tests that give intentions to reader. The previous name  
of methods were :

testAreasOutside1
testAreasOutisde2
testCorner1
testIntersection1
testIntersection2
testMergingDisjointRects
testMergingNestedRects
testMergingOverlappingRects
testMergingTrivial
testMergingTwoRects

They are now :

testARectangleContainsHisOrigin
testARectangleDoesNotContainHisCorner
testARectangleIntersectsWithHimself
testAnEmptyRectangleHasNoArea
testMergingNestedRectangleReturnTheContainer
testMergingOneRectangleReturnsThisRectangle
testRectangleWithSameOriginIntersects
testTwoRectangleWithAnAdjascentBorderDoesNotIntersects
testTwoRectangleWithAnAdjascentCornerDoesNotIntersects

What do you think about the idea ? Maybe i should send these new  
tests to the Squeak 3.10 release team ?

--
Serge Stinckwich
http://doesnotunderstand.free.fr/



Reply | Threaded
Open this post in threaded view
|

Re: Better names for tests

Ralph Johnson
On 10/22/07, Serge Stinckwich <[hidden email]> wrote:
> What do you think about the idea ?

Those are MUCH better names!

> Maybe i should send these new
> tests to the Squeak 3.10 release team ?

Put the changes in Mantis.  3.10 is winding down, so they might
actually go in 3.11 instead, but your changes are an improvement, and
they will get in eventually.

-Ralph