The Trunk: MorphicTests-pre.66.mcz

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

The Trunk: MorphicTests-pre.66.mcz

commits-2
Patrick Rein uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-pre.66.mcz

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

Name: MorphicTests-pre.66
Author: pre
Time: 25 September 2020, 9:44:57.768674 am
UUID: 4785ae25-ad3c-ad4b-8341-0f3f4a4f3f1d
Ancestors: MorphicTests-mt.65

Adds a test case for layouting morphs in text in case the TextAnchor attribute is applied to more than the SoH character (which is unusual but valid).

=============== Diff against MorphicTests-mt.65 ===============

Item was added:
+ ----- Method: TextAnchorTest>>testTwoTextAnchorsOneWithNestedInterval (in category 'tests') -----
+ testTwoTextAnchorsOneWithNestedInterval
+
+ | anchorAttribute2 anchoredMorph2 |
+ anchoredMorph2 := RectangleMorph new.
+ anchoredMorph height: 40.
+ anchoredMorph2 height: 40.
+ anchorAttribute2 := TextAnchor new anchoredMorph: anchoredMorph2.
+ text := Text streamContents: [:stream |
+ stream
+ nextPutAll: 'contrived ';
+ nextPutAll: Character startOfHeader asString asText;
+ nextPutAll: ' whose morph is in the center.';
+ nextPutAll: Character startOfHeader asString asText;
+ nextPutAll: 'and some more text!!'].
+ text addAttribute: anchorAttribute from: 11 to: 61.
+ text addAttribute: anchorAttribute2 from: 42 to: 48.
+ textMorph hResizing: #shrinkWrap.
+ self prepareTextMorph.
+
+ self assert: textMorph paragraph lines first lineHeight < 50.
+ self assert: anchoredMorph right < anchoredMorph2 left!