[Pkg] The Trunk: KernelTests-mt.340.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 28 08:48:39 UTC 2018


Marcel Taeumel uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-mt.340.mcz

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

Name: KernelTests-mt.340
Author: mt
Time: 28 May 2018, 10:48:39.54437 am
UUID: f7b17ce4-7d8b-4a4d-9da9-da8b9046d970
Ancestors: KernelTests-eem.339

New test for uniclass creation. Appendix to Kernel-mt.1172

=============== Diff against KernelTests-eem.339 ===============

Item was added:
+ ----- Method: ClassBuilderTest>>testNewUniclass (in category 'testing - uniclass') -----
+ testNewUniclass
+ 
+ 	baseClass := Object subclass: self baseClassName
+ 		instanceVariableNames: ''
+ 		classVariableNames: ''
+ 		poolDictionaries: ''
+ 		category: self categoryNameForTemporaryClasses.
+ 	"Note that you have to denote a new base class to be capable of spawning uni classes. See Object class >> #isUniClass for more information."
+ 	baseClass class
+ 		compile: ('isUniClass\	^ self ~~ {1}' withCRs format: {self baseClassName})
+ 		classified: 'instance creation'.
+ 		
+ 	subClass := baseClass newSubclass.
+ 	
+ 	self
+ 		assert: subClass isUniClass;
+ 		assert: subClass environment ~~ baseClass environment;
+ 		assert: subClass category = Object categoryForUniclasses;
+ 		assert: (baseClass organization categoryOfElement: subClass name) isNil.
+ 	
+ 	self deny: subClass isObsolete.
+ 	subClass removeFromSystem.
+ 	self assert: subClass isObsolete.!



More information about the Packages mailing list