Marcel Taeumel uploaded a new version of MorphicTests to project The Trunk: http://source.squeak.org/trunk/MorphicTests-mt.84.mcz
==================== Summary ====================
Name: MorphicTests-mt.84 Author: mt Time: 5 April 2022, 2:36:45.389025 pm UUID: 6a7e9954-f900-44f9-b876-f2d43a5ee8bc Ancestors: MorphicTests-lrnp.83
Fixes some layout tests.
=============== Diff against MorphicTests-lrnp.83 ===============
Item was changed: ----- Method: TableLayoutTest>>testPluggableTextMorph (in category 'tests') ----- testPluggableTextMorph
+ | ptm ptmExtent | + ptmExtent := 100 @ (TextStyle defaultFont height * 3). - | ptm | ptm := PluggableTextMorph new + extent: ptmExtent; - extent: 100@50; setText: 'Hello World!! Hello World!! Hello World!! Hello World!!'; wrapFlag: true. container := self newContainer addMorphBack: ptm. self ensureLayout: container. + self assert: ptmExtent equals: container extent. - self assert: 100@50 equals: container extent.
self assert: ptm vIsScrollbarShowing. self deny: ptm hIsScrollbarShowing.
"Make it a one-liner." ptm wrapFlag: false. self ensureLayout: container. self deny: ptm vIsScrollbarShowing. self assert: ptm hIsScrollbarShowing.
"Make it a one-liner without the horizontal scrollbar." ptm hideScrollBarsIndefinitely. self ensureLayout: container. self deny: ptm vIsScrollbarShowing. self deny: ptm hIsScrollbarShowing. !
Item was changed: ----- Method: TableLayoutTest>>testTwoTextMorphsHorizontal (in category 'tests') ----- testTwoTextMorphsHorizontal
| str1 str2 label2 label1 heightAt200 | str1 := 'abc def'. str2 := 'tzu ghj qwe'. container := self newContainer hResizing: #spaceFill; vResizing: #shrinkWrap; addMorphBack: (label1 := TextMorph new contents: str1; wrapFlag: true; hResizing: #spaceFill); addMorphBack: (label2 := TextMorph new contents: str2; wrapFlag: true; hResizing: #spaceFill). container width: 200. self ensureLayout: container. heightAt200 := container height. self assert: 100 equals: label1 width. self assert: 100 equals: label2 width. container width: 100. self ensureLayout: container. self assert: 50 equals: label1 width. self assert: 50 equals: label2 width. self assert: container height > heightAt200. container width: 10000. self ensureLayout: container. self assert: 5000 equals: label1 width. self assert: 5000 equals: label2 width. + self assert: self defaultFont lineGrid equals: container height! - self assert: self defaultFont height + 2 equals: container height!
Item was changed: ----- Method: TableLayoutTest>>testTwoTextMorphsVertical (in category 'tests') ----- testTwoTextMorphsVertical
+ | str1 str2 label2 label1 font minWidth | - | str1 str2 label2 label1 font | str1 := 'abc def'. str2 := 'tzu ghj qwe'. container := self newContainer hResizing: #spaceFill; vResizing: #shrinkWrap; listDirection: #topToBottom; addMorphBack: (label1 := TextMorph new contents: str1; wrapFlag: true; hResizing: #spaceFill); addMorphBack: (label2 := TextMorph new contents: str2; wrapFlag: true; hResizing: #spaceFill). font := self defaultFont. + minWidth := label1 minWidth max: label2 minWidth. + #(1 2 4 8) do: [:factor | + container width: factor * minWidth. + self ensureLayout: container. + self assert: container width equals: label1 width. + self assert: container width equals: label2 width. + self assert: 0 equals: container height \ font lineGrid].! - container width: 200. - self ensureLayout: container. - self assert: 200 @ (font height + 2) equals: label1 extent. - self assert: 200 @ (font height + 2) equals: label2 extent. - - container width: 50. - self ensureLayout: container. - self assert: 50 equals: label1 width. - self assert: 50 equals: label2 width. - " check that we land on a multiple of the line height " - self assert: 0 equals: container height \ (font height + 2). - - container width: 20. - self ensureLayout: container. - self assert: 20 equals: label1 width. - self assert: 20 equals: label2 width. - " check that we land on a multiple of the line height " - self assert: 0 equals: container height \ (font height + 2)!
packages@lists.squeakfoundation.org