[Pkg] The Trunk: KernelTests-eem.301.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jan 7 22:25:13 UTC 2016
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.301.mcz
==================== Summary ====================
Name: KernelTests-eem.301
Author: eem
Time: 7 January 2016, 2:24:59.710673 pm
UUID: ab71f651-ae4e-456b-b61c-109261640eb2
Ancestors: KernelTests-eem.300
Test soem more Monitor facilities
=============== Diff against KernelTests-eem.300 ===============
Item was added:
+ ----- Method: MonitorTest>>testCheckOwnerProcess (in category 'examples') -----
+ testCheckOwnerProcess
+ self should: [Monitor new checkOwnerProcess]
+ raise: Error.
+
+ self shouldnt: [| m | m := Monitor new. m critical: [m checkOwnerProcess]]
+ raise: Error.
+
+ self should: [| s m |
+ m := Monitor new.
+ [m critical: [s := #in. Semaphore new wait]] fork.
+ Processor yield.
+ self assert: #in equals: s.
+ m checkOwnerProcess]
+ raise: Error!
Item was added:
+ ----- Method: MonitorTest>>testCriticalIfLocked (in category 'examples') -----
+ testCriticalIfLocked
+ | m s |
+ m := Monitor new.
+ self assert: #unlocked == (m critical: [#unlocked] ifLocked: [#locked]).
+ [m critical: [s := #in. Semaphore new wait]] fork.
+ Processor yield.
+ self assert: #in equals: s.
+ self assert: #locked equals: (m critical: [#unlocked] ifLocked: [#locked])!
More information about the Packages
mailing list