[Pkg] The Trunk: Tests-mtf.103.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Dec 18 19:17:21 UTC 2010

Matthew Fulmer uploaded a new version of Tests to project The Trunk:

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

Name: Tests-mtf.103
Author: mtf
Time: 16 December 2010, 11:45:46.289 am
UUID: 898bec63-6357-2547-add6-63832f2ef9c3
Ancestors: Tests-ul.102

Wrote tests to assert that a right mouse click generates a yellow button event on all platforms. there are 3 parts to this change:

Fixed a bug in testWinVM3ButtonMousePreference; it was looking for a file named vmPath\.ini rather than vmPath\squeak.ini. Requires System-mtf.402 (in trunk)

Changed testWinVM3ButtonMousePreference to always require 3ButtonMouse to be enabled in the Win32 VM, so that the Win32 VM sends right clicks as blue button events, like the other VMs do

Added testSwapMouseButtonsPreference to assert that right clicks generate yellow button events rather than the default blue button event

=============== Diff against Tests-ul.102 ===============

Item was added:
+ ----- Method: ReleaseTest>>testSwapMouseButtonsPreference (in category 'testing') -----
+ testSwapMouseButtonsPreference
+ 	"Swap mouse buttons should be enabled"
+ 	self assert: Preferences swapMouseButtons!

Item was changed:
  ----- Method: Win32VMTest>>testWinVM3ButtonMousePreference (in category 'tests') -----
+ 	"Ensure that 3ButtonMouse preference is enabled, so that the Win32 VM sends mouse clicks the same way other VMs do"
- 	"Ensure that swapMouseButtons agrees with 3ButtonMouse preference"
  	| iniData iniPref exePath |
  	Smalltalk platformName = 'Win32' ifFalse:[^self].
+ 	exePath := Smalltalk vmFileName.
- 	exePath := Smalltalk vmPath.
  	iniData := [
  		(FileStream readOnlyFileNamed: (exePath copyUpToLast: $.), '.ini')
  	] on: Error do:[:ex| ex return: ''].
  	iniPref := false. "default is OFF"
  	iniData linesDo:[:line|
  		(line beginsWith: '3ButtonMouse') ifTrue:[
  			iniPref := (line copyAfter: $=) withBlanksTrimmed ~= '0'.
+ 	self assert: iniPref = true.
- 	self assert: iniPref = Preferences swapMouseButtons.

More information about the Packages mailing list