## [squeak-dev] The Trunk: GraphicsTests-mt.60.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jun 8 12:51:47 UTC 2022

```Marcel Taeumel uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-mt.60.mcz

==================== Summary ====================

Name: GraphicsTests-mt.60
Author: mt
Time: 8 June 2022, 2:51:46.704335 pm
Ancestors: GraphicsTests-mt.59

Complements Graphics-mt.520.

=============== Diff against GraphicsTests-mt.59 ===============

+ ----- Method: RectangleTest>>testContainsPoint (in category 'tests') -----
+ testContainsPoint
+
+ 	| r |
+ 	r := Rectangle origin: 0 at 0 extent: 50 at 50.
+
+ 	{
+ 		r center . true .
+ 		1.5 at 1.5 . true .
+
+ 		r topLeft . true .
+ 		r topRight . false . "!!!!!!"
+ 		r bottomLeft . false . "!!!!!!"
+ 		r bottomRight . false . "!!!!!!"
+
+ 	} groupsDo: [ :point :result |
+ 		self assert: (r containsPoint: point) = result].!

Item was changed:
----- Method: RectangleTest>>testPointAtFraction (in category 'tests') -----
testPointAtFraction

| r |
r := Rectangle origin: 0 at 0 extent: 50 at 50.

{
r topLeft . 0.0 @ 0.0 .
r center . 0.5 @ 0.5 .
- 		r bottomRight . 1.0 @ 1.0 .

5 at 5 . 0.1 @ 0.1 .
+ 		40 at 50 . 0.8 @ 1.0 .
- 		40 at 50 . 0.8 @ 1.0

+ 		r bottomRight . 1.0 @ 1.0 .
+ 		49 at 49 . 0.99 @ 0.99 .
+
} groupsDo: [ :expected :fraction |
self assert: expected equals: (r pointAtFraction: fraction)].!

Item was changed:
----- Method: RectangleTest>>testRandomPoint (in category 'tests') -----
testRandomPoint

+ 	| r pt |
- 	| r |
r := Rectangle origin: 0 at 0 extent: 50 at 50.
+ 	pt := r randomPoint.
+ 	self
+ 		assert: (r containsPoint: pt)
+ 		description: ('{1} is not in rectangle {2}' format: {pt. r});
+ 		assert: pt isIntegerPoint
+ 		description: ('{1} is not an integer point' format: {pt}).!
- 	self assert: (r containsPoint: r randomPoint).
- 	self assert: r randomPoint isIntegerPoint.!

```