[squeak-dev] The Trunk: SystemChangeNotification-Tests-laza.18.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Dec 14 15:51:00 UTC 2011


Alexander Lazarević uploaded a new version of SystemChangeNotification-Tests to project The Trunk:
http://source.squeak.org/trunk/SystemChangeNotification-Tests-laza.18.mcz

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

Name: SystemChangeNotification-Tests-laza.18
Author: laza
Time: 14 December 2011, 4:50:49.344 pm
UUID: 3e3d2bfc-1a12-40b3-8660-24072d04e1bf
Ancestors: SystemChangeNotification-Tests-laza.16
Backported From: SystemChangeNotification-Tests-laza.17

- Added a test that checks that recategorization of a class gets recorded in the changes file
- Marked possible tests as expectedFailures
- changed the filename of the temporary changes file to some more random string than temp.changes (thanks Nicolas)

=============== Diff against SystemChangeNotification-Tests-laza.16 ===============

Item was changed:
  TestCase subclass: #SystemChangeFileTest
+ 	instanceVariableNames: 'tempChangesFile tempChangesName'
- 	instanceVariableNames: 'tempChangesFile'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'SystemChangeNotification-Tests'!

Item was added:
+ ----- Method: SystemChangeFileTest>>expectedFailures (in category 'testing') -----
+ expectedFailures
+ 	^#(
+ 		#testCategoryModified
+ 		#testClassReorganized
+ 		#testProtocolModified
+ 	)!

Item was added:
+ ----- Method: SystemChangeFileTest>>genericChangesName (in category 'private') -----
+ genericChangesName
+ 	^self prefixChangesName, self randomString, '.changes'!

Item was added:
+ ----- Method: SystemChangeFileTest>>prefixChangesName (in category 'private') -----
+ prefixChangesName
+ 	^self prefixGeneral!

Item was changed:
  ----- Method: SystemChangeFileTest>>prepare:change:verify: (in category 'testing') -----
  prepare: prepareBlock change: changeBlock verify: verifyBlock
  	"All tests follow this pattern. Beware that prepareBlock (and verifyBlock) will be evalutated twice."
  	
  	"Setup the testcourt"
  	prepareBlock value.
  	
+ 	"Embrace the changeBlock so that any change to our testcourt
+ 	will be recorded in our temporary changes file"
- 	"Embrace the changeBlock so that any changes to our testcourt
- 	gets recorded in our temporary changes file"
  	self useTemporaryChangesFile.
  	changeBlock value.
  	"Check if the changes we made worked as expected. We need to do
  	this before we switch back to the standard changes file"
  	"We raise an Error if this fails, because then the testcase is broken"
  	[verifyBlock value]
  		on: TestFailure
  		do: [self error: 'The verifyBlock needs to validate the changes made in the changeBlock'].
  	self useStandardChangesFile.
  
  	"Remove the testcourt completely"
  	self removeTestcourt.
  
  	"Setup the testcourt once again"
  	prepareBlock value.
  
  	"Replay the changes from the temporary changes file"
  	self replayChanges.
  
  	"See if we got the same changes as we did before using the changeBlock"
  	verifyBlock value.
  !

Item was changed:
  ----- Method: SystemChangeFileTest>>tempChangesName (in category 'accessing') -----
  tempChangesName
+ 	^tempChangesName ifNil: [tempChangesName := self genericChangesName]!
- 	^'temp.changes'!

Item was changed:
  ----- Method: SystemChangeFileTest>>testCategoryModified (in category 'as yet unclassified') -----
+ testCategoryModified
+ 	self assert: false description: 'When does that happen?'!
- testCategoryModified!

Item was changed:
+ ----- Method: SystemChangeFileTest>>testClassRecategorized (in category 'testing') -----
+ testClassRecategorized
+ 	| aClassName aNewClassCategory |
+ 	aClassName := self genericClassName.
+ 	aNewClassCategory := self genericClassCategory.
+ 	self
+ 		prepare: [
+ 			self createClass: aClassName.
+ 			SystemOrganization addCategory: aNewClassCategory.
+ 		]
+ 		change: [
+ 			SystemOrganization classify: aClassName under: aNewClassCategory.
+ 		]
+ 		verify: [
+ 			self assert: (SystemOrganization categoryOfElement: aClassName) = aNewClassCategory.
+ 		]
+ !
- ----- Method: SystemChangeFileTest>>testClassRecategorized (in category 'as yet unclassified') -----
- testClassRecategorized!

Item was changed:
  ----- Method: SystemChangeFileTest>>testClassReorganized (in category 'as yet unclassified') -----
+ testClassReorganized
+ 	self assert: false description: 'When does that happen?'!
- testClassReorganized!

Item was changed:
  ----- Method: SystemChangeFileTest>>testProtocolModified (in category 'as yet unclassified') -----
+ testProtocolModified
+ 	self assert: false description: 'When does that happen?'!
- testProtocolModified!




More information about the Squeak-dev mailing list