Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jr.436.mcz==================== Summary ====================
Name: Tests-jr.436
Author: jr
Time: 28 June 2020, 10:18:05.236052 pm
UUID: 049894aa-5f79-a44d-a2c0-ee65887af7ac
Ancestors: Tests-mt.435
Test class definition reading
testClassDefinitionFromPseudoClass exposes the traitComposition bug triggered by Collections-ul.900. Monticello-jr.726 is supposed to fix this bug.
=============== Diff against Tests-mt.435 ===============
Item was added:
+ ----- Method: MCStReaderTest>>testClassDefinition (in category 'tests') -----
+ testClassDefinition
+ | reader definition |
+ reader := MCStReader on: 'Object subclass: #NewClass
+ instanceVariableNames: ''instVar1 instVar2''
+ classVariableNames: ''ClassVar1 ClassVar2''
+ poolDictionaries: ''Pool1 Pool2''
+ category: ''NewCategory''!!' readStream.
+ definition := reader definitions first.
+ self assert: definition isClassDefinition;
+ assert: #NewClass equals: definition className;
+ assert: #(instVar1 instVar2) equals: definition instVarNames asArray;
+ assert: #(ClassVar1 ClassVar2) equals: definition classVarNames asArray;
+ assert: #(Pool1 Pool2) equals: definition poolDictionaries asArray;
+ assert: 'NewCategory' equals: definition category;
+ assert: '{}' equals: definition traitCompositionString;
+ assert: '{}' equals: definition classTraitCompositionString.!
Item was added:
+ ----- Method: MCStReaderTest>>testClassDefinitionFromPseudoClass (in category 'tests') -----
+ testClassDefinitionFromPseudoClass
+ | reader pseudoClass definition |
+ reader := MCStReader new.
+ pseudoClass := PseudoClass new
+ name: #NewClass;
+ definition: 'Object subclass: #NewClass
+ instanceVariableNames: ''instVar1 instVar2''
+ classVariableNames: ''ClassVar1 ClassVar2''
+ poolDictionaries: ''Pool1 Pool2''
+ category: ''NewCategory''';
+ yourself.
+ definition := reader classDefinitionFrom: pseudoClass.
+ self assert: definition isClassDefinition;
+ assert: #NewClass equals: definition className;
+ assert: #(instVar1 instVar2) equals: definition instVarNames asArray;
+ assert: #(ClassVar1 ClassVar2) equals: definition classVarNames asArray;
+ assert: #(Pool1 Pool2) equals: definition poolDictionaries asArray;
+ assert: 'NewCategory' equals: definition category;
+ assert: '{}' equals: definition traitCompositionString;
+ assert: '{}' equals: definition classTraitCompositionString.!