author | Patrik Svestka <patrik.svestka@gmail.com> |
Wed, 14 Nov 2018 13:11:58 +0100 | |
branch | jv |
changeset 724 | 4dae63fce9f9 |
parent 664 | e31b2e7b658d |
permissions | -rw-r--r-- |
724
4dae63fce9f9
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
Patrik Svestka <patrik.svestka@gmail.com>
parents:
664
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
4dae63fce9f9
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
Patrik Svestka <patrik.svestka@gmail.com>
parents:
664
diff
changeset
|
2 |
|
105 | 3 |
"{ Package: 'stx:goodies/sunit' }" |
4 |
||
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
5 |
"{ NameSpace: Smalltalk }" |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
6 |
|
105 | 7 |
TestFailure subclass:#ResumableTestFailure |
8 |
instanceVariableNames:'' |
|
9 |
classVariableNames:'' |
|
10 |
poolDictionaries:'' |
|
11 |
category:'SUnit-Preload' |
|
12 |
! |
|
13 |
||
222 | 14 |
!ResumableTestFailure class methodsFor:'documentation'! |
15 |
||
16 |
documentation |
|
17 |
" |
|
18 |
Sometimes it is useful to see when debugging (and/or to log when running) the results from several assertions in a test. Example: |
|
19 |
||
20 |
#(‘same’ ‘*’ ‘*.txt’ ‘a*c’) with: #(‘same’ ‘any’ ‘some.txt’ ‘abc’) do: |
|
21 |
[:eachMeta :eachString | |
|
22 |
self assert: (eachMeta match: eachString) |
|
23 |
description: (‘<1s> does not match <2s>’ expandMacrosWith: eachMeta with: eachString) |
|
24 |
resumable: true]. |
|
25 |
||
26 |
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.' |
|
27 |
||
28 |
||
29 |
" |
|
30 |
! ! |
|
105 | 31 |
|
32 |
!ResumableTestFailure methodsFor:'Camp Smalltalk'! |
|
33 |
||
222 | 34 |
handleFailureWith:something |
105 | 35 |
"resumable test failure. Continue with the test suite" |
36 |
||
37 |
^ self resumeWith:something |
|
38 |
! |
|
39 |
||
40 |
mayProceed |
|
41 |
||
42 |
^ true |
|
43 |
! |
|
44 |
||
222 | 45 |
sunitExitWith: aValue |
46 |
||
47 |
^self resume: aValue |
|
105 | 48 |
! ! |
49 |
||
50 |
!ResumableTestFailure class methodsFor:'documentation'! |
|
51 |
||
52 |
version |
|
222 | 53 |
^ '$Header: /cvs/stx/stx/goodies/sunit/ResumableTestFailure.st,v 1.2 2011-06-29 19:15:49 cg Exp $' |
54 |
! |
|
55 |
||
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
56 |
version_HG |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
57 |
|
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
58 |
^ '$Changeset: <not expanded> $' |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
59 |
! |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
60 |
|
222 | 61 |
version_SVN |
724
4dae63fce9f9
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
Patrik Svestka <patrik.svestka@gmail.com>
parents:
664
diff
changeset
|
62 |
^ '�Id: ResumableTestFailure.st 204 2010-09-11 15:21:51Z vranyj1 �' |
105 | 63 |
! ! |
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
64 |