author | Jan Vrany <jan.vrany@labware.com> |
Tue, 21 May 2024 14:45:43 +0100 | |
branch | jv |
changeset 784 | 10e743d12eb3 |
parent 724 | 4dae63fce9f9 |
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 |
|
46 | 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 |
|
46 | 7 |
TestResource subclass:#ExampleTestResource |
8 |
instanceVariableNames:'runningState' |
|
9 |
classVariableNames:'' |
|
10 |
poolDictionaries:'' |
|
11 |
category:'SUnit-Tests' |
|
12 |
! |
|
13 |
||
14 |
||
68 | 15 |
!ExampleTestResource class methodsFor:'testing'! |
46 | 16 |
|
17 |
isAvailable |
|
18 |
||
19 |
^super isAvailable and: [self current isStarted] |
|
20 |
! ! |
|
21 |
||
68 | 22 |
!ExampleTestResource methodsFor:'accessing'! |
46 | 23 |
|
24 |
runningState |
|
25 |
||
26 |
^runningState |
|
27 |
! |
|
28 |
||
29 |
runningState: aSymbol |
|
30 |
||
31 |
runningState := aSymbol |
|
32 |
! ! |
|
33 |
||
68 | 34 |
!ExampleTestResource methodsFor:'constants'! |
46 | 35 |
|
36 |
startedStateSymbol |
|
37 |
||
38 |
^#started |
|
39 |
! |
|
40 |
||
41 |
stoppedStateSymbol |
|
42 |
||
43 |
^#stopped |
|
44 |
! ! |
|
45 |
||
68 | 46 |
!ExampleTestResource methodsFor:'running'! |
46 | 47 |
|
48 |
setUp |
|
222 | 49 |
|
46 | 50 |
self runningState: self startedStateSymbol |
51 |
! |
|
52 |
||
53 |
tearDown |
|
54 |
||
55 |
self runningState: self stoppedStateSymbol |
|
56 |
! ! |
|
57 |
||
68 | 58 |
!ExampleTestResource methodsFor:'testing'! |
46 | 59 |
|
60 |
isAvailable |
|
222 | 61 |
|
46 | 62 |
^self runningState == self startedStateSymbol |
63 |
! |
|
64 |
||
65 |
isStarted |
|
222 | 66 |
|
46 | 67 |
^self runningState == self startedStateSymbol |
68 |
! |
|
69 |
||
70 |
isStopped |
|
222 | 71 |
|
46 | 72 |
^self runningState == self stoppedStateSymbol |
73 |
! ! |
|
74 |
||
75 |
!ExampleTestResource class methodsFor:'documentation'! |
|
76 |
||
77 |
version |
|
222 | 78 |
^ '$Header: /cvs/stx/stx/goodies/sunit/ExampleTestResource.st,v 1.3 2011-06-29 19:15:49 cg Exp $' |
79 |
! |
|
80 |
||
81 |
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
|
82 |
^ '§Id: ExampleTestResource.st 182 2009-12-05 18:12:17Z vranyj1 §' |
46 | 83 |
! ! |
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
84 |