author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 26 Nov 2017 20:40:34 +0000 | |
branch | jv |
changeset 696 | 268bf2c60556 |
parent 664 | e31b2e7b658d |
permissions | -rw-r--r-- |
439 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
449
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
449
diff
changeset
|
4 |
|
439 | 5 |
TestCase subclass:#SUnitTests2 |
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SUnit-Smalltalk/X-Tests' |
|
10 |
! |
|
11 |
||
12 |
TestCase subclass:#TestCaseWithErrorInTearDown |
|
13 |
instanceVariableNames:'' |
|
14 |
classVariableNames:'' |
|
15 |
poolDictionaries:'' |
|
16 |
privateIn:SUnitTests2 |
|
17 |
! |
|
18 |
||
19 |
!SUnitTests2 class methodsFor:'documentation'! |
|
20 |
||
21 |
documentation |
|
22 |
" |
|
23 |
More tests for SUnit. Uses St/X private classes. |
|
24 |
||
25 |
[author:] |
|
26 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
27 |
||
28 |
[instance variables:] |
|
29 |
||
30 |
[class variables:] |
|
31 |
||
32 |
[see also:] |
|
33 |
||
34 |
" |
|
35 |
! ! |
|
36 |
||
37 |
!SUnitTests2 methodsFor:'tests'! |
|
38 |
||
39 |
testErrorInTearDown |
|
40 |
||
41 |
| result | |
|
42 |
||
43 |
result := TestCaseWithErrorInTearDown buildSuite run. |
|
44 |
self assert: result errors size == 2. |
|
45 |
||
46 |
"Created: / 16-01-2012 / 20:07:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
47 |
! ! |
|
48 |
||
49 |
!SUnitTests2::TestCaseWithErrorInTearDown class methodsFor:'testing'! |
|
50 |
||
51 |
isAbstract |
|
52 |
||
53 |
"HACK: To prevent it being run by normal tools..." |
|
54 |
||
449 | 55 |
^(thisContext sender selector == #buildSuite) not. |
439 | 56 |
|
57 |
"Created: / 16-01-2012 / 20:41:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
58 |
! ! |
|
59 |
||
60 |
!SUnitTests2::TestCaseWithErrorInTearDown methodsFor:'running'! |
|
61 |
||
62 |
tearDown |
|
63 |
||
64 |
10 perform: ' zork ' |
|
65 |
||
66 |
"Created: / 16-01-2012 / 19:55:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
67 |
! ! |
|
68 |
||
69 |
!SUnitTests2::TestCaseWithErrorInTearDown methodsFor:'tests'! |
|
70 |
||
71 |
testFail |
|
72 |
||
73 |
self assert: false |
|
74 |
||
75 |
"Created: / 16-01-2012 / 19:54:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
76 |
! |
|
77 |
||
78 |
testPass |
|
79 |
||
80 |
self assert: true |
|
81 |
||
82 |
"Created: / 16-01-2012 / 19:54:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
83 |
! ! |
|
84 |
||
85 |
!SUnitTests2 class methodsFor:'documentation'! |
|
86 |
||
87 |
version |
|
449 | 88 |
^ '$Header: /cvs/stx/stx/goodies/sunit/SUnitTests2.st,v 1.2 2012-08-02 20:56:07 vrany Exp $' |
439 | 89 |
! |
90 |
||
91 |
version_CVS |
|
449 | 92 |
^ '$Header: /cvs/stx/stx/goodies/sunit/SUnitTests2.st,v 1.2 2012-08-02 20:56:07 vrany Exp $' |
439 | 93 |
! ! |
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
449
diff
changeset
|
94 |