The Trunk: KernelTests-eem.303.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: KernelTests-eem.303.mcz

commits-2
Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.303.mcz

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

Name: KernelTests-eem.303
Author: eem
Time: 18 February 2016, 1:35:19.172705 pm
UUID: b78a89cf-abb7-4432-95d9-106423fac62a
Ancestors: KernelTests-cmm.302

Add tests for isSuspended.

=============== Diff against KernelTests-cmm.302 ===============

Item was added:
+ ----- Method: ProcessTest>>testIsSuepended (in category 'tests') -----
+ testIsSuepended
+ | semaphore |
+ self deny: Processor activeProcess isSuspended.
+ semaphore := Semaphore new.
+ "This process is runnable but hasn't got to the wait yet becasue the active process is running."
+ self deny: ([semaphore wait] forkAt: Processor activePriority) isSuspended.
+ self deny: ([semaphore wait] forkAt: Processor activePriority) suspendingList == semaphore.
+ "This one does get to run because, being higher priority it preempts the active process until it waits on the semaphore.".
+ self assert: ([semaphore wait] forkAt: Processor activePriority + 1) isSuspended.
+ self assert: ([semaphore wait] forkAt: Processor activePriority + 1) suspendingList == semaphore!