Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
valuesportinglog [2022/01/31 19:02] christian [FileIn 4] |
valuesportinglog [2022/02/01 13:29] christian [FileIn 7 - Tests] |
||
---|---|---|---|
Line 174: | Line 174: | ||
</ | </ | ||
+ | Published as **[Squeak Fileout PDFtalk] (3.0.0.6, | ||
+ | |||
+ | ===== FileIn 5 ===== | ||
+ | |||
+ | FileOut from VW, then fileIn into a fresh Squeak image. | ||
+ | |||
+ | Loads without errors or warnings!. | ||
+ | |||
+ | < | ||
+ | First milestone: <span style=" | ||
+ | </ | ||
+ | |||
+ | Next step: fileIn the tests. | ||
+ | |||
+ | ===== FileIn 6 - Tests ===== | ||
+ | |||
+ | Added Squeak class method ''# | ||
+ | |||
+ | <code Smalltalk> | ||
+ | self | ||
+ | write: (' | ||
+ | pundles: (Array with: (Store.Registry packageNamed: | ||
+ | package: #' | ||
+ | prerequisites: | ||
+ | packageChanges: | ||
+ | </ | ||
+ | |||
+ | with the standard transformation for Value classes: | ||
+ | |||
+ | <code Smalltalk> | ||
+ | ValuesTestingTransform | ||
+ | ^PackageChange hierarchyChanges: | ||
+ | classReference: | ||
+ | classChanges: | ||
+ | </ | ||
+ | |||
+ | FileOut from VW with: | ||
+ | |||
+ | <code Smalltalk> | ||
+ | |||
+ | then fileIn into a Squeak image with Values loaded. | ||
+ | |||
+ | Loads without errors. | ||
+ | |||
+ | The Transcript shows: | ||
+ | <code Smalltalk> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | </ | ||
+ | |||
+ | The VW error classes are not known in Squeak. We define a rewrite of the three test methods: | ||
+ | |||
+ | <code Smalltalk> | ||
+ | ValuesTestingTransform | ||
+ | ^PackageChange | ||
+ | hierarchyChanges: | ||
+ | classReference: | ||
+ | classChanges: | ||
+ | localChanges: | ||
+ | classReference: | ||
+ | instanceChanges: | ||
+ | add: (Rewrite method: # | ||
+ | add: (Rewrite method: # | ||
+ | add: (Rewrite method: # | ||
+ | yourself))) | ||
+ | </ | ||
+ | |||
+ | The rule ''# | ||
+ | |||
+ | <code Smalltalk> | ||
+ | replaceSqueakErrorClasses | ||
+ | ^(self new) | ||
+ | replace: SubscriptOutOfBoundsError name asString with: #Error asString; | ||
+ | replace: NonIntegerIndexError name asString with: #Error asString; | ||
+ | replace: NotFoundError name asString with: #NotFound asString; | ||
+ | yourself | ||
+ | </ | ||
+ | |||
+ | Published as **[Squeak Fileout PDFtalk] (3.0.0.7, | ||
+ | ===== FileIn 7 - Tests ===== | ||
+ | |||
+ | FileOut [Values] and [Values Testing], then fileIn into a fresh Squeak image. | ||
+ | |||
+ | Loads without errors. | ||
+ | |||
+ | The Transcript shows: | ||
+ | <code Smalltalk> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | ValuemapTests>> | ||
+ | </ | ||
+ | |||
+ | |||
+ | Published as **[Squeak Fileout PDFtalk] (3.0.0.8, |