[squeak-dev] The Trunk: Tests-fbs.212.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed May 8 11:45:43 UTC 2013
Frank Shearar uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-fbs.212.mcz
==================== Summary ====================
Name: Tests-fbs.212
Author: fbs
Time: 8 May 2013, 12:44:37.698 pm
UUID: 9a584476-c74e-49e1-88c6-be01cfcc5742
Ancestors: Tests-fbs.211
In keeping with the naming convention, MorphicUIBugTest -> MorphicUIManagerTest.
=============== Diff against Tests-fbs.211 ===============
Item was removed:
- TestCase subclass: #MorphicUIBugTest
- instanceVariableNames: 'cases'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Tests-Bugs'!
-
- !MorphicUIBugTest commentStamp: 'wiz 1/3/2007 13:57' prior: 0!
- A MorphicUIBugTest is a class for testing the shortcomings and repairs of the MorphicUI manager.
- .
-
- Instance Variables
- cases: <aCollection>
-
- cases
- - a list of morphs that may need to be deleted during teardown.
- the tests are expected to fill this list it starts out empty by default.
-
-
- !
Item was removed:
- ----- Method: MorphicUIBugTest>>defaultTimeout (in category 'as yet unclassified') -----
- defaultTimeout
- ^ 60 "seconds"!
Item was removed:
- ----- Method: MorphicUIBugTest>>findWindowInWorldLabeled: (in category 'as yet unclassified') -----
- findWindowInWorldLabeled: aLabel
-
- ^World submorphs
- detect: [ :each |
- (each isKindOf: SystemWindow)
- and: [ each label = aLabel ] ]
- ifNone: nil.!
Item was removed:
- ----- Method: MorphicUIBugTest>>setUp (in category 'as yet unclassified') -----
- setUp
- "default. tests will add morphs to list. Teardown will delete."
-
- cases := #() .!
Item was removed:
- ----- Method: MorphicUIBugTest>>tearDown (in category 'as yet unclassified') -----
- tearDown
- "default. tests will add morphs to list. Teardown will delete."
-
- cases do: [ :each | each delete ] .!
Item was removed:
- ----- Method: MorphicUIBugTest>>testOpenWorkspace (in category 'as yet unclassified') -----
- testOpenWorkspace
- "self new testOpenWorkspace"
- "MorphicUIBugTest run: #testOpenWorkspace"
-
- | window myLabel foundWindow myModel |
- self assert: Smalltalk isMorphic.
- myLabel := 'Workspace from SUnit test' .
- foundWindow := self findWindowInWorldLabeled: myLabel .
- self assert: foundWindow isNil.
- window := UIManager default edit: '"MorphicUIBugTest run: #openWorkspaceTest"' label: myLabel.
- window := window.
- 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.
- foundWindow delete!
Item was removed:
- ----- Method: MorphicUIBugTest>>testOpenWorkspaceAns (in category 'as yet unclassified') -----
- testOpenWorkspaceAns
- "Test if method opening a workspace answers the window opened"
-
- "MorphicUIBugTest run: #testOpenWorkspaceAns"
-
-
- | window myLabel foundWindow |
-
- self assert: ( Smalltalk isMorphic ) .
-
- myLabel := 'Workspace from ', 'SUnit test' .
- foundWindow := self findWindowInWorldLabeled: myLabel .
- self assert: ( foundWindow isNil ) .
-
- window :=
- UIManager default edit: '"MorphicUIBugTest run: #openWorkspaceTest"' label: myLabel .
-
- foundWindow := self findWindowInWorldLabeled: myLabel .
-
- cases := Array with: foundWindow . "For teardown."
-
- self assert: ( window == foundWindow ) .
-
- foundWindow delete .!
Item was removed:
- ----- Method: MorphicUIBugTest>>testShowAllBinParts (in category 'as yet unclassified') -----
- testShowAllBinParts
- "self new testShowAllBinParts"
- "MorphicUIBugTest run: #testShowAllBinParts"
-
- self assert: ( Smalltalk isMorphic ) .
- self shouldnt: [cases := Array with: ObjectsTool initializedInstance showAll openCenteredInWorld ] raise: Error .
-
-
-
-
- !
Item was removed:
- ----- Method: MorphicUIBugTest>>testUIManagerNoAcceptInitially (in category 'as yet unclassified') -----
- testUIManagerNoAcceptInitially
- "Ensure that UIManager does not invoke the accept: action initially."
-
- | accepted window |
- accepted := false.
- window := UIManager default edit: Text new label: 'Test' accept: [:val| accepted := true].
- window delete.
- self deny: accepted.!
Item was added:
+ TestCase subclass: #MorphicUIManagerTest
+ instanceVariableNames: 'cases'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Bugs'!
+
+ !MorphicUIManagerTest commentStamp: 'wiz 1/3/2007 13:57' prior: 0!
+ A MorphicUIBugTest is a class for testing the shortcomings and repairs of the MorphicUI manager.
+ .
+
+ Instance Variables
+ cases: <aCollection>
+
+ cases
+ - a list of morphs that may need to be deleted during teardown.
+ the tests are expected to fill this list it starts out empty by default.
+
+
+ !
Item was added:
+ ----- Method: MorphicUIManagerTest>>defaultTimeout (in category 'as yet unclassified') -----
+ defaultTimeout
+ ^ 60 "seconds"!
Item was added:
+ ----- Method: MorphicUIManagerTest>>findWindowInWorldLabeled: (in category 'as yet unclassified') -----
+ findWindowInWorldLabeled: aLabel
+
+ ^World submorphs
+ detect: [ :each |
+ (each isKindOf: SystemWindow)
+ and: [ each label = aLabel ] ]
+ ifNone: nil.!
Item was added:
+ ----- Method: MorphicUIManagerTest>>setUp (in category 'as yet unclassified') -----
+ setUp
+ "default. tests will add morphs to list. Teardown will delete."
+
+ cases := #() .!
Item was added:
+ ----- 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 added:
+ ----- Method: MorphicUIManagerTest>>testOpenWorkspace (in category 'as yet unclassified') -----
+ testOpenWorkspace
+ "self new testOpenWorkspace"
+ "MorphicUIBugTest run: #testOpenWorkspace"
+
+ | window myLabel foundWindow myModel |
+ self assert: Smalltalk isMorphic.
+ myLabel := 'Workspace from SUnit test' .
+ foundWindow := self findWindowInWorldLabeled: myLabel .
+ self assert: foundWindow isNil.
+ window := UIManager default edit: '"MorphicUIBugTest run: #openWorkspaceTest"' label: myLabel.
+ window := window.
+ 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.
+ foundWindow delete!
Item was added:
+ ----- 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 |
+
+ self assert: ( Smalltalk isMorphic ) .
+
+ myLabel := 'Workspace from ', 'SUnit test' .
+ foundWindow := self findWindowInWorldLabeled: myLabel .
+ self assert: ( foundWindow isNil ) .
+
+ window :=
+ UIManager default edit: '"MorphicUIBugTest run: #openWorkspaceTest"' label: myLabel .
+
+ foundWindow := self findWindowInWorldLabeled: myLabel .
+
+ cases := Array with: foundWindow . "For teardown."
+
+ self assert: ( window == foundWindow ) .
+
+ foundWindow delete .!
Item was added:
+ ----- Method: MorphicUIManagerTest>>testShowAllBinParts (in category 'as yet unclassified') -----
+ testShowAllBinParts
+ "self new testShowAllBinParts"
+ "MorphicUIBugTest run: #testShowAllBinParts"
+
+ self assert: ( Smalltalk isMorphic ) .
+ self shouldnt: [cases := Array with: ObjectsTool initializedInstance showAll openCenteredInWorld ] raise: Error .
+
+
+
+
+ !
Item was added:
+ ----- 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 default edit: Text new label: 'Test' accept: [:val| accepted := true].
+ window delete.
+ self deny: accepted.!
More information about the Squeak-dev
mailing list
|