The Trunk: Tests-mt.441.mcz

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

The Trunk: Tests-mt.441.mcz

commits-2
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.441.mcz

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

Name: Tests-mt.441
Author: mt
Time: 11 October 2020, 1:46:15.182652 pm
UUID: a7f0172b-8d24-0142-9577-e6a8eab4fc38
Ancestors: Tests-eem.440

Refactoring 'Active' variables -- Step 2 of 2. Removes all uses of Active(World|Hand|Event) by replacing those with "self current(World|Hand|Event)" or "Project current world" when required to not add/cement Morphic dependency.

See http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-td5121690.html

=============== Diff against Tests-eem.440 ===============

Item was changed:
  ----- Method: HandBugs>>testTargetPoint (in category 'tests') -----
  testTargetPoint
  "self new testTargetPoint"
  "self run: #testTargetPoint"
 
  "This should not throw an exception."
+ self currentHand targetPoint
- ActiveHand targetPoint
 
  !

Item was changed:
  ----- Method: LocaleTest>>setUp (in category 'running') -----
  setUp
 
  previousID := Locale current localeID.
+ previousKeyboardInterpreter := self currentHand instVarNamed: 'keyboardInterpreter'.
- previousKeyboardInterpreter := ActiveHand instVarNamed: 'keyboardInterpreter'.
  previousClipboardInterpreter := Clipboard default instVarNamed: 'interpreter'.
+ self currentHand clearKeyboardInterpreter.
+ Clipboard default clearInterpreter.!
- ActiveHand clearKeyboardInterpreter.
- Clipboard default clearInterpreter.
- !

Item was changed:
  ----- Method: LocaleTest>>tearDown (in category 'running') -----
  tearDown
 
+ self currentHand instVarNamed: 'keyboardInterpreter' put: previousKeyboardInterpreter.
- ActiveHand instVarNamed: 'keyboardInterpreter' put: previousKeyboardInterpreter.
  Clipboard default instVarNamed: 'interpreter' put: previousClipboardInterpreter.
  Locale switchToID: (LocaleID isoLanguage: previousID).!

Item was changed:
  ----- Method: LocaleTest>>testLocaleChanged (in category 'tests') -----
  testLocaleChanged
  "self debug: #testLocaleChanged"
  "LanguageEnvironment >> startUp is called from Prject >> localeChanged"
  <timeout: 60> "takes quite a while"
  Project current updateLocaleDependents.
+ self assert: (self currentHand instVarNamed: 'keyboardInterpreter') isNil description: 'non-nil keyboardInterpreter'.
- self assert: (ActiveHand instVarNamed: 'keyboardInterpreter') isNil description: 'non-nil keyboardInterpreter'.
  self assert: (Clipboard default instVarNamed: 'interpreter') isNil description: 'non-nil interpreter'.
  Locale switchToID: (LocaleID isoLanguage: 'ja').
  self assert: 'ja' equals: Locale current localeID isoLanguage.
  Locale switchToID: (LocaleID isoLanguage: 'en').
  self assert: 'en' equals: Locale current localeID isoLanguage.!