Skip to content

Commit

Permalink
Refactor change name from aTestEvironment to testingEnvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
Alisu committed Sep 25, 2019
1 parent 5df1f2a commit e2579fc
Show file tree
Hide file tree
Showing 55 changed files with 200 additions and 200 deletions.
2 changes: 1 addition & 1 deletion src/AST-Core-Tests/RBFormatterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RBFormatterTest >> testCoreSystem [
#(#Object #Behavior #Boolean #True #False #Integer #SmallInteger #Collection #String)
do: [ :each |
| class |
class := aTestEnvironment classNamed: each.
class := testingEnvironment classNamed: each.
self
formatClass: class;
formatClass: class class ]
Expand Down
2 changes: 1 addition & 1 deletion src/Collections-Tests/ArrayTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ ArrayTest >> setUp [
literalArray := #(1 true 3 #four).
selfEvaluatingArray := { 1. true. (3/4). String loremIpsum. (2 to: 4) . 5 }.
nonSEArray1 := { 1 . Set with: 1 }.
nonSEarray2 := { aTestEnvironment associationAt: #Array }.
nonSEarray2 := { testingEnvironment associationAt: #Array }.
example1 := #(1 2 3 4 5) copy.
indexArray:= {2. 3. 4.}.
valueArray:={0. 0. 0.}.
Expand Down
20 changes: 10 additions & 10 deletions src/Fuel-Tests-Core/FLBasicSerializationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ FLBasicSerializationTest >> testConsiderCustomGlobal [

aPerson := FLPerson new.
[
aTestEnvironment at: globalKey put: aPerson.
testingEnvironment at: globalKey put: aPerson.
self assertSerializationIdentityOf: aPerson.
] ensure: [ aTestEnvironment removeKey: globalKey ]
] ensure: [ testingEnvironment removeKey: globalKey ]

]

Expand All @@ -179,12 +179,12 @@ FLBasicSerializationTest >> testConsiderCustomWideSymbolGlobal [

aPerson := FLPerson new.
[
aTestEnvironment at: aWideSymbol put: aPerson.
testingEnvironment at: aWideSymbol put: aPerson.
self
shouldnt: [ self resultOfSerializeAndMaterialize: aPerson ]
raise: Error
] ensure: [
aTestEnvironment removeKey: aWideSymbol ].
testingEnvironment removeKey: aWideSymbol ].

]

Expand Down Expand Up @@ -345,9 +345,9 @@ FLBasicSerializationTest >> testDontConsiderCustomGlobal [
globalName := #FLGlobalVariableForTesting.

[
aTestEnvironment at: globalName put: aPerson.
testingEnvironment at: globalName put: aPerson.
self deny: (self resultOfSerializeAndMaterialize: aPerson) == aPerson
] ensure: [ aTestEnvironment removeKey: globalName ].
] ensure: [ testingEnvironment removeKey: globalName ].

]

Expand Down Expand Up @@ -864,11 +864,11 @@ FLBasicSerializationTest >> testWideStringClassName [
yourself.
class := Class new setName: className; yourself.
[
aTestEnvironment at: class name put: class.
testingEnvironment at: class name put: class.
self
shouldnt: [ self resultOfSerializeAndMaterialize: class ]
raise: Error
] ensure:[ aTestEnvironment removeKey: class name ]
] ensure:[ testingEnvironment removeKey: class name ]
]

{ #category : #'tests-strings' }
Expand All @@ -879,7 +879,7 @@ FLBasicSerializationTest >> testWideStringGlobal [
yourself.
globalValue := global, 'value'.
[
aTestEnvironment
testingEnvironment
at: global
put: globalValue.
self analyzer considerGlobal: global.
Expand All @@ -889,7 +889,7 @@ FLBasicSerializationTest >> testWideStringGlobal [
raise: Error.
self assert: self materialized class equals: Association.
self assert: self materialized value == global
] ensure: [ aTestEnvironment removeKey: global ]
] ensure: [ testingEnvironment removeKey: global ]
]

{ #category : #'tests-collections' }
Expand Down
4 changes: 2 additions & 2 deletions src/Fuel-Tests-Core/FLClassSerializationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Class {
{ #category : #tests }
FLClassSerializationTest >> during: aBlock rename: aClass as: anotherClass [

[ aTestEnvironment at: aClass name put: anotherClass.
[ testingEnvironment at: aClass name put: anotherClass.
^aBlock value ] ensure: [
aTestEnvironment at: aClass name put: aClass ].
testingEnvironment at: aClass name put: aClass ].
]

{ #category : #tests }
Expand Down
4 changes: 2 additions & 2 deletions src/Fuel-Tests-Core/FLHeaderSerializationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FLHeaderSerializationTest >> testPostMaterializationActions [
aClass perform: #postLoadMethod.
self assert: (aClass perform: #classVariable) = 1.

self serializer addPostMaterializationAction: [ (aTestEnvironment at: #FuelPostMaterializationTestClassToBeDeleted) perform: #postLoadMethod2 ].
self serializer addPostMaterializationAction: [ (testingEnvironment at: #FuelPostMaterializationTestClassToBeDeleted) perform: #postLoadMethod2 ].
self serialize: aClass.
self assert: (aClass perform: #classVariable) = 1.
self materialized.
Expand All @@ -75,7 +75,7 @@ FLHeaderSerializationTest >> testPreMaterializationActions [
aClass perform: #postLoadMethod.
self assert: (aClass perform: #classVariable) = 1.

self serializer addPreMaterializationAction: [ (aTestEnvironment at: #FuelPreMaterializationTestClassToBeDeleted) perform: #postLoadMethod2 ].
self serializer addPreMaterializationAction: [ (testingEnvironment at: #FuelPreMaterializationTestClassToBeDeleted) perform: #postLoadMethod2 ].
self serialize: aClass.
self assert: (aClass perform: #classVariable) = 1.
self materialized.
Expand Down
2 changes: 1 addition & 1 deletion src/Fuel-Tests-Core/FLSerializationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ FLSerializationTest >> tearDownClassFactory [
{ #category : #running }
FLSerializationTest >> tearDownGlobalVariables [

aTestEnvironment removeKey: #FLGlobalVariableForTesting ifAbsent: []
testingEnvironment removeKey: #FLGlobalVariableForTesting ifAbsent: []
]

{ #category : #running }
Expand Down
2 changes: 1 addition & 1 deletion src/Fuel-Tests-Core/FLTraitSerializationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FLTraitSerializationTest >> newInstanceFrom: aTrait [
| aClass |
aClass := self newClass.
"If one wants to use a materialized trait in a class, it has to be added to Smalltalk globals. Fuel does not do that. Fuel just materializes the trait. It is up to the user to decide what to do with it. "
aTestEnvironment at: aTrait name put: aTrait.
testingEnvironment at: aTrait name put: aTrait.
aClass addToComposition: aTrait.
^ aClass new
]
Expand Down
14 changes: 7 additions & 7 deletions src/Fuel-Tests-Core/FLUserGuidesTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Class {
FLUserGuidesTest >> tearDown [
#('demo.fuel' 'numbers.fuel' 'number.fuel.zip' 'example.FL')
do: [ :each | self deleteFileNamed: each ].
aTestEnvironment removeKey: #GlobalSet1 ifAbsent: [ ].
aTestEnvironment removeKey: #GlobalSet2 ifAbsent: [ ].
testingEnvironment removeKey: #GlobalSet1 ifAbsent: [ ].
testingEnvironment removeKey: #GlobalSet2 ifAbsent: [ ].
super tearDown
]

Expand All @@ -22,8 +22,8 @@ FLUserGuidesTest >> testConsiderGlobal [
| aSerializer anArray materializedArray |
"Prepare an array whose two elements are system globals."
anArray := Array with: Set new with: Set new.
aTestEnvironment at: #GlobalSet1 put: anArray first.
aTestEnvironment at: #GlobalSet2 put: anArray second.
testingEnvironment at: #GlobalSet1 put: anArray first.
testingEnvironment at: #GlobalSet2 put: anArray second.

"Serialize considering *only first* as a global object."
FLPlatform current
Expand All @@ -41,8 +41,8 @@ FLUserGuidesTest >> testConsiderGlobal [
materializeFrom: aStream) root].

"Check that second element is a new Set."
[ (aTestEnvironment at: #GlobalSet1) == materializedArray first ] assert.
[ (aTestEnvironment at: #GlobalSet2) ~~ materializedArray second ] assert
[ (testingEnvironment at: #GlobalSet1) == materializedArray first ] assert.
[ (testingEnvironment at: #GlobalSet2) ~~ materializedArray second ] assert
]

{ #category : #'tests-Getting Started' }
Expand Down Expand Up @@ -143,7 +143,7 @@ FLUserGuidesTest >> testPluggableSubstitution [

{ #category : #'tests-Getting Started' }
FLUserGuidesTest >> testShowingProgressBar [
(aTestEnvironment includesKey: #FLProgressSerialization)
(testingEnvironment includesKey: #FLProgressSerialization)
ifFalse: [ " Needs:
(ConfigurationOfFuel project latestVersion) load: 'FuelProgressUpdate'.
" ^ self skip ].
Expand Down
2 changes: 1 addition & 1 deletion src/Gofer-Tests/GoferApiTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ GoferApiTest >> testSqueaksource [

{ #category : #'tests - repositories' }
GoferApiTest >> testSubDirectoryRepository [
aTestEnvironment
testingEnvironment
at: #MCSubDirectoryRepository
ifPresent: [ :subDirectoryRepositoryClass | |path|
path := (FileSystem disk workingDirectory / '*') fullName.
Expand Down
4 changes: 2 additions & 2 deletions src/Graphics-Tests/BitBltTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ BitBltTest >> testAlphaCompositing2 [
{ #category : #'tests - bugs' }
BitBltTest >> testAlphaCompositing2Simulated [

aTestEnvironment
testingEnvironment
at: #BitBltSimulation
ifPresent: [ :bitblt |
| bb f1 mixColor f2 result eps |
Expand All @@ -84,7 +84,7 @@ BitBltTest >> testAlphaCompositing2Simulated [
{ #category : #'tests - bugs' }
BitBltTest >> testAlphaCompositingSimulated [

aTestEnvironment
testingEnvironment
at: #BitBltSimulation
ifPresent: [ :bitblt |
| mixColor result eps f1 bb f2 |
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs-Tests/JobTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
{ #category : #running }
JobTest >> tearDown [

aTestEnvironment at: #SystemProgressMorph ifPresent: [:spm |
testingEnvironment at: #SystemProgressMorph ifPresent: [:spm |
spm uniqueInstance bars do: [ :e | e close ]].
super tearDown
]
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel-Tests-Extended/ClassTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ClassTest >> deleteClass [
| cl |
cl := testEnvironment at: className ifAbsent: [ ^ self ].

aTestEnvironment at: #ChangeSet ifPresent: [
testingEnvironment at: #ChangeSet ifPresent: [
cl removeFromChanges ].

cl removeFromSystemUnlogged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SendsDeprecatedMethodToGlobalRuleTest >> globalName [
[ globalName :=
('TestGlobal', 1e10 atRandom asString) asSymbol
] doWhileTrue: [
aTestEnvironment includesKey: globalName ] ]
testingEnvironment includesKey: globalName ] ]
]

{ #category : #properties }
Expand All @@ -35,7 +35,7 @@ SendsDeprecatedMethodToGlobalRuleTest >> setUp [
| deprClass |
super setUp.
deprClass := Object newAnonymousSubclass.
aTestEnvironment at: self globalName put: deprClass new.
testingEnvironment at: self globalName put: deprClass new.

deprClass compile: self deprecatedMethodName, ' self deprecated: ''this method is deprecated'''.
deprClass compile: self nonDeprecatedMethodName.
Expand All @@ -47,7 +47,7 @@ SendsDeprecatedMethodToGlobalRuleTest >> setUp [
{ #category : #running }
SendsDeprecatedMethodToGlobalRuleTest >> tearDown [

aTestEnvironment removeKey: self globalName ifAbsent: [ ].
testingEnvironment removeKey: self globalName ifAbsent: [ ].
globalName := nil.
testClass := nil.
super tearDown
Expand Down
4 changes: 2 additions & 2 deletions src/Kernel-Tests/IVsAndClassVarNamesConflictTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ IVsAndClassVarNamesConflictTest >> testOneCanProceedWhenIntroducingCapitalizedIn
]
on: Exception
do: [ :ex | ex resume ].
self assert: (aTestEnvironment keys includes: class name)
self assert: (testingEnvironment keys includes: class name)
]

{ #category : #tests }
Expand All @@ -48,5 +48,5 @@ IVsAndClassVarNamesConflictTest >> testOneCanProceedWhenIntroducingClasseVariabl
]
on: Exception
do: [ :ex | ex resume ].
self assert: (aTestEnvironment keys includes: class name)
self assert: (testingEnvironment keys includes: class name)
]
10 changes: 5 additions & 5 deletions src/Manifest-Tests/BuilderManifestTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BuilderManifestTest >> setUp [

| cl |
super setUp.
cl := aTestEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl := testingEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].

cl
ifNotNil: [
Expand All @@ -29,7 +29,7 @@ BuilderManifestTest >> setUp [
BuilderManifestTest >> tearDown [

| cl |
cl := aTestEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl := testingEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl
ifNotNil: [
cl
Expand Down Expand Up @@ -257,7 +257,7 @@ BuilderManifestTest >> testCreationManifest [
| manifestBuilder cl |
manifestBuilder := TheManifestBuilder new.

cl := aTestEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl := testingEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl
ifNotNil: [
cl
Expand All @@ -273,7 +273,7 @@ BuilderManifestTest >> testCreationManifestOn [
| manifestBuilder cl |
manifestBuilder := TheManifestBuilder new.

cl := aTestEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl := testingEnvironment at: #ManifestManifestResourcesTests ifAbsent: [ nil ].
cl
ifNotNil: [
cl
Expand Down Expand Up @@ -354,7 +354,7 @@ BuilderManifestTest >> testIsClassAManifest [

self deny: Point isManifest.
TheManifestBuilder of: MFClassA.
self assert: ( (aTestEnvironment at: #ManifestManifestResourcesTests) isManifest)
self assert: ( (testingEnvironment at: #ManifestManifestResourcesTests) isManifest)
]

{ #category : #tests }
Expand Down
2 changes: 1 addition & 1 deletion src/Manifest-Tests/SmalllintManifestCheckerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {

{ #category : #running }
SmalllintManifestCheckerTest >> cleaningResources [
aTestEnvironment
testingEnvironment
at: #ManifestManifestResourcesTests
ifPresent: [ :cl |
cl
Expand Down
12 changes: 6 additions & 6 deletions src/Metacello-TestsMC/MetacelloDictionaryRepositoryTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ MetacelloDictionaryRepositoryTest >> setUp [
repo := self monticelloRepository.
self tempRepositories add: repo.
gofer repository: repo.
aTestEnvironment at: #'Metacello_Gofer_Test_Repository' put: repo.
testingEnvironment at: #'Metacello_Gofer_Test_Repository' put: repo.
repo := self alternateRepository.
self tempRepositories add: repo.
aTestEnvironment at: #'Metacello_Configuration_Test_Alternate_Repository' put: repo.
testingEnvironment at: #'Metacello_Configuration_Test_Alternate_Repository' put: repo.
repo := self configurationRepository.
self tempRepositories add: repo.
aTestEnvironment at: #'Metacello_Configuration_Test_Repository' put: repo.
testingEnvironment at: #'Metacello_Configuration_Test_Repository' put: repo.
initialWorkingCopyList := MCWorkingCopy allManagers
collect: [ :each | each packageName ].
undefinedSymbols := MetacelloPlatform current disableUndefinedSybolUpdates
Expand All @@ -124,9 +124,9 @@ MetacelloDictionaryRepositoryTest >> tearDown [
aGofer := Gofer new.
self tearDownPackages: aGofer.
aGofer references notEmpty ifTrue: [ aGofer metacelloUnload ].
aTestEnvironment removeKey: #Metacello_Gofer_Test_Repository ifAbsent: [ ].
aTestEnvironment removeKey: #Metacello_Configuration_Test_Repository ifAbsent: [ ].
aTestEnvironment removeKey: #Metacello_Configuration_Test_Alternate_Repository ifAbsent: [ ].
testingEnvironment removeKey: #Metacello_Gofer_Test_Repository ifAbsent: [ ].
testingEnvironment removeKey: #Metacello_Configuration_Test_Repository ifAbsent: [ ].
testingEnvironment removeKey: #Metacello_Configuration_Test_Alternate_Repository ifAbsent: [ ].
self tempRepositories do: [ :repo | MCRepositoryGroup default removeIdenticalRepository: repo ].
MetacelloPlatform current reenableUndefinedSybolUpdates: undefinedSymbols.
finalWorkingCopyList := MCWorkingCopy allManagers collect: [ :each | each packageName ].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Class {
{ #category : #running }
MetacelloExternalScriptingTestCase >> setUpRepositoryContents [
super setUpRepositoryContents.
aTestEnvironment at: #'Metacello_Config_Test_Repository' put: configurationRepository
testingEnvironment at: #'Metacello_Config_Test_Repository' put: configurationRepository
]

{ #category : #running }
MetacelloExternalScriptingTestCase >> tearDownRepositories [
super tearDownRepositories.
MCRepositoryGroup default
removeIdenticalRepository:
(aTestEnvironment at: #'Metacello_XXX_Test_Repository' ifAbsent: [ ]).
aTestEnvironment removeKey: #'Metacello_Config_Test_Repository' ifAbsent: [ ].
aTestEnvironment removeKey: #'Metacello_XXX_Test_Repository' ifAbsent: [ ]
(testingEnvironment at: #'Metacello_XXX_Test_Repository' ifAbsent: [ ]).
testingEnvironment removeKey: #'Metacello_Config_Test_Repository' ifAbsent: [ ].
testingEnvironment removeKey: #'Metacello_XXX_Test_Repository' ifAbsent: [ ]
]
Loading

0 comments on commit e2579fc

Please sign in to comment.