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