[Pkg] The Trunk: Tests-bf.152.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 4 15:27:12 UTC 2012

Bert Freudenberg uploaded a new version of Tests to project The Trunk:

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

Name: Tests-bf.152
Author: bf
Time: 4 May 2012, 5:26:53.469 pm
UUID: b395ab5c-75ae-4088-9a0a-8919546aa8da
Ancestors: Tests-eem.151

Fix MC override tests: you cannot override a method in your own package

=============== Diff against Tests-eem.151 ===============

Item was changed:
  ----- Method: MCMethodDefinitionTest>>testRevertOldMethod (in category 'testing') -----
  	| definition changeRecord |
+ 	Object compile: 'yourself ^ self' classified: self mockOverrideMethodCategory.
- 	Object compile: 'yourself ^ self' classified: MCMockPackageInfo new methodCategoryPrefix.
  	definition := (MethodReference class: Object selector: #yourself) asMethodDefinition.
+ 	changeRecord := definition scanForPreviousVersions first.
- 	changeRecord := definition scanForPreviousVersion.
  	self assert: changeRecord notNil.
  	self assert: changeRecord category = 'accessing'.
  	changeRecord fileIn.!

Item was changed:
  ----- Method: MCMethodDefinitionTest>>testRevertOverrideMethod (in category 'testing') -----
  	| definition |
+ 	self class compile: 'override ^ 2' classified:  '*foobarbaz-override'.
- 	self class compile: 'override ^ 2' classified: self mockOverrideMethodCategory.
  	definition := (MethodReference class: self class selector: #override) asMethodDefinition.
  	self assert: definition isOverrideMethod.
  	self assert: self override = 2.
  	definition unload.
  	self assert: self override = 1.
  	self assert: (MethodReference class: self class selector: #override) category = 'mocks'.

More information about the Packages mailing list