Nicolas Cellier uploaded a new version of MorphicTests to project The Trunk: http://source.squeak.org/trunk/MorphicTests-nice.40.mcz
==================== Summary ====================
Name: MorphicTests-nice.40 Author: nice Time: 26 April 2017, 11:18:11.635198 pm UUID: e709833d-000f-471c-abed-23c75c36b9ad Ancestors: MorphicTests-mt.39
Classify a few 'as yet unclassified' methods
=============== Diff against MorphicTests-mt.39 ===============
Item was changed: + ----- Method: CircleMorphBugs>>testCircleInstance (in category 'tests') ----- - ----- Method: CircleMorphBugs>>testCircleInstance (in category 'as yet unclassified') ----- testCircleInstance "" "self run: #testCircleInstance"
| circ | self assert: (circ := CircleMorph initializedInstance) extent = circ extent x asPoint
!
Item was changed: + ----- Method: LayoutFrameTest>>testInset (in category 'tests') ----- - ----- Method: LayoutFrameTest>>testInset (in category 'as yet unclassified') ----- testInset | lf rectangle | lf := LayoutFrame new leftFraction: 0 offset: 10; topFraction: 0 offset: 10; rightFraction: 1 offset: -10; bottomFraction: 1 offset: -10; yourself. rectangle := lf layout: nil in: (50@10 corner: 150@70). self assert: (60@20 corner: 140@60) = rectangle!
Item was changed: + ----- Method: LayoutFrameTest>>testLeftTopAligned (in category 'tests') ----- - ----- Method: LayoutFrameTest>>testLeftTopAligned (in category 'as yet unclassified') ----- testLeftTopAligned | lf rectangle | lf := LayoutFrame new leftFraction: 0 offset: 10; topFraction: 0 offset: 10; rightFraction: 0 offset: 60; bottomFraction: 0 offset: 25; yourself. rectangle := lf layout: nil in: (50@10 corner: 150@70). self assert: (60@20 corner: 110@35) = rectangle!
Item was changed: + ----- Method: LayoutFrameTest>>testRightBottomQuadrant (in category 'tests') ----- - ----- Method: LayoutFrameTest>>testRightBottomQuadrant (in category 'as yet unclassified') ----- testRightBottomQuadrant | lf rectangle | lf := LayoutFrame new leftFraction: 1/2 offset: 1; topFraction: 1/2 offset: 1; rightFraction: 1 offset: -2; bottomFraction: 1 offset: -2; yourself. rectangle := lf layout: nil in: (50@10 corner: 150@70). self assert: (101@41 corner: 148@68) = rectangle!
Item was changed: + ----- Method: LayoutFrameTest>>testSpaceFill (in category 'tests') ----- - ----- Method: LayoutFrameTest>>testSpaceFill (in category 'as yet unclassified') ----- testSpaceFill | lf rectangle | lf := LayoutFrame new leftFraction: 0 offset: 0; topFraction: 0 offset: 0; rightFraction: 1 offset: 0; bottomFraction: 1 offset: 0; yourself. rectangle := lf layout: nil in: (50@10 corner: 150@70). self assert: (50@10 corner: 150@70) = rectangle!
Item was changed: + ----- Method: MorphicTestTextModel>>flags (in category 'accessing') ----- - ----- Method: MorphicTestTextModel>>flags (in category 'as yet unclassified') ----- flags
^ flags ifNil: [flags := Bag new]!
Item was changed: + ----- Method: MorphicTestTextModel>>hasFlag: (in category 'accessing') ----- - ----- Method: MorphicTestTextModel>>hasFlag: (in category 'as yet unclassified') ----- hasFlag: aSymbol
^ self flags includes: aSymbol!
Item was changed: + ----- Method: MorphicTestTextModel>>result (in category 'accessing') ----- - ----- Method: MorphicTestTextModel>>result (in category 'as yet unclassified') ----- result
^ result!
Item was changed: + ----- Method: MorphicTestTextModel>>result: (in category 'accessing') ----- - ----- Method: MorphicTestTextModel>>result: (in category 'as yet unclassified') ----- result: anObject
result := anObject.!
Item was changed: + ----- Method: MorphicUIManagerTest>>defaultTimeout (in category 'accessing') ----- - ----- Method: MorphicUIManagerTest>>defaultTimeout (in category 'as yet unclassified') ----- defaultTimeout ^ 60 "seconds"!
Item was changed: + ----- Method: MorphicUIManagerTest>>findWindowInWorldLabeled: (in category 'private') ----- - ----- Method: MorphicUIManagerTest>>findWindowInWorldLabeled: (in category 'as yet unclassified') ----- findWindowInWorldLabeled: aLabel "Look in the world and in the hand for windows. Yes, windows may spawn in the hand." ^ World submorphs, (World hands gather: [:hand | hand submorphs]) detect: [ :each | each isSystemWindow and: [ each label = aLabel ] ] ifNone: [].!
Item was changed: + ----- Method: MorphicUIManagerTest>>setUp (in category 'initialize-release') ----- - ----- Method: MorphicUIManagerTest>>setUp (in category 'as yet unclassified') ----- setUp "default. tests will add morphs to list. Teardown will delete."
cases := #(). uiManager := MorphicUIManager new.!
Item was changed: + ----- Method: MorphicUIManagerTest>>tearDown (in category 'initialize-release') ----- - ----- Method: MorphicUIManagerTest>>tearDown (in category 'as yet unclassified') ----- tearDown "default. tests will add morphs to list. Teardown will delete."
cases do: [ :each | each delete ].!
Item was changed: + ----- Method: MorphicUIManagerTest>>testOpenWorkspace (in category 'tests') ----- - ----- Method: MorphicUIManagerTest>>testOpenWorkspace (in category 'as yet unclassified') ----- testOpenWorkspace "self new testOpenWorkspace" "MorphicUIBugTest run: #testOpenWorkspace" | window myLabel foundWindow myModel | myLabel := 'Workspace from SUnit test' . foundWindow := self findWindowInWorldLabeled: myLabel . self assert: foundWindow isNil. window := uiManager edit: '"MorphicUIBugTest run: #openWorkspaceTest"' label: myLabel. foundWindow := self findWindowInWorldLabeled: myLabel. cases := Array with: foundWindow . "For teardown."
myModel := foundWindow submorphs detect: #isMorphicModel. self assert: myModel model class == Workspace. self assert: foundWindow model class == Workspace.!
Item was changed: + ----- Method: MorphicUIManagerTest>>testOpenWorkspaceAns (in category 'tests') ----- - ----- Method: MorphicUIManagerTest>>testOpenWorkspaceAns (in category 'as yet unclassified') ----- testOpenWorkspaceAns "Test if method opening a workspace answers the window opened"
"MorphicUIBugTest run: #testOpenWorkspaceAns"
| window myLabel foundWindow | myLabel := 'Workspace from ', 'SUnit test' . foundWindow := self findWindowInWorldLabeled: myLabel . self assert: ( foundWindow isNil ) .
window := uiManager edit: '"MorphicUIBugTest run: #openWorkspaceTest"' label: myLabel. foundWindow := self findWindowInWorldLabeled: myLabel . cases := Array with: foundWindow . "For teardown." self assert: ( window == foundWindow ) .!
Item was changed: + ----- Method: MorphicUIManagerTest>>testShowAllBinParts (in category 'tests') ----- - ----- Method: MorphicUIManagerTest>>testShowAllBinParts (in category 'as yet unclassified') ----- testShowAllBinParts "self new testShowAllBinParts" "MorphicUIBugTest run: #testShowAllBinParts"
| tool | self shouldnt: [tool := ObjectsTool initializedInstance showAll openCenteredInWorld] raise: Error. cases := Array with: tool.!
Item was changed: + ----- Method: MorphicUIManagerTest>>testUIManagerNoAcceptInitially (in category 'tests') ----- - ----- Method: MorphicUIManagerTest>>testUIManagerNoAcceptInitially (in category 'as yet unclassified') ----- testUIManagerNoAcceptInitially "Ensure that UIManager does not invoke the accept: action initially."
| accepted window | accepted := false. window := uiManager edit: Text new label: 'Test' accept: [:val| accepted := true]. window delete. self deny: accepted.!
Item was changed: + ----- Method: SimpleSwitchMorphTest>>classToBeTested (in category 'accessing') ----- - ----- Method: SimpleSwitchMorphTest>>classToBeTested (in category 'as yet unclassified') ----- classToBeTested ^ SimpleSwitchMorph !
Item was changed: + ----- Method: SimpleSwitchMorphTest>>setUp (in category 'initialize-release') ----- - ----- Method: SimpleSwitchMorphTest>>setUp (in category 'as yet unclassified') ----- setUp super setUp. testSwitch := SimpleSwitchMorph new!
Item was changed: + ----- Method: SimpleSwitchMorphTest>>testName (in category 'tests') ----- - ----- Method: SimpleSwitchMorphTest>>testName (in category 'as yet unclassified') ----- testName
self assert: testSwitch externalName = 'SimpleSwitch'!
Item was changed: + ----- Method: SimpleSwitchMorphTest>>testState (in category 'tests') ----- - ----- Method: SimpleSwitchMorphTest>>testState (in category 'as yet unclassified') ----- testState self assert: testSwitch isOff. self deny: testSwitch isOn. testSwitch toggleState. self assert: testSwitch isOn. self deny: testSwitch isOff!
Item was changed: + ----- Method: SimpleSwitchMorphTest>>testSwitching (in category 'tests') ----- - ----- Method: SimpleSwitchMorphTest>>testSwitching (in category 'as yet unclassified') ----- testSwitching
testSwitch setSwitchState: false. self assert: testSwitch isOff. self assert: testSwitch color = testSwitch offColor. testSwitch setSwitchState: true. self assert: testSwitch isOn. self assert: testSwitch color = testSwitch onColor.!
Item was changed: + ----- Method: StickynessBugz>>testForTiltedStickyness (in category 'tests') ----- - ----- Method: StickynessBugz>>testForTiltedStickyness (in category 'as yet unclassified') ----- testForTiltedStickyness "self new testForTiltedStickyness" "self run: #testForTiltedStickyness"
| m | m := RectangleMorph new openCenteredInWorld .
cases := Array with: m . "save for tear down."
self assert: ( m topRendererOrSelf isSticky not ) .
m beSticky .
self assert: ( m topRendererOrSelf isSticky ) .
m addFlexShell .
cases := Array with: m topRendererOrSelf .
m topRendererOrSelf rotationDegrees: 45.0 .
self assert: ( m topRendererOrSelf isSticky ) .
m beUnsticky .
self assert: ( m topRendererOrSelf isSticky not ) .
m topRendererOrSelf delete. ^true
!
Item was changed: + ----- Method: TestInWorldMorph>>initialize (in category 'initialization') ----- - ----- Method: TestInWorldMorph>>initialize (in category 'as yet unclassified') ----- initialize super initialize. outOfWorldCount := intoWorldCount := 0.!
Item was changed: + ----- Method: TestInWorldMorph>>intoWorld: (in category 'accessing') ----- - ----- Method: TestInWorldMorph>>intoWorld: (in category 'as yet unclassified') ----- intoWorld: aWorld aWorld ifNil:[^self]. super intoWorld: aWorld. intoWorldCount := intoWorldCount + 1. !
Item was changed: + ----- Method: TestInWorldMorph>>intoWorldCount (in category 'accessing') ----- - ----- Method: TestInWorldMorph>>intoWorldCount (in category 'as yet unclassified') ----- intoWorldCount ^intoWorldCount!
Item was changed: + ----- Method: TestInWorldMorph>>outOfWorld: (in category 'accessing') ----- - ----- Method: TestInWorldMorph>>outOfWorld: (in category 'as yet unclassified') ----- outOfWorld: aWorld aWorld ifNil:[^self]. super outOfWorld: aWorld. outOfWorldCount := outOfWorldCount + 1. !
Item was changed: + ----- Method: TestInWorldMorph>>outOfWorldCount (in category 'accessing') ----- - ----- Method: TestInWorldMorph>>outOfWorldCount (in category 'as yet unclassified') ----- outOfWorldCount ^outOfWorldCount!
Item was changed: + ----- Method: UnimplementedCallBugz>>testPolyIntersect (in category 'tests') ----- - ----- Method: UnimplementedCallBugz>>testPolyIntersect (in category 'as yet unclassified') ----- testPolyIntersect "self run: #testPolyIntersect" "This should not throw an exception." PolygonMorph initializedInstance intersects: ( Rectangle center: Display center extent: 100 asPoint ).!
packages@lists.squeakfoundation.org