The Trunk: MorphicTests-mt.28.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-mt.28.mcz

commits-2
Marcel Taeumel uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-mt.28.mcz

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

Name: MorphicTests-mt.28
Author: mt
Time: 26 April 2015, 10:16:58.066 pm
UUID: 91d7cfe9-373c-2a4c-9269-a8871c0d1b76
Ancestors: MorphicTests-mt.27

Minor cleanup in Morphic tests:
- get custom world without creating a project
- make MorphBugs have a real test
- update UIManager to also look through hands for finding windows

=============== Diff against MorphicTests-mt.27 ===============

Item was changed:
  SystemOrganization addCategory: #'MorphicTests-Basic'!
  SystemOrganization addCategory: #'MorphicTests-Kernel'!
  SystemOrganization addCategory: #'MorphicTests-Layouts'!
- SystemOrganization addCategory: #'MorphicTests-ToolBuilder'!
  SystemOrganization addCategory: #'MorphicTests-Support'!
  SystemOrganization addCategory: #'MorphicTests-Text Support'!
+ SystemOrganization addCategory: #'MorphicTests-ToolBuilder'!
  SystemOrganization addCategory: #'MorphicTests-Widgets'!
  SystemOrganization addCategory: #'MorphicTests-Worlds'!

Item was changed:
+ MorphTest subclass: #MorphBugs
- TestCase subclass: #MorphBugs
  instanceVariableNames: ''
  classVariableNames: ''
  poolDictionaries: ''
  category: 'MorphicTests-Basic'!

Item was removed:
- ----- Method: MorphBugs>>adhereToEdgeTest (in category 'as yet unclassified') -----
- adhereToEdgeTest
- "self new adhereToEdgeTest"
- "self run: #adhereToEdgeTest"
-
- | r |
- r := RectangleMorph new openInWorld .
-
- "This should not throw an exception."
- [ r adhereToEdge: #eternity ] ensure: [ r delete ].
- r delete .
-
- ^true !

Item was added:
+ ----- Method: MorphBugs>>testAdhereToEdgeEternity (in category 'tests') -----
+ testAdhereToEdgeEternity
+
+ | r |
+ r := RectangleMorph new openInWorld: self getWorld.
+
+ self
+ shouldnt: [ r adhereToEdge: #eternity ]
+ raise: Exception.!

Item was changed:
  ----- Method: MorphTest>>getWorld (in category 'initialize-release') -----
  getWorld
+
+ ^ world ifNil: [
+ world := PasteUpMorph newWorldForProject: nil.
+ world
+ viewBox: (0@0 extent: world extent);
+ yourself]!
- ^ world
- ifNil: [world := MorphicProject new world]!

Item was changed:
  ----- Method: MorphTest>>tearDown (in category 'initialize-release') -----
  tearDown
+
+ morph delete.!
- morph delete.
- world
- ifNotNil: [Project deletingProject: world project]!

Item was changed:
  ----- 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])
-
- ^World submorphs
  detect: [ :each |
  (each isKindOf: SystemWindow)
  and: [ each label = aLabel ] ]
+ ifNone: [].!
- ifNone: nil.!