The Trunk: Tests-cwp.190.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-cwp.190.mcz

commits-2
Colin Putney uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-cwp.190.mcz

==================== Summary ====================

Name: Tests-cwp.190
Author: cwp
Time: 9 March 2013, 8:25:03.779 pm
UUID: cb59c8bb-1b81-46cd-a12c-baf9fe6baa79
Ancestors: Tests-nice.189

Added tests for renaming classes during import and export from an environment.

=============== Diff against Tests-nice.189 ===============

Item was added:
+ NamePolicyTest subclass: #AddPrefixNamePolicyTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: AddPrefixNamePolicyTest>>createPolicy (in category 'as yet unclassified') -----
+ createPolicy
+ ^ AddPrefixNamePolicy prefix: 'XX'!

Item was added:
+ ----- Method: AddPrefixNamePolicyTest>>testAddsPrefix (in category 'as yet unclassified') -----
+ testAddsPrefix
+ self assertIncludes: #Griffle as: #XXGriffle.
+ !

Item was added:
+ ----- Method: AddPrefixNamePolicyTest>>testDoesntDuplicatePrefix (in category 'as yet unclassified') -----
+ testDoesntDuplicatePrefix
+ self denyIncludes: #XXGriffle!

Item was added:
+ TestCase subclass: #AliasTest
+ instanceVariableNames: 'value'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: AliasTest>>setUp (in category 'tests') -----
+ setUp
+ value := Object new!

Item was added:
+ ----- Method: AliasTest>>testAsBindingRead (in category 'tests') -----
+ testAsBindingRead
+ | alias imported |
+ alias := (#Griffle -> value) asBinding: #Plonk.
+ imported := alias asBinding: #Nurp.
+ self assert: imported key = #Nurp.
+ self assert: imported value == value!

Item was added:
+ ----- Method: AliasTest>>testAsBindingWrite (in category 'tests') -----
+ testAsBindingWrite
+ | alias imported global |
+ global := Association key: #Griffle value: Object new.
+ alias := global asBinding: #Plonk.
+ imported := alias asBinding: #Nurp.
+ imported value: value.
+ self assert: global value == value!

Item was added:
+ ----- Method: AliasTest>>testCanAssign (in category 'tests') -----
+ testCanAssign
+ | alias |
+ alias := Alias key: #Plonk source: #Giffle -> value.
+ self assert: alias canAssign!

Item was added:
+ ----- Method: AliasTest>>testIsSpecialRead (in category 'tests') -----
+ testIsSpecialRead
+ | alias |
+ alias := Alias key: #Plonk source: #Griffle -> value.
+ self assert: alias isSpecialReadBinding!

Item was added:
+ ----- Method: AliasTest>>testIsSpecialWrite (in category 'tests') -----
+ testIsSpecialWrite
+ | alias |
+ alias := Alias key: #Plonk source: #Griffle -> value.
+ self assert: alias isSpecialWriteBinding!

Item was added:
+ ----- Method: AliasTest>>testRead (in category 'tests') -----
+ testRead
+ | alias global |
+ global := #Giffle -> value.
+ alias := Alias key: #Plonk source: global.
+ self assert: alias key == #Plonk.
+ self assert: alias value == value.!

Item was added:
+ ----- Method: AliasTest>>testWrite (in category 'tests') -----
+ testWrite
+ | alias global |
+ global := #Giffle -> Object new.
+ alias := Alias key: #Plonk source: global.
+ alias value: value.
+ self assert: global value == value.
+ self assert: alias value == value.!

Item was added:
+ NamePolicyTest subclass: #AllNamePolicyTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: AllNamePolicyTest>>createPolicy (in category 'running') -----
+ createPolicy
+ ^ AllNamePolicy new!

Item was added:
+ ----- Method: AllNamePolicyTest>>testPassesName (in category 'tests') -----
+ testPassesName
+ self assertIncludes: #Griffle !

Item was added:
+ TestCase subclass: #BindingPolicyTest
+ instanceVariableNames: 'namespace policy value'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: BindingPolicyTest class>>isAbstract (in category 'as yet unclassified') -----
+ isAbstract
+ ^ self name = #BindingPolicyTest!

Item was added:
+ ----- Method: BindingPolicyTest>>setUp (in category 'as yet unclassified') -----
+ setUp
+ namespace := IdentityDictionary new.
+ value := Object new!

Item was added:
+ TestCase subclass: #BindingTest
+ instanceVariableNames: 'key value'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: BindingTest>>setUp (in category 'as yet unclassified') -----
+ setUp
+ key := Object new.
+ value := Object new.!

Item was added:
+ ----- Method: BindingTest>>testAsBindingRead (in category 'as yet unclassified') -----
+ testAsBindingRead
+ | binding imported |
+ binding := Binding key: #Griffle value: value.
+ imported := binding asBinding: #Plonk.
+ self assert: imported key = #Plonk.
+ self assert: imported value == value.!

Item was added:
+ ----- Method: BindingTest>>testCanAssign (in category 'as yet unclassified') -----
+ testCanAssign
+ | binding |
+ binding := Binding key: key value: value.
+ self deny: binding canAssign!

Item was added:
+ ----- Method: BindingTest>>testIsSpecialRead (in category 'as yet unclassified') -----
+ testIsSpecialRead
+ | binding |
+ binding := Binding key: key value: value.
+ self deny: binding isSpecialReadBinding!

Item was added:
+ ----- Method: BindingTest>>testIsSpecialWrite (in category 'as yet unclassified') -----
+ testIsSpecialWrite
+ | binding |
+ binding := Binding key: key value: value.
+ self assert: binding isSpecialWriteBinding!

Item was added:
+ ----- Method: BindingTest>>testRead (in category 'as yet unclassified') -----
+ testRead
+ | binding |
+ binding := Binding key: key value: value.
+ self assert: binding key == key.
+ self assert: binding value == value!

Item was added:
+ ----- Method: BindingTest>>testResumeExceptionToWrite (in category 'as yet unclassified') -----
+ testResumeExceptionToWrite
+ | binding |
+ binding := Binding key: key value: Object new.
+ [binding value: value]
+ on: AttemptToWriteReadOnlyGlobal
+ do: [:ex | ex resume: true].
+ self assert: binding value == value!

Item was added:
+ ----- Method: BindingTest>>testWriteRaisesException (in category 'as yet unclassified') -----
+ testWriteRaisesException
+ | binding |
+ binding := Binding key: key value: value.
+ self
+ should: [binding value: Object new]
+ raise: AttemptToWriteReadOnlyGlobal.!

Item was added:
+ ----- Method: EnvironmentTest>>assertExports:value: (in category 'export tests') -----
+ assertExports: aSymbol value: v2
+ self assert: (env public includesKey: aSymbol).
+ self assert: (env public at: aSymbol) == v2!

Item was removed:
- ----- Method: EnvironmentTest>>disabledTestInternalVisibility (in category 'compiling tests') -----
- disabledTestInternalVisibility
- | griffle plonk |
- self createClass: #Griffle.
- self createClass: #Plonk.
- griffle := env at: #Griffle.
- griffle compile: 'plonk ^ Plonk'.
- plonk := griffle new plonk.
- self assert: (env at: #Plonk) == plonk!

Item was changed:
  ----- Method: EnvironmentTest>>setUp (in category 'running') -----
  setUp
+ env := Environment withName: 'test'.
- env := Environment name: 'test'.
  value := Object new.!

Item was changed:
  ----- Method: EnvironmentTest>>testAtDoesntFindUndeclared (in category 'binding tests') -----
  testAtDoesntFindUndeclared
+ env := Environment withName: #Test.
- env := Environment new.
  env bindingOf: #Griffle.
  self should: [ env at: #Griffle ] raise: KeyNotFound!

Item was added:
+ ----- Method: EnvironmentTest>>testExclusiveExplicitExport (in category 'export tests') -----
+ testExclusiveExplicitExport
+ env export: #Plonk.
+ env at: #Griffle put: Object new.
+ self assert: env public isEmpty!

Item was added:
+ ----- Method: EnvironmentTest>>testExclusiveMultiExplicitExport (in category 'export tests') -----
+ testExclusiveMultiExplicitExport
+ env export: #(Plonk #Griffle).
+ env at: #Nurp put: Object new.
+ self assert: env public isEmpty!

Item was changed:
  ----- Method: EnvironmentTest>>testExplicitExport (in category 'export tests') -----
  testExplicitExport
- env requireExplicitExports.
- env at: #Griffle put: value.
  env export: #Griffle.
+ env at: #Griffle put: value.
+ self assertExports: #Griffle value: value!
- self assert: (env exports at: #Griffle) == value!

Item was added:
+ ----- Method: EnvironmentTest>>testExportAddPrefix (in category 'export tests') -----
+ testExportAddPrefix
+ env exportAddingPrefix: 'XX'.
+ env at: #Griffle put: value.
+ self assertExports: #XXGriffle value: value!

Item was added:
+ ----- Method: EnvironmentTest>>testExportAddingPrefixPublicizesExistingValue (in category 'export tests') -----
+ testExportAddingPrefixPublicizesExistingValue
+ env at: #Griffle put: value.
+ env exportAddingPrefix: 'XX'.
+ self assertExports: #XXGriffle value: value!

Item was added:
+ ----- Method: EnvironmentTest>>testExportPublicizesExistingValue (in category 'export tests') -----
+ testExportPublicizesExistingValue
+ env at: #Griffle put: value.
+ env export: #Griffle.
+ self assertExports: #Griffle value: value!

Item was added:
+ ----- Method: EnvironmentTest>>testExportRemovingPrefix (in category 'export tests') -----
+ testExportRemovingPrefix
+ env exportRemovingPrefix: 'XX'.
+ env at: #XXGriffle put: value.
+ self assertExports: #Griffle value: value!

Item was added:
+ ----- Method: EnvironmentTest>>testExportRemovingPrefixPublicizesExistingValue (in category 'export tests') -----
+ testExportRemovingPrefixPublicizesExistingValue
+ env at: #XXGriffle put: value.
+ env exportRemovingPrefix: 'XX'.
+ self assertExports: #Griffle value: value!

Item was added:
+ ----- Method: EnvironmentTest>>testExportSelfPublicizesExistingValue (in category 'export tests') -----
+ testExportSelfPublicizesExistingValue
+ env at: #Griffle put: value.
+ env exportSelf.
+ self assertExports: #Griffle value: value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportAddingPrefix (in category 'import tests') -----
+ testImportAddingPrefix
+ | foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: value.
+ env import: foreign addingPrefix: 'XX'.
+ self assert: (env bindingOf: #XXGriffle) value == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportAddingPrefixResolvesUndeclared (in category 'import tests') -----
+ testImportAddingPrefixResolvesUndeclared
+ | binding foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: value.
+ env undeclared at: #XXGriffle put: nil.
+ binding := env undeclared associationAt: #XXGriffle.
+ env import: foreign addingPrefix: 'XX'.
+ self assert: (env bindingOf: #XXGriffle) == binding.
+ self assert: (env valueOf: #XXGriffle) == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportAlias (in category 'import tests') -----
+ testImportAlias
+ | foreign binding |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: value.
+ env from: foreign import: #Plonk -> #Griffle.
+ binding := env bindingOf: #Plonk.
+ self assert: binding key = #Plonk.
+ self assert: binding value == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportAliases (in category 'import tests') -----
+ testImportAliases
+ | foreign v2 v3 |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: value.
+ foreign at: #Nurp put: (v2 := Object new).
+ foreign at: #Ziffy put: (v3 := Object new).
+ env from: foreign import: {#Plonk -> #Nurp. #Wiffy -> #Ziffy}.
+ self assert: (env bindingOf: #Griffle) isNil.
+ self assert: (env bindingOf: #Plonk) value == v2.
+ self assert: (env bindingOf: #Wiffy) value == v3!

Item was changed:
+ ----- Method: EnvironmentTest>>testImportFromOther (in category 'import tests') -----
- ----- Method: EnvironmentTest>>testImportFromOther (in category 'export tests') -----
  testImportFromOther
  | foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
- foreign := Environment new.
  foreign at: #Griffle put: value.
+ env import: foreign.
- env importEnvironment: foreign.
  self assert: (env bindingOf: #Griffle) value == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportOne (in category 'import tests') -----
+ testImportOne
+ | foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: value.
+ env from: foreign import: #Griffle.
+ self assert: (env bindingOf: #Griffle) value == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportRemovingPrefix (in category 'import tests') -----
+ testImportRemovingPrefix
+ | foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #XXGriffle put: value.
+ env import: foreign removingPrefix: 'XX'.
+ self assert: (env bindingOf: #Griffle) value == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportRemovingPrefixResolvesUndeclared (in category 'import tests') -----
+ testImportRemovingPrefixResolvesUndeclared
+ | binding foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #XXGriffle put: value.
+ env undeclared at: #Griffle put: nil.
+ binding := env undeclared associationAt: #Griffle.
+ env import: foreign removingPrefix: 'XX'.
+ self assert: (env bindingOf: #Griffle) == binding.
+ self assert: (env valueOf: #Griffle) == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportResolvesUndeclared (in category 'import tests') -----
+ testImportResolvesUndeclared
+ | binding foreign |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: value.
+ env undeclared at: #Griffle put: nil.
+ binding := env undeclared associationAt: #Griffle.
+ env import: foreign.
+ self assert: (env bindingOf: #Griffle) == binding.
+ self assert: (env valueOf: #Griffle) == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportSelfResolvesUndeclared (in category 'import tests') -----
+ testImportSelfResolvesUndeclared
+ | binding |
+ env undeclared at: #Griffle put: nil.
+ binding := env undeclared associationAt: #Griffle.
+ env at: #Griffle put: value.
+ env importSelf.
+ self assert: (env bindingOf: #Griffle) == binding.
+ self assert: (env valueOf: #Griffle) == value!

Item was added:
+ ----- Method: EnvironmentTest>>testImportWritable (in category 'import tests') -----
+ testImportWritable
+ | foreign binding |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign at: #Griffle put: 'v1'.
+ env from: foreign import: #Plonk -> #Griffle.
+ binding := env bindingOf: #Plonk.
+ binding value: 'v2'.
+ self assert: (foreign bindingOf: #Griffle) value == 'v2' !

Item was added:
+ ----- Method: EnvironmentTest>>testInternalVisibility (in category 'compiling tests') -----
+ testInternalVisibility
+ | griffle plonk |
+ self createClass: #Griffle.
+ self createClass: #Plonk.
+ griffle := env at: #Griffle.
+ griffle compile: 'plonk ^ Plonk'.
+ plonk := griffle new plonk.
+ self assert: (env at: #Plonk) == plonk!

Item was added:
+ ----- Method: EnvironmentTest>>testMultiExplicitExport (in category 'export tests') -----
+ testMultiExplicitExport
+ | v2 |
+ env export: #(#Griffle #Plonk).
+ env at: #Griffle put: value.
+ env at: #Plonk put: (v2 := Object new).
+ self assertExports: #Griffle value: value.
+ self assertExports: #Plonk value: v2!

Item was added:
+ ----- Method: EnvironmentTest>>testMultiExportPublicizesExistingValue (in category 'export tests') -----
+ testMultiExportPublicizesExistingValue
+ | v2 |
+ env at: #Griffle put: value.
+ env at: #Plonk put: (v2 := Object new).
+ env export: #(Griffle Plonk).
+ self assertExports: #Griffle value: value.
+ self assertExports: #Plonk value: v2.!

Item was removed:
- ----- Method: EnvironmentTest>>testRequireExplicitExportIdempotency (in category 'export tests') -----
- testRequireExplicitExportIdempotency
- env requireExplicitExports.
- env at: #Griffle put: value.
- env export: #Griffle.
- env requireExplicitExports.
- self assert: (env exports includesKey: #Griffle)!

Item was changed:
  ----- Method: EnvironmentTest>>testRequireExplicitExports (in category 'export tests') -----
  testRequireExplicitExports
- env requireExplicitExports.
  env at: #Griffle put: Object new.
+ self assert: env public isEmpty!
- self assert: env exports isEmpty!

Item was changed:
  ----- Method: EnvironmentTest>>testWriteAndLookup (in category 'binding tests') -----
  testWriteAndLookup
  | assoc |
  env at: #Griffle put: value.
  assoc := env bindingOf: #Griffle.
  self assert: assoc key == #Griffle.
  self assert: assoc value == value.
  !

Item was added:
+ NamePolicyTest subclass: #ExplicitNamePolicyTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>createPolicy (in category 'running') -----
+ createPolicy
+ ^ ExplicitNamePolicy spec: #Griffle -> #Plonk!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testAssociationSpec (in category 'tests') -----
+ testAssociationSpec
+ policy := ExplicitNamePolicy spec: #Griffle -> #Plonk.
+ self assertIncludes: #Griffle as: #Plonk!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testDictionarySpec (in category 'tests') -----
+ testDictionarySpec
+ | aliases |
+ aliases := IdentityDictionary new
+ at: #Griffle put: #Plonk;
+ yourself.
+ policy := ExplicitNamePolicy spec: aliases.
+ self assertIncludes: #Griffle as: #Plonk!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testDoesntIncludeOriginal (in category 'tests') -----
+ testDoesntIncludeOriginal
+ self denyIncludes: #Plonk !

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testDoesntIncludeOther (in category 'tests') -----
+ testDoesntIncludeOther
+ self denyIncludes: #Nurp !

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testMixedSpec (in category 'tests') -----
+ testMixedSpec
+ policy := ExplicitNamePolicy spec: {#Nurp. #Griffle->#Plonk. #(Ziffy)}.
+ self assertIncludes: #Griffle as: #Plonk.
+ self assertIncludes: #Nurp.
+ self assertIncludes: #Ziffy.!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testPolicySpec (in category 'tests') -----
+ testPolicySpec
+ | again |
+ policy := ExplicitNamePolicy spec: #Griffle.
+ again := ExplicitNamePolicy spec: policy.
+ self assert: policy == again!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testSymbolSpec (in category 'tests') -----
+ testSymbolSpec
+ policy := ExplicitNamePolicy spec: #Griffle.
+ self assertIncludes: #Griffle!

Item was added:
+ ----- Method: ExplicitNamePolicyTest>>testTransformsName (in category 'tests') -----
+ testTransformsName
+ self assertIncludes: #Griffle as: #Plonk.!

Item was added:
+ BindingPolicyTest subclass: #ExportTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: ExportTest>>policyClass (in category 'as yet unclassified') -----
+ policyClass
+ ^ Export!

Item was added:
+ ----- Method: ExportTest>>testExportAll (in category 'as yet unclassified') -----
+ testExportAll
+ policy := Export namespace: namespace.
+ policy bind: #Griffle to: value.
+ self assert: (namespace at: #Griffle) == value!

Item was added:
+ ----- Method: ExportTest>>testExported (in category 'as yet unclassified') -----
+ testExported
+ policy := Export namespace: namespace policy: (ExplicitNamePolicy spec: #(Griffle)).
+ policy bind: #Griffle to: value.
+ self assert: (namespace at: #Griffle) == value!

Item was added:
+ ----- Method: ExportTest>>testNotExported (in category 'as yet unclassified') -----
+ testNotExported
+ policy := Export namespace: namespace policy: (ExplicitNamePolicy spec: #Nurp).
+ policy bind: #Griffle to: value.
+ self assert: namespace isEmpty!

Item was added:
+ ----- Method: ExportTest>>testStackedExports (in category 'as yet unclassified') -----
+ testStackedExports
+ | griffle plonk |
+ griffle := Export
+ namespace: namespace
+ policy: (ExplicitNamePolicy spec: #Griffle).
+ plonk := Export
+ namespace: namespace
+ policy: (ExplicitNamePolicy spec: #Plonk)
+ next: griffle.
+ plonk bind: #Griffle to: value.
+ self assert: (namespace at: #Griffle) == value!

Item was added:
+ TestCase subclass: #GlobalTest
+ instanceVariableNames: 'key value'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: GlobalTest>>setUp (in category 'as yet unclassified') -----
+ setUp
+ key := Object new.
+ value := Object new.
+ !

Item was added:
+ ----- Method: GlobalTest>>testAsBindingRead (in category 'as yet unclassified') -----
+ testAsBindingRead
+ | global imported |
+ global := Association key: key value: value.
+ imported := global asBinding: #Griffle.
+ self assert: imported key = #Griffle.
+ self assert: imported value == value.
+ !

Item was added:
+ ----- Method: GlobalTest>>testAsBindingWrite (in category 'as yet unclassified') -----
+ testAsBindingWrite
+ | global imported |
+ global := Association key: key value: Object new.
+ imported := global asBinding: #Griffle.
+ imported value: value.
+ self assert: imported value == value.
+ !

Item was added:
+ ----- Method: GlobalTest>>testCanAssign (in category 'as yet unclassified') -----
+ testCanAssign
+ | global |
+ global := Association key: key value: value.
+ self assert: global canAssign!

Item was added:
+ ----- Method: GlobalTest>>testIsSpecialRead (in category 'as yet unclassified') -----
+ testIsSpecialRead
+ | global |
+ global := Association key: key value: value.
+ self deny: global isSpecialReadBinding!

Item was added:
+ ----- Method: GlobalTest>>testIsSpecialWrite (in category 'as yet unclassified') -----
+ testIsSpecialWrite
+ | global |
+ global := Association key: key value: value.
+ self deny: global isSpecialWriteBinding!

Item was added:
+ ----- Method: GlobalTest>>testRead (in category 'as yet unclassified') -----
+ testRead
+ | global |
+ global := Association key: key value: value.
+ self assert: global key == key.
+ self assert: global value == value.!

Item was added:
+ ----- Method: GlobalTest>>testWrite (in category 'as yet unclassified') -----
+ testWrite
+ | global |
+ global := Association key: key value: Object new.
+ global value: value.
+ self assert: global value == value!

Item was added:
+ BindingPolicyTest subclass: #ImportTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: ImportTest>>policyClass (in category 'as yet unclassified') -----
+ policyClass
+ ^ Import!

Item was added:
+ ----- Method: ImportTest>>testImportAll (in category 'as yet unclassified') -----
+ testImportAll
+ | binding |
+ policy := Import namespace: namespace.
+ namespace at: #Griffle put: value.
+ binding := policy bindingOf: #Griffle.
+ self assert: binding value == value!

Item was added:
+ ----- Method: ImportTest>>testImported (in category 'as yet unclassified') -----
+ testImported
+ | binding |
+ policy := Import namespace: namespace policy: (ExplicitNamePolicy spec: #Griffle).
+ namespace at: #Griffle put: value.
+ binding := policy bindingOf: #Griffle.
+ self assert: binding value == value.!

Item was added:
+ ----- Method: ImportTest>>testNotImported (in category 'as yet unclassified') -----
+ testNotImported
+ | binding |
+ policy := Import namespace: namespace policy: (ExplicitNamePolicy spec: #Nurp).
+ namespace at: #Griffle put: value.
+ binding := policy bindingOf: #Griffle.
+ self assert: binding value isNil!

Item was added:
+ ----- Method: ImportTest>>testStackedImports (in category 'as yet unclassified') -----
+ testStackedImports
+ | griffle plonk binding |
+ griffle := Import
+ namespace: namespace
+ policy: (ExplicitNamePolicy spec: #Griffle).
+ plonk := Import
+ namespace: namespace
+ policy: (ExplicitNamePolicy spec: #Plonk)
+ next: griffle.
+ namespace at: #Griffle put: value.
+ binding := plonk bindingOf: #Griffle.
+ self assert: binding value == value.!

Item was added:
+ TestCase subclass: #NamePolicyTest
+ instanceVariableNames: 'policy'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: NamePolicyTest>>assertIncludes: (in category 'asserting') -----
+ assertIncludes: foreignName
+ ^ self assertIncludes: foreignName as: foreignName!

Item was added:
+ ----- Method: NamePolicyTest>>assertIncludes:as: (in category 'asserting') -----
+ assertIncludes: localName as: foreignName
+ | actual |
+ policy name: localName do: [:foreign | actual := foreign].
+ self assert: actual = foreignName!

Item was added:
+ ----- Method: NamePolicyTest>>denyIncludes: (in category 'asserting') -----
+ denyIncludes: localName
+ | actual |
+ policy name: localName do: [:foreign | actual := foreign].
+ self assert: actual isNil!

Item was added:
+ ----- Method: NamePolicyTest>>setUp (in category 'running') -----
+ setUp
+ policy := self createPolicy!

Item was added:
+ NamePolicyTest subclass: #RemovePrefixNamePolicyTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Environments'!

Item was added:
+ ----- Method: RemovePrefixNamePolicyTest>>createPolicy (in category 'as yet unclassified') -----
+ createPolicy
+ ^ RemovePrefixNamePolicy prefix: 'XX'!

Item was added:
+ ----- Method: RemovePrefixNamePolicyTest>>testOnlyRemovesPrefix (in category 'as yet unclassified') -----
+ testOnlyRemovesPrefix
+ self denyIncludes: #XAGriffle!

Item was added:
+ ----- Method: RemovePrefixNamePolicyTest>>testRemovesPrefix (in category 'as yet unclassified') -----
+ testRemovesPrefix
+ self assertIncludes: #XXGriffle as: #Griffle!