[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[py8] 50

.
self running: 'Class instance variable names tests'
Stream allInstVarNames = #(collection position readLimit)

self running: 'Class instantiation & remotion tests'
(Object subclass: #MyTest) notNil
MyTest removeFromSystem. ^(Smalltalk includesKey: #MyTest) not
(Object subclass: #MyTest) notNil
(Object subclass: #MyTest instanceVariableNames: 'hello world') notNil
MyTest instVarNames = #(hello world)
MyTest removeFromSystem. ^(Smalltalk includesKey: #MyTest) not
(Object subclass: #MyTest) notNil
MyTest removeFromSystem. ^(Smalltalk includesKey: #MyTest) not

(Object subclass: #MyTest) notNil
MyTest superclass = Object
self running: 'Class reshape tests'
(Object subclass: #MyTest instanceVariableNames: 'hello world') notNil
MyTest instVarNames = #(hello world)

self running: 'Class reshape (pool & classVar) tests'
Smalltalk at: #Pool1 put: (PoolDictionary fromTuples: #( #(Color1 1) #(Color2 2) )). ^Pool1 size = 2
Object subclass: #MyTest instanceVariableNames: 'hello my world' classVariableNames: 'ClassVar1 ClassVar2' poolDictionaries: 'Pool1' category: #tests. ^true
MyTest category = #tests
MyTest instVarNames = #(hello my world)
MyTest classVariableNames = #(ClassVar1 ClassVar2)
MyTest poolDictionaryNames = #(Pool1)

self running: 'Class reshape (clean) tests'
Object subclass: #MyTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: #hello. ^true
MyTest category = #hello
MyTest instVarNames isEmpty
MyTest classVariableNames isEmpty
MyTest poolDictionaryNames isEmpty

self running: 'Point subclass tests'
Point subclass: #MyTest instanceVariableNames: #z category: #hello. ^true
MyTest superclass = Point
MyTest category = #hello
MyTest instVarNames = #( z )
MyTest classVariableNames isEmpty
MyTest poolDictionaryNames isEmpty
MyTest allInstVarNames = #(x y z)

MyTest removeFromSystem. ^(Smalltalk includesKey: #MyTest) not