[Pkg] The Trunk: ToolsTests-fbs.66.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 29 21:24:02 UTC 2013


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

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

Name: ToolsTests-fbs.66
Author: fbs
Time: 29 June 2013, 10:23:54.003 pm
UUID: ec13d0c3-3b9c-4e40-bfcd-d1c92fb47fd1
Ancestors: ToolsTests-fbs.65

MethodReferenceTest belongs with the other System-Support tests.

=============== Diff against ToolsTests-fbs.65 ===============

Item was removed:
- ClassTestCase subclass: #MethodReferenceTest
- 	instanceVariableNames: 'env'
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'ToolsTests-Browser'!

Item was removed:
- ----- Method: MethodReferenceTest>>createClass: (in category 'private') -----
- createClass: aSymbol
- 	| builder |
- 	builder := ClassBuilder new.
- 	^ builder
- 		name: aSymbol
- 		inEnvironment: env
- 		subclassOf: Object
- 		type: #normal
- 		instanceVariableNames: ''
- 		classVariableNames: ''
- 		poolDictionaries: ''
- 		category: 'Test'.!

Item was removed:
- ----- Method: MethodReferenceTest>>setUp (in category 'running') -----
- setUp
- 	| g p |
- 	env := Environment named: 'test'.
- 	g := self createClass: #Griffle.
- 	p := self createClass: #Plonk.
- 	g compile: 'foo ^ 1'.
- 	g organization classify: #foo under: #accessing.
- 	g class compile: 'classFoo ^ 1'.
- 	g compile: 'bar ^ 1'.
- 	p compile: 'foo ^ 2'.
- 	self createClass: #Unused.!

Item was removed:
- ----- Method: MethodReferenceTest>>testActualClassIsScopedToEnvironment (in category 'tests') -----
- testActualClassIsScopedToEnvironment
- 	| mref |
- 	mref := MethodReference class: (env at: #Griffle) selector: #foo environment: env.
- 	self assert: (env at: #Griffle) equals: mref actualClass.!

Item was removed:
- ----- Method: MethodReferenceTest>>testCanReferToMethodInSpecificEnvironment (in category 'tests') -----
- testCanReferToMethodInSpecificEnvironment
- 	| mref |
- 	mref := MethodReference class: self class selector: #testReferencedEnvironmentDefaultsToSmalltalkGlobals environment: env.
- 	self assert: env equals: mref environment.!

Item was removed:
- ----- Method: MethodReferenceTest>>testCategory (in category 'tests') -----
- testCategory
- 	| mref |
- 	mref := MethodReference class: (env at: #Griffle) selector: #foo environment: env.
- 	self assert: #accessing equals: mref category.!

Item was removed:
- ----- Method: MethodReferenceTest>>testEquals (in category 'Running') -----
- testEquals
- 	| aMethodReference anotherMethodReference |
- 	aMethodReference := MethodReference new.
- 	anotherMethodReference := MethodReference new.
- 	"Two fresh instances should be equals between them"
- 	self assert: MethodReference new equals: MethodReference new.
- 	self assert: MethodReference new hash equals: MethodReference new hash.
- 
- 	"Two instances representing the same method (same class and  
- 	same selector) should be equals"
- 	self assert: (MethodReference class: String selector: #foo) equals: (MethodReference class: String selector: #foo).
- 	self assert: (MethodReference class: String selector: #foo) hash equals: (MethodReference class: String selector: #foo) hash.!

Item was removed:
- ----- Method: MethodReferenceTest>>testNotEquals (in category 'Running') -----
- testNotEquals
- 	self
- 		deny: (MethodReference class: String selector: #foo) = (MethodReference class: String class selector: #foo)
- 		description: 'Different classes, same selector -> no more equals'.
- 	self
- 		deny: (MethodReference class: String selector: #foo) = (MethodReference class: String selector: #bar)
- 		description: 'Same class, different selectors -> no more equals'.!

Item was removed:
- ----- Method: MethodReferenceTest>>testReferencedEnvironmentDefaultsToSmalltalkGlobals (in category 'tests') -----
- testReferencedEnvironmentDefaultsToSmalltalkGlobals
- 	| mref |
- 	mref := MethodReference class: self class selector: #testReferencedEnvironmentDefaultsToSmalltalkGlobals.
- 	self assert: Smalltalk globals equals: mref environment.!



More information about the Packages mailing list