added: #shouldSkip
authorvrany
Wed, 28 Nov 2012 19:08:59 +0100
changeset 529 6bcbe6998b73
parent 528 d8d38bbb8fe9
child 530 f52ca9c87552
added: #shouldSkip
TestCase.st
--- a/TestCase.st	Tue Nov 27 12:08:30 2012 +0100
+++ b/TestCase.st	Wed Nov 28 19:08:59 2012 +0100
@@ -432,6 +432,22 @@
     "Created: / 13-06-2011 / 16:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+shouldSkip
+    "Returns true, if this testcase should be skipped when a testsuite is run.
+     This inly a hint, a test runner is not obliged to respect return value.
+
+     Currently, the only user is stx/goodies/builder/reports"
+
+    | method |
+    method := self class lookupMethodFor: testSelector.
+    method annotationsAt:#ignore orAt: #skip do:[:annotation|
+         ^true
+    ].
+    ^false
+
+    "Created: / 28-11-2012 / 18:03:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 testCount
 
     ^1
@@ -866,11 +882,11 @@
 !TestCase class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.90 2012-11-08 00:04:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.91 2012-11-28 18:08:59 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.90 2012-11-08 00:04:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.91 2012-11-28 18:08:59 vrany Exp $'
 !
 
 version_SVN