1. Object model¶
1.1. An Object
, simply¶
"EssentialsObjectTest, protocol tests"
testInspectObject
^ self exportSlotsGraphOf: Object new
1.2. nil
, even more simpler¶
"EssentialsObjectTest, protocol tests"
testInspectNil
^ self exportSlotsGraphOf: nil
1.3. true
and false
¶
On one hand, truthness is encoded by,
"EssentialsObjectTest, protocol tests"
testInspectTrue
^ self exportSlotsGraphOf: true
On the other hand, falsehood is encoded by,
"EssentialsObjectTest, protocol tests"
testInspectFalse
^ self exportSlotsGraphOf: false
1.4. Object
class and its superclasses¶
"EssentialsObjectTest, protocol tests"
testInspectObjectModel
^ self exportSlotsGraphOf: Object
1.4.1. Trait
class¶
First introduced in [ScharliDNB03] then extended in [DNScharli+06], traits are another mechanism to define behavior. Some applications can be found in both [BScharliD03] and [CDW09], also a wiki page exists at [com].
As a real case, the class definition
ClassTestCase subclass: #CollectionRootTest
uses: TIterateTest + TEmptyTest + TSizeTest
instanceVariableNames: ''
classVariableNames: ''
package: 'Collections-Abstract-Tests-Base'
is an example of traits usage and its inspection produces