Skip to content

Commit

Permalink
scripts/visualgst: Create Gtk SUnit based on a TestResult
Browse files Browse the repository at this point in the history
2014-02-04  Gwenael Casaccio <gwenael.casaccio@gmail.com>

	* scripts/Test.st: Show test result in GtkSUnit.

2014-02-04  Gwenael Casaccio  <gwenael.casaccio@gmail.com>

	* SUnit/GtkSUnit.st: Add GtkSUnit class>>#results:.
  • Loading branch information
Gwenael Casaccio authored and zecke committed Feb 5, 2014
1 parent 455d5c4 commit 76a6aeb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2014-02-04 Gwenael Casaccio <gwenael.casaccio@gmail.com>

* scripts/Test.st: Show test result in GtkSUnit.

2014-01-24 Holger Hans Peter Freyther <holger@freyther.de>

* scripts/Test.st: Add -d/--debug option parsing.
Expand Down
4 changes: 4 additions & 0 deletions packages/visualgst/ChangeLog
@@ -1,3 +1,7 @@
2014-02-04 Gwenael Casaccio <gwenael.casaccio@gmail.com>

* SUnit/GtkSUnit.st: Add GtkSUnit class>>#results:.

2014-02-03 Gwenael Casaccio <gwenael.casaccio@gmail.com>

* Extensions.st: Add AbstractNamespace>>hasTestCase, AbstractNamespace>>allSubspaces.
Expand Down
20 changes: 17 additions & 3 deletions packages/visualgst/SUnit/GtkSUnit.st
Expand Up @@ -36,6 +36,22 @@
GtkBrowsingTool subclass: GtkSUnit [
| namespaceWidget classWidget methodWidget sourceCodeWidget successfullWidget failedWidget errorWidget namespace class state |

GtkSUnit class >> results: results [
<category: 'instance creation'>

^ self open
results: results;
yourself
]

results: results [
<category: 'results ui'>

successfullWidget results: results passed.
failedWidget results: results failures.
errorWidget results: results errors.
]

accelPath [
<category: 'accelerator path'>

Expand Down Expand Up @@ -312,9 +328,7 @@ GtkBrowsingTool subclass: GtkSUnit [
suite logPolicy: TestBacktraceLog new.
results := suite run.

successfullWidget results: results passed.
failedWidget results: results failures.
errorWidget results: results errors.
self results: results.

results failures do: [ :each | each "logPolicy logStatus inspect" printNl ].
]
Expand Down
3 changes: 1 addition & 2 deletions scripts/Test.st
Expand Up @@ -174,7 +174,6 @@ result runCount = result passedCount ifFalse: [
debug ifTrue: [
Transcript nextPutAll: 'Tests failed. Loading graphical environment.'; nl.
SUnitUnhandledDebugger loadVisualGST.
result gtkInspect.
script gtkInspect.
Smalltalk VisualGST GtkSUnit results: result.
SUnitUnhandledDebugger keepRunning].
ObjectMemory quit: 1 ]!

0 comments on commit 76a6aeb

Please sign in to comment.