The Trunk: SUnitGUI-mt.64.mcz

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

The Trunk: SUnitGUI-mt.64.mcz

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

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

Name: SUnitGUI-mt.64
Author: mt
Time: 16 August 2016, 1:39:42.360602 pm
UUID: 08349d2a-bbbc-fd46-9741-19647ea05127
Ancestors: SUnitGUI-mt.63

Fixes test result colors in TestRunner.

=============== Diff against SUnitGUI-mt.63 ===============

Item was added:
+ ----- Method: TestRunner class>>themeProperties (in category 'preferences') -----
+ themeProperties
+
+ ^ super themeProperties, {
+ { #failureColor. 'Colors'. 'Color to indicate failed tests.'}.
+ { #errorColor. 'Colors'. 'Color to indicate errored tests.'}.
+ { #passColor. 'Colors'. 'Color to indicate passed tests.'}.
+
+ { #failureTextColor. 'Colors'. 'Color to indicate failed tests.'}.
+ { #errorTextColor. 'Colors'. 'Color to indicate errored tests.'}.
+ { #passTextColor. 'Colors'. 'Color to indicate passed tests.'}.
+
+ }!

Item was added:
+ ----- Method: TestRunner>>applyUserInterfaceTheme (in category 'updating') -----
+ applyUserInterfaceTheme
+
+ super applyUserInterfaceTheme.
+
+ self changed: #statusColor.
+ self changed: #statusTextColor.!

Item was changed:
  ----- Method: TestRunner>>buildStatusWith: (in category 'building') -----
  buildStatusWith: aBuilder
  ^ aBuilder pluggableTextSpec new
  model: self;
  menu: #statusMenu:;
  color: #statusColor;
+ textColor: #statusTextColor;
  getText: #statusText;
  yourself.!

Item was changed:
  ----- Method: TestRunner>>statusColor (in category 'accessing-testing') -----
  statusColor
+ result hasErrors ifTrue: [^ self userInterfaceTheme errorColor ifNil: [Color red]].
+ result hasFailures ifTrue: [^ self userInterfaceTheme failureColor ifNil: [Color yellow]].
+ ^ self userInterfaceTheme passColor ifNil: [Color green]!
- result hasErrors
- ifTrue: [ ^ Color red ].
- result hasFailures
- ifTrue:[ ^ Color yellow ].
- ^ Color green!

Item was added:
+ ----- Method: TestRunner>>statusTextColor (in category 'accessing-testing') -----
+ statusTextColor
+ result hasErrors ifTrue: [^ self userInterfaceTheme errorTextColor ifNil: [Color black]].
+ result hasFailures ifTrue: [^ self userInterfaceTheme failureTextColor ifNil: [Color black]].
+ ^ self userInterfaceTheme passTextColor ifNil: [Color black]!

Item was changed:
  ----- Method: TestRunner>>updateStatus: (in category 'updating') -----
  updateStatus: aBoolean
  "Update the status display, at most once a second if aBoolean is true."
 
  (aBoolean and: [ lastUpdate = Time totalSeconds ])
  ifTrue: [ ^ self ].
+ self changed: #statusText; changed: #statusColor; changed: #statusTextColor.
- self changed: #statusText; changed: #statusColor.
  lastUpdate := Time totalSeconds.!