[squeak-dev] The Trunk: Tests-eem.381.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Aug 9 19:49:48 UTC 2017
Eliot Miranda uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-eem.381.mcz
==================== Summary ====================
Name: Tests-eem.381
Author: eem
Time: 9 August 2017, 10:09:11.49354 am
UUID: b1c7febe-4a63-4f32-895a-e2aae2e8972c
Ancestors: Tests-dtl.380
No longer hard-code the typeOfClass for compiled code MCClassDefinitions. Instead trust the typeSymbol argument. Assumes Monticello-eem.673
=============== Diff against Tests-dtl.380 ===============
Item was changed:
----- Method: MCClassDefinitionTest>>testKindOfSubclassForCompiledBlock (in category 'testing - class type') -----
testKindOfSubclassForCompiledBlock
"CompiledCode and its subclasses are a special case."
| classDef |
"CompiledBlock should be like CompiledMethod, both now are subclassed from CompiledCode"
+ classDef := self mockClass: #CompiledBlock super: #CompiledCode.
- classDef := self mockClass: #CompiledBlock super: #CompiledCode type: #bytes.
self assert: #compiledMethod equals: classDef type.
+ self assert: CompiledBlock typeOfClass equals: classDef type!
- self assert: CompiledBlock typeOfClass equals: classDef type.
- !
Item was changed:
----- Method: MCClassDefinitionTest>>testKindOfSubclassForCompiledCode (in category 'testing - class type') -----
testKindOfSubclassForCompiledCode
"CompiledCode and its subclasses are a special case."
| classDef |
"CompiledMethod is now a subclass of CompiledCode, which is also of type #compiledMethod"
+ classDef := self mockClass: #CompiledCode super: #ByteArray.
- classDef := self mockClass: #CompiledCode super: #ByteArray type: #bytes.
self assert: #compiledMethod equals: classDef type.
+ self assert: CompiledCode typeOfClass equals: classDef type!
- self assert: CompiledCode typeOfClass equals: classDef type.
-
- !
Item was changed:
----- Method: MCClassDefinitionTest>>testKindOfSubclassForCompiledMethod (in category 'testing - class type') -----
testKindOfSubclassForCompiledMethod
"CompiledCode and its subclasses are a special case."
| classDef |
+ classDef := self mockClass: #CompiledMethod super: #CompiledCode.
- classDef := self mockClass: #CompiledMethod super: #CompiledCode type: #bytes.
self assert: #compiledMethod equals: classDef type.
+ self assert: CompiledMethod typeOfClass equals: classDef type!
- self assert: CompiledMethod typeOfClass equals: classDef type.
- !
Item was changed:
----- Method: MCClassDefinitionTest>>testKindOfSubclassForSocketAddress (in category 'testing - class type') -----
testKindOfSubclassForSocketAddress
"A subclass of ByteArray that is not treated specially"
| classDef |
+ classDef := self mockClass: #SocketAddress super: #ByteArray.
- classDef := self mockClass: #SocketAddress super: #ByteArray type: #bytes.
self assert: #bytes equals: classDef type.
+ self assert: SocketAddress typeOfClass equals: classDef type!
- self assert: SocketAddress typeOfClass equals: classDef type.
-
- !
Item was changed:
----- Method: MCTestCase>>mockClass:super: (in category 'mocks') -----
mockClass: className super: superclassName
+ ^ MCClassDefinition
+ name: className
+ superclassName: superclassName
+ category: self mockCategoryName
+ instVarNames: #()
+ classVarNames: #()
+ poolDictionaryNames: #()
+ classInstVarNames: #()
+ type: ((Smalltalk classNamed: className asSymbol)
+ ifNil: [#normal]
+ ifNotNil: [:class| class typeOfClass])
+ comment: (self commentForClass: className)
+ commentStamp: (self commentStampForClass: className)!
- ^ self mockClass: className super: superclassName type: #normal
- !
Item was removed:
- ----- Method: MCTestCase>>mockClass:super:type: (in category 'mocks') -----
- mockClass: className super: superclassName type: typeSymbol
- ^ MCClassDefinition
- name: className
- superclassName: superclassName
- category: self mockCategoryName
- instVarNames: #()
- classVarNames: #()
- poolDictionaryNames: #()
- classInstVarNames: #()
- type: typeSymbol
- comment: (self commentForClass: className)
- commentStamp: (self commentStampForClass: className)!
More information about the Squeak-dev
mailing list
|