The Trunk: MorphicTests-nice.76.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-nice.76.mcz

commits-2
Nicolas Cellier uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-nice.76.mcz

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

Name: MorphicTests-nice.76
Author: nice
Time: 14 April 2021, 8:36:28.728889 pm
UUID: c2f02bb9-13ed-a74e-b5fa-f4f84b52ba01
Ancestors: MorphicTests-nice.75

Fix 3 tests

=============== Diff against MorphicTests-nice.75 ===============

Item was changed:
  ----- Method: MorphTest>>test10TransformKeepsLayer (in category 'tests - submorphs - layers') -----
  test10TransformKeepsLayer
 
+ | transform |
- | aMorph transform |
- aMorph := Morph new.
  transform := morph addFlexShell.
 
+ morph morphicLayerNumber: 50.
- aMorph morphicLayerNumber: 50.
  self assert: 50 equals: transform morphicLayerNumber.
 
  transform morphicLayerNumber: 20.
  self assert: 20 equals: transform morphicLayerNumber.
 
+ transform removeMorph: morph.
- transform removeMorph: aMorph.
  transform morphicLayerNumber: 50.
  self
+ assert: 20 equals: morph morphicLayerNumber;
- assert: 20 equals: aMorph morphicLayerNumber;
  assert: 50 equals: transform morphicLayerNumber!

Item was changed:
  ----- Method: MorphTest>>test12ResetLayerToDefault (in category 'tests - submorphs - layers') -----
  test12ResetLayerToDefault
 
+ | default |
+ default := morph morphicLayerNumber.
- | aMorph default |
- aMorph := Morph new.
- default := aMorph morphicLayerNumber.
 
+ morph morphicLayerNumber: default * 2.
+ self deny: default equals: morph morphicLayerNumber.
- aMorph morphicLayerNumber: default * 2.
- self deny: default equals: aMorph morphicLayerNumber.
 
  morph morphicLayerNumber: nil.
+ self assert: default equals: morph morphicLayerNumber!
- self assert: default equals: aMorph morphicLayerNumber!

Item was changed:
  ----- Method: TableLayoutTest>>testCheckBoxGroup (in category 'tests - example layouts') -----
  testCheckBoxGroup
 
+ | group groupContents labels boxHeight |
- | group groupContents labels |
  labels := Dictionary new.
  group := self newContainer
  hResizing: #shrinkWrap;
  vResizing: #shrinkWrap;
  layoutPolicy: TableLayout new;
  listDirection: #topToBottom;
  layoutInset: 0;
  cellPositioning: #topLeft;
  borderStyle: (SimpleBorder color: Color black width: 2);
  yourself.
  group addMorphBack: (labels at: #groupLabel put: 'Favorite Ice Cream' asMorph).
 
  groupContents := self newContainer
  hResizing: #shrinkWrap;
  vResizing: #shrinkWrap;
  layoutPolicy: TableLayout new;
  listDirection: #topToBottom;
  cellGap: 0;
  cellPositioning: #topLeft;
  yourself.
  group addMorphBack: groupContents.
+
+ boxHeight := 16.
-
  #('Vanilla' 'Chocolate') withIndexDo: [:label :index |
  | checkBox |
  checkBox := self newContainer
  hResizing: #shrinkWrap;
  vResizing: #shrinkWrap;
  layoutPolicy: TableLayout new;
  listDirection: #rightToLeft;
  yourself.
  checkBox
  addMorphBack: (labels at: (#box, index asString) asSymbol put: label asMorph);
+ addMorphBack: (self newMorph extent: 16@boxHeight; borderColor: Color black; borderWidth: 2).
- addMorphBack: (self newMorph extent: 16@16; borderColor: Color black; borderWidth: 2).
  groupContents addMorphBack: checkBox].
 
  self ensureLayout: group.
  self
  assert: (labels at: #groupLabel) width + (group borderWidth * 2)
  equals: group width.
  self
  assert: (labels at: #groupLabel) height
+ + ((labels at: #box1) height max: boxHeight)
+ + ((labels at: #box2) height max: boxHeight)
- + (labels at: #box1) height
- + (labels at: #box2) height
  + (group borderWidth * 2)
  equals: group height.!