Sending perform: #== with: anObject to an instance of MCPackageInEnvironment should test identity of the actual instance, not the MCPackage to which it refers. If this is not so, a PluggableDictionary will fail when doing identity checks on its keys, as is the case for a SystemTracer adding all objects to its oop dictionary.
Add MCPackageInEnvironmentTest to document the issue.
=============== Diff against Tests-mt.394 ===============
Item was added:
+ ----- Method: MCPackageInEnvironmentTest>>testPerformIdentityEquals (in category 'testing') -----
+ "Verify that #perform:with: can be used to send #== for identity test. Required
+ for identity test in PluggableDictionary. Delegation to the MCPackage does not
+ work in that case because the package is a different object."
+ | aProtoObj |
+ aProtoObj :=MCPackageInEnvironment
+ decorating: (MCPackage new name: 'No Name Yet')
+ in: Environment default.
+ self assert: [aProtoObj == aProtoObj]
+ description: 'Direct test for identity does not invoke delegation'.
+ "Normal perform:with: delegation with any selector other than #=="
+ aProtoObj perform: #name: with: #FOO.
+ self assert: #FOO equals: aProtoObj name
+ description: 'name of the MCPackage should have been set to #FOO'.
+ "Selector #== must refer to aProtoObj, not to the MCPackage to which it delegates"
+ self assert: [aProtoObj perform: #== with: aProtoObj]
+ description: 'If aProtoObj delegates to the MCPackage the identity test will fail'.