[squeak-dev] The Trunk: MorphicTests-dtl.44.mcz
Marcel Taeumel
marcel.taeumel at hpi.de
Sat Nov 18 07:19:41 UTC 2017
Maybe we can draw inspiration from MorphicEventTests and set up a custom world and world state to write those tests w/o reyling on global system state.
Btw.: WorldState is a global, too? :-O
Best,
Marcel
Am 18.11.2017 04:01:00 schrieb commits at source.squeak.org <commits at source.squeak.org>:
David T. Lewis uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-dtl.44.mcz
==================== Summary ====================
Name: MorphicTests-dtl.44
Author: dtl
Time: 17 November 2017, 10:00:40.18563 pm
UUID: 74a707eb-bd44-445f-9737-a977ef236a35
Ancestors: MorphicTests-dtl.43
Remove unnecessary reference to global World.
=============== Diff against MorphicTests-dtl.43 ===============
Item was changed:
----- Method: WorldStateTest>>testDeferredUIQueueTimeout (in category 'tests') -----
testDeferredUIQueueTimeout
"Ensure that the World's deferredUIMessage will take no more time than
specified by WorldState's deferredExecutionTimeLimit"
| firstWasRun secondWasRun thirdWasRun |
firstWasRun := secondWasRun := thirdWasRun := false.
WorldState addDeferredUIMessage:[
firstWasRun := true.
(Delay forMilliseconds: WorldState deferredExecutionTimeLimit + 50) wait.
].
WorldState addDeferredUIMessage:[
secondWasRun := true.
].
WorldState addDeferredUIMessage:[
thirdWasRun := true.
].
self deny: firstWasRun.
self deny: secondWasRun.
self deny: thirdWasRun.
+ Project current world doOneCycleNow.
- World doOneCycleNow.
self assert: firstWasRun.
self deny: secondWasRun.
self deny: thirdWasRun.
+ Project current world doOneCycleNow.
- World doOneCycleNow.
self assert: firstWasRun.
self assert: secondWasRun.
self assert: thirdWasRun.
!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171118/e1fc0555/attachment.html>
More information about the Squeak-dev
mailing list
|