[squeak-dev] The Trunk: TraitsTests-fbs.11.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 2 19:59:26 UTC 2013


Frank Shearar uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-fbs.11.mcz

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

Name: TraitsTests-fbs.11
Author: fbs
Time: 2 May 2013, 8:59:12.516 pm
UUID: 9a7215e9-a6c8-4844-8e4c-a7387e03f5a7
Ancestors: TraitsTests-ul.10

#assert:equals: is much better than #assert:

=============== Diff against TraitsTests-ul.10 ===============

Item was changed:
  ----- Method: TraitFileOutTest>>testFileOutCategory (in category 'testing') -----
  testFileOutCategory
  	"File out whole system category, delete all classes and traits and then
  	file them in again."
  
  	"self run: #testFileOutCategory"
  
- 	| |
  	SystemOrganization fileOutCategory: self categoryName.
  	SystemOrganization removeSystemCategory: self categoryName.
  	self deny: (Smalltalk globals keys includesAnyOf: #(CA CB TA TB TC TD)).
  	
  	self fileIn: self categoryName , '.st'..
  
  	self assert: (Smalltalk globals keys includesAllOf: #(CA CB TA TB TC TD)).
  
  	ta := Smalltalk at: #TA.
  	self assert: (ta isKindOf: Trait).
+ 	self assert: 'TB + TC @ {#cc->#c} - {#c}' equals: ta traitComposition asString.
- 	self assert: ta traitComposition asString = 'TB + TC @ {#cc->#c} - {#c}'.
  	self assert: (ta methodDict keys includesAllOf: #(a b cc)).
  
  	cb := Smalltalk at: #CB.
  	self assert: (cb isKindOf: Class).
+ 	self assert: 'TA' equals: cb traitComposition asString.
- 	self assert: cb traitComposition asString = 'TA'.
  	self assert: (cb methodDict keys includesAllOf: #(cb a b cc)).
  
  	"test classSide traitComposition of CB"
  
+ 	self assert: 'TA classTrait + TC' equals: cb classSide traitComposition asString.
- 	self assert: cb classSide traitComposition asString =  'TA classTrait + TC'.
  	self assert: (cb classSide methodDict keys includesAllOf: #(d c))
  !

Item was changed:
  ----- Method: TraitFileOutTest>>testFileOutTrait (in category 'testing') -----
  testFileOutTrait
  	"fileOut trait T6, remove it from system and then file it in again"
  
  	"self run: #testFileOutTrait"
  
  	| fileName |
  	self t6 compile: 'localMethod: argument ^argument'.
  	self t6 classSide compile: 'localClassSideMethod: argument ^argument'.
  	self t6 fileOut.
  	fileName := self t6 asString , '.st'.
  	self resourceClassesAndTraits remove: self t6.
  	self t6 removeFromSystem.
  	
  	self fileIn: fileName.
  
  	self assert: (Smalltalk includesKey: #T6).
  	TraitsResource current t6: (Smalltalk at: #T6).
  	self resourceClassesAndTraits add: self t6.
  	self assert: (self t6 isKindOf: Trait).
+ 	self assert: 'T1 + T2 @ {#m22Alias->#m22}' equals: self t6 traitComposition asString.
- 	self assert: self t6 traitComposition asString = 'T1 + T2 @ {#m22Alias->#m22}'.
  	self assert: (self t6 methodDict keys includesAllOf: #(
  						#localMethod:
  						#m11
  						#m12
  						#m13
  						#m21
  						#m22
  						#m22Alias
  					)).
+ 	self assert: 2 equals: self t6 classSide methodDict size.
+ 	self assert: (self t6 classSide methodDict keys includes: #localClassSideMethod:) description: 'Missing selector #localClassSideMethod:'.
+ 	self assert: (self t6 classSide methodDict keys includes: #m2ClassSide:) description: 'Missing selector #m2ClassSide:'.!
- 	self assert: self t6 classSide methodDict size = 2.
- 	self assert: (self t6 classSide methodDict keys includesAllOf: #(#localClassSideMethod: #m2ClassSide: ))!



More information about the Squeak-dev mailing list