Marcel Taeumel uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-mt.51.mcz==================== Summary ====================
Name: GraphicsTests-mt.51
Author: mt
Time: 12 December 2018, 10:09:09.446544 am
UUID: 472be479-c09a-674a-a046-b47a64264bfe
Ancestors: GraphicsTests-mt.50
Updates tests for converting points into rectangles.
=============== Diff against GraphicsTests-mt.50 ===============
Item was changed:
----- Method: PointTest>>testRectangleMix (in category 'tests') -----
testRectangleMix
{
Rectangle center: 60@60 extent: 100@100.
Rectangle origin: 10@10 extent: 100@100.
+ Rectangle origin: 10@10 corner: 110@110.
+
+ "1) Point/receiver is the origin, i.e. upper left corner."
- Rectangle origin: 10@10 corner: 110@110.
-
- 60@60 inflate: 100@100.
10@10 extent: 100@100.
10@10 corner: 110@110.
+
+ "2) Point/receiver is the extent."
+ 100@100 origin: 10@10.
+ 100@100 center: 60@60.
+
+ "3) Receiver and argument are either origin or corner."
+ 110@110 rect: 10@10.
+
} permutationsDo: [:rects |
rects overlappingPairsDo: [:r1 :r2 |
self assert: r1 equals: r2]].!
Item was added:
+ ----- Method: PointTest>>testRectangleWithCenter (in category 'tests') -----
+ testRectangleWithCenter
+
+ self
+ assert: (Rectangle center: 50@50 extent: 100@100)
+ equals: (100@100 center: 50@50).!
Item was removed:
- ----- Method: PointTest>>testRectangleWithInflate (in category 'tests') -----
- testRectangleWithInflate
-
- self
- assert: (Rectangle center: 50@50 extent: 100@100)
- equals: (50@50 inflate: 100@100).!
Item was added:
+ ----- Method: PointTest>>testRectangleWithOrigin (in category 'tests') -----
+ testRectangleWithOrigin
+
+ self
+ assert: (Rectangle origin: 50@50 extent: 100@100)
+ equals: (100@100 origin: 50@50).!
Item was added:
+ ----- Method: PointTest>>testRectangleWithPoints (in category 'tests') -----
+ testRectangleWithPoints
+
+ self
+ assert: (Rectangle origin: 50@50 corner: 100@100)
+ equals: (100@100 rect: 50@50).!