#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 13:35:30 +0100
changeset 739 8af22adf78e4
parent 738 19f75695aa0f
child 740 7f2cc93c7a75
#FEATURE by cg class: TestResult added: #overallOutcome
TestResult.st
--- a/TestResult.st	Thu Mar 28 12:17:57 2019 +0100
+++ b/TestResult.st	Thu Mar 28 13:35:30 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:goodies/sunit' }"
 
 "{ NameSpace: Smalltalk }"
@@ -260,6 +262,19 @@
     "Created: / 20-08-2011 / 14:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+overallOutcome
+    "returns a verdict as symbol;
+     one of error, fail, pass, skip or notRun"
+     
+    self hasErrors ifTrue:[^ #error].
+    self hasFailures ifTrue:[^ #fail].
+    self hasPassed ifTrue:[^ #pass].
+    self hasSkipped ifTrue:[^ #skip].
+    ^ #notRun
+
+    "Created: / 28-03-2019 / 13:35:19 / Claus Gittinger"
+!
+
 passed
         passed isNil ifTrue: [
             "/ cg: exposed and added to (see TestRunnerEmbedded>>debug)