[squeak-dev] The Inbox: KernelTests-tonyg.382.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 4 17:51:01 UTC 2020


A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-tonyg.382.mcz

==================== Summary ====================

Name: KernelTests-tonyg.382
Author: tonyg
Time: 4 June 2020, 7:51:00.716353 pm
UUID: 8b08a8d8-6d8e-4836-b06a-4743168a3c5f
Ancestors: KernelTests-tonyg.381

More Promise tests for Promise/A+ behaviour.

=============== Diff against KernelTests-tonyg.381 ===============

Item was added:
+ ----- Method: PromiseTest>>testNilErrBlockPropagation (in category 'tests - monad') -----
+ testNilErrBlockPropagation
+ 	"https://promisesaplus.com section 2.2.7.4"
+ 	| p q |
+ 	p := Promise new.
+ 	q := p then: [:v | self error: 'Shouldn''t call resolvedBlock'] ifRejected: nil.
+ 	p rejectWith: 1.
+ 	self assert: p isRejected.
+ 	self assert: q isRejected.
+ 	self assert: p error equals: 1.
+ 	self assert: q error equals: 1.!

Item was added:
+ ----- Method: PromiseTest>>testNilResolvedBlockPropagation (in category 'tests - monad') -----
+ testNilResolvedBlockPropagation
+ 	"https://promisesaplus.com section 2.2.7.3"
+ 	| p q |
+ 	p := Promise new.
+ 	q := p then: nil ifRejected: [:e | self error: 'Shouldn''t call errBlock'].
+ 	p resolveWith: 1.
+ 	self assert: p isResolved.
+ 	self assert: q isResolved.
+ 	self assert: p value equals: 1.
+ 	self assert: q value equals: 1.!



More information about the Squeak-dev mailing list