Comment #2 on issue 3666 by
[hidden email]: Ensure that
classOrTraitNamed: doesn't return globals.
http://code.google.com/p/pharo/issues/detail?id=3666Tests for System-fbs.108: ensuring that classOrTraitNamed: doesn't return
globals.
=============== Diff against Tests-ar.108 ===============
Item was added:
+ TestCase subclass: #SystemDictionaryTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-System-Support'!
Item was added:
+ ----- Method:
SystemDictionaryTest>>testClassOrTraitNamedReturnsClassForClasses (in
category 'testing - classes and traits') -----
+ testClassOrTraitNamedReturnsClassForClasses
+ self assert: Object == (Smalltalk globals
classOrTraitNamed: 'Object').
+ self assert: Object == (Smalltalk globals classOrTraitNamed:
#Object).!
Item was added:
+ ----- Method:
SystemDictionaryTest>>testClassOrTraitNamedReturnsNilForGlobals (in
category 'testing - classes and traits') -----
+ testClassOrTraitNamedReturnsNilForGlobals
+ self assert: nil = (Smalltalk globals
classOrTraitNamed: 'Undeclared').
+ self assert: nil = (Smalltalk globals classOrTraitNamed:
#Undeclared).!