The Trunk: Tests-ul.58.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-ul.58.mcz

commits-2
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.58.mcz

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

Name: Tests-ul.58
Author: ul
Time: 8 March 2010, 1:49:21.203 am
UUID: 6342428f-e88e-8341-8217-6f74bc3d685f
Ancestors: Tests-nice.57

- renamed PackageDependencyTest's #testPackage:dependsOnlyOn: to #testPackage:  dependsExactlyOn:, since that's the intended behavior.
- removed fixed dependencies from #testCompiler, #testExceptions and #testMorphic

=============== Diff against Tests-nice.57 ===============

Item was changed:
  ----- Method: PackageDependencyTest>>testToolBuilderSUnit (in category 'tests') -----
  testToolBuilderSUnit
+ self testPackage: 'ToolBuilder-SUnit' dependsExactlyOn: #(
- self testPackage: 'ToolBuilder-SUnit' dependsOnlyOn: #(
  Collections
  Kernel
  ToolBuilder
  'ToolBuilder-Kernel'
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testCompression (in category 'tests') -----
  testCompression
+ self testPackage: 'Compression' dependsExactlyOn: #(
- self testPackage: 'Compression' dependsOnlyOn: #(
  Collections
  Exceptions
  Files
  Graphics
  Kernel
  Multilingual
  SUnit
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testSystem (in category 'tests') -----
  testSystem
+ self testPackage: 'System' dependsExactlyOn: #(
- self testPackage: 'System' dependsOnlyOn: #(
  Collections
  Balloon
  Compiler
  Compression
  Exceptions
  Files
  Graphics
  Kernel
  Monticello
  MonticelloConfigurations
  Morphic
  MorphicExtras
  Multilingual
  Network
  PackageInfo
  Sound
  'ToolBuilder-Kernel'
  Tools
  TrueType
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testMonticello (in category 'tests') -----
  testMonticello
+ self testPackage: 'Monticello' dependsExactlyOn: #(
- self testPackage: 'Monticello' dependsOnlyOn: #(
  Collections
  Compiler
  Compression
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  Network
  PackageInfo
  System
  Tests
  'ToolBuilder-Kernel'
  'ToolBuilder-Morphic'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testToolBuilder (in category 'tests') -----
  testToolBuilder
+ self testPackage: 'ToolBuilder-Kernel' dependsExactlyOn: #(
- self testPackage: 'ToolBuilder-Kernel' dependsOnlyOn: #(
  Collections
  Files
  Graphics
  Kernel
  SUnit
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testBalloon (in category 'tests') -----
  testBalloon
+ self testPackage: 'Balloon' dependsExactlyOn: #(
- self testPackage: 'Balloon' dependsOnlyOn: #(
  Kernel Collections Graphics Morphic System
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testMorphicExtras (in category 'tests') -----
  testMorphicExtras
+ self testPackage: 'MorphicExtras' dependsExactlyOn: #(
- self testPackage: 'MorphicExtras' dependsOnlyOn: #(
  Balloon
  Collections
  Compiler
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  Network
  Sound
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testCollections (in category 'tests') -----
  testCollections
+ self testPackage: 'Collections' dependsExactlyOn: #(
- self testPackage: 'Collections' dependsOnlyOn: #(
  Balloon
  Compiler
  Kernel
  Compression
  Exceptions
  Files
  Graphics
  Morphic
  MorphicExtras
  Multilingual
  Network
  System
  'ToolBuilder-Kernel'
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testServices (in category 'tests') -----
  testServices
+ self testPackage: 'Services-Base' dependsExactlyOn: #(
- self testPackage: 'Services-Base' dependsOnlyOn: #(
  Collections
  Compiler
  Exceptions
  Graphics
  Kernel
  Morphic
  PackageInfo
  PreferenceBrowser
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testToolBuilderMorphic (in category 'tests') -----
  testToolBuilderMorphic
+ self testPackage: 'ToolBuilder-Morphic' dependsExactlyOn: #(
- self testPackage: 'ToolBuilder-Morphic' dependsOnlyOn: #(
  Collections
  Exceptions
  Graphics
  Kernel
  Morphic
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testTrueType (in category 'tests') -----
  testTrueType
+ self testPackage: 'TrueType' dependsExactlyOn: #(
- self testPackage: 'TrueType' dependsOnlyOn: #(
  Collections
  Balloon
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  Multilingual
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testMultilingual (in category 'tests') -----
  testMultilingual
+ self testPackage: 'Multilingual' dependsExactlyOn: #(
- self testPackage: 'Multilingual' dependsOnlyOn: #(
  Collections
  Compiler
  Compression
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  Network
  System
  'ToolBuilder-Kernel'
  Tools
  TrueType
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testEtoys (in category 'tests') -----
  testEtoys
+ self testPackage: 'EToys' dependsExactlyOn: #(
- self testPackage: 'EToys' dependsOnlyOn: #(
  Balloon
  Collections
  Compiler
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  MorphicExtras
  Network
  Protocols
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testSound (in category 'tests') -----
  testSound
+ self testPackage: 'Sound' dependsExactlyOn: #(
- self testPackage: 'Sound' dependsOnlyOn: #(
  Collections
  Balloon
  EToys
  Files
  Graphics
  Kernel
  Morphic
  MorphicExtras
  Network
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testShoutCore (in category 'tests') -----
  testShoutCore
+ self testPackage: 'ShoutCore' dependsExactlyOn: #(
- self testPackage: 'ShoutCore' dependsOnlyOn: #(
  Collections
  Graphics
  Kernel
  Monticello
  System
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testSUnit (in category 'tests') -----
  testSUnit
+ self testPackage: 'SUnit' dependsExactlyOn: #(
- self testPackage: 'SUnit' dependsOnlyOn: #(
  Collections
  Exceptions
  Kernel
  System
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testToolBuilderMVC (in category 'tests') -----
  testToolBuilderMVC
+ self testPackage: 'ToolBuilder-MVC' dependsExactlyOn: #(
- self testPackage: 'ToolBuilder-MVC' dependsOnlyOn: #(
  Collections
  Exceptions
  Graphics
  ST80
  ToolBuilder
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testNetwork (in category 'tests') -----
  testNetwork
+ self testPackage: 'Network' dependsExactlyOn: #(
- self testPackage: 'Network' dependsOnlyOn: #(
  Collections
  Compiler
  Compression
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  Multilingual
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testPackageInfo (in category 'tests') -----
  testPackageInfo
+ self testPackage: 'PackageInfo' dependsExactlyOn: #(
- self testPackage: 'PackageInfo' dependsOnlyOn: #(
  Collections
  Compiler
  Graphics
  Kernel
  Morphic
  System
  'ToolBuilder-Kernel'
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testMorphic (in category 'tests') -----
  testMorphic
+ self testPackage: 'Morphic' dependsExactlyOn: #(
- self testPackage: 'Morphic' dependsOnlyOn: #(
  Balloon
  Collections
  Compiler
  EToys
  Exceptions
  Files
  Graphics
  Kernel
  Monticello
  MonticelloConfigurations
  'Morphic-TrueType' "????"
  MorphicExtras
  Multilingual
  Network
- PreferenceBrowser
- Protocols
  ST80
  Sound
  System
  'ToolBuilder-Kernel'
  'ToolBuilder-Morphic'
  Tools
  TrueType
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testVersionNumber (in category 'tests') -----
  testVersionNumber
+ self testPackage: 'VersionNumber' dependsExactlyOn: #(
- self testPackage: 'VersionNumber' dependsOnlyOn: #(
  Collections
  Kernel
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testFiles (in category 'tests') -----
  testFiles
+ self testPackage: 'Files' dependsExactlyOn: #(
- self testPackage: 'Files' dependsOnlyOn: #(
  Collections
  Compression
  Exceptions
  Graphics
  Kernel
  Multilingual
  Network
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testCompiler (in category 'tests') -----
  testCompiler
+ self testPackage: 'Compiler' dependsExactlyOn: #(
- self testPackage: 'Compiler' dependsOnlyOn: #(
  Collections
  Exceptions
  Graphics
  Kernel
  System
  'ToolBuilder-Kernel'
- Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testKernel (in category 'tests') -----
  testKernel
+ self testPackage: 'Kernel' dependsExactlyOn: #(
- self testPackage: 'Kernel' dependsOnlyOn: #(
  Collections
  Compiler
  Compression
  Exceptions
  Files
  Graphics
  Morphic
  MorphicExtras
  Multilingual
  System
  'ToolBuilder-Kernel'
  Tools
  Traits
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testTraits (in category 'tests') -----
  testTraits
+ self testPackage: 'Traits' dependsExactlyOn: #(
- self testPackage: 'Traits' dependsOnlyOn: #(
  Collections
  Compiler
  Exceptions
  Files
  Kernel
  Monticello
  System
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testSUnitGUI (in category 'tests') -----
  testSUnitGUI
+ self testPackage: 'SUnitGUI' dependsExactlyOn: #(
- self testPackage: 'SUnitGUI' dependsOnlyOn: #(
  Collections
  Graphics
  Kernel
  PackageInfo
  SUnit
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') -----
  testPreferenceBrowser
+ self testPackage: 'PreferenceBrowser' dependsExactlyOn: #(
- self testPackage: 'PreferenceBrowser' dependsOnlyOn: #(
  Collections
  EToys
  Exceptions
  Graphics
  Kernel
  Morphic
  MorphicExtras
  System
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testXML (in category 'tests') -----
  testXML
+ self testPackage: 'XML' dependsExactlyOn: #(
- self testPackage: 'XML' dependsOnlyOn: #(
  Collections
  Exceptions
  Files
  Kernel
  Multilingual
  System
  Tests
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testInstaller (in category 'tests') -----
  testInstaller
+ self testPackage: 'Installer' dependsExactlyOn: #(
- self testPackage: 'Installer' dependsOnlyOn: #(
  Collections
  Compression
  Exceptions
  Files
  Kernel
  Monticello
  MonticelloConfigurations
  Multilingual
  Network
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testGraphics (in category 'tests') -----
  testGraphics
+ self testPackage: 'Graphics' dependsExactlyOn: #(
- self testPackage: 'Graphics' dependsOnlyOn: #(
  Collections
  Compression
  Exceptions
  Files
  Kernel
  Morphic
  MorphicExtras
  Multilingual
  Network
  System
  'ToolBuilder-Kernel'
  Tools
  TrueType
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testNebraska (in category 'tests') -----
  testNebraska
+ self testPackage: 'Nebraska' dependsExactlyOn: #(
- self testPackage: 'Nebraska' dependsOnlyOn: #(
  Balloon
  Collections
  EToys
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  MorphicExtras
  Multilingual
  Network
  SUnit
  Sound
  System
  'ToolBuilder-Kernel'
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testTools (in category 'tests') -----
  testTools
+ self testPackage: 'Tools' dependsExactlyOn: #(
- self testPackage: 'Tools' dependsOnlyOn: #(
  Collections
  Compiler
  Compression
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  MorphicExtras
  Multilingual
  Network
  PackageInfo
  ST80
  System
  'ToolBuilder-Kernel'
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testST80 (in category 'tests') -----
  testST80
+ self testPackage: 'ST80' dependsExactlyOn: #(
- self testPackage: 'ST80' dependsOnlyOn: #(
  Collections
  Compiler
  Exceptions
  Files
  Graphics
  Kernel
  Morphic
  Multilingual
  Network
  SUnit
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was added:
+ ----- Method: PackageDependencyTest>>testPackage:dependsExactlyOn: (in category 'utilities') -----
+ testPackage: pkgName dependsExactlyOn: pkgList
+ "Ensure that the package with the given name depends only on the packages in pkgList.
+ NOTE: If you use this for fixing dependencies, classDeps includes the classes
+ and users from the package(s) not declared as dependents. Basically, you need
+ to fix all the references in classDeps to make the test pass."
+ | classDeps pi pkgDeps |
+ classDeps := IdentityDictionary new.
+ pi := PackageOrganizer default packageNamed: pkgName ifAbsent:[^self]. "unloaded"
+ pi classes do:[:pkgClass|
+ (classDeps at: (pkgClass superclass ifNil:[ProtoObject])
+ ifAbsentPut:[OrderedCollection new]) add: pkgClass name, ' superclass'.
+ ].
+ pi methods do:[:mref| | cm |
+ cm := mref compiledMethod.
+ 1 to: cm numLiterals do:[:i| | lit |
+ ((lit := cm literalAt: i) isVariableBinding
+ and:[lit value isBehavior]) ifTrue:[(classDeps at: lit value ifAbsentPut:[OrderedCollection new]) add: cm methodClass asString, '>>', cm selector]]].
+ pkgDeps := Dictionary new.
+ classDeps keys do:[:aClass| | pkg |
+ pkg := PackageOrganizer default packageOfClass: aClass ifNone:[nil].
+ pkg ifNil:[
+ Transcript cr; show: 'WARNING: No package for ', aClass.
+ (classDeps removeKey: aClass) do:[:each| Transcript crtab; show: each].
+ ] ifNotNil:[
+ (pkgDeps at: pkg name ifAbsentPut:[OrderedCollection new]) add: aClass.
+ ].
+ ].
+ (pkgDeps removeKey: pkgName ifAbsent:[#()])
+ do:[:aClass| classDeps removeKey: aClass ifAbsent:[]].
+ pkgList do:[:pkg|
+ self assert: (pkgDeps includesKey: pkg).
+ (pkgDeps removeKey: pkg ifAbsent: [#()])
+ do:[:aClass| classDeps removeKey: aClass ifAbsent:[]].
+ ].
+ classDeps keysAndValuesDo:[:class :deps|
+ Transcript cr; show: class name, ' dependencies:'.
+ deps do:[:each| Transcript crtab; show: each].
+ ].
+ self assert: pkgDeps isEmpty.
+ !

Item was changed:
  ----- Method: PackageDependencyTest>>testProtocols (in category 'tests') -----
  testProtocols
+ self testPackage: 'Protocols' dependsExactlyOn: #(
- self testPackage: 'Protocols' dependsOnlyOn: #(
  Collections
  Graphics
  Kernel
  Morphic
  MorphicExtras
  System
  'ToolBuilder-Kernel'
  Tools
  ).!

Item was changed:
  ----- Method: PackageDependencyTest>>testExceptions (in category 'tests') -----
  testExceptions
+ self testPackage: 'Exceptions' dependsExactlyOn: #(
- self testPackage: 'Exceptions' dependsOnlyOn: #(
  Collections
- Files
  Graphics
  Kernel
  Morphic
  System
  ).!

Item was removed:
- ----- Method: PackageDependencyTest>>testPackage:dependsOnlyOn: (in category 'utilities') -----
- testPackage: pkgName dependsOnlyOn: pkgList
- "Ensure that the package with the given name depends only on the packages in pkgList.
- NOTE: If you use this for fixing dependencies, classDeps includes the classes
- and users from the package(s) not declared as dependents. Basically, you need
- to fix all the references in classDeps to make the test pass."
- | classDeps pi pkgDeps |
- classDeps := IdentityDictionary new.
- pi := PackageOrganizer default packageNamed: pkgName ifAbsent:[^self]. "unloaded"
- pi classes do:[:pkgClass|
- (classDeps at: (pkgClass superclass ifNil:[ProtoObject])
- ifAbsentPut:[OrderedCollection new]) add: pkgClass name, ' superclass'.
- ].
- pi methods do:[:mref| | cm |
- cm := mref compiledMethod.
- 1 to: cm numLiterals do:[:i| | lit |
- ((lit := cm literalAt: i) isVariableBinding
- and:[lit value isBehavior]) ifTrue:[(classDeps at: lit value ifAbsentPut:[OrderedCollection new]) add: cm methodClass asString, '>>', cm selector]]].
- pkgDeps := Dictionary new.
- classDeps keys do:[:aClass| | pkg |
- pkg := PackageOrganizer default packageOfClass: aClass ifNone:[nil].
- pkg ifNil:[
- Transcript cr; show: 'WARNING: No package for ', aClass.
- (classDeps removeKey: aClass) do:[:each| Transcript crtab; show: each].
- ] ifNotNil:[
- (pkgDeps at: pkg name ifAbsentPut:[OrderedCollection new]) add: aClass.
- ].
- ].
- (pkgDeps removeKey: pkgName ifAbsent:[#()])
- do:[:aClass| classDeps removeKey: aClass ifAbsent:[]].
- pkgList do:[:pkg|
- self assert: (pkgDeps includesKey: pkg).
- (pkgDeps removeKey: pkg ifAbsent:[#()])
- do:[:aClass| classDeps removeKey: aClass ifAbsent:[]].
- ].
- classDeps keysAndValuesDo:[:class :deps|
- Transcript cr; show: class name, ' dependencies:'.
- deps do:[:each| Transcript crtab; show: each].
- ].
- self assert: pkgDeps isEmpty.
- !