tests/PPContextTest.st
changeset 421 7e08b31e0dae
parent 381 0bbbcf5da2d4
child 427 a7f5e6de19d2
--- a/tests/PPContextTest.st	Wed Nov 19 10:52:37 2014 +0000
+++ b/tests/PPContextTest.st	Mon Nov 24 00:09:23 2014 +0000
@@ -72,6 +72,23 @@
 	self assert: context position = 0.
 !
 
+testMemoization3
+	| stream memento memento2 collection |
+	stream := 'abc' asPetitStream.
+	context := context stream: stream.
+	collection := OrderedCollection new.
+
+	memento := context remember.
+	context propertyAt: #foo put: collection.
+	memento2 := context remember.
+	
+	context restore: memento.
+	self assert: (context hasProperty: #foo) not.
+	
+	context restore: memento2.
+	self assert: (context hasProperty: #foo).
+!
+
 testPutGlobals
 	self assert: (context hasGlobal: #foo) not.
 	self assert: (context hasGlobal: #bar) not.