equal
deleted
inserted
replaced
70 |
70 |
71 context restore: memento. |
71 context restore: memento. |
72 self assert: context position = 0. |
72 self assert: context position = 0. |
73 ! |
73 ! |
74 |
74 |
|
75 testMemoization3 |
|
76 | stream memento memento2 collection | |
|
77 stream := 'abc' asPetitStream. |
|
78 context := context stream: stream. |
|
79 collection := OrderedCollection new. |
|
80 |
|
81 memento := context remember. |
|
82 context propertyAt: #foo put: collection. |
|
83 memento2 := context remember. |
|
84 |
|
85 context restore: memento. |
|
86 self assert: (context hasProperty: #foo) not. |
|
87 |
|
88 context restore: memento2. |
|
89 self assert: (context hasProperty: #foo). |
|
90 ! |
|
91 |
75 testPutGlobals |
92 testPutGlobals |
76 self assert: (context hasGlobal: #foo) not. |
93 self assert: (context hasGlobal: #foo) not. |
77 self assert: (context hasGlobal: #bar) not. |
94 self assert: (context hasGlobal: #bar) not. |
78 |
95 |
79 self should: [ context globalAt: #foo ] raise: Error. |
96 self should: [ context globalAt: #foo ] raise: Error. |