The Trunk: MorphicTests-dtl.44.mcz

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

The Trunk: MorphicTests-dtl.44.mcz

commits-2
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.
  !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: MorphicTests-dtl.44.mcz

marcel.taeumel
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 [hidden email] <[hidden email]>:

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.
!