Colin Putney uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-cwp.153.mcz ==================== Summary ==================== Name: Tests-cwp.153 Author: cwp Time: 26 July 2012, 11:57:32.466 pm UUID: a0416b69-6b69-43f7-8ba9-63186a143c67 Ancestors: Tests-bf.152, Tests-cwp.150 merge Introduce EnvironmentTest. =============== Diff against Tests-bf.152 =============== Item was changed: SystemOrganization addCategory: #'Tests-Exceptions'! SystemOrganization addCategory: #'Tests-Files'! SystemOrganization addCategory: #'Tests-Compiler'! SystemOrganization addCategory: #'Tests-Digital Signatures'! SystemOrganization addCategory: #'Tests-Object Events'! SystemOrganization addCategory: #'Tests-System-Support'! SystemOrganization addCategory: #'Tests-Bugs'! SystemOrganization addCategory: #'Tests-ObjectsAsMethods'! SystemOrganization addCategory: #'Tests-PrimCallController'! SystemOrganization addCategory: #'Tests-Release'! SystemOrganization addCategory: #'Tests-Utilities'! SystemOrganization addCategory: #'Tests-VM'! SystemOrganization addCategory: #'Tests-Hex'! SystemOrganization addCategory: #'Tests-Monticello'! SystemOrganization addCategory: #'Tests-Localization'! SystemOrganization addCategory: #'Tests-FilePackage'! SystemOrganization addCategory: #'Tests-Finalization'! SystemOrganization addCategory: #'Tests-Dependencies'! SystemOrganization addCategory: #'Tests-Monticello-Mocks'! + SystemOrganization addCategory: #'Tests-Environments'! Item was added: + TestCase subclass: #EnvironmentTest + instanceVariableNames: 'env value' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-Environments'! Item was added: + ----- Method: EnvironmentTest>>createClass: (in category 'running') ----- + createClass: aSymbol + | builder | + builder := ClassBuilder new. + builder + name: aSymbol + inEnvironment: env + subclassOf: Object + type: #normal + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Test'. + ! Item was added: + ----- 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 added: + ----- Method: EnvironmentTest>>setUp (in category 'running') ----- + setUp + env := Environment name: 'test'. + value := Object new.! Item was added: + ----- Method: EnvironmentTest>>tearDown (in category 'running') ----- + tearDown + env destroy! Item was added: + ----- Method: EnvironmentTest>>testAtDoesntFindUndeclared (in category 'binding tests') ----- + testAtDoesntFindUndeclared + env := Environment new. + env bindingOf: #Griffle. + self should: [ env at: #Griffle ] raise: KeyNotFound! Item was added: + ----- Method: EnvironmentTest>>testAtIfAbsent (in category 'compatibility tests') ----- + testAtIfAbsent + | result | + result := env at: #Griffle ifAbsent: [value]. + self assert: result == value! Item was added: + ----- Method: EnvironmentTest>>testAtIfAbsentNot (in category 'compatibility tests') ----- + testAtIfAbsentNot + | result | + env at: #Griffle put: value. + result := env at: #Griffle ifAbsent: [self assert: false]. + self assert: result == value! Item was added: + ----- Method: EnvironmentTest>>testAtIfPresent (in category 'compatibility tests') ----- + testAtIfPresent + | result | + env at: #Griffle put: value. + env at: #Griffle ifPresent: [:v | result := v]. + self assert: result == value! Item was added: + ----- Method: EnvironmentTest>>testAtIfPresentNot (in category 'compatibility tests') ----- + testAtIfPresentNot + env at: #Griffle ifPresent: [self assert: false].! Item was added: + ----- Method: EnvironmentTest>>testExplicitExport (in category 'export tests') ----- + testExplicitExport + env requireExplicitExports. + env at: #Griffle put: value. + env export: #Griffle. + self assert: (env exports at: #Griffle) == value! Item was added: + ----- Method: EnvironmentTest>>testImportFromOther (in category 'export tests') ----- + testImportFromOther + | foreign | + foreign := Environment new. + foreign at: #Griffle put: value. + env importEnvironment: foreign. + self assert: (env bindingOf: #Griffle) value == value! Item was added: + ----- Method: EnvironmentTest>>testReadOnlyBindings (in category 'binding tests') ----- + testReadOnlyBindings + | binding class | + class := Behavior new. + env at: #Griffle put: class. + binding := env bindingOf: #Griffle. + self + should: [binding value: nil] + raise: AttemptToWriteReadOnlyGlobal! Item was added: + ----- 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 added: + ----- Method: EnvironmentTest>>testRequireExplicitExports (in category 'export tests') ----- + testRequireExplicitExports + env requireExplicitExports. + env at: #Griffle put: Object new. + self assert: env exports isEmpty! Item was added: + ----- Method: EnvironmentTest>>testUndeclaredBindingMoved (in category 'binding tests') ----- + testUndeclaredBindingMoved + | assoc | + assoc := env bindingOf: #Griffle. + env at: #Griffle put: value. + self assert: (env at: #Griffle) == value! Item was added: + ----- 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: + ----- Method: EnvironmentTest>>testWriteAndRead (in category 'binding tests') ----- + testWriteAndRead + env at: #Griffle put: value. + self assert: (env at: #Griffle) == value.! |
On 27 July 2012 07:58, <[hidden email]> wrote:
> Colin Putney uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-cwp.153.mcz > > ==================== Summary ==================== > > Name: Tests-cwp.153 > Author: cwp > Time: 26 July 2012, 11:57:32.466 pm > UUID: a0416b69-6b69-43f7-8ba9-63186a143c67 > Ancestors: Tests-bf.152, Tests-cwp.150 > > merge > > Introduce EnvironmentTest. > > =============== Diff against Tests-bf.152 =============== Cool. I just ran the full suite of tests and we have no regressions (in the sense that the tests I mentioned the other day still fail, but no new ones fail). Yay! frank |
Free forum by Nabble | Edit this page |