[squeak-dev] The Trunk: Tests-nice.128.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 8 11:56:00 UTC 2011
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.128.mcz
==================== Summary ====================
Name: Tests-nice.128
Author: nice
Time: 8 May 2011, 1:55:41.538 pm
UUID: e50c57ae-b633-4433-b76d-902f61cb4b7b
Ancestors: Tests-ul.127
minor refactorings: use #anySatisfy: #allSatisfy: #noneSatisfy: where it simplifies
=============== Diff against Tests-ul.127 ===============
Item was changed:
----- Method: MCSnapshotBrowserTest>>assertAListIncludes: (in category 'asserting') -----
assertAListIncludes: anArrayOfStrings
+ self assert: (self listMorphs
+ anySatisfy: [:m | m getList includesAllOf: anArrayOfStrings]).!
- self listMorphs
- detect: [:m | m getList includesAllOf: anArrayOfStrings]
- ifNone: [self assert: false].!
Item was changed:
----- Method: MCSnapshotBrowserTest>>assertAListMatches: (in category 'asserting') -----
assertAListMatches: strings
| listMorphs |
listMorphs := self listMorphs.
+ self assert: (listMorphs
+ anySatisfy: [:m | | list |
+ list := m getList. (list size = strings size) and: [list includesAllOf: strings]])!
- listMorphs
- detect: [:m | | list |
- list := m getList. (list size = strings size) and: [list includesAllOf: strings]]
- ifNone: [self assert: false].!
Item was changed:
----- Method: MCSnapshotBrowserTest>>assertButtonExists: (in category 'asserting') -----
assertButtonExists: aString
+ self assert: (self buttonMorphs anySatisfy: [:m | m label = aString])!
- self buttonMorphs detect: [:m | m label = aString] ifNone: [self assert: false].
- !
Item was changed:
----- Method: MCSnapshotBrowserTest>>denyAListHasSelection: (in category 'asserting') -----
denyAListHasSelection: aString
+ self deny: (self listMorphs
+ anySatisfy: [:m | m selection = aString])!
- | found |
- found := true.
- self listMorphs
- detect: [:m | m selection = aString]
- ifNone: [found := false].
- self deny: found.!
Item was changed:
----- Method: MCSnapshotBrowserTest>>denyAListIncludesAnyOf: (in category 'asserting') -----
denyAListIncludesAnyOf: anArrayOfStrings
+ self deny: (self listMorphs
+ anySatisfy: [:m | m getList includesAnyOf: anArrayOfStrings])!
- | found |
- found := true.
- self listMorphs
- detect: [:m | m getList includesAnyOf: anArrayOfStrings]
- ifNone: [found := false].
- self deny: found.!
More information about the Squeak-dev
mailing list
|