[squeak-dev] The Trunk: MorphicTests-tpr.91.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jan 16 02:00:30 UTC 2023
tim Rowledge uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-tpr.91.mcz
==================== Summary ====================
Name: MorphicTests-tpr.91
Author: tpr
Time: 15 January 2023, 6:00:29.415403 pm
UUID: fd5bf37d-f82b-46a2-b4f1-5856b724dfe6
Ancestors: MorphicTests-eem.90
Remove some variable shadowing
=============== Diff against MorphicTests-eem.90 ===============
Item was changed:
----- Method: TableLayoutTest>>testScrollPaneBarUpdate (in category 'tests - scroll panes') -----
testScrollPaneBarUpdate
+ | child |
- | child container |
container := ScrollPane new color: Color green; extent: 300 @ 300; showVScrollBarOnlyWhenNeeded; showHScrollBarOnlyWhenNeeded.
container scroller addMorphBack: (child := Morph new color: Color red; extent: 100 @ 100).
self ensureLayout: container.
self assert: container hScrollBar owner isNil.
self assert: container vScrollBar owner isNil.
child extent: 400 @ 100.
self ensureLayout: container.
self assert: container hScrollBar owner notNil.
self assert: container vScrollBar owner isNil.
child extent: 400 @ 400.
self ensureLayout: container.
self assert: container hScrollBar owner notNil.
self assert: container hScrollBar owner notNil!
Item was changed:
----- Method: TableLayoutTest>>testShrinkWrapIssue (in category 'tests') -----
testShrinkWrapIssue
+ "A container that has no layout policy does MUST trigger layout computation for its submorphs in time."
+ | inner item1 item2 |
- "A container that has no layout policy does MUST trigger layout computation for its submorphs in time."
-
- | container inner item1 item2 |
container := Morph new
hResizing: #shrinkWrap;
vResizing: #shrinkWrap;
yourself.
inner := self newContainer
listDirection: #topToBottom;
yourself.
container addMorphBack: inner.
inner
addMorphBack: (item1 := self newMorph extent: 50 at 50; yourself);
addMorphBack: (item2 := self newMorph extent: 50 at 50; yourself).
self ensureLayout: container.
self assert: 50 at 100 equals: container extent.
item1 width: 100.
item2 width: 200.
self ensureLayout: container.
self assert: 200 at 100 equals: container extent.!
Item was changed:
----- Method: TextAnchorTest>>testResizeAnchoredMorph (in category 'tests') -----
testResizeAnchoredMorph
+ | priorExtent |
- | 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 Squeak-dev
mailing list
|