Skip to content

Commit

Permalink
A simple test that store a catched continuation.
Browse files Browse the repository at this point in the history
  • Loading branch information
massimo-nocentini committed Jan 15, 2020
1 parent 763a178 commit c69e9f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Kernel-Tests/ContinuationTest.class.st
Expand Up @@ -98,6 +98,18 @@ ContinuationTest >> testSimpleCallCC [
self assert: x
]

{ #category : #'as yet unclassified' }
ContinuationTest >> testSimpleStoreCallCC [
| x continuation |
continuation := self callcc: #yourself.
x := false.
continuation = true
ifTrue: [ x := true ]
ifFalse: [ continuation value: true.
self error: 'This message shouldn''t be sent, ever.' ].
self assert: x
]

{ #category : #tests }
ContinuationTest >> testSimplestCallCC [
| x |
Expand Down

0 comments on commit c69e9f3

Please sign in to comment.