The Inbox: KernelTests-jar.396.mcz

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

The Inbox: KernelTests-jar.396.mcz

commits-2
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-jar.396.mcz

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

Name: KernelTests-jar.396
Author: jar
Time: 16 March 2021, 11:52:12.69619 pm
UUID: 35e3c78b-a504-c544-aa0c-f652405ba417
Ancestors: KernelTests-mt.394

Complementing Kernel-jar.1381.mcz

It tests that a process is terminated when it reaches the last instruction of the bottom context for methods other than Process>>#terminate; this test would fail with the previous version of isTerminated.

=============== Diff against KernelTests-mt.394 ===============

Item was added:
+ ----- Method: ProcessTest>>terminated (in category 'support') -----
+ terminated
+ "supports testProcessStateTests2"
+
+ ^self suspend.
+ !

Item was added:
+ ----- Method: ProcessTest>>testProcessStateTests2 (in category 'tests') -----
+ testProcessStateTests2
+ "I test that a process is terminated when it reaches the last instruction
+ of the bottom context for methods other than Process>>#terminate;
+ this test would fail with the version of isTerminated before 3/11/2021."
+
+ | bottomContext newProcess |
+
+ newProcess := Process new.
+ bottomContext := Context
+ sender: nil
+ receiver: newProcess
+ method: (ProcessTest>>#terminated)
+ arguments: {}.
+ newProcess suspendedContext: ([] asContextWithSender: bottomContext).
+ newProcess priority: Processor activePriority.
+
+ self deny: newProcess isTerminated.
+ newProcess terminate.
+ self assert: newProcess isTerminated.
+ !