ResumableTestFailure.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 14 Nov 2018 13:11:58 +0100
branchjv
changeset 724 4dae63fce9f9
parent 664 e31b2e7b658d
permissions -rw-r--r--
vIssue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present - All source *.st files are now Unicode UTF8 without BOM Files are in two groups (fileOut works this way in Smalltalk/X): - containing a unicode character have "{ Encoding: utf8 }" at the header - ASCII only are without the header

"{ Encoding: utf8 }"

"{ Package: 'stx:goodies/sunit' }"

"{ NameSpace: Smalltalk }"

TestFailure subclass:#ResumableTestFailure
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SUnit-Preload'
!

!ResumableTestFailure class methodsFor:'documentation'!

documentation
"
   Sometimes it is useful to see when debugging (and/or to log when running) the results from several assertions in a test.  Example:

	#(‘same’ ‘*’ ‘*.txt’ ‘a*c’) with: #(‘same’ ‘any’ ‘some.txt’ ‘abc’) do:
		[:eachMeta :eachString |
		self assert: (eachMeta match: eachString)
			description: (‘<1s> does not match <2s>’ expandMacrosWith: eachMeta with: eachString)
			resumable: true].

Raising a ResumableTestFailure means that all the assertions will be run (if the test case is logging, this will print out a message to the log for each one that fails).  When debugging, the user can hit ''proceed'' to continue the test and see which other expressions do not match.'


"
! !

!ResumableTestFailure methodsFor:'Camp Smalltalk'!

handleFailureWith:something
    "resumable test failure. Continue with the test suite"

    ^ self resumeWith:something
!

mayProceed

    ^ true
!

sunitExitWith: aValue

	^self resume: aValue
! !

!ResumableTestFailure class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/sunit/ResumableTestFailure.st,v 1.2 2011-06-29 19:15:49 cg Exp $'
!

version_HG

    ^ '$Changeset: <not expanded> $'
!

version_SVN
    ^ '�Id: ResumableTestFailure.st 204 2010-09-11 15:21:51Z vranyj1 �'
! !