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:49] christian [FileIn 6 - Tests] |
valuesportinglog [2022/02/01 13:29] christian [FileIn 7 - Tests] |
||
---|---|---|---|
Line 182: | Line 182: | ||
Loads without errors or warnings!. | Loads without errors or warnings!. | ||
- | First milestome achieved: fileIn without errors. | + | < |
+ | First milestone: <span style=" | ||
+ | </ | ||
Next step: fileIn the tests. | Next step: fileIn the tests. | ||
Line 188: | Line 190: | ||
===== FileIn 6 - Tests ===== | ===== FileIn 6 - Tests ===== | ||
- | Added Squeak class methods | + | Added Squeak class method '' |
+ | |||
+ | <code Smalltalk> | ||
+ | self | ||
+ | write: (' | ||
+ | pundles: (Array with: (Store.Registry packageNamed: | ||
+ | package: #' | ||
+ | prerequisites: | ||
+ | packageChanges: | ||
+ | </ | ||
+ | |||
+ | with the standard | ||
<code Smalltalk> | <code Smalltalk> | ||
Line 198: | Line 211: | ||
FileOut from VW with: | FileOut from VW with: | ||
+ | |||
<code Smalltalk> | <code Smalltalk> | ||
- | , then fileIn into a Squeak image with Values loaded. | + | |
+ | then fileIn into a Squeak image with Values loaded. | ||
Loads without errors. | Loads without errors. | ||
Line 215: | Line 230: | ||
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, |