[Pkg] The Trunk: MorphicTests-mt.58.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Oct 10 09:01:00 UTC 2019


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

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

Name: MorphicTests-mt.58
Author: mt
Time: 10 October 2019, 11:01:01.808276 am
UUID: c5e62a1d-fe51-474c-aa33-b9809ce932c5
Ancestors: MorphicTests-mt.57

Adds a test for that (fixed) resize-anchor-should-recompose bug.

=============== Diff against MorphicTests-mt.57 ===============

Item was changed:
  ----- Method: TextAnchorTest>>refreshTextMorph (in category 'utility') -----
  refreshTextMorph
  
+ 	textMorph imageForm.
+ 	"textMorph fullBounds. --- not yet working."!
- 	textMorph changed; imageForm. "This triggers a redraw and thereby positions the embedded morphs."!

Item was added:
+ ----- Method: TextAnchorTest>>testResizeAnchoredMorph (in category 'tests') -----
+ testResizeAnchoredMorph
+ 	
+ 	| anchoredMorph priorExtent |
+ 	anchoredMorph := EllipseMorph new.
+ 	anchoredMorph extent: 50 at 50.
+ 	
+ 	text := 'Hello, World!!\-> X <-\Hello, World!!' withCRs asText
+ 		copyReplaceTokens: 'X'
+ 		with: (Text string: Character startOfHeader asString attribute: (TextAnchor new anchoredMorph: anchoredMorph)).
+ 	self prepareTextMorph.	
+ 	
+ 	"Height is easy because morph is higher than the font."
+ 	priorExtent := textMorph extent.
+ 	anchoredMorph height: anchoredMorph height + 15.
+ 	self refreshTextMorph.
+ 	self assert: priorExtent y + 15 equals: textMorph height.
+ 	
+ 	"Width must be at least the text width."
+ 	anchoredMorph width: textMorph width.
+ 	self refreshTextMorph.
+ 	
+ 	priorExtent := textMorph extent.
+ 	anchoredMorph width: anchoredMorph width + 15.
+ 	self refreshTextMorph.
+ 	self assert: priorExtent x + 15 equals: textMorph width.!



More information about the Packages mailing list