Better names for tests

Serge Stinckwich Serge.Stinckwich at info.unicaen.fr
Mon Oct 22 13:52:42 UTC 2007


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/





More information about the Squeak-dev mailing list